:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --card-hover: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    
    --primary: #0ea5e9;
    --accent: #f472b6; 
    --danger: #ef4444;

    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Skrytí ikonky vlaječky (attribution flag) v mapě Leaflet */
.leaflet-attribution-flag {
    display: none !important;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); padding-bottom: 0; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--primary); }

/* Pomocná třída pro formátování názvů */
.capitalize-text { text-transform: capitalize; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
header { 
    padding: 15px 0; 
    border-bottom: 1px solid var(--border); 
    background: rgba(248, 250, 252, 0.95); 
    position: sticky; top: 0; z-index: 1900; backdrop-filter: blur(8px); 
}
/* Úprava kontejneru hlavičky pro Flexbox (Logo vlevo, Menu vpravo) */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-weight: 700; font-size: 1.9rem; color: var(--text); display: flex; align-items: center; gap: 8px; }

        @media (max-width: 768px) {
.logo { font-weight: 700; font-size: 1.4rem; }
        }
        
.logo i { color: var(--primary); }

/* MENU BUTTON */
.menu-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.menu-btn:hover { color: var(--primary); }

/* SIDEBAR MENU */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--card);
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    right: 0;
}

.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1999;
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.close-menu-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}
.close-menu-btn:hover { color: var(--danger); }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.side-link i {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.side-link:hover {
    background: var(--card-hover);
    color: var(--primary);
}

.side-link:hover i {
    color: var(--primary);
}

.mobile-region-grid { display: none; }

/* SEARCH & GPS */
.search-wrapper { position: relative; margin: 30px auto; max-width: 600px; }
.search-input { 
    width: 100%; 
    background: var(--card); 
    border: 2px solid var(--border); 
    color: var(--text); 
    padding: 16px 50px 16px 50px; /* padding-right zvětšen pro ikonku GPS */
    border-radius: 50px; 
    font-size: 1rem; 
    outline: none; 
    box-shadow: var(--shadow);
}
.search-input:focus { border-color: var(--primary); }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.2rem; }

/* GPS Button Styles */
.location-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.location-btn:hover {
    color: #0284c7;
    transform: translateY(-50%) scale(1.1);
}
.location-btn.loading {
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: translateY(-50%) rotate(360deg); } }

#search-results { 
    position: absolute; top: 100%; left: 15px; right: 15px; 
    background: var(--card); 
    border-radius: 12px; margin-top: 8px; z-index: 50; display: none; 
    border: 1px solid var(--border); 
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.search-item { 
    display: block; padding: 12px 20px; 
    border-bottom: 1px solid var(--border); 
    color: var(--text);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--card-hover); }

