@import url("fonts.css");

/* Freiberger Sommernächte · Bootstrap 5.3
 * Nach bootstrap.min.css laden; old_css.css nicht zusätzlich einbinden.
 * Layout/Abstände: Bootstrap-Klassen. Beispiele: BOOTSTRAP.md.
 */

/* Farben, Schrift und Bootstrap-Komponenten: src/bootstrap/_variables.scss. */
html {
    scroll-padding-top: 2rem;
    scrollbar-color: var(--bs-primary) var(--bs-body-bg);
}
body {
    min-height: 100vh;
    min-height: 100svh;
    overflow-wrap: break-word;
}
::selection { color: var(--bs-body-color); background: var(--bs-highlight-bg); }
a { text-underline-offset: .22em; text-decoration-thickness: 1px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--bs-secondary);
    outline-offset: 3px;
}
:where(input, textarea, select) {
    accent-color: var(--bs-secondary);
    caret-color: var(--bs-secondary);
}

/* Nur redaktionelle Typografie ergänzen; Schrift und Gewicht kommen aus Bootstrap. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    text-wrap: balance;
    letter-spacing: -.025em;
}

/* Opt-in für Fließtexte, ohne Grid-Spalten pauschal zu begrenzen. */
.prose { max-width: 72ch; }
.prose :where(h2, h3, h4):not(:first-child) { margin-top: 1.75em; }

/* Bildbühne als eigene Komponente. Inhalt und Abstände: Bootstrap. */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
    color: #fff;
    background: var(--bs-secondary) var(--hero-image, none) center / cover;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-home {
    min-height: clamp(24rem, 45vw, 34rem);
    padding-block: clamp(5rem, 10vw, 8rem);
}
.hero-page { min-height: 18rem; padding-block: 4rem; }
.hero h1 {
    width: fit-content;
    max-width: 100%;
    padding: .25em .4em;
    color: var(--hero-title-color, #fff);
    background-color: var(--hero-title-background, var(--bs-primary));
    line-height: 0.725;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

/* Gemeinsamer Ausschnitt für Hero und Footer, ausgerichtet an .container-xl.
 * --brand-width bei abweichender Logobreite am Hero setzen. */
.hero--notched, .footer--notched {
    --brand-width: clamp(10rem, 27vw, 22.5rem);
    --notch-container-width: 100%;
    --notch-start: max(.75rem, calc((100% - var(--notch-container-width)) / 2 + .75rem));
    --notch-depth: clamp(2rem, 5vw, 3.75rem);
    clip-path: polygon(0 0, var(--notch-start) 0,
        calc(var(--notch-start) + var(--brand-width) / 2) var(--notch-depth),
        calc(var(--notch-start) + var(--brand-width)) 0,
        100% 0, 100% 100%, 0 100%);
}
@media (min-width: 1200px) {
    .hero--notched, .footer--notched { --notch-container-width: 1140px; }
}
@media (min-width: 1400px) {
    .hero--notched, .footer--notched { --notch-container-width: 1320px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Navigation; Layout übernimmt Bootstrap. */
.section-nav .btn { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.section-nav .btn:is(:hover, :focus-visible, .active) {
    text-decoration: underline;
    text-underline-offset: .22em;
}
.section-nav .btn.active { font-weight: 700; }
.brand { width: clamp(10rem, 27vw, 22.5rem); }
.no-js .navbar-collapse { display: block; }
.no-js .navbar-toggler { display: none; }
#main-nav .nav-link[aria-current="page"] { text-decoration: underline; }
.nav-icon .nav-link { display: inline-flex; align-items: center; gap: .5rem; }
.nav-icon .navigation-icon { display: block; width: 25px; height: 25px; object-fit: contain; }

.partner-entry:is(a):is(:hover, :focus-visible) figure {
    border-color: var(--bs-primary) !important;
}
.partner-entry:is(a):is(:hover, :focus-visible) figcaption {
    text-decoration: underline;
    text-underline-offset: .22em;
}

@media print {
    .site-header, .site-footer, .hero, .scroll-top { display: none !important; }
}

/* Programm: kompakte Vorschaubilder und lesbare Veranstaltungszeilen. */
.programme-thumbnail { aspect-ratio: 3 / 2; object-fit: contain; object-position: top; }
.programme-title { color: inherit; text-decoration: none; }
.programme-title:is(:hover, :focus-visible) { text-decoration: underline; }
.programme-detail-image { max-height: 32rem; object-fit: contain; object-position: top; }
.programme-description { white-space: pre-line; }
.programme-description:has(p) { white-space: normal; }

.programme-entry {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.programme-entry-content { grid-column: 2; min-width: 0; }
.programme-entry-image { grid-column: 2; justify-self: end; width: 250px; max-width: 100%; }
.programme-calendar {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: block;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    text-align: center;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.programme-calendar-month {
    display: block;
    padding: .35rem .2rem;
    background: var(--bs-primary);
    color: var(--bs-white);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}
.programme-calendar-day { display: block; padding-top: .35rem; font-size: 2rem; font-weight: 700; }
.programme-calendar-year { display: block; padding: .1rem .2rem .45rem; font-size: .8rem; }
@media (min-width: 576px) {
    .programme-entry { grid-template-columns: 5rem minmax(0, 1fr); gap: 1.5rem; }
    .programme-entry--with-image { grid-template-columns: 5rem minmax(0, 1fr) clamp(10rem, 25vw, 300px); }
    .programme-entry-image { grid-column: 3; grid-row: 1; width: 100%; }
    .programme-calendar-day { font-size: 2.5rem; }
}

/* MASSIF-picture bleibt innerhalb der bestehenden Bootstrap-Bildflächen. */
.ratio > picture { display: block; }
.ratio > picture > img { width: 100%; height: 100%; }
.hero > picture, .hero > .hero-image { position: absolute; inset: 0; z-index: -2; display: block; }
.hero > picture > .hero-image, .hero > .hero-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Der Footer greift das Ausschnittmotiv und die warme Farbpalette auf. */
.site-footer {
    padding-top: var(--notch-depth, 0px);
    background-color: var(--bs-secondary);
    color: var(--bs-light);
}
.site-footer a { color: inherit; }
.site-footer .footer-brand { text-decoration: none; }
.site-footer .footer-location { color: rgba(var(--bs-light-rgb), .8); }
.site-footer a:is(:hover, :focus) { color: var(--bs-light); text-decoration: underline; }
.site-footer a:focus-visible { outline: 3px solid var(--bs-light); outline-offset: 3px; box-shadow: none; }
.site-footer .nav-link { display: inline-flex; align-items: center; min-height: 44px; }

/* Modulgrenzen unabhängig vom internen Text-/Bildlayout erkennbar machen. */
.content-module { display: flow-root; }
#inhalt > .content-module + .content-module { margin-block-start: clamp(2rem, 4vw, 3.5rem); }
.content-module > :last-child,
.content-module > .ck-content > :last-child { margin-bottom: 0; }

/* Kartenausgabe des Geolocation-AddOns. */
.location-map { display: block; width: 100%; height: clamp(20rem, 50vw, 32rem); }
