/* ============================================================
   STIL DER THEATER-AG-WEBSEITE
   Farben, Schrift und Aufbau orientieren sich an der
   offiziellen Website des Thomas-Mann-Gymnasiums Stutensee:
   - Schrift "Lato"
   - weiße Inhaltsfläche auf hellgrauem Hintergrund
   - Rot (#be3835) als Hauptfarbe
   - graue Überschriften mit drei kleinen Quadraten davor

   TIPP: Alle wichtigen Farben stehen hier oben als Variablen.
   Wenn ihr eine Farbe ändern wollt, reicht es, sie an dieser
   einen Stelle anzupassen.
   ============================================================ */
:root {
    --farbe-rot: #be3835;            /* TMG-Rot (Links, Akzente)          */
    --farbe-rot-dunkel: #962c2a;     /* dunkleres Rot für Hover-Effekte   */
    --farbe-rot-hell: #ffdedd;       /* sehr helles Rot für Flächen       */
    --farbe-grau-dunkel: #5e5e5f;    /* dunkles Grau (Navigation)         */
    --farbe-grau: #949494;           /* mittleres Grau (2. Quadrat)       */
    --farbe-grau-hell: #c8c8c8;      /* helles Grau (3. Quadrat)          */
    --farbe-ueberschrift: #696969;   /* graue Überschriften               */
    --farbe-text: #242424;           /* normaler Fließtext                */
    --farbe-weiss: #ffffff;          /* weiße Inhaltsfläche               */
    --farbe-seite: #ececec;          /* hellgrauer Seitenhintergrund      */
    --farbe-kasten: #e5e8ee;         /* hellgraue Info-Kästen             */
    --farbe-rahmen: #dddddd;         /* dezente Rahmenlinien              */

    --schrift: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --max-breite: 1185px;            /* Breite der weißen Inhaltsfläche   */
    --innen-abstand: 44px;           /* seitlicher Abstand des Inhalts    */
}

/* ---------- Grundlegendes ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* sanftes Scrollen bei Menü-Klicks */
}

body {
    font-family: var(--schrift);
    font-size: 16px;
    color: var(--farbe-text);
    line-height: 1.7;
    /* hellgrauer Hintergrund mit leichtem Verlauf – wie beim TMG */
    background: var(--farbe-seite) linear-gradient(180deg, rgba(200, 200, 200, 0.5), transparent 600px);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

/* Links sind rot – wie auf der TMG-Website */
a {
    color: var(--farbe-rot);
    text-decoration: none;
}

a:hover {
    color: var(--farbe-rot-dunkel);
    text-decoration: underline;
}

/* ============================================================
   WEISSE INHALTSFLÄCHE in der Seitenmitte
   ============================================================ */
.page {
    max-width: var(--max-breite);
    margin: 0 auto;
    background: var(--farbe-weiss);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.12);
    min-height: 100vh;
    position: relative;
}

/* ============================================================
   KOPFBEREICH (Header) mit Logo im TMG-Stil
   ============================================================ */
.site-header {
    background: var(--farbe-weiss);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px var(--innen-abstand);
}

/* Das Logo: graue Buchstaben + rotes Quadrat + roter Schriftzug */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.logo-square {
    width: 34px;
    height: 34px;
    background: var(--farbe-rot);
    flex-shrink: 0;
}

.logo-text {
    color: var(--farbe-rot);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Navigation: dunkelgraue Leiste ---------- */
.main-nav {
    background: var(--farbe-grau-dunkel);
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav a {
    display: block;
    padding: 12px 22px;
    color: var(--farbe-weiss);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
}

/* Pfeil vor jedem Menüpunkt – wie beim "Kontakt"-Reiter des TMG */
.main-nav a::before {
    content: "\2794\00a0"; /* Pfeil ➔ und Leerzeichen */
    font-size: 13px;
}

.main-nav a:hover {
    background: var(--farbe-rot);
    color: var(--farbe-weiss);
    text-decoration: none;
}

/* Menü-Knopf (drei Striche) – nur auf kleinen Bildschirmen sichtbar */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 28px;
    height: 4px;
    background: var(--farbe-grau-dunkel);
    border-radius: 2px;
}

/* ============================================================
   BÜHNENBILD (Hero) – wie der Bilder-Slider der Schulseite
   ============================================================ */
.hero {
    position: relative;
}

.hero-image {
    width: 100%;
    height: min(55vh, 460px);
    object-fit: cover;
}

/* Textkasten unten links auf dem Bild */
.hero-caption {
    position: absolute;
    left: var(--innen-abstand);
    bottom: 34px;
    background: rgba(94, 94, 95, 0.88); /* dunkles TMG-Grau, leicht durchsichtig */
    color: var(--farbe-weiss);
    padding: 14px 22px;
    border-left: 6px solid var(--farbe-rot);
}

.hero-caption h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1.2;
}

.hero-caption p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* Deko-Punkte wie beim Bilder-Slider */
.hero-dots {
    position: absolute;
    right: var(--innen-abstand);
    bottom: 14px;
    display: flex;
    gap: 8px;
}

.hero-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--farbe-grau);
}

.hero-dots span.aktiv {
    background: var(--farbe-rot);
    border-color: var(--farbe-rot);
}

/* ---------- Brotkrumen-Zeile ---------- */
.breadcrumb {
    padding: 12px var(--innen-abstand);
    font-size: 14px;
    color: var(--farbe-text);
    border-bottom: 1px solid var(--farbe-rahmen);
}

.breadcrumb a {
    color: var(--farbe-text);
    text-decoration: underline;
}

.breadcrumb a:hover {
    color: var(--farbe-rot);
}

