/* Global styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --hover-color: #2980b9;
    --light-gray: #f5f6fa;
    --border-color: #dcdde1;
    --primary: #3498db;
    --primary-dark: #2980b9;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --accent: #e74c3c;
    --success: #2ecc71;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-radius: 10px;
    --spacing-sm: 8px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color:#222; background:#fff; margin:0; }
.section { max-width:1200px; margin:0 auto; padding:20px; }
.text-center { text-align:center; }
.muted { color:#777; }

/* Global heading styles */
h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    text-align: left;
    text-transform: none;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Responsive h1 for mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin: 1rem 0;
    }
}

/* --- LAYOUT MAPY + SIDEBAR (ulica.php, mapa.php) --- */
.map-container { display:flex; gap:20px; margin-bottom:2em; align-items:flex-start; }
#map { flex-grow:1; height:600px; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.streets-sidebar { flex-basis:350px; flex-shrink:0; background:#f9f9f9; padding:20px; border-radius:12px; height:600px; overflow-y:auto; }
.streets-sidebar h3 { margin-top:0; margin-bottom:15px; border-bottom:2px solid #eee; padding-bottom:10px; font-size:1.05rem; }

/* --- LISTY ULIC --- */
.street-list a { display:block; padding:8px 12px; text-decoration:none; color:#333; border-radius:6px; margin-bottom:5px; transition:background-color .2s; }
.street-list a:hover { background:#e9e9e9; }
.street-list a.active { background:#007bff; color:#fff; font-weight:600; }

/* Modern Header styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-links a.active {
    background: var(--secondary-color);
    color: white;
}

/* Hamburger menu for mobile */
.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Responsive navigation */
@media (max-width: 1024px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 991px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        order: 1;
        flex: 0 0 auto;
    }
    
    .hamburger-menu {
        display: block;
        order: 2;
        flex: 0 0 auto;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 1rem 0;
        margin: 0;
        flex-direction: column;
        z-index: 1000;
        order: 3;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        display: block;
        margin: 0;
        padding: 0.5rem 1rem;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        color: #333;
    }
}

/* Map container and sidebar */
.map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    height: 600px;
}

@media (max-width: 768px) {
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }

    .poi-details {
        height: auto !important;
        max-height: none !important;
        order: -1;
    }

    #map {
        height: 400px !important;
    }
}

#map {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-details {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 152, 219, 0.3) rgba(0, 0, 0, 0.05);
}

.poi-details h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.poi-subcategories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcategory {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.subcategory:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.subcategory.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.poi-details::-webkit-scrollbar {
    width: 6px;
}

.poi-details::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.poi-details::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 3px;
}

.poi-details::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

.poi-details h3 {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Category styles - consolidated version */
.category-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap; /* Pozwala kategoriom zawijać się do kolejnych linii */
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0;
}

