/* === ZASAHY ARCHIVE, CARDS & DETAIL STYLES === */

/* --- 21. ZÁSAHY FILTR A SEZNAM --- */
.page-template-template-zasahy .site-main {
    padding-bottom: 60px;
}

.zasahy-filter-sticky-wrapper {
    position: sticky;
    top: 80px;
    z-index: 500;
    display: flex;
    justify-content: center;
    margin: 0 0 35px 0;
    pointer-events: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

body.admin-bar .zasahy-filter-sticky-wrapper {
    top: 112px;
}

.zasahy-filter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 16px;
    max-width: 100%;
    pointer-events: auto;
    background: rgba(10, 11, 17, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border-radius: 9999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow-anchor: none;
}

html[data-theme="light"] .zasahy-filter {
    background: rgba(244, 246, 251, 0.85);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.filter-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .filter-header {
    border-right-color: rgba(15, 23, 42, 0.1);
}

.filter-icon {
    font-size: 18px;
    color: var(--primary);
}

.filter-label {
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 1px;
    font-size: 0.78rem;
    margin: 0;
}

.year-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.year-buttons::-webkit-scrollbar {
    display: none;
}

.btn-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    color: var(--text-dim);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

html[data-theme="light"] .btn-year {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    color: #475569;
}

.btn-year:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

html[data-theme="light"] .btn-year:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

.btn-year.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
    font-weight: 800;
}

.year-section {
    margin-bottom: 60px;
    scroll-margin-top: 155px;
}

.year-section:last-of-type {
    margin-bottom: 0px;
}

.year-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 40px;
    padding-bottom: 10px;
    position: relative;
    z-index: 10;
}

.year-heading {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
    line-height: 1;
}

.year-count {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.month-group {
    margin-bottom: 60px;
}

.month-group:last-child {
    margin-bottom: 0;
}

.month-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
}

.month-title {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    margin: 0;
}

.month-count {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ==========================================================================
   KARTY UDÁLOSTÍ A ZPRÁV (ZASAH-CARD)
   ========================================================================== */
.zasahy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.zasahy-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.zasahy-grid.cols-1 {
    grid-template-columns: 1fr;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.zasah-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zasah-card:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 34, 34, 0.5);
    box-shadow: none;
}

html[data-theme="light"] .zasah-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: none;
}

html[data-theme="light"] .zasah-card:hover {
    border-color: rgba(230, 34, 34, 0.45);
    box-shadow: none;
}

/* Obrázek karty s poměrem stran a ztmavením */
.zasah-image {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #1a1d29;
    border-radius: 17px 17px 0 0;
}

html[data-theme="light"] .zasah-image {
    background: #eef1f8;
}

.zasah-image a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 17px 17px 0 0;
    overflow: hidden;
}

.zasah-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 17px 17px 0 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.zasah-card:hover .zasah-image img {
    transform: scale(1.07);
}

/* Horní plovoucí pilulkové štítky (datum a kategorie) */
.zasah-date-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 30px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    background-clip: padding-box;
}

.zasah-number-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(10, 10, 10, 0.82);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 30px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background-clip: padding-box;
}

.zasah-number-badge.badge-zasah {
    background: linear-gradient(135deg, #e62222 0%, #b71c1c 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(230, 34, 34, 0.45);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.zasah-number-badge.badge-aktualita {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.45);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Informace v kartě */
.zasah-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zasah-info h3 {
    font-size: 1.28rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zasah-info h3 a {
    color: var(--text);
    transition: color 0.25s ease;
    text-decoration: none;
}

.zasah-card:hover .zasah-info h3 a {
    color: var(--primary);
}

.zasah-excerpt {
    font-size: 0.92rem;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.65em;
}

html[data-theme="light"] .zasah-excerpt {
    color: #555e6d;
}

/* Spodní tlačítko "Číst podrobnosti" */
.read-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 18px 18px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: 100%;
    margin-top: auto;
}

.read-more::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
}

html[data-theme="light"] .read-more {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text);
}

.zasah-card:hover .read-more {
    background: var(--primary);
    border-top-color: var(--primary);
    color: #ffffff;
}