.breadcrumb span {
    margin: 0 4px;
    color: var(--farbe-grau);
}

/* ============================================================
   SEKTIONEN
   ============================================================ */
.section {
    padding: 44px var(--innen-abstand);
}

/* Überschrift mit den drei Quadraten (rot, grau, hellgrau)
   davor – das Markenzeichen der TMG-Website */
.section-title {
    color: var(--farbe-ueberschrift);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: var(--farbe-rot);
    /* die beiden weiteren Quadrate entstehen durch Schatten */
    box-shadow: 24px 0 0 var(--farbe-grau),
                48px 0 0 var(--farbe-grau-hell);
    margin-right: 48px;
}

/* ---------- Über uns ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
}

/* Hellgrauer Kasten wie die Info-Flächen der Schulseite */
.fact-list {
    list-style: none;
    background: var(--farbe-kasten);
    border-left: 5px solid var(--farbe-rot);
    padding: 14px 20px;
}

.fact-list li {
    padding: 3px 0;
}

/* Bilder mit feinem Rahmen und Schatten – wie beim TMG */
.about-figure img,
.gallery-item img {
    border: 1px solid var(--farbe-rahmen);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.25);
}

.about-figure figcaption {
    font-size: 14px;
    color: var(--farbe-ueberschrift);
    margin-top: 10px;
}

/* ============================================================
   INFO-KASTEN (Ensemble & Spielplan)
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

/* Variante mit zwei Karten (Ensemble + Produktion) */
.info-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
    background: var(--farbe-kasten);
    border-top: 5px solid var(--farbe-rot);
    padding: 22px;
}

.info-card h3 {
    color: var(--farbe-ueberschrift);
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 18px;
}

.actor-list {
    list-style: none;
}

.actor-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(148, 148, 148, 0.35);
    font-weight: 700;
}

/* die Rolle (im <span>) dezent und rechtsbündig */
.actor-list li span {
    font-weight: 400;
    font-size: 13px;
    color: var(--farbe-ueberschrift);
    text-align: right;
    flex-shrink: 0;
}

.actor-list li:last-child {
    border-bottom: none;
}

.info-note {
    margin-top: 14px;
    font-size: 14px;
    font-style: italic;
    color: var(--farbe-ueberschrift);
}

/* ---------- Klickbare Stücke ---------- */
.stueck {
    background: var(--farbe-weiss);
    border: 1px solid var(--farbe-rahmen);
    padding: 14px 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stueck:hover,
.stueck:focus {
    border-color: var(--farbe-rot);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.15);
    outline: none;
}

.stueck-titel {
    color: var(--farbe-rot);
    font-size: 16px;
    font-weight: 700;
}

.stueck-datum {
    font-size: 13.5px;
    color: var(--farbe-ueberschrift);
    font-weight: 700;
    margin: 3px 0;
}

.stueck-kurz {
    font-size: 14px;
    color: var(--farbe-text);
}

/* Roter Hinweis "Weiterlesen …" – wie auf der Schulseite */
.stueck::after {
    content: "Weiterlesen …";
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--farbe-rot);
}

.stueck:hover::after {
    text-decoration: underline;
}

/* Die Details sind auf der Seite unsichtbar –
   JavaScript zeigt sie im Klick-Fenster (Modal) an. */
.stueck-details {
    display: none;
}

/* ============================================================
   GALERIE – im Stil von "Unsere Highlights"
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item figcaption {
    margin-top: 10px;
    color: var(--farbe-rot);
    font-weight: 700;
    font-size: 15px;
}

/* ============================================================
   FUSSBEREICH (Footer) – wie beim TMG:
   Copyright links, rote Links rechts, Pfeil nach oben
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--farbe-rahmen);
    padding: 26px var(--innen-abstand) 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy {
    font-size: 14px;
    color: var(--farbe-ueberschrift);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.footer-links li + li::before {
    content: "|";
    color: var(--farbe-grau);
    margin: 0 10px;
}

.footer-links a {
    font-size: 14px;
    color: var(--farbe-rot);
}

/* Pfeil-Knopf "nach oben" unten in der Mitte */
.scroll-top {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--farbe-weiss);
    border: 1px solid var(--farbe-rahmen);
    border-bottom: none;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--farbe-grau-dunkel);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.scroll-top:hover {
    background: var(--farbe-rot);
    color: var(--farbe-weiss);
}

/* ============================================================
   MODAL (Klick-Fenster für Stück-Details)
   ============================================================ */
/* Solange das Modal das Attribut "hidden" hat, ist es
   wirklich unsichtbar (wichtig, weil display:flex das
   hidden-Attribut sonst außer Kraft setzen würde) */
.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(36, 36, 36, 0.65); /* abgedunkelter Hintergrund */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 200;
}

.modal {
    background: var(--farbe-weiss);
    border-top: 6px solid var(--farbe-rot);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: modal-auf 0.2s ease-out;
}

@keyframes modal-auf {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal h3 {
    color: var(--farbe-ueberschrift);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 4px;
    padding-right: 2rem;
}

.modal-datum {
    color: var(--farbe-rot);
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-inhalt p {
    margin-bottom: 0.75rem;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--farbe-kasten);
    color: var(--farbe-grau-dunkel);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: var(--farbe-rot);
    color: var(--farbe-weiss);
}

/* ============================================================
   ANPASSUNG FÜR HANDYS UND TABLETS
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --innen-abstand: 20px;
    }

    .info-grid,
    .info-grid--2,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Menü-Knopf zeigen, Navigation ausklappbar machen */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
    }

    .main-nav.offen {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .logo-text {
        font-size: 15px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
