/* ============================================================
   GFZA Predigten v1.3.0
   ============================================================ */

:root {
    --gfza-gold:        #e8a838;
    --gfza-gold-dim:    rgba(232,168,56,0.12);
    --gfza-gold-mid:    rgba(232,168,56,0.35);
    --gfza-card:        #1e1e1e;
    --gfza-card-hover:  #252525;
    --gfza-surface:     #161616;
    --gfza-border:      rgba(255,255,255,0.07);
    --gfza-border-gold: rgba(232,168,56,0.3);
    --gfza-text:        #ede7d9;
    --gfza-muted:       #7a7268;
    --gfza-radius:      12px;
    --gfza-radius-lg:   16px;
}

/* ════════════════════════════════════════════
   FILTER-BAR
════════════════════════════════════════════ */
.gfza-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gfza-border);
}

.gfza-filter-btn {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 999px;
    border: 1px solid var(--gfza-border);
    background: transparent;
    color: var(--gfza-muted);
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    white-space: nowrap;
}
.gfza-filter-btn:hover {
    border-color: var(--gfza-border-gold);
    color: var(--gfza-gold);
    background: var(--gfza-gold-dim);
}
.gfza-filter-btn.active {
    background: var(--gfza-gold);
    border-color: var(--gfza-gold);
    color: #111;
    font-weight: 700;
}

/* ── Archiv-Dropdown ── */
.gfza-archive-dropdown {
    position: relative;
}

.gfza-archive-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gfza-archive-icon {
    font-size: 13px;
    line-height: 1;
}

.gfza-archive-caret {
    width: 10px;
    height: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
    display: inline-block;
    flex-shrink: 0;
}
.gfza-archive-dropdown.open .gfza-archive-caret {
    transform: rotate(225deg) translateY(-2px);
}
.gfza-archive-dropdown.open .gfza-archive-toggle {
    border-color: var(--gfza-border-gold);
    color: var(--gfza-gold);
    background: var(--gfza-gold-dim);
}

.gfza-archive-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--gfza-radius);
    min-width: 220px;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.gfza-archive-dropdown.open .gfza-archive-menu { display: block; }

.gfza-archive-menu-header {
    padding: 10px 16px 8px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gfza-muted);
    border-bottom: 1px solid var(--gfza-border);
}

.gfza-archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gfza-border);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}
.gfza-archive-item:last-child { border-bottom: none; }
.gfza-archive-item:hover { background: rgba(255,255,255,0.04); }
.gfza-archive-item.active { background: var(--gfza-gold-dim); }
.gfza-archive-item.active .gfza-archive-year { color: var(--gfza-gold); }

.gfza-archive-year {
    font-size: 15px;
    font-weight: 700;
    color: var(--gfza-text);
    line-height: 1;
}
.gfza-archive-name {
    font-size: 11px;
    color: var(--gfza-muted);
    margin-top: 3px;
    line-height: 1.3;
}
.gfza-archive-left { display: flex; flex-direction: column; }
.gfza-archive-arr {
    color: var(--gfza-muted);
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Lade-State ── */
.gfza-video-grid.loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* ════════════════════════════════════════════
   GRID
════════════════════════════════════════════ */
.gfza-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transition: opacity 0.15s;
}

.gfza-cols-2 .gfza-video-grid { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
    .gfza-video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .gfza-video-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════
   HERO-KARTE (erste Kachel)
════════════════════════════════════════════ */
.gfza-hero-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 3fr 2fr;
    border-radius: var(--gfza-radius-lg);
    background: var(--gfza-card);
    border: 1px solid var(--gfza-border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    /* Keine min-height – Höhe kommt vom Thumbnail */
}
.gfza-hero-card:hover {
    border-color: var(--gfza-border-gold);
    box-shadow: 0 0 0 1px var(--gfza-border-gold), 0 20px 50px rgba(0,0,0,0.5);
}

/* Thumbnail: immer exakt 16:9, kein Leerraum */
.gfza-hero-card .gfza-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    width: 100%;
}
.gfza-hero-card .gfza-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gfza-hero-card:hover .gfza-thumb { transform: scale(1.03); }

/* Gradient über Hero-Thumbnail für Lesbarkeit */
.gfza-hero-card .gfza-thumb-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.gfza-hero-card .gfza-card-body {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    background: #1a1a1a;
    border-left: 1px solid var(--gfza-border);
    /* Gleiche Höhe wie Thumbnail-Seite */
    align-self: stretch;
}

.gfza-hero-card .gfza-card-date {
    font-size: 11px;
    color: var(--gfza-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.gfza-hero-card .gfza-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gfza-text);
    line-height: 1.3;
    margin: 0;
}

/* Scroll-Wrapper – sitzt außen, trägt den overflow */
.gfza-hero-card .gfza-card-desc-scroll {
    max-height: 130px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
    flex-shrink: 0;
}
.gfza-hero-card .gfza-card-desc-scroll::-webkit-scrollbar { width: 4px; }
.gfza-hero-card .gfza-card-desc-scroll::-webkit-scrollbar-track { background: transparent; }
.gfza-hero-card .gfza-card-desc-scroll::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