/* HERO & TEXT */
.hero { text-align: center; padding: 20px 0; }
.big-temp { 
    font-size: 4.5rem; font-weight: 700; 
    background: linear-gradient(to bottom, var(--text), #475569); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    letter-spacing: -2px;
}

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 30px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-box { 
    background: var(--card); 
    padding: 20px; border-radius: 16px; text-align: center; 
    border: 1px solid var(--border); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.stat-val { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500;}
.wind-arrow { display: inline-block; transition: transform 0.5s ease-out; color: var(--primary); font-size: 1.2rem; margin-left: 5px; }

/* SECTION TITLES */
.section-title { 
    margin-top: 50px; margin-bottom: 25px; 
    /*display: flex;*/ text-align: center; align-items: center; gap: 10px; 
    font-size: 1.4rem; color: var(--text); font-weight: 700;
}
.section-title i { color: var(--primary); }
.section-center { justify-content: center; }

/* FEATURES */
.features-section {
    display: grid; grid-template-columns: 1fr; gap: 20px; margin: 50px 0;
}
@media (min-width: 768px) { .features-section { grid-template-columns: repeat(3, 1fr); } }
.feature-box {
    background: var(--card); padding: 30px 20px;
    border-radius: var(--radius); border: 1px solid var(--border);
    text-align: center; transition: transform 0.2s;
}
.feature-box:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.feature-icon {
    width: 60px; height: 60px;
    background: rgba(14, 165, 233, 0.1); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 20px auto;
}
.feature-title { font-weight: 700; margin-bottom: 10px; color: var(--text); font-size: 1.1rem; }
.feature-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* CITY CARDS */
.city-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .city-cards-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .city-cards-grid { grid-template-columns: repeat(5, 1fr); } }
.city-mini-card {
    background: var(--card); border: 1px solid var(--border);
    padding: 15px; border-radius: 12px; text-align: center;
    font-weight: 600; color: var(--text); transition: all 0.2s;
    /* Zajištění velkých písmen */
    text-transform: capitalize;
}
.city-mini-card:hover {
    border-color: var(--primary); background: var(--card-hover); color: var(--primary); transform: translateY(-2px);
}

/* MAP DAYS CONTROL */
/* === 1. ZDROJ DAT (ČHMÚ) - Vpravo nahoře === */
    .radar-source-attribution {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.85);
        color: #333;
        font-size: 11px;
        padding: 3px 8px;
        z-index: 1000;
        border-radius: 4px;
        pointer-events: none;
        font-weight: 600;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        white-space: nowrap;
    }

    /* === 2. TLAČÍTKO SVĚT (World Radar) === */
    .radar-world-btn {
        position: absolute;
        z-index: 1000;
        background-color: #ffffff;
        color: #333;
        font-weight: 600;
        text-decoration: none;
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 4px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
        transition: background-color 0.2s;

        /* DESKTOP POZICE: Vedle zoomu (který je vlevo) */
        top: 10px;
        left: 60px; 
    }

    .radar-world-btn:hover {
        background-color: #f0f0f0;
        color: #000;
    }

    /* === 3. ÚPRAVA PRO MOBILY (aby neleželo na legendě) === */
    @media (max-width: 768px) {
        
        /* Zdroj dat trochu zmenšíme */
        .radar-source-attribution {
            font-size: 10px;
            padding: 2px 6px;
        }

        /* Tlačítko Svět dáme POD zoom tlačítka */
        /* Zoom tlačítka mají obvykle výšku cca 70px, takže dáme 80px od vrchu */
        .radar-world-btn {
            top: 80px;  /* Posun dolů pod zoom */
            left: 10px; /* Zarovnání doleva ke kraji */
            right: auto;
            bottom: auto; /* Ujistíme se, že není dole u legendy */
        }
    }

.map-control-days {
    display: flex; gap: 10px; padding-top: 15px; padding-bottom: 10px;
    overflow-x: auto; scrollbar-width: none;
}
.map-control-days::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .map-control-days { justify-content: center; } }

.map-day-card {
    flex: 0 0 100px; background: var(--card);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 10px; text-align: center; cursor: pointer;
    transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); user-select: none;
}
.map-day-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2px; }
.map-day-card .date-label { font-size: 0.8rem; color: #94a3b8; margin-bottom: 5px; }
.map-day-card .temp-val { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.map-day-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.map-day-card.active {
    border: 2px solid var(--primary); background: rgba(14, 165, 233, 0.05);
    padding: 9px; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

/* CHIPS */
.grid-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;}
.chip { 
    background: var(--card); padding: 12px; border-radius: 12px; 
    text-align: center; font-size: 0.95rem; border: 1px solid var(--border); color: var(--text);
    font-weight: 500; text-transform: capitalize;
}
.chip:hover { border-color: var(--primary); background: var(--card-hover); color: var(--primary); }

/* MAP & RADAR */
#map { 
    width: 100%; height: 450px; border-radius: var(--radius); 
    border: 1px solid var(--border); background: #e2e8f0; 
}
/* === RADAR LEGENDA === */

/* Obalovací prvek - nutný pro pozicování legendy */
.map-wrapper {
    position: relative; /* Důležité: definuje hranice pro absolutní pozici legendy */
    width: 100%;
}

/* Samotná legenda */
.radar-legend {
    position: absolute;
    bottom: 15px;      /* Odsazení od spodního okraje mapy */
    left: 10px;        /* Odsazení od levého okraje mapy */
    z-index: 1000;     /* Musí být nad mapou (Leaflet má z-indexy kolem 400-800) */
    
    width: 45px;      /* Výchozí šířka pro PC */
    height: auto;      /* Výška se dopočítá */
    max-width: 60%;    /* Aby na malých mobilech nebyla širší než 60% mapy */
    
    /* Vzhled - volitelné stínování pro lepší čitelnost */
    background: rgba(255, 255, 255, 0.6); 
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    
    /* Aby se přes legendu dalo klikat na mapu (posouvat ji) */
    pointer-events: none; 
    user-select: none;
}

/* === RESPONZIVITA PRO MOBILY === */
@media (max-width: 768px) {
    .radar-legend {
        width: 35px; /* Na mobilu legendu zmenšíme */
        bottom: 10px;
        left: 5px;
    }
}
.radar-controls { 
    margin-top: 15px; display: flex; justify-content: space-between; align-items: center; 
    background: var(--card); padding: 12px 20px; border-radius: 12px; 
    border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 20px;
}

    /* CSS PRO RADAR - PŘEVZATO A UPRAVENO Z IFRAME */
        .radar-controls {
            display: flex;
            align-items: center;
            gap: 15px;
            background: #fff;
            padding: 20px;
            border-top: 1px solid var(--border);
            border-radius: 0 0 8px 8px;
            flex-wrap: wrap;
        }

        .slider-wrapper { 
            position: relative; 
            flex-grow: 1; 
            display: flex;
            align-items: center;
            margin-bottom: 5px; 
            min-width: 200px;
        }

        input[type=range] { 
            width: 100%; 
            cursor: pointer; 
            margin: 0;
            accent-color: var(--primary);
        }
        
        #radar-time {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text);
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
            min-width: 60px;
            text-align: right;
        }

        .labels { 
            position: absolute; 
            width: 100%;
            top: 18px; 
            height: 15px; 
            pointer-events: none;
        }
        .lbl { 
            position: absolute; 
            font-size: 0.65rem; 
            color: var(--text-muted); 
            top: 2px; 
            transform: translateX(-50%); 
        }
        .lbl:first-child { transform: translateX(0); }
        .lbl:last-child { transform: translateX(-100%); }
        
        @media (max-width: 700px) {
            .lbl { display: none; } 
            .lbl:first-child, .lbl:last-child { display: block; }
            .lbl:nth-child(3) { display: block; }
            
            .radar-controls { gap: 10px; }
            .slider-wrapper { order: 3; flex-basis: 100%; margin-top:5px; }
            #radar-play { order: 1; }
            #radar-time { order: 2; margin-left: auto; }
        }

        /* Ořez radaru aby zmizely legendy ČHMÚ */
        .radar-layer {
            clip-path: inset(23.5% 17.0% 1% 0.5%);
        }
        .leaflet-attribution-flag { display: none !important; }
        
