/*
|--------------------------------------------------------------------------
| Grundlayout
|--------------------------------------------------------------------------
*/

.calendar-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 2rem;

    width: min(1280px, calc(100% - 3rem));
    margin: 2rem auto 4rem;
}

.calendar-detail-main,
.calendar-detail-sidebar {
    min-width: 0;
}


/*
|--------------------------------------------------------------------------
| Informationskarten
|--------------------------------------------------------------------------
*/

.calendar-detail-facts {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.calendar-detail-fact,
.calendar-detail-section,
.calendar-detail-summary,
.calendar-detail-error {
    border: 1px solid rgba(143, 180, 226, 0.2);
    border-radius: 0.85rem;

    background:
        linear-gradient(
            145deg,
            #18375c 0%,
            #122b49 52%,
            #0e233d 100%
        );

    color: #eef5ff;

    box-shadow:
        0 12px 30px rgba(3, 14, 31, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calendar-detail-fact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;

    min-height: 88px;
    padding: 1rem 1.15rem;
}

.calendar-detail-fact-label,
.calendar-detail-eyebrow,
.calendar-detail-summary-eyebrow {
    display: block;

    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.09em;
    text-transform: uppercase;

    color: #9ebbe2;
}

.calendar-detail-fact-value {
    overflow-wrap: anywhere;

    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;

    color: #ffffff;
}


/*
|--------------------------------------------------------------------------
| Beschreibung
|--------------------------------------------------------------------------
*/

.calendar-detail-section {
    padding: 1.6rem;
}

.calendar-detail-section-title {
    margin: 0.4rem 0 1rem;

    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.25;

    color: #ffffff;
}

.calendar-detail-description {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #d7e5f7;
}

.calendar-detail-description p {
    margin: 0 0 1rem;
}

.calendar-detail-description p:last-child {
    margin-bottom: 0;
}

.calendar-detail-description a {
    color: #8fc4ff;
}

.calendar-detail-description a:hover {
    color: #b8dcff;
}


/*
|--------------------------------------------------------------------------
| Seitenleiste
|--------------------------------------------------------------------------
*/

.calendar-detail-summary {
    position: sticky;
    top: 1.5rem;

    padding: 1.5rem;
}

.calendar-detail-summary-title {
    margin: 0.4rem 0 1.25rem;

    font-size: 1.35rem;
    line-height: 1.3;

    color: #ffffff;
}

.calendar-detail-summary-list {
    display: flex;
    flex-direction: column;

    margin: 0;
}

.calendar-detail-summary-item {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;

    padding: 0.85rem 0;

    border-bottom:
        1px solid rgba(161, 193, 229, 0.16);
}

.calendar-detail-summary-item:first-child {
    padding-top: 0;
}

.calendar-detail-summary-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.calendar-detail-summary-item dt {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #9eb0c8;
}

.calendar-detail-summary-item dd {
    min-width: 0;
    margin: 0;

    overflow-wrap: anywhere;

    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: right;

    color: #f2f7ff;
}


/*
|--------------------------------------------------------------------------
| Externer Link
|--------------------------------------------------------------------------
*/

.calendar-detail-external-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;

    border: 1px solid #3d8df5;
    border-radius: 0.6rem;

    background:
        linear-gradient(
            135deg,
            #347fe8 0%,
            #2367c8 100%
        );

    color: #ffffff;

    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;

    box-shadow:
        0 8px 20px rgba(16, 88, 190, 0.24);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.calendar-detail-external-link:hover {
    border-color: #61a3fa;

    background:
        linear-gradient(
            135deg,
            #438ff0 0%,
            #2b72d7 100%
        );

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(16, 88, 190, 0.32);
}

.calendar-detail-external-link:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.4);
    outline-offset: 3px;
}


/*
|--------------------------------------------------------------------------
| Fehleransicht
|--------------------------------------------------------------------------
*/

.calendar-detail-error {
    width: min(680px, calc(100% - 3rem));
    margin: 2rem auto 4rem;
    padding: 2rem;

    text-align: center;
}

.calendar-detail-error h2 {
    margin: 0 0 0.75rem;
    color: #ffffff;
}

.calendar-detail-error p {
    margin: 0;
    color: #d2dfef;
}

.calendar-detail-error a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 1.25rem;
    padding: 0.7rem 1rem;

    border: 1px solid #3d8df5;
    border-radius: 0.55rem;

    background:
        linear-gradient(
            135deg,
            #347fe8 0%,
            #2367c8 100%
        );

    color: #ffffff;

    font-weight: 700;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.calendar-detail-error a:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(16, 88, 190, 0.28);
}


/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 1000px) {
    .calendar-detail-layout {
        grid-template-columns: minmax(0, 1fr) 310px;
    }

    .calendar-detail-facts {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}


/*
|--------------------------------------------------------------------------
| Kleine Tablets
|--------------------------------------------------------------------------
*/

@media (max-width: 820px) {
    .calendar-detail-layout {
        grid-template-columns: 1fr;
        width: min(100% - 2rem, 760px);
    }

    .calendar-detail-summary {
        position: static;
    }
}


/*
|--------------------------------------------------------------------------
| Smartphones
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {
    .calendar-detail-layout {
        width: calc(100% - 1.25rem);
        margin: 1.25rem auto 2.5rem;
        gap: 1.25rem;
    }

    .calendar-detail-facts {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .calendar-detail-fact {
        min-height: 0;
        padding: 1rem;
    }

    .calendar-detail-section,
    .calendar-detail-summary {
        padding: 1.2rem;
    }

    .calendar-detail-summary-item {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .calendar-detail-summary-item dd {
        text-align: left;
    }

    .calendar-detail-error {
        width: calc(100% - 1.25rem);
        margin: 1.25rem auto 2.5rem;
        padding: 1.5rem 1.2rem;
    }
}