/* Innerer Text – keine Clip-Styles, kein overflow */
.gfza-hero-card .gfza-card-desc {
    font-size: 13.5px;
    color: var(--gfza-muted);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    white-space: normal;
}

.gfza-hero-card .gfza-yt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gfza-gold);
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-top: 4px;
    transition: gap 0.2s;
}
.gfza-hero-card:hover .gfza-yt-link { gap: 10px; }

/* Badge */
.gfza-badge-new {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--gfza-gold);
    color: #111;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    z-index: 1;
}

/* Play-Button Hero */
.gfza-hero-card .gfza-play-btn {
    position: absolute;
    bottom: 16px; right: 16px;
    width: 52px; height: 52px;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    z-index: 1;
}
.gfza-hero-card:hover .gfza-play-btn { opacity: 1; transform: scale(1.08); }
.gfza-hero-card .gfza-play-btn svg { width: 100%; height: 100%; }

@media (max-width: 760px) {
    .gfza-hero-card {
        grid-template-columns: 1fr;
    }
    .gfza-hero-card .gfza-card-body {
        padding: 22px 20px;
        border-left: none;
        border-top: 1px solid var(--gfza-border);
    }
    .gfza-hero-card .gfza-card-title { font-size: 18px; }
}

/* ════════════════════════════════════════════
   NORMALE KACHELN
════════════════════════════════════════════ */
.gfza-video-card:not(.gfza-hero-card) {
    background: var(--gfza-card);
    border: 1px solid var(--gfza-border);
    border-radius: var(--gfza-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.gfza-video-card:not(.gfza-hero-card):hover {
    border-color: var(--gfza-border-gold);
    transform: translateY(-2px);
    background: var(--gfza-card-hover);
}

.gfza-video-card:not(.gfza-hero-card) .gfza-thumb-wrap {
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #111;
}
.gfza-video-card:not(.gfza-hero-card) .gfza-thumb {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.35s ease;
}
.gfza-video-card:not(.gfza-hero-card):hover .gfza-thumb { transform: scale(1.05); }

/* Play-Button – normal klein, zentriert, immer sichtbar auf hover */
.gfza-video-card:not(.gfza-hero-card) .gfza-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.gfza-video-card:not(.gfza-hero-card):hover .gfza-play-btn { opacity: 1; }
.gfza-video-card:not(.gfza-hero-card) .gfza-play-btn svg { width: 100%; height: 100%; }

/* Goldener Balken unten am Thumbnail */
.gfza-video-card:not(.gfza-hero-card) .gfza-thumb-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gfza-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.gfza-video-card:not(.gfza-hero-card):hover .gfza-thumb-wrap::after { transform: scaleX(1); }

.gfza-video-card:not(.gfza-hero-card) .gfza-card-body {
    padding: 13px 15px 15px;
}
.gfza-video-card:not(.gfza-hero-card) .gfza-card-date {
    font-size: 10px;
    color: var(--gfza-gold);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}
.gfza-video-card:not(.gfza-hero-card) .gfza-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gfza-text);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ════════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════════ */
.gfza-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gfza-lightbox.open { display: flex; }

.gfza-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.gfza-lightbox-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    background: #181818;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.9);
}

.gfza-lightbox-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: #fff; font-size: 18px; line-height: 1;
    cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.gfza-lightbox-close:hover {
    background: rgba(232,168,56,0.75);
    border-color: var(--gfza-gold);
}

.gfza-lightbox-video { aspect-ratio: 16/9; background: #000; }
.gfza-lightbox-video iframe { width: 100%; height: 100%; border: none; display: block; }

.gfza-lightbox-info {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--gfza-border);
}

.gfza-lb-date {
    font-size: 10px;
    color: var(--gfza-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 7px;
}

#gfza-lb-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gfza-text);
    margin: 0 0 10px;
    line-height: 1.3;
}

.gfza-lb-desc-wrap {
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}
.gfza-lb-desc-wrap::-webkit-scrollbar { width: 3px; }
.gfza-lb-desc-wrap::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

#gfza-lb-desc {
    font-size: 13px;
    color: var(--gfza-muted);
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}

/* ── Kein Video ── */
.gfza-no-videos { color: var(--gfza-muted); font-style: italic; padding: 20px 0; }

/* ── Listen-Stil ── */
.gfza-predigten-wrap.list .gfza-video-grid { grid-template-columns: 1fr; }
.gfza-predigten-wrap.list .gfza-video-card:not(.gfza-hero-card) {
    display: flex; flex-direction: row;
}
.gfza-predigten-wrap.list .gfza-video-card:not(.gfza-hero-card) .gfza-thumb-wrap {
    width: 180px; flex-shrink: 0; aspect-ratio: unset; min-height: 110px;
}
@media (max-width: 540px) {
    .gfza-predigten-wrap.list .gfza-video-card:not(.gfza-hero-card) { flex-direction: column; }
    .gfza-predigten-wrap.list .gfza-video-card:not(.gfza-hero-card) .gfza-thumb-wrap {
        width: 100%; aspect-ratio: 16/9; min-height: unset;
    }
}
