/* Magdener Dorfzytig
   Gestaltung: dunkles Reblaub-Grün + Marken-Grün #589231 (Original-Logo),
   Roboto Slab (Titel) / Roboto (Text), gedämpfter Salbei-Hintergrund.
   Rubriken mit Linien statt Karten – das Vokabular einer Zeitung. */

:root {
    --gruen-tief: #33511f;      /* Reblaub – Hero, Menü, Footer */
    --akzent: #589231;          /* Marken-Grün aus dem Logo */
    --akzent-dunkel: #46741f;
    --tinte: #20241c;           /* grünstichiges Schwarz */
    --text: #2b2f27;
    --grau: #68705f;
    --linie: #c9cab9;
    --hintergrund: #deddd0;     /* gedämpftes Salbei – bewusst nicht weiss */
    --papier: #f6f5ef;          /* Inhaltsflächen */
    --gold: #CCA90A;            /* historische Akzentfarbe der alten Seite */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Roboto", system-ui, sans-serif;
    font-weight: 400;
    color: var(--text);
    background: var(--hintergrund);
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: "Roboto Slab", Georgia, serif;
    color: var(--tinte);
    line-height: 1.2;
    text-wrap: balance;
}

/* Browser-Oberflächen gehören zur Gestaltung: Auswahl, Caret, Scrollbalken */
::selection { background: var(--akzent); color: #fff; }
input, textarea { caret-color: var(--akzent-dunkel); }
html { scrollbar-color: var(--akzent-dunkel) var(--hintergrund); }
h1 { font-size: 2.4rem; font-weight: 600; margin: 0 0 .7rem; }
h2 { font-size: 1.45rem; font-weight: 600; margin: 2.75rem 0 .9rem; }
h3 { font-size: 1.15rem; font-weight: 600; }

/* Zwischentitel mit kurzer grüner Linie darüber – Rubrik-Marke der Zeitung */
h2::before {
    content: "";
    display: block;
    width: 2.5rem; height: 3px;
    background: var(--akzent);
    margin-bottom: .55rem;
}

a {
    color: var(--akzent-dunkel);
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--gruen-tief); }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--akzent);
    outline-offset: 2px;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* Kopf: Logo auf Papier, darunter dunkelgrüne Menüleiste */
.site-header { background: var(--papier); }
.header-inner {
    display: flex; flex-wrap: wrap; align-items: center;
    padding-top: 1.3rem;
}
.brand { display: block; }
.brand-logo { width: min(420px, 88vw); height: auto; display: block; }

.nav-toggle {
    display: none; margin-left: auto; font-size: 1.5rem;
    background: none; border: 1px solid var(--linie); border-radius: 4px;
    padding: .2rem .6rem; cursor: pointer; color: var(--tinte);
}