.btn-play { 
    background: var(--primary); border: none; padding: 10px 25px; 
    border-radius: 50px; font-weight: 600; cursor: pointer; color: white; 
    transition: background 0.2s;
}
.btn-play:hover { background: #0284c7; }
.btn-play.playing { background: var(--danger); }

/* HOURLY & NAV */
.hourly-nav-container { margin-top: 30px; position: relative; }
.hourly-nav-header { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
@media (min-width: 600px) { .hourly-nav-header { flex-direction: row; justify-content: space-between; align-items: center; } }
.hourly-toggle { 
    display: flex; gap: 4px; background: var(--border); 
    padding: 4px; border-radius: 10px;
}
.hourly-toggle button { 
    flex: 1; background: transparent; color: var(--text-muted); border: none; 
    padding: 8px 16px; cursor: pointer; border-radius: 8px; font-weight: 600; 
    transition: all 0.2s; font-size: 0.9rem;
}
.hourly-toggle button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }

.hourly-strip-wrapper { position: relative; margin-bottom: 25px; }
.hourly-content { 
    display: flex; overflow-x: auto; scroll-behavior: smooth; gap: 12px;
    padding: 5px 2px; width: 100%;
    scrollbar-width: none;
}
.hourly-content::-webkit-scrollbar { display: none; }
.hourly-strip-item {
    flex: 0 0 90px; background: var(--card); padding: 15px 5px; 
    border-radius: 14px; text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}
.hourly-strip-item.current-hour {
    border: 2px solid var(--primary); background: #f0f9ff;
}

/* CHART */
.hourly-chart-wrapper { 
    width: 100%; overflow-x: auto; background: var(--card); 
    border-radius: var(--radius); padding: 20px; margin-bottom: 30px; 
    border: 1px solid var(--border); 
}
.chart-inner-container { position: relative; width: 100%; min-width: 800px; height: 350px; } 

/* ARROWS & BUTTONS */
.scroll-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); 
    width: 40px; height: 40px; background: var(--card); color: var(--text); 
    border: 1px solid var(--border); border-radius: 50%; box-shadow: var(--shadow);
    display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 10;
    transition: all 0.2s;
}
.hourly-strip-wrapper:hover .scroll-arrow { display: flex; }
.scroll-arrow:hover { color: var(--primary); border-color: var(--primary); }
.arrow-left { left: -15px; } .arrow-right { right: -15px; }

.hidden-item { display: none !important; }

/* === UPRAVENÉ TLAČÍTKO ZOBRAZIT DALŠÍ === */
.btn-show-more {
    display: block; margin: 25px auto; padding: 10px 24px;
    padding: 0; 
    border: none; 
    background: none;
    color: var(--primary); 
    cursor: pointer; 
    font-size: 1rem; 
    transition: color 0.2s;
    text-decoration: none; 
}
.btn-show-more:hover { 
    color: var(--text); 
    text-decoration: underline; 
}


.btn-show-more i { 
   color: var(--text-muted);
}


/* SEO FOOTER SECTION */
.seo-navigation-wrapper {
    background: #f1f5f9;
    padding: 60px 0 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}
.seo-heading { text-align: center; margin-bottom: 25px; color: var(--text-muted); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.tag-link {
    font-size: 0.85rem;
    padding: 8px 16px;
    background: #2196f31c;
    border: 1px solid var(--border);
    border-radius: 30px;
    color: #2196F3;
    transition: all 0.2s;
    font-weight: 500;
    /* min-width: 220px; */
    text-align: center;
    text-transform: capitalize;
}
.tag-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}


footer { padding: 40px 20px; text-align: center; background: var(--bg); color: var(--text-muted); font-size: 0.9rem; }


     .cz-map-container {
            position: relative; width: 100%; max-width: 1100px;
            margin: 20px auto 20px auto; aspect-ratio: 16/9;
            background-image: url('img/Cesko-kraje-mp.svg');
            background-size: cover; background-position: center;
            border-radius: 12px; overflow: hidden;
        }
        .map-point {
            position: absolute; transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 8px; padding: 4px 8px;
            text-align: center; cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
            display: flex; align-items: center; gap: 6px;
            color: #0f172a; font-size: 0.95rem; text-decoration: none;
            white-space: nowrap; z-index: 10;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
        }
        .map-point img { width: 28px; height: 28px; display: block; }
        .map-point .temp { font-weight: 700; }
        .map-point:hover {
            transform: translate(-50%, -50%) scale(1.15); z-index: 1000 !important;
            background: var(--primary); border-color: var(--primary); color: #fff;
        }
        
        @media (max-width: 768px) {
        
       .map-point {
    position: absolute;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: none;
    display: flex; /* Použijeme flexbox */
    flex-direction: column; /* Uspořádáme položky pod sebe */
    align-items: center; /* Vycentrujeme je horizontálně */
    gap: 2px; /* Menší mezera mezi ikonou a textem */
        }
        
         .point-temp-range {
            font-size: 0.7rem !important;
        }    
              
    /*.cz-map-container { display: none; }*/ 
    .mobile-region-grid { 
        display: none; 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
        margin-bottom: 20px; 
    }
    .region-card {
        background: var(--card); border: 1px solid var(--border);
        padding: 15px; border-radius: 12px; display: flex;
        flex-direction: column; align-items: center; text-align: center;
        color: var(--text);
    }
    .scroll-arrow { display: none !important; }
    .arrow-left, .arrow-right { display: none; }
}
        
        /* Modal Styles */
        .modal-overlay {
            display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
            z-index: 9999; justify-content: center; align-items: center;
            padding: 20px;
        }
        .modal-content {
            background: var(--card); width: 100%; max-width: 1300px;
            border-radius: 16px; padding: 25px; position: relative;
            box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
            max-height: 90vh; overflow-y: auto;
            animation: modalFadeIn 0.2s ease-out;
        }
        @keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
        .close-modal {
            position: absolute; top: 15px; right: 20px; font-size: 2rem;
            color: var(--text-muted); cursor: pointer; transition: 0.2s;
            line-height: 1;
        }
        .close-modal:hover { color: var(--danger); }
        .modal-header { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; text-align: center; }
        
         /* CSS Oprava pro modal graf na mobilu */
        .chart-scroll-wrapper {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .chart-inner-scroll-container {
            min-width: 600px; /* Vynucení šířky pro scroll */
            height: 300px;
        }
        /* Styl pro teplotu na mapě (rozsah) */
        .point-temp-range {
            font-size: 0.8rem;
            font-weight: 700;
            white-space: nowrap;
        }
        .small-wind {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
        }
        /* Modal stats grid */
        .modal-stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            gap: 10px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid var(--border);
            text-align: center;
        }
        .modal-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .modal-stat-label { font-size: 0.75rem; color: var(--text-muted); }
        .modal-stat-val { font-weight: 600; font-size: 0.95rem; }
        
        /* New Sub-nav styles */
        .sub-nav {
            display: flex;
            gap: 10px;
            margin-bottom: 20px; margin-top: 20px;
            justify-content: center;
        }
        .sub-nav a {
            text-decoration: none;
            color: var(--text-muted);
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 500;
            background: rgba(0,0,0,0.03);
            transition: all 0.2s;
        }
        .sub-nav a:hover {
            background: rgba(0,0,0,0.06);
        }
        .sub-nav a.active {
            background: var(--primary);
            color: white;
        }  
        .seo-box
         {
        text-align: left; margin:30px 0; padding:20px; background:var(--card); border:1px solid var(--border); border-radius:12px; line-height:1.6; color:var(--text-muted);
        }
                .seo-description-text { margin-top: 25px; font-size: 1rem; color: var(--text-muted); line-height: 1.6; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
        .stats-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 20px; }
        .stat-detail-box { background: rgba(255,255,255,0.6); padding: 15px 10px; border-radius: 8px; text-align: center; border: 1px solid rgba(0,0,0,0.05); }
        .stat-detail-val { font-weight: 700; font-size: 1.1rem; color: var(--text); }
        .stat-detail-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
   
    .ai-summary-box {
    border: 1px solid var(--border); background: #ffffff; padding: 15px; border-radius: 8px; margin: 15px 0; margin-left: auto; margin-right: auto;
    }
        
    .chmi-container {
      margin: 20px auto 60px;
      text-align: center;
    }
    .chmi-alert-box {
        border-radius: 8px;
        padding: 15px;
            background: #ecf5fb;
        
        margin-bottom: 15px;
    }

    .chmi-alert-box .meta {
        font-size: 0.85em;
        color: #000000;
        margin-top: 10px;
        border-top: 1px dotted #ccc;
        padding-top: 10px;
    }
    .chmi-alert-box .districts {
        font-weight: bold;
    }