.category-buttons .button {
    flex: 0 0 auto;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-buttons .button:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.category-buttons .button.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* Strzałki do scrollowania nie są już potrzebne przy flex-wrap */
.scroll-arrow {
    display: none;
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

/* POI List styles */
.poi-list {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-list h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.poi-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.poi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.poi-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.poi-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.map-button, .details-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.map-button {
    background: var(--light-gray);
    color: var(--primary-color);
}

.map-button:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.show-on-map,
.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: auto;
    min-width: 140px;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.show-on-map:hover,
.details-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.show-on-map i,
.details-button i {
    font-size: 16px;
}

.detailed-content {
    display: flex;
    flex-direction: column;
}

.detailed-content h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 16px;
}

.detailed-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.detailed-content h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.detailed-content .details {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #4a4a4a;
    line-height: 1.6;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.detailed-content .details::-webkit-scrollbar {
    width: 4px;
}

.detailed-content .details::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.detailed-content .details::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 2px;
}

.detailed-content .details::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

.detailed-content .details p {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detailed-content .details strong {
    color: #2c3e50;
    font-weight: 600;
}

/* POI Details Page */
.poi-details-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    height: 500px;
}

.poi-details-container #map {
    flex: 1;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-details-container .details-panel {
    width: 300px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 152, 219, 0.3) rgba(0, 0, 0, 0.05);
}

.poi-details-container .details-panel h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.poi-details-container .details p {
    margin: 10px 0;
    line-height: 1.6;
}

.poi-details-container .details strong {
    color: var(--primary-color);
    font-weight: 600;
}

.poi-details-container .details a {
    color: #2c3e50;
    text-decoration: none;
}

.poi-details-container .details a:hover {
    color: #2c3e50;
}

/* Popup / Balloon (poi_browser, ulica popup) */
.popup-content { min-width:220px; font-size:14px; color:#222; }
.popup-content h3 { margin:0 0 6px 0; font-size:1rem; color:#0056b3; }
.popup-content .details { margin-top:6px; font-size:0.9rem; color:#555; }
.popup-content a.details-button { padding:6px 10px; font-size:13px; display:inline-block; margin-top:8px; }

/* Air Quality Styles */
.air-quality-icon {
    font-size: 3em;
}

.parameter-icon {
    font-size: 2em;
}

.weather-map {
    width: 100%;
    height: 420px;
    border-radius: 8px;
}

/* Map Popup Styles */
.map-popup-icon {
    font-size: 32px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid;
}

.map-popup-temp {
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-popup-content {
    text-align: center;
    min-width: 150px;
}

.map-popup-title {
    margin-bottom: 10px;
}

.map-popup-temp-large {
    font-size: 24px;
    margin: 10px 0;
}

.map-popup-desc {
    color: #666;
}

.map-popup-details {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

/* Inline styles from other files */
.white-space-pre {
    white-space: pre-wrap;
}

.link-no-decoration {
    color: #333;
    text-decoration: none;
}

.card-title-small {
    font-size: 0.8rem;
}

.image-small {
    height: 50px;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    #map {
        height: 300px;
    }
    
    .poi-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-overview {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loading indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    color: #000;
    padding: 15px 30px;
    border-radius: 5px;
    z-index: 1000;
}

/* Error message */
.error-message {
    background-color: #ff7675;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* Weather / Pogoda (pogoda.php) --- */
.weather-widget { display:flex; gap:14px; align-items:center; background:#f7fbff; border:1px solid #e6f0ff; padding:12px; border-radius:8px; }
.weather-widget .temp { font-size:2rem; font-weight:700; color:#1f6feb; }
.weather-forecast { display:flex; gap:8px; margin-top:10px; }

/* --- POI DETAILS (poi_details.php) --- */
.poi-header { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.poi-info { display:flex; gap:30px; flex-wrap:wrap; }
.poi-info h4 { margin:6px 0; }
.poi-info table { width:100%; border-collapse:collapse; }
.poi-info table td, .poi-info table th { padding:6px; border-bottom:1px solid #f0f0f0; }

/* --- RESPONSYWNOŚĆ --- */
@media (max-width:900px) {
  .map-container { flex-direction:column; }
  .streets-sidebar { width:100%; height:300px; }
  #map { height:450px; }
  .poi-grid { grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); }
  .events-list { grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
}

/* Index page — blok pogody (obsługuje #pogoda, .pogoda, .index-weather, .weather-card) */
#index-pogoda,
.pogoda,
.index-weather,
.weather-card {
    background: linear-gradient(180deg, rgba(52,152,219,0.06), rgba(255,255,255,0.85));
    border: 1px solid rgba(52,152,219,0.12);
    padding: 16px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 16px;
    align-items: center;
    color: var(--text-color);
    max-width: 460px;
    margin: 0.5rem 0;
}

#index-pogoda .temp,
.index-weather .temp,
.weather-card .temp {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

#index-pogoda .meta,
.index-weather .meta,
.weather-card .meta {
    font-size: 0.95rem;
    color: var(--text-muted);
}

#index-pogoda .icon,
.index-weather .icon,
.weather-card .icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: rgba(52,152,219,0.08);
    border-radius: 8px;
}

#index-pogoda .forecast,
.index-weather .forecast,
.weather-card .forecast {
    display:flex;
    gap:8px;
    margin-top:8px;
    flex-wrap:wrap;
}

#index-pogoda .forecast .day,
.index-weather .forecast .day,
.weather-card .forecast .day {
    display:flex;
    flex-direction:column;
    align-items:center;
    font-size:0.85rem;
    color:var(--text-muted);
    min-width:56px;
}

@media (max-width:600px) {
    #index-pogoda,
    .pogoda,
    .index-weather,
    .weather-card {
        flex-direction: row;
        gap:10px;
        padding:12px;
        max-width:100%;
    }
    #index-pogoda .icon,
    .index-weather .icon {
        width:56px;
        height:56px;
        font-size:28px;
    }
    #index-pogoda .temp,
    .index-weather .temp { font-size:1.6rem; }
}

/* Weather box (append this block) */
.weather-box {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    height: 510px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.06);
}

.weather-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-title h3 {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 600;
}

.weather-main-icon {
    font-size: 1.8em;
    color: #3498db;
}

.weather-temp {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-temp i {
    color: #e74c3c;
    font-size: 1.2em;
}

.temp-value {
    font-size: 1.8em;
    font-weight: 600;
    color: #2c3e50;
}

.weather-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.08);
}

.weather-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.9);
}

.weather-item i {
    color: #3498db;
    font-size: 1.4em;
    width: 30px;
    text-align: center;
}

.weather-item span {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.05em;
}

.weather-update {
    display: block;
    margin-top: 12px;
    color: #7f8c8d;
    font-size: 0.9em;
    text-align: right;
}

.weather-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-label {
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-value {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* small screens */
@media (max-width: 600px) {
    .weather-box { height: auto; padding: 16px; }
    .weather-item { padding: 12px; }
    .weather-main-icon { font-size: 1.4em; }
    .temp-value { font-size: 1.4rem; }
}

/* Hero dla najnowszego newsa (zastępuje mapę na stronie głównej) */
.hero-news {
    width: 100%;
    height: 578px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.hero-news .hero-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    color: #fff;
}

.hero-overlay .hero-title {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-overlay .hero-excerpt {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
}

/* responsiveness */
@media (max-width:900px) {
    .hero-news { height: 320px; }
    .hero-overlay { padding: 14px; }
    .hero-overlay .hero-title { font-size: 1.2rem; }
    .hero-overlay .hero-excerpt { font-size: 0.95rem; }
}

/* Weather page styles */
.weather-page .weather-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
}

.weather-page .current-weather {
    text-align: center;
    padding: 30px;
}

.weather-page .temperature {
    font-size: 3em;
    font-weight: bold;
    color: #2c3e50;
}

.weather-page .feels-like {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-top: -10px;
}

.weather-page .weather-details {
    font-size: 1.2em;
    color: #7f8c8d;
}

.weather-page canvas {
    max-width: 100%;
    height: auto !important;
}

.weather-page .forecast-day {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.weather-page .forecast-day:last-child {
    border-bottom: none;
}

.weather-page .forecast-date {
    width: 100px;
    font-weight: bold;
}

.weather-page .forecast-icon {
    width: 50px;
    text-align: center;
    font-size: 1.5em;
}

.weather-page .forecast-temp {
    flex: 1;
    text-align: right;
}

.weather-page .forecast-precip {
    width: 80px;
    text-align: right;
    color: #3498db;
}

.weather-page .max-temp {
    color: #e74c3c;
    font-weight: bold;
}

.weather-page .min-temp {
    color: #3498db;
    margin-left: 10px;
}

.weather-page .weather-icon {
    font-size: 2.5em;
    margin: 20px 0;
}

.weather-page .sunny { color: #f1c40f; }
.weather-page .partly-cloudy { color: #95a5a6; }
.weather-page .cloudy { color: #7f8c8d; }
.weather-page .rain { color: #3498db; }
.weather-page .snow { color: #bdc3c7; }
.weather-page .thunder { color: #9b59b6; }
.weather-page .fog { color: #95a5a6; }

.weather-page .sunrise-icon { color: #f39c12; }
.weather-page .sunset-icon { color: #e67e22; }
.weather-page .daylight-icon { color: #f1c40f; }
.weather-page .uv-icon { color: #e74c3c; }

@media (max-width: 768px) {
    .weather-page .weather-card { padding: 15px; margin-bottom: 15px; }
    .weather-page .temperature { font-size: 2.5em; }
    .weather-page .weather-details { font-size: 1em; }
    .weather-page .forecast-day { padding: 10px; }
    .weather-page .forecast-date { width: 80px; font-size: 0.9em; }
    .weather-page .forecast-icon { width: 40px; font-size: 1.2em; }
    .weather-page .forecast-temp { font-size: 0.9em; }
    .weather-page .forecast-precip { width: 60px; font-size: 0.9em; }
    .weather-page h1 { font-size: 1.5rem; }
    .weather-page h3 { font-size: 1.2rem; display: block; margin-bottom: 15px; }
}

/* Weather page - H3 styles - FORCE BLOCK DISPLAY */
.weather-page .weather-card h3 {
    display: block !important;
    width: 100%;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
}

.weather-page .current-weather h3 {
    text-align: center;
}

/* FIX: Zapewnia, że H3 w kartach pogody jest zawsze nad zawartością */
.weather-card {
    display: flex;
    flex-direction: column;
}

.weather-card h3 {
    width: 100%;
    text-align: center; /* Opcjonalnie, dla lepszego wyglądu */
    margin-bottom: 15px;
}

/* ============================================= */
/*           Styling dla POI Details             */
/* ============================================= */

.poi-details-page .poi-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.poi-details-page .poi-header h1 {
    margin-bottom: 0.25rem;
}

.poi-details-page .poi-category {
    font-size: 1.2rem;
    color: #6c757d; /* muted color */
    text-transform: capitalize;
}

.poi-details-page .info-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.poi-details-page .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poi-details-page .info-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.poi-details-page .info-list li:last-child {
    border-bottom: none;
}

.poi-details-page .info-list .icon {
    font-size: 1.2rem;
    color: #0d6efd; /* Bootstrap primary color */
    width: 40px;
    flex-shrink: 0;
    text-align: center;
}

.poi-details-page .info-list .info-content {
    font-size: 1rem;
}

.poi-details-page .info-list .info-content a {
    text-decoration: none;
    color: #0d6efd;
}

.poi-details-page .info-list .info-content a:hover {
    text-decoration: underline;
}

.poi-details-page #map {
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.poi-details-page .debug-section .card-header {
    cursor: pointer;
}

.poi-details-page .osm-tags-table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}

.poi-details-page .osm-tags-table th,
.poi-details-page .osm-tags-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.poi-details-page .osm-tags-table th {
    background-color: #f8f9fa;
}

.poi-details-page .osm-tags-table code {
    background-color: #e9ecef;
    padding: 2px 4px;
    border-radius: 4px;
    color: #c7254e;
}

/* Poprawki dla listy dodatkowych informacji */
.poi-details-page .info-list .info-content strong {
    display: block;
    color: #343a40;
}

/* ============================================= */
/*           Custom Leaflet Popup Styles         */
/* ============================================= */

/* Reset default Leaflet padding */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 200px;
}

/* Custom popup container */
.custom-popup {
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
}

.custom-popup-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.custom-popup-category {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
    text-transform: capitalize;
}

.custom-popup-link {
    display: block;
    margin-top: 10px;
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
}

.custom-popup-link:hover {
    text-decoration: underline;
}

/* Styling for Wikidata image in POI details */
.poi-details-page .poi-image-container {
    margin-bottom: 1.5rem;
}

.poi-details-page .poi-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================= */
/*           Styling dla kart POI                */
/* ============================================= */
.poi-categories {
    margin-top: 40px;
}
.poi-category {
    margin-bottom: 30px;
}
.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.poi-item {
    display: flex;
}
.poi-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.poi-item:hover .poi-card {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.poi-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}
.poi-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #343a40;
}
.poi-card-summary {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}
.poi-card-details-btn {
    margin-top: 12px;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
    font-size: 0.9rem;
    align-self: flex-start;
}
.poi-card-details-btn i {
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.poi-card-details-btn:hover i {
    transform: translateX(3px);
}

/* Logo: skaluj proporcjonalnie, ogranicz wysokość */
.header .logo img,
.main-nav .logo img {
  height: 56px;    /* dopasuj do nagłówka */
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

/* Mniejsze ekrany */
@media (max-width: 768px) {
  .header .logo img,
  .main-nav .logo img {
    height: 44px;
  }
}
@media (max-width: 420px) {
  .header .logo img,
  .main-nav .logo img {
    height: 36px;
  }
}

.hero-content {
  color: #fff;
  background: linear-gradient(90deg, rgba(229,62,62,0.95), rgba(210,45,45,0.95));
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(229,62,62,0.18);
  display: inline-block;
  margin: 10px;
}

.hero-news .hero-overlay { 
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.65));
}

.hero-title {
  color: #ffdede;
  font-size: 1.6rem;
  margin: 6px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  font-weight: 800;
}

.hero-excerpt {
  color: #ffecec;
  opacity: 0.95;
  margin-top: 6px;
}

/* Weather box accent */
.weather-box {
  border: 1px solid rgba(229,62,62,0.08);
  box-shadow: 0 8px 28px rgba(229,62,62,0.04);
  border-radius: 12px;
  overflow: hidden;
}
.weather-title h3 { color: #e53e3e; margin:0; font-weight:700; }

/* Event titles red */
.event-title {
  color: #e53e3e;
  font-weight: 800;
  margin-bottom: 6px;
}

/* Buttons accent for highlighted items */
.card .btn-primary, .event-button {
  background: linear-gradient(180deg,#e53e3e,#c43b3b);
  border: none;
  box-shadow: 0 6px 18px rgba(196,59,59,0.18);
}
.card .btn-primary:hover, .event-button:hover {
  background: linear-gradient(180deg,#c43b3b,#a32f2f);
}

/* Subtle badge for sticky news */
.sticky-news::before {
  content: "WYRÓŻNIONE";
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e53e3e;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight:700;
  box-shadow: 0 4px 12px rgba(229,62,62,0.14);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title { font-size: 1.25rem; }
  .hero-content { font-size: 0.8rem; padding:4px 10px; }
}

/* ============================================= */
/*     News Page - Dark Category Tabs & Button  */
/* ============================================= */

/* Category Tabs - Dark Theme */
.category-tabs {
    border-bottom: 2px solid #2c3e50;
    
    border-radius: 8px 8px 0 0;
    padding: 0;
    margin-bottom: 2rem;
}

.category-tabs .nav-link {
    color: var(--primary-color);
    font-weight: 600;
    padding: 15px 28px;
    
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    background-color: transparent;
    border:1px solid #bdc3c7;
}

.category-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.144);
    border-bottom-color: var(--primary-color);
}

.category-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.2);
}

.category-tabs .nav-link i {
    margin-right: 8px;
}

/* Load More Button - Dark Theme */
.load-more-btn {
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    border: 2px solid #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.3);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(44, 62, 80, 0.5);
    color: #ffffff;
    border-color: #34495e;
}

.load-more-btn:active {
    transform: scale(0.98);
}

.load-more-btn i {
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.load-more-btn:hover i {
    transform: translateY(3px);
}

#loading-spinner {
    border-color: #2c3e50;
    border-right-color: transparent;
}

/* News Card Styles */
.news-item-wrapper .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
}

.news-item-wrapper .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.news-item-wrapper .card-img-top {
    height: 200px;
    object-fit: cover;
}

.news-item-wrapper .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-item-wrapper .card-title a {
    color: #333;
    text-decoration: none;
}

.news-item-wrapper .card-title a:hover {
    color: #007bff;
}

.news-item-wrapper .card-text {
    color: #666;
    line-height: 1.6;
}

/* Sticky News Badge */
.sticky-news {
    border: 2px solid #ffd700;
    position: relative;
}

.sticky-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffd700;
    color: #000;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sticky-badge i {
    transform: rotate(45deg);
    margin-right: 5px;
}

/* Fade-in animation for newly loaded items */
@keyframes fadeInNews {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item-wrapper.new-item {
    animation: fadeInNews 0.5s ease-out;
}

/* Responsive dla news page */
@media (max-width: 768px) {
    .category-tabs .nav-link {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
    
    /* Ukryj ikony w zakładkach na mobile */
    .category-tabs .nav-link i {
        display: none;
    }
    
    .news-item-wrapper .card-img-top {
        height: 150px;
    }
    
    .load-more-btn {
        padding: 12px 35px;
        font-size: 1rem;
    }
}

/* ================================================
   INDEX.PHP - HOME PAGE STYLES
   ================================================ */

/* Horizontal weather bar */
.weather-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.weather-bar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

.weather-bar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 600;
}

.weather-bar-header .weather-main-icon {
    font-size: 1.8em;
    color: #3498db;
}

.weather-bar-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.weather-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.08);
    transition: all 0.3s ease;
}

.weather-bar-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.95);
}

.weather-bar-item i {
    color: #3498db;
    font-size: 1.6em;
    width: 32px;
    text-align: center;
}

.weather-bar-value {
    display: flex;
    flex-direction: column;
}

.weather-bar-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-bar-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Events cards for top section */
.upcoming-events-compact {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 510px;
    overflow-y: auto;
}

.event-card-compact {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    gap: 12px;
    align-items: center;
}

.event-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.event-image-compact {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.event-info-compact {
    flex-grow: 1;
}

.event-title-compact {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 5px;
    color: #2c3e50;
    line-height: 1.3;
}

.event-date-compact {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.85em;
}

.event-button-compact {
    display: inline-block;
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.85em;
    white-space: nowrap;
}

.event-button-compact:hover {
    background-color: #2980b9;
    color: white;
}

/* Scrollbar styling for events */
.upcoming-events-compact::-webkit-scrollbar {
    width: 6px;
}

.upcoming-events-compact::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.upcoming-events-compact::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 3px;
}

.upcoming-events-compact::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

/* Responsive for index.php */
@media (max-width: 768px) {
    .weather-bar-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .weather-bar-item {
        padding: 8px;
        gap: 8px;
    }
    
    .weather-bar-item i {
        font-size: 1.3em;
        width: 24px;
    }
    
    .weather-bar-number {
        font-size: 1rem;
    }
    
    .upcoming-events-compact {
        height: auto;
        max-height: 400px;
    }
    
    .event-card-compact {
        flex-direction: column;
        text-align: center;
    }
    
    .event-image-compact {
        width: 100%;
        height: 120px;
    }
}

/* ================================================
   NEWS_DETAILS.PHP - ARTICLE DETAIL PAGE
   ================================================ */
.news-article {
    max-width: 800px;
    margin: 0 auto;
}

.news-article h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.featured-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.news-article .content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.news-article .content p {
    margin-bottom: 1.5rem;
}

.news-article .metadata {
    font-size: 0.9rem;
    color: #666;
}

/* ================================================
   FOOTER STYLES
   ================================================ */
.footer {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--secondary-color);
}

.footer .section {
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* Informator styles */
.guide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

.guide-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.guide-title {
    font-size: 2em;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.guide-intro {
    background: #ecf0f1;
    padding: 20px;
    border-left: 4px solid #3498db;
    margin: 20px 0;
    border-radius: 5px;
    font-size: 1.1em;
    line-height: 1.8;
}

.guide-section {
    margin: 30px 0;
}

.guide-section h2 {
    font-size: 1.5em;
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

.guide-section h3 {
    font-size: 1.3em;
    color: #2980b9;
    margin-bottom: 10px;
}

.guide-section p, .guide-section ul, .guide-section ol {
    line-height: 1.8;
    color: #2c3e50;
}

.guide-section ul li, .guide-section ol li {
    margin-bottom: 8px;
}

.guide-section a {
    color: #3498db;
    text-decoration: none;
}

.guide-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar h3 {
    font-size: 1.3em;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.poi-list, .city-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poi-list li, .city-list li {
    margin: 12px 0;
}

.poi-list a, .city-list a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.poi-list a:hover, .city-list a:hover {
    color: #2980b9;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .guide-container {
        grid-template-columns: 1fr;
    }
}

/* =========================== */
/* ULICA.PHP - Street Page Styles */
/* =========================== */

/* Map container */
.map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

#map {
    flex: 1;
    min-width: 300px;
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.streets-sidebar {
    width: 100%;
    max-width: 320px;
}

.street-list {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 0.5rem;
    border-radius: 4px;
}

.street-list a {
    display: block;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    border-radius: 4px;
    color: #212529;
}

.street-list a:hover {
    background-color: #f8f9fa;
}

.street-list a.active {
    font-weight: bold;
    background-color: #e9ecef;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.popup-content {
    padding: 0.5rem;
}

.popup-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #212529;
    font-weight: 600;
}

.popup-content .details-button {
    display: inline-block;
    background-color: #0d6efd;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.popup-content .details-button:hover {
    background-color: #0b5ed7;
}

.popup-content .details-button i {
    margin-right: 5px;
}

/* POI List on street pages */
.poi-list {
    margin-top: 3rem;
    padding: 2rem;
}

.poi-category-header {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.4rem;
    color: #212529;
}

.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.poi-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.poi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.detailed-content {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.detailed-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #212529;
}

.poi-details-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

.button-group .details-button {
    background-color: #0d6efd;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.button-group .details-button:hover {
    background-color: #0b5ed7;
}

.button-group .details-button i {
    margin-right: 5px;
}

/* Related news and events */
.related-news,
.related-events {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.related-news h2,
.related-events h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #212529;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-date,
.event-date {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.news-card h3 a {
    color: #212529;
    text-decoration: none;
}

.news-card h3 a:hover {
    color: #0d6efd;
}

.event-venue,
.event-address {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.read-more:hover {
    text-decoration: underline;
}

/* No street selected view */
.no-street-selected {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.streets-sidebar-only .street-list {
    max-height: 60vh;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 8px;
}

/* Responsive styles for street pages */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
    }
    
    #map {
        flex: none;
        width: 100%;
        height: 400px;
        order: 1;
    }
    
    .streets-sidebar {
        width: 100%;
        max-width: 100%;
        order: 2;
        margin-top: 1rem;
    }
    
    .street-list {
        max-height: 250px;
    }
    
    .poi-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .button-group {
        margin-top: 1rem;
        width: 100%;
    }
    
    .button-group .details-button {
        display: block;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #map {
        height: 350px;
    }
    
    .section h1 {
        font-size: 1.5rem;
    }
    
    .poi-category-header {
        font-size: 1.2rem;
    }
}

/* --- Styles for street search on /mapa page --- */
.search-box {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    z-index: 100;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-box small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.street-item {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.street-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Popup styles dla mapy g��wnej */
.popup-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #333;
}

.popup-content .text-muted {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.popup-content .button-group {
    margin-top: 0.5rem;
}

.popup-content .details-button {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #007bff;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.popup-content .details-button:hover {
    background-color: #0056b3;
}

.popup-content .details-button i {
    margin-right: 0.3rem;
}

/* Atrakcje - attraction cards */
.attraction-card {
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.attraction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.attraction-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.95);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#attractions-map {
    width: 100%;
    border-radius: 0 0 0.375rem 0.375rem;
}

.leaflet-popup-content {
    margin: 10px;
}

/* Karty kategorii - używane w atrakcjach i informatorze */
.category-link-card {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.category-link-card .card {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 2px solid #e0e0e0;
    cursor: pointer;
}

.category-link-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: #0d6efd;
}

.category-link-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-link-card .card-text {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Lista poradników - informator */
.list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.list-group-item:hover {
    border-left-color: #0d6efd;
    background-color: #f8f9fa;
}

/* Karty ofert pracy - job.php */
.job-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.job-card:hover {
    transform: translateY(-5px);
}

.job-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.job-company {
    color: #7f8c8d;
    margin-bottom: 8px;
}

.job-location {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 15px;
}

.job-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.list-group-item a {
    color: #333;
    font-weight: 500;
}

.list-group-item a:hover {
    color: #0d6efd;
}