.site-nav {
    flex-basis: 100%;
    display: flex; flex-wrap: wrap;
    margin-top: 1.1rem;
    /* Tinte statt Grün: die Leiste hebt sich vom grünen Titelband darunter ab */
    background: var(--tinte);
    box-shadow: 0 0 0 100vmax var(--tinte);
    clip-path: inset(0 -100vmax);
}
.site-nav a {
    font-weight: 500; font-size: 1rem;
    text-decoration: none; color: #dcded2;
    padding: .8rem 1.15rem;
    /* Menüpunkte füllen die ganze Inhaltsbreite bis zur rechten Kante */
    flex: 1 1 auto;
    text-align: center;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.site-nav a.aktiv { color: #fff; background: var(--akzent); font-weight: 600; }

main { padding: 0 1.25rem 4rem; }

/* Titelbalken der Unterseiten – der Zeitungskopf jeder Rubrik */
.seitenkopf {
    background: var(--gruen-tief);
    color: #edf0e3;
    padding: 2.2rem 0 2.5rem;
}
.seitenkopf h1 { color: #fff; margin: 0; }
.seitenkopf .lead {
    font-family: "Roboto Slab", serif;
    font-size: 1.2rem; color: #cfdfb9;
    max-width: 62ch; margin: .6rem 0 0;
}

/* Inhalt der Unterseiten liegt auf einem Papierbogen */
main.blatt {
    background: var(--papier);
    padding: 2.25rem 3rem 3.5rem;
    box-shadow: 0 14px 34px rgba(32, 36, 28, .16);
    margin-bottom: 4rem;
}
main.blatt > h2:first-child { margin-top: 0; }
main.blatt p, main.blatt ul, main.blatt ol { max-width: 72ch; }
main.blatt table.termine { border: 1px solid var(--linie); border-top: 2px solid var(--gruen-tief); }

/* Hero: vollbreites dunkelgrünes Band, die aktuelle Ausgabe wie ein
   frisch verteiltes Heft */
.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas:
        "kopf   cover"
        "aktion cover";
    column-gap: 3rem; row-gap: .25rem;
    align-items: start;
    background: var(--gruen-tief);
    box-shadow: 0 0 0 100vmax var(--gruen-tief);
    clip-path: inset(0 -100vmax);
    color: #edf0e3;
    padding: 3rem 0 3.25rem;
    margin-bottom: 2.5rem;
}
.hero-kopf   { grid-area: kopf; align-self: end; }
.hero-cover  { grid-area: cover; align-self: center; }
.hero-aktion { grid-area: aktion; }
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin: .9rem 0 1.1rem; }

/* Meldung zur neuen Ausgabe – gedrucktes Papier-Etikett mit feinem Goldrahmen:
   leuchtet auf dem Dunkelgrün, wirkt aber wie Druckerzeugnis statt Callout */
.hero-meldung {
    display: inline-block;
    background: var(--papier);
    color: var(--tinte);
    font-family: "Roboto Slab", serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.45;
    border: 1px solid var(--gold);
    outline: 3px solid var(--papier); /* Papierrand um den Goldrahmen, wie beim Heft */
    padding: .55rem 1.1rem;
    margin: 1rem 0 0;
    box-shadow: 0 6px 16px rgba(10, 18, 4, .35);
}
.hero h1 { color: #fff; }
.hero-sub {
    font-size: 1.3rem; color: #cfdfb9; margin-top: 0;
    font-family: "Roboto Slab", serif;
}
.hero-info { max-width: 52ch; color: #dde3cf; }
/* Buttons im Hero in Tinte – Interaktion trägt die Nav-Farbe,
   das Papier-Etikett bleibt das einzige helle Highlight */
.hero .btn { background: var(--tinte); color: #fff; }
.hero .btn:hover { background: #000; color: #fff; }
.hero .btn-sekundaer { background: transparent; border: 2px solid rgba(246,245,239,.55); color: #f1f4e8; }
.hero .btn-sekundaer:hover { background: rgba(255,255,255,.1); border-color: #f6f5ef; color: #fff; }
.hero-cover img {
    width: 100%; max-width: 330px; display: block; margin-left: auto;
    aspect-ratio: 210 / 297; object-fit: cover; /* kein Layout-Sprung beim Laden */
    border: 5px solid var(--papier);
    box-shadow: 0 16px 36px rgba(10, 18, 4, .45);
    transform: rotate(1.2deg);   /* leicht aufgelegtes Heft */
}

/* Buttons: Satzschrift, sagen was passiert */
.btn {
    display: inline-block; background: var(--akzent); color: #fff;
    font-family: "Roboto", sans-serif; font-weight: 600; font-size: 1rem;
    padding: .7rem 1.4rem; border-radius: 3px;
    text-decoration: none; border: none; cursor: pointer;
}
.btn { transition: background-color .15s ease-out; }
.btn:hover { background: var(--akzent-dunkel); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-sekundaer { background: transparent; color: var(--akzent-dunkel); border: 2px solid var(--akzent); }
.btn-sekundaer:hover { background: #d2dcc0; color: var(--gruen-tief); }

/* Tabellen – Zeitungsmaterial: Linien tragen die Ordnung */
table.termine {
    border-collapse: collapse; width: 100%; max-width: 760px;
    background: var(--papier);
    border-top: 2px solid var(--gruen-tief);
}
.termine th, .termine td {
    text-align: left; padding: .6rem .9rem;
    border-bottom: 1px solid var(--linie); vertical-align: top;
    font-variant-numeric: tabular-nums; /* Daten und Preise in Tabellenziffern */
}
.termine thead th {
    font-family: "Roboto", sans-serif; font-weight: 600;
    color: var(--gruen-tief); background: none;
    border-bottom: 2px solid var(--akzent);
}

/* Rubriken statt Karten: Linie oben, keine Kästen, kein Einheitsschatten */
.karten {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem 2.5rem; margin-top: 2.5rem;
}

/* Sponsoren-Logos auf weissem Grund, damit Logos mit weissem Hintergrund sauber sitzen */
/* Sponsoren-Band auf jeder Seite, direkt über dem Fuss */
.sponsoren-band .wrap { border-top: 1px solid var(--linie); padding-top: 2rem; }
.sponsoren-band h2 { margin-top: 0; }
.sponsoren-band + .site-footer { margin-top: 2rem; }
.sponsoren { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.sponsoren a {
    display: block; background: #fff; padding: .75rem 1rem;
    border: 1px solid var(--linie);
}
.sponsoren img { display: block; max-width: 200px; height: auto; }
.karte {
    border-top: 3px solid var(--akzent);
    padding: 1rem 0 1.5rem;
    background: none;
}
.karte h3 { margin: .2rem 0 .5rem; }

/* Einleitung der Unterseiten: Text links, Themenbild rechts auf gleicher Höhe */
.intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 2.5rem;
    align-items: start;
}
.intro-text > :first-child { margin-top: 0; }
.intro-text > :last-child { margin-bottom: 0; }
.intro .themenbild { margin: .35rem 0 0; max-width: none; }

/* Themenbild */
.themenbild {
    width: 100%; max-width: 760px; display: block;
    aspect-ratio: 3 / 2; object-fit: cover; /* kein Layout-Sprung beim Laden */
    margin: 0 0 1.5rem;
    border: 4px solid var(--papier);
    box-shadow: 0 6px 18px rgba(32, 36, 28, .18);
}

/* Team: Porträtraster */
.team-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 1.5rem; margin: 1.2rem 0 2.5rem;
}
.team-mitglied {
    margin: 0;
    text-align: left;
    background: var(--papier);
    padding-bottom: .9rem;
}
.team-mitglied img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top;
    display: block; margin: 0 0 .7rem;
}
/* Ohne Foto: Initialen im selben Quadrat */
.team-platzhalter {
    aspect-ratio: 1 / 1; display: grid; place-items: center;
    margin: 0 0 .7rem;
    background: var(--hintergrund); color: var(--gruen-tief);
    font-family: "Roboto Slab", serif; font-size: 2.6rem; font-weight: 600;
}
.team-mitglied figcaption { padding: 0 .9rem; }
.team-rolle {
    font-size: .85rem; font-weight: 500; color: var(--akzent-dunkel);
}
.team-name { font-family: "Roboto Slab", serif; font-size: 1.05rem; color: var(--tinte); }

/* Ausgaben-Archiv */
.jahrgang h2 { margin-bottom: 1.1rem; }
.ausgaben-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.6rem; margin-bottom: 1rem;
}
.ausgabe-kachel { text-align: left; }
.ausgabe-kachel img, .ausgabe-kachel .platzhalter {
    width: 100%; aspect-ratio: 210 / 297; object-fit: cover;
    border: 3px solid var(--papier); background: var(--papier);
    box-shadow: 0 5px 14px rgba(32, 36, 28, .22);
    display: grid; place-items: center; color: var(--grau);
}
.ausgabe-kachel a { text-decoration: none; }
.ausgabe-kachel a:hover img { box-shadow: 0 8px 20px rgba(32, 36, 28, .34); }
.ausgabe-label { margin-top: .55rem; font-size: .95rem; font-family: "Roboto Slab", serif; color: var(--tinte); }
.download-link {
    font-weight: 600; font-size: .9rem;
    color: var(--akzent-dunkel); text-decoration: underline;
}
.download-link:hover { color: var(--gruen-tief); }

/* Formulare */
.formular { max-width: 540px; display: grid; gap: 1rem; }
.formular label { display: grid; gap: .3rem; font-weight: 500; font-size: .95rem; }
.formular input, .formular textarea, .formular select {
    padding: .6rem .7rem; border: 1px solid #a7aa98; border-radius: 3px;
    font: inherit; background: var(--papier); color: var(--text);
}
.formular input:focus, .formular textarea:focus, .formular select:focus {
    outline: 3px solid var(--akzent); outline-offset: 0;
}
.formular .hp { position: absolute; left: -9999px; }
.meldung { padding: .7rem 1rem; max-width: 640px; }
.meldung.ok { background: #e3ecd3; border: 1px solid var(--akzent-dunkel); }
.meldung.fehler { background: #f3e0dd; border: 1px solid #a33a2a; }

/* Fuss */
.site-footer { background: var(--gruen-tief); color: #d9dfc9; margin-top: 3.5rem; }
.footer-inner {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
    padding: 2.4rem 1.25rem; font-size: .95rem;
}
.site-footer a { color: #b9d6a3; }
.footer-copy { align-self: end; text-align: right; color: #b3c0a1; }

/* Bewegung nur, wenn erwünscht */
@media (prefers-reduced-motion: reduce) {
    .hero-cover img { transform: none; }
    * { transition: none !important; }
}

/* Responsiv */
@media (max-width: 760px) {
    h1 { font-size: 1.9rem; }
    main.blatt { padding: 1.5rem 1.25rem 2.5rem; }
    /* Handy: Bild über dem Text, volle Breite */
    .intro { grid-template-columns: 1fr; gap: 1.25rem; }
    .intro .themenbild { order: -1; margin: 0; }
    .seitenkopf { padding: 1.6rem 0 1.9rem; }
    /* Reihenfolge auf dem Handy: Schlagzeile, dann das Heft, dann Aktion */
    .hero {
        grid-template-columns: 1fr;
        grid-template-areas: "kopf" "cover" "aktion";
        row-gap: 1.5rem;
        padding: 2rem 0 2.5rem;
    }
    .hero-cover img { margin: 0 auto; max-width: 240px; transform: none; }
    /* Banderole zentriert über dem Heft, wie aufgeklebt */
    .hero-meldung { display: table; margin: .9rem auto 0; font-size: 1rem; }
    .hero-knoepfe { display: grid; gap: .6rem; margin: 0 0 1rem; }
    .hero-knoepfe .btn { text-align: center; }
    .termine th, .termine td { padding: .45rem .6rem; font-size: .92rem; }
    .brand-logo { width: min(300px, 80vw); }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-copy { text-align: left; }
    .nav-toggle { display: block; }
    .site-nav { display: none; flex-direction: column; }
    body.nav-offen .site-nav { display: flex; }
    .site-nav a { border-top: 1px solid rgba(255,255,255,.14); }
}