/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    display: none; /* Defaultně skryté, JS zobrazí */
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 30px;
        text-align: left;
    }
}

.cookie-content {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 800px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.btn-cookie {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-cookie-necessary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-cookie-necessary:hover {
    background: var(--card-hover);
}

.btn-cookie-accept {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
}
.btn-cookie-accept:hover {
    background: #0284c7;
}

/* --- DROBEČKOVÁ NAVIGACE (BREADCRUMBS) --- */
.breadcrumbs {
    width: 100%;
    margin: 15px 0 20px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Odkazy v drobečkové navigaci */
.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Oddělovač / */
.breadcrumbs .sep {
    color: #cbd5e1;
    font-size: 0.8em;
}

/* Poslední položka (aktuální stránka) - není odkaz, je tmavá */
.breadcrumbs li:last-child span[itemprop="name"] {
    font-weight: 600;
    color: var(--text);
}

/* Mobilní zobrazení - skrytí kraje, aby se vešlo to podstatné */
@media (max-width: 768px) {
    .breadcrumbs .hide-mobile {
        display: none;
    }
    .breadcrumbs {
        font-size: 0.85rem;
        overflow-x: auto;
    }
}

/* =========================================
   STYLY PRO TÉMATICKÝ BLOK ČLÁNKŮ (vložit na konec style.css)
   ========================================= */

.articles-grid {
    display: grid;
    /* Automaticky vytvoří sloupce, minimální šířka karty je 280px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

.article-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden; /* Aby obrázek nepřetékal z kulatých rohů */
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Aby byly všechny karty stejně vysoké */
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.article-img-wrapper {
    width: 100%;
    height: 180px; /* Fixní výška pro obrázky */
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.article-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zajistí, že obrázek vyplní plochu a nebude deformovaný */
    transition: transform 0.3s ease;
}

.article-card:hover .article-img-wrapper img {
    transform: scale(1.05); /* Jemné přiblížení obrázku při najetí myší */
}

.article-content {
    padding: 20px;
    flex-grow: 1; /* Aby se obsah natáhl a tlačítko bylo dole */
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    line-height: 1.3;
    color: var(--text-dark);
}

.article-content p {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.btn-text i {
    transition: transform 0.2s ease;
}

.article-card:hover .btn-text i {
    transform: translateX(4px); /* Šipka se posune doprava při najetí */
}

/* Úprava boxu pro pozicování kolečka */
.chmi-alert-box {
    position: relative;
    padding-left: 45px !important; /* Prostor pro kolečko vlevo */
    text-align: left;
}

/* Samotné kolečko u zprávy */
.alert-indicator {
    position: absolute;
    left: 15px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* Centrovaná legenda */
.chmi-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}