
.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.75rem;
    justify-content: center;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.04em;
}

.cal-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================
   CALENDAR WRAPPER & NAV
========================================= */

.calendar-wrapper {
    max-width: 860px;
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
    box-sizing: border-box;
    width: 100%;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.cal-title {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: #111;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cal-btn {
    background: rgba(45, 147, 214, 0.1);
    border: 1.5px solid rgba(29, 116, 173, 0.589);
    color: #1a6fa8;
    font-size: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-btn:hover {
    background: rgba(37, 144, 214, 0.548);
    border-color: #2d93d6;
}

/* =========================================
   GRID
========================================= */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.cal-day-label {
    text-align: center;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #555;
    padding-bottom: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Base day cell */
.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    font-weight: 300;
    color: #222;
    background: rgba(139, 116, 158, 0.267);
    border: 1.5px solid rgba(38, 79, 110, 0.493);
    position: relative;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: default;
    user-select: none;
}

.cal-day.empty {
    background: transparent;
    border: none;
}

/* Past days — muted */
.cal-day.past {
    color: black;
    background: rgba(41, 70, 88, 0);
    border: 1.5px solid rgba(38, 79, 110, 0.493);
}

/* Today */
.cal-day.today {
    border: 4px solid rgb(221, 10, 10);
    
    
    color: black;

    background: rgba(221, 10, 10, 0);
}

/* =========================================
   EVENT DAYS — per type
========================================= */

.cal-day.has-event {
    cursor: pointer;
    
    
}

.cal-day.has-event:hover {
    transform: scale(1.07);
}

/* Vortrag — blue */
.cal-day.type-vortrag {
    background: #33d62d6c;
    border-color: #33d62d00;
    color: black;
    box-shadow: 0 0px 6px #33d62d;
    border: 1.5px solid rgba(38, 79, 110, 0.493);
    
}
.cal-day.type-vortrag:hover {
    background: #33d62d6c;
    box-shadow: 0 6px 18px #33d62d;
}

/* Asession — green */
.cal-day.type-asession {
    background: #2d92d665;
    border-color: #2d92d600;
    box-shadow: 0 0 6px #2d93d6;
    border: 1.5px solid rgba(38, 79, 110, 0.493);
}
.cal-day.type-asession:hover {
    background: #2d92d665;
    box-shadow: 0 6px 18px #2d93d6;
}


/* Workshop — purple */
.cal-day.type-workshop {
    background: #e908e959;
    border-color: #e908e900;
    box-shadow: 0 0px 6px #e908e9;
    border: 1.5px solid rgba(38, 79, 110, 0.493);
}
.cal-day.type-workshop:hover {
    background: #db3fdb70;
    box-shadow: 0 6px 18px #e908e9;
}

/* Sonstige — grey */
.cal-day.type-sonstige {
    background: #e28f2394;
    border-color: #2d92d600;
    box-shadow: 0 0px 6px #e28f23;
    border: 1.5px solid rgba(38, 79, 110, 0.493);
    
}
.cal-day.type-sonstige:hover {
    background: #e28f2394;
    box-shadow: 0 6px 18px #e28f23;
}

/* Past events — desaturated */
.cal-day.past-event {
    
    filter: grayscale(0.1);
}

/* =========================================
   EVENT DOTS
========================================= */

.event-dots {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.type-dot-vortrag  { background: #33d62d; box-shadow: 0 0 4px rgba(45,147,214,0.6); }
.type-dot-asession    { background: #2d93d6; box-shadow: 0 0 4px rgba(61,184,122,0.6); }
.type-dot-workshop { background: #e908e9; box-shadow: 0 0 4px rgba(155,111,212,0.6); }
.type-dot-sonstige { background: #e28f23; box-shadow: 0 0 4px rgba(226,143,35,0.6); }

/* Legend dots match */
.type-vortrag  { background: #33d62d; }
.type-asession    { background: #2d93d6; }
.type-workshop { background: #e908e9; }
.type-sonstige { background: #e28f23; }

/* =========================================
   MODAL
========================================= */

.event-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.event-modal-backdrop.open {
    display: flex;
}

.event-modal {
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(45, 147, 214, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.modal-event + .modal-event {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-type-badge {
    display: inline-block;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 2rem;
    padding: 0.2rem 0.75rem;
    margin-bottom: 0.6rem;
}

.type-badge-vortrag  { background: rgba(45,147,214,0.12);  color: #33d62d; }
.type-badge-asession    { background: rgba(61,184,122,0.12);   color: #2d93d6; }
.type-badge-workshop { background: rgba(155,111,212,0.12);  color: #e908e9; }
.type-badge-sonstige { background: rgba(138,155,176,0.12);  color: #e28f23; }

.modal-event-title {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    color: #3a3a3a;
    margin-bottom: 0.75rem;
}

.modal-description {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a6fa8;
    text-decoration: none;
    background: rgba(45, 147, 214, 0.1);
    border: 1px solid rgba(45, 147, 214, 0.25);
    border-radius: 2rem;
    padding: 0.35rem 0.9rem;
    transition: background 0.2s, border-color 0.2s;
}

.modal-link:hover {
    background: rgba(45, 147, 214, 0.2);
    border-color: #2d93d6;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .calendar-wrapper {
        margin: -6rem auto 6rem;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .cal-day {
        border-radius: 0.4rem;
        font-size: 0.7rem;
    }

    .cal-btn {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }

    .event-modal {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .cal-legend {
        gap: 0.5rem 1rem;
    }

    .cal-legend-item {
        font-size: 0.72rem;
    }

}