.read-more .material-symbols-rounded {
    font-size: 1.15rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zasah-card:hover .read-more .material-symbols-rounded {
    transform: translateX(6px);
}

.no-results {
    text-align: center;
    padding: 80px 40px;
    border-style: dashed;
    border-radius: var(--radius);
}

.no-results .material-symbols-rounded {
    font-size: 4rem;
    color: var(--glass-border);
    margin-bottom: 20px;
}

.no-results p {
    color: var(--text-dim);
    font-size: 1.2rem;
}


/* ==========================================================================
   DETAIL ČLÁNKU / ZÁSAHU (SINGLE.PHP)
   ========================================================================== */

.single-post-page {
    padding-top: 20px;
    padding-bottom: 28px;
}

.single-article-container {
    max-width: 950px;
    margin: 0 auto;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Drobečková navigace */
.single-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888888;
    margin-bottom: 20px;
}

.single-breadcrumbs a {
    color: #a0a5b5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-breadcrumbs a:hover {
    color: var(--primary);
}

.single-breadcrumbs .crumb-separator {
    color: #555555;
}

.single-breadcrumbs .crumb-current {
    color: #ffffff;
}

html[data-theme="light"] .single-breadcrumbs .crumb-current {
    color: #111111;
}

/* Horní metadata (Štítek + Datum) */
.single-entry-header .post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.single-entry-header .post-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.single-entry-header .post-category-tag.badge-zasah {
    background: linear-gradient(135deg, #e62222 0%, #b71c1c 100%);
    box-shadow: 0 4px 15px rgba(230, 34, 34, 0.4);
}

.single-entry-header .post-category-tag.badge-aktualita {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.single-entry-header .post-category-tag .material-symbols-rounded {
    font-size: 16px;
}

.post-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #d1d5db;
}

.post-date-pill .material-symbols-rounded {
    font-size: 16px;
    color: var(--primary);
}

html[data-theme="light"] .post-date-pill {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333333;
}

/* Hlavní nadpis článku */
.single-page-title {
    font-size: clamp(1.75rem, 4.5vw, 2.8rem);
    font-weight: 900;
    text-align: center;
    line-height: 1.22;
    margin: 0 0 26px 0;
    color: var(--text);
}

/* Hlavní náhledový obrázek článku */
.single-featured-image {
    margin-bottom: 40px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-height: 520px;
    background: #0a0a0a;
}

.single-featured-image img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* Typografie a obsah článku */
.single-entry-content {
    font-size: 1.12rem;
    line-height: 1.85;
    color: #e2e8f0;
    margin-bottom: 50px;
}

html[data-theme="light"] .single-entry-content {
    color: #334155;
}

.single-entry-content p {
    margin-bottom: 24px;
}

/* Zvýrazněný rámeček pro výjezdovou techniku (pouze přes vyhrazené pole) */
.dispatch-info-box {
    background: rgba(230, 34, 34, 0.08);
    border: 1px solid rgba(230, 34, 34, 0.25);
    border-left: 5px solid var(--primary);
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 1.08rem;
    font-weight: 700;
    color: #ffffff;
    margin: 25px 0 35px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    line-height: 1.5;
}

.dispatch-info-box .material-symbols-rounded {
    font-size: 26px;
    color: var(--primary);
    flex-shrink: 0;
}

html[data-theme="light"] .dispatch-info-box {
    background: rgba(230, 34, 34, 0.05);
    border-color: rgba(230, 34, 34, 0.2);
    border-left-color: var(--primary);
    color: #111111;
}

/* Standardní nadpisy uvnitř článku */
.single-entry-content h2,
.single-entry-content h3,
.single-entry-content h4,
.single-entry-content h5 {
    color: #ffffff;
    font-weight: 800;
    margin-top: 35px;
    margin-bottom: 16px;
    line-height: 1.3;
}

html[data-theme="light"] .single-entry-content h2,
html[data-theme="light"] .single-entry-content h3,
html[data-theme="light"] .single-entry-content h4,
html[data-theme="light"] .single-entry-content h5 {
    color: #111111;
}

/* Galerie v článku */
.single-entry-content .wp-block-gallery {
    margin-top: 35px;
    margin-bottom: 35px;
}

/* Navigace na předchozí / další článek */
.post-navigation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 35px;
    margin-bottom: 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 25px;
}

.post-navigation-grid.has-single-nav {
    grid-template-columns: 1fr;
}

.post-nav-card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-nav-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.post-nav-card.next-card {
    text-align: right;
}

.nav-direction {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.next-card .nav-direction {
    justify-content: flex-end;
}

.nav-post-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html[data-theme="light"] .nav-post-title {
    color: #111111;
}

html[data-theme="light"] .post-nav-card:hover {
    background: #f8fafc;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Spodní tlačítko zpět */
.single-post-page .post-footer-actions {
    text-align: center;
    margin-top: 28px;
    margin-bottom: 0;
}

.single-post-page .post-footer-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 0.92rem;
}


/* ==========================================================================
   RESPONSIVITA
   ========================================================================== */
@media (max-width: 900px) {
    .zasahy-grid,
    .zasahy-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .zasahy-grid,
    .zasahy-grid.cols-1,
    .zasahy-grid.cols-2,
    .zasahy-grid.cols-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .single-post-page {
        padding-top: 10px;
        padding-bottom: 20px;
    }

    .single-entry-header {
        margin-bottom: 16px;
    }

    .single-page-title {
        font-size: 1.65rem;
        margin-top: 8px;
        margin-bottom: 12px;
        line-height: 1.25;
    }

    .single-breadcrumbs {
        font-size: 0.78rem;
        margin-bottom: 10px;
    }

    .post-meta-top {
        gap: 8px;
        margin-bottom: 8px;
    }

    .post-category-tag,
    .post-date-pill {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .dispatch-info-box {
        padding: 12px 16px;
        font-size: 0.92rem;
        margin: 16px 0 20px 0;
        gap: 10px;
    }

    .single-entry-content {
        font-size: 0.95rem;
        line-height: 1.65;
        margin-bottom: 20px;
    }

    .single-entry-content p {
        margin-bottom: 14px;
    }

    .post-navigation-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 24px;
        margin-bottom: 0;
        padding-top: 18px;
    }

    .post-nav-card {
        padding: 12px 16px;
    }

    .nav-post-title {
        font-size: 0.9rem;
    }

    .single-post-page .post-footer-actions {
        margin-top: 20px;
        margin-bottom: 0;
    }

    .single-post-page .post-footer-actions .btn {
        width: 100%;
        max-width: 300px;
        font-size: 0.88rem;
        padding: 12px 20px;
    }

    .zasah-card {
        border-radius: 16px;
    }

    .zasah-image {
        height: 195px;
    }

    .zasah-date-badge,
    .zasah-number-badge {
        top: 10px;
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .zasah-date-badge {
        left: 10px;
    }

    .zasah-number-badge {
        right: 10px;
    }

    .zasah-info {
        padding: 16px 18px 14px 18px;
    }

    .zasah-info h3 {
        font-size: 1.15rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .zasah-excerpt {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .read-more {
        padding: 12px 18px;
        font-size: 0.78rem;
        border-radius: 0 0 16px 16px;
    }

    .zasahy-filter-sticky-wrapper {
        top: 68px;
        margin: 0 0 24px 0;
    }

    body.admin-bar .zasahy-filter-sticky-wrapper {
        top: 108px;
    }

    .zasahy-filter {
        padding: 5px 12px 5px 14px;
        gap: 8px;
        max-width: calc(100vw - 32px);
    }

    .filter-header {
        padding-right: 8px;
        gap: 4px;
    }

    .filter-icon {
        font-size: 16px;
    }

    .filter-label {
        font-size: 0.72rem;
    }

    .btn-year {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .year-heading {
        font-size: 1.85rem;
    }

    .post-navigation-grid {
        grid-template-columns: 1fr;
    }
    
    .post-nav-card.next-card {
        text-align: left;
    }
    
    .next-card .nav-direction {
        justify-content: flex-start;
    }
}

/* --- DYNAMIC LOADING --- */
.hidden-year {
    display: none;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 60px;
    width: 100%;
}

.load-more-container .btn {
    min-width: 200px;
}

