/**
 * event-card-v2.css – KuK Bendorf Event Cards
 *
 * Design-Prinzip: Die Karte ist ein Plakat.
 * Großes Flyer-Bild, alles andere tritt zurück.
 * Kein Farbstreifen, kein visuelles Rauschen.
 *
 * @version 3.0.0
 */

/* ═══════════════════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════════════════ */

.event-card-v2 {
    flex: 0 0 268px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    position: relative;

    /* Roter Akzent nur oben – dezent, nicht dominant */
    border-top: 3px solid #F20F0F;
    border-left: 1px solid rgba(0, 0, 0, 0.07);
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08);

    transition:
        transform   0.35s cubic-bezier(0.19, 1, 0.22, 1),
        box-shadow  0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.event-card-v2:hover {
    transform: translateY(-8px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 24px 52px rgba(242, 15, 15, 0.16);
}


/* ═══════════════════════════════════════════════════════
   BILD  –  nimmt den Löwenanteil der Karte ein
   ═══════════════════════════════════════════════════════ */

.event-card-image {
    position: relative;
    height: 310px;          /* Hoch genug für Portrait-Flyer */
    width: 100%;
    overflow: hidden;
    background: #1A1A2E;    /* Fallback wenn kein Bild */
    flex-shrink: 0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Flyer-Kopf zeigen, nicht Mitte */
    display: block;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.event-card-v2:hover .event-card-image img {
    transform: scale(1.05);
}

/* Subtiler Schatten am Bildrand unten – verbessert Übergang zu weißem Inhalt */
.event-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.18) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}


/* ═══════════════════════════════════════════════════════
   DATUM-BADGE  –  kleines Pill, liegt oben-links auf dem Bild
   ═══════════════════════════════════════════════════════ */

.event-card-v2 .event-date-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;

    /* Pill-Form mit Glasmorphismus-Touch */
    background: rgba(242, 15, 15, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;

    padding: 5px 11px 5px 10px;
    border-radius: 20px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.30);
    line-height: 1.2;

    /* Kein festes min-width – passt sich dem Inhalt an */
    white-space: nowrap;
    font-size: 0;   /* Kinder setzen eigene Größe */
}

/* Datum (Tag.Monat.Jahr) */
.event-card-v2 .event-date-badge .day {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* Uhrzeit */
.event-card-v2 .event-date-badge span:not(.day) {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    padding-left: 8px;
    letter-spacing: 0;
    opacity: 1;
    text-transform: none;
    background: none;
}

.event-card-v2 .event-date-badge span:not(.day) i {
    margin-right: 3px;
    font-size: 0.72rem;
    opacity: 0.85;
}


/* ═══════════════════════════════════════════════════════
   INHALT  –  kompakt und aufgeräumt
   ═══════════════════════════════════════════════════════ */

.event-details {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #ffffff;
}

/* Titel */
.event-details h3 {
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.event-details h3 a {
    font-size: 1rem;
    font-weight: 700;
    color: #1A1A2E;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-details h3 a:hover {
    color: #F20F0F;
}

/* Meta-Zeilen (Ort, Preis) */
.event-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.845rem;
    color: #6b7280;
    margin-bottom: 5px;
    line-height: 1.3;
}

.event-meta-row:last-of-type {
    margin-bottom: 0;
}

.event-meta-row i {
    color: #F20F0F;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

/* Trennlinie vor dem CTA */
.event-details a[href]:not([class]) {
    margin-top: auto;
    padding-top: 13px;
    margin-top: 13px;
    border-top: 1px solid #f0f0f0;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #F20F0F;
    text-decoration: none;
    background: none;
    box-shadow: none;
    border-radius: 0;
    transition: gap 0.2s ease, color 0.2s ease;
}

.event-details a[href]:not([class])::after {
    content: '→';
    font-size: 0.95rem;
    font-weight: 900;
    transition: transform 0.2s ease;
    display: inline-block;
}

.event-details a[href]:not([class]):hover {
    color: #C00B0B;
    gap: 9px;
    background: none;
    transform: none;
    box-shadow: none;
}

.event-details a[href]:not([class]):hover::after {
    transform: translateX(3px);
}

/* Nicht verwendete Klasse – bleibt für andere Templates */
.event-time-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}
.event-time-badge i {
    margin-right: 6px;
    color: #F20F0F;
}


/* ═══════════════════════════════════════════════════════
   LUPE / ZOOM-BUTTON
   ═══════════════════════════════════════════════════════ */

.event-zoom-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #F20F0F;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.event-card-v2:hover .event-zoom-btn {
    opacity: 1;
    transform: scale(1);
}

.event-zoom-btn:hover {
    background: #F20F0F;
    color: #ffffff;
}

/* Tooltip */
.event-zoom-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 0.72rem;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.event-zoom-btn:hover::before {
    opacity: 1;
}


/* ═══════════════════════════════════════════════════════
   FLYER LIGHTBOX
   ═══════════════════════════════════════════════════════ */

.kuk-flyer-lb {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.kuk-flyer-lb.is-open {
    opacity: 1;
    pointer-events: all;
}

.kuk-flyer-lb-figure {
    position: relative;
    max-height: 92vh;
    max-width: min(520px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kuk-flyer-lb-figure img {
    max-height: 84vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.kuk-flyer-lb-figure figcaption {
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.kuk-flyer-lb-close {
    position: absolute;
    top: -46px;
    right: 0;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.75);
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.kuk-flyer-lb-close:hover {
    background: #F20F0F;
    border-color: #F20F0F;
    color: #fff;
}


/* ═══════════════════════════════════════════════════════
   ARCHIV-GRID  (archive-event.php)
   ═══════════════════════════════════════════════════════ */

.events-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.events-archive-grid .event-card-v2 {
    flex: unset;   /* kein flex-shrink im Grid */
    width: 100%;
}

@media (max-width: 600px) {
    .events-archive-grid {
        grid-template-columns: 1fr;
    }
}


/* ═══════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════ */

html[data-theme="dark"] .event-card-v2 {
    background: #1A1A2C;
    border-color: rgba(255, 255, 255, 0.05);
    border-top-color: #F20F0F;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .event-card-v2:hover {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 24px 52px rgba(242, 15, 15, 0.22);
}

html[data-theme="dark"] .event-details {
    background: #1A1A2C;
}

html[data-theme="dark"] .event-details h3 a {
    color: #F0F0F8;
}

html[data-theme="dark"] .event-details h3 a:hover {
    color: #ff4f4f;
}

html[data-theme="dark"] .event-meta-row {
    color: #8892a4;
}

html[data-theme="dark"] .event-details a[href]:not([class]) {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #ff4f4f;
}

html[data-theme="dark"] .event-details a[href]:not([class]):hover {
    color: #ff2222;
}
