/* ================================================================
   VERANSTALTUNGEN – Kalenderblatt-Design (Komplett)
   ================================================================ */

.modern-events-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 850px;
    margin: 40px auto;
}

.modern-event-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s;
    border: 1px solid #eaeaea;
    text-align: left;

    /* NEU: Zwingend nötig für den Z-Index */
    position: relative;
    z-index: 1;
}

.modern-event-card:hover,
.modern-event-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(223, 108, 48, 0.15);
    border-color: #fcece3;

    /* NEU: Holt die Karte beim Hovern oder Klicken absolut in den Vordergrund */
    z-index: 50;
}

/* --- KALENDERBLATT (Links) --- */
.me-calendar-sheet {
    background: var(--primary-blue, #8bcbe6);
    color: white;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    text-align: center;
    /* FIX: Runde Ecken manuell setzen, da overflow entfernt wurde */
    border-top-left-radius: 11px;
    border-bottom-left-radius: 11px;
}

.me-month {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.me-day {
    font-family: 'Merriweather', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.me-weekday {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
}

.me-year {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.7;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* --- NEUES BODY LAYOUT (Desktop) --- */
.me-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.mobile-title {
    display: none;
}

.me-content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.desktop-title {
    font-family: 'Merriweather', serif;
    color: var(--text-brown, #8c4b38);
    font-size: 1.65rem;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.me-desc {
    font-family: 'Open Sans', sans-serif;
    color: #444;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Sidebar für Datum/Ort/Uhrzeit (Rechte Spalte) */
.me-meta-sidebar {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-left: 2px solid #f4f4f4;
    padding-left: 25px;
}

.me-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1.05rem;
    color: #444;
    font-weight: 600;
    line-height: 1.4;
}

.me-meta-item span.icon {
    font-size: 1.2rem;
    margin-top: -2px;
}

/* --- KALENDER-BUTTON & DROPDOWN --- */
.cal-dropdown-wrapper {
    position: relative;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
}

.me-cal-btn {
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-orange, #df6c30);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(223, 108, 48, 0.3);
}

.me-cal-btn:hover {
    background-color: #c95c25;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(223, 108, 48, 0.4);
}

/* FIX: Dropdown öffnet sich jetzt nach unten */
.cal-menu {
    position: absolute;
    top: 100%;
    /* Nach unten öffnen */
    left: 0;
    margin-top: 8px;
    /* Abstand zum Button */
    background: #fff;
    min-width: 260px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #eaeaea;
    padding: 8px 0;
    z-index: 9999;

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    /* Startet leicht nach oben versetzt */
    transition: all 0.2s ease;
}

.cal-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cal-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-dark, #333);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cal-menu a:hover {
    background-color: #f8f9fa;
    color: var(--primary-orange, #df6c30);
}

.cal-icon {
    font-size: 1.2rem;
    display: inline-block;
    text-align: center;
    width: 24px;
}

/* --- BILD-STYLING & LIGHTBOX --- */
.me-image {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    /* Wichtig für den Hover-Text */
    cursor: zoom-in;
    /* Zeigt die Maus als Lupe an */
}

.me-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.modern-event-card:hover .me-image img {
    transform: scale(1.03);
}

/* Der kleine "Bild vergrößern" Hinweis, der beim Hovern erscheint */
.me-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    pointer-events: none;
    /* Verhindert, dass der Text den Klick blockiert */
    opacity: 0;
    /* Erstmal unsichtbar */
    transition: opacity 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

.me-image:hover .me-zoom-hint {
    opacity: 1;
    /* Wird sichtbar, wenn man über das Bild fährt */
}

/* --- RESPONSIVE FÜR SMARTPHONES --- */
@media (max-width: 768px) {
    .modern-event-card {
        flex-direction: column;
    }

    .me-calendar-sheet {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px;
        /* Ecken auf dem Handy anpassen */
        border-top-left-radius: 11px;
        border-top-right-radius: 11px;
        border-bottom-left-radius: 0;
    }

    .me-day {
        font-size: 2.2rem;
        margin: 0;
    }

    .me-month {
        margin: 0;
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .me-weekday {
        margin: 0;
    }

    .me-year {
        margin: 0;
        margin-left: 8px;
        border-left: 1px solid rgba(255, 255, 255, 0.4);
        padding-left: 10px;
    }

    .me-body {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .desktop-title {
        display: none;
    }

    .mobile-title {
        display: block;
        font-family: 'Merriweather', serif;
        color: var(--text-brown, #8c4b38);
        font-size: 1.5rem;
        margin: 0;
        font-weight: 700;
        line-height: 1.3;
    }

    .me-meta-sidebar {
        flex: none;
        border-left: none;
        padding-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .me-meta-item {
        background: #f9f9f9;
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid #f0f0f0;
        font-size: 0.95rem;
        font-weight: 600;
        align-items: center;
    }

    .me-meta-item span.icon {
        margin-top: 0;
    }

    .cal-dropdown-wrapper {
        width: 100%;
    }

    .me-cal-btn {
        width: 100%;
        justify-content: center;
    }

    /* Menü öffnet auf dem Handy auch nach unten */
    .cal-menu {
        width: 100%;
        top: 100%;
        bottom: auto;
        margin-top: 8px;
    }
}