/* ==========================================================
   Frankenhofen online – Stylesheet
   Farben angelehnt an die alte Seite:
   Dunkeloliv #425118, Olivgrün #7B8F5A, Himmelblau #DEEFFF
   Keine externen Schriften, keine Cookies, kein Framework.
   ========================================================== */

:root {
  --oliv-dunkel: #425118;
  --oliv-tief: #2e3a10;
  --oliv: #7b8f5a;
  --oliv-hell: #e6ecd9;
  --himmel: #deefff;
  --himmel-hell: #f1f8ff;
  --himmel-kante: #bcd8f2;
  --text: #1f2615;
  --text-leise: #56604a;
  --weiss: #ffffff;
  --akzent: #c8762a;          /* warmes Orange – Nachfolger der alten Hinweisfarbe */
  --bayern: #1f6fb8;          /* für den Maibaum (weiß-blau) */
  --radius: 14px;
  --schatten: 0 1px 2px rgba(35, 45, 15, .06), 0 6px 20px rgba(35, 45, 15, .08);
  --breite: 1100px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--himmel-hell);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--oliv-dunkel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--akzent); }

h1, h2, h3 { font-family: var(--schrift-titel); color: var(--oliv-dunkel); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--oliv-dunkel); color: var(--weiss); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopfbereich ---------- */

.kopf {
  position: sticky; top: 0; z-index: 50;
  background: rgba(222, 239, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 4px solid var(--oliv);
  transition: box-shadow .3s;
}
.kopf.gescrollt { box-shadow: 0 4px 18px rgba(35, 45, 15, .15); }

.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.marke img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--weiss); box-shadow: 0 0 0 2px var(--oliv);
}
.marke-text { display: flex; flex-direction: column; line-height: 1.05; }
.marke-name { font-family: var(--schrift-titel); font-size: 1.45rem; font-weight: 700; color: #1b1b1b; }
.marke-zusatz { font-family: "Courier New", monospace; color: var(--oliv); font-size: .95rem; letter-spacing: .12em; }

/* Navigation */
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  position: relative; display: block; padding: 8px 12px;
  color: var(--oliv-dunkel); text-decoration: none; font-weight: 600; font-size: .98rem;
  border-radius: 8px; transition: background-color .2s, color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--akzent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover { background: rgba(123, 143, 90, .12); color: var(--oliv-tief); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--oliv-tief); }
.nav a.nav-maibaum { background: var(--bayern); color: var(--weiss); }
.nav a.nav-maibaum::after { background: var(--weiss); }
.nav a.nav-maibaum:hover { background: #185a96; color: var(--weiss); }

.menue-knopf {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; border-radius: 8px;
}
.menue-knopf span, .menue-knopf span::before, .menue-knopf span::after {
  display: block; width: 26px; height: 3px; background: var(--oliv-dunkel); border-radius: 2px;
  position: relative; transition: transform .3s ease, background-color .3s;
}
.menue-knopf span::before, .menue-knopf span::after { content: ""; position: absolute; left: 0; }
.menue-knopf span::before { top: -8px; }
.menue-knopf span::after { top: 8px; }
.menue-knopf[aria-expanded="true"] span { background: transparent; }
.menue-knopf[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.menue-knopf[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .js .menue-knopf { display: block; }
  .nav { width: 100%; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--himmel); border-bottom: 4px solid var(--oliv);
    display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease;
    box-shadow: 0 12px 20px rgba(35, 45, 15, .12);
  }
  .js .nav.offen { grid-template-rows: 1fr; }
  .js .nav > ul { overflow: hidden; }
  .nav ul { flex-direction: column; padding: 0 12px; gap: 0; }
  .js .nav.offen ul { padding: 8px 12px 16px; }
  .nav li { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
  .nav.offen li { opacity: 1; transform: none; }
  .nav.offen li:nth-child(2) { transition-delay: .04s; }
  .nav.offen li:nth-child(3) { transition-delay: .08s; }
  .nav.offen li:nth-child(4) { transition-delay: .12s; }
  .nav.offen li:nth-child(5) { transition-delay: .16s; }
  .nav.offen li:nth-child(6) { transition-delay: .20s; }
  .nav a { padding: 12px 10px; font-size: 1.05rem; border-bottom: 1px solid var(--himmel-kante); border-radius: 0; }
  .nav a.nav-maibaum { border-radius: 8px; margin-top: 8px; text-align: center; }
  .nav a::after { display: none; }
  /* ohne JavaScript: Menü einfach sichtbar */
  html:not(.js) .kopf-innen { flex-wrap: wrap; }
  html:not(.js) .nav li { opacity: 1; transform: none; }
}

/* ---------- Hero (Startseite) ---------- */

.hero {
  position: relative; min-height: min(62vh, 520px);
  display: flex; align-items: flex-end;
  background: var(--oliv-dunkel) url("../bilder/start/panoramaKueheklein.jpg") center 60% / cover no-repeat;
  color: var(--weiss);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30, 38, 10, .85) 0%, rgba(30, 38, 10, .35) 45%, rgba(30, 38, 10, 0) 75%);
}
.hero-inhalt { position: relative; max-width: var(--breite); width: 100%; margin: 0 auto; padding: 40px 20px 48px; }
.hero h1 { color: var(--weiss); font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero p { font-size: 1.2rem; margin: .3em 0 0; max-width: 40ch; color: var(--himmel); }
.hero .ueberzeile { text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; color: var(--himmel); margin: 0 0 .5em; }

/* Seitenkopf (Unterseiten) */
.seitenkopf { background: var(--oliv-dunkel); color: var(--himmel); padding: 44px 0 36px; position: relative; overflow: hidden; }
.seitenkopf::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(222,239,255,.12), rgba(222,239,255,0) 70%);
}
.seitenkopf h1 { color: var(--weiss); margin: 0; }
.seitenkopf p { margin: .4em 0 0; max-width: 60ch; }
.seitenkopf.maibaum { background: linear-gradient(135deg, var(--bayern), #0f4c85); }
.brotkrumen { font-size: .88rem; margin-bottom: .8em; }
.brotkrumen a { color: var(--himmel); }

/* ---------- Layout ---------- */

.inhalt { max-width: var(--breite); margin: 0 auto; padding: 0 20px; }
main { padding-bottom: 64px; }
.schmal { max-width: 760px; }
.abschnitt { padding-top: 8px; }

.raster { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.zweispaltig { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 760px) { .zweispaltig { grid-template-columns: 1fr; } }

/* Karten */
.karte {
  background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none; color: inherit;
}
a.karte:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(35,45,15,.08), 0 14px 30px rgba(35,45,15,.14); color: inherit; }
.karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
a.karte:hover img { transform: scale(1.04); }
.karte-bild { overflow: hidden; }
.karte-text { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.karte h3 { margin: 0; font-size: 1.15rem; }
.karte p { margin: 0; color: var(--text-leise); font-size: .97rem; }
.karte .mehr { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--oliv-dunkel); }
.karte .mehr::after { content: " →"; display: inline-block; transition: transform .2s; }
a.karte:hover .mehr::after { transform: translateX(4px); }

.kasten {
  background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); padding: 22px 24px;
}
.kasten > :first-child { margin-top: 0; }
.kasten.gruen { background: var(--oliv-dunkel); color: var(--himmel); }
.kasten.gruen h2, .kasten.gruen h3 { color: var(--weiss); }
.kasten.gruen a { color: var(--weiss); }

/* Fakten-Liste */
.fakten { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.fakten dt { font-weight: 700; color: var(--oliv-dunkel); }
.fakten dd { margin: 0; }
.kasten.gruen .fakten dt { color: var(--weiss); }

/* ---------- Archiv-Kennzeichnung ---------- */

.archiv-marke {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #f4ead8; color: #7a4a14; border: 1px solid #e3cfa9;
  padding: 3px 10px; border-radius: 999px; width: fit-content;
}
.archiv-marke::before { content: ""; width: 12px; height: 12px; background: currentColor; mask: var(--icon-archiv) center / contain no-repeat; -webkit-mask: var(--icon-archiv) center / contain no-repeat; }
:root { --icon-archiv: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v5H3zM4 9h16v12H4zm5 3v2h6v-2z'/%3E%3C/svg%3E"); }

.archiv-hinweis {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fbf5ea; border: 1px solid #ecdcbc; border-left: 5px solid var(--akzent);
  padding: 14px 18px; border-radius: 10px; margin: 28px 0; font-size: .95rem; color: #5b4420;
}
.archiv-hinweis strong { color: #7a4a14; }

/* ---------- Galerie ---------- */

.galerie { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 20px 0; padding: 0; list-style: none; }
.galerie figure { margin: 0; }
.galerie a { display: block; overflow: hidden; border-radius: 10px; box-shadow: var(--schatten); background: var(--himmel); }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.galerie a:hover img { transform: scale(1.06); }
.galerie figcaption { font-size: .88rem; color: var(--text-leise); padding: 6px 2px 0; line-height: 1.4; }
.galerie.hoch img { aspect-ratio: 3 / 4; }
.galerie.gross { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.panorama { border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); margin: 20px 0; }
.panorama img { width: 100%; }

figure.bild { margin: 24px 0; }
figure.bild img { border-radius: 10px; box-shadow: var(--schatten); }
figure.bild figcaption { font-size: .9rem; color: var(--text-leise); margin-top: 6px; }
.rechts { float: right; max-width: 320px; margin: 4px 0 16px 24px; }
@media (max-width: 640px) { .rechts { float: none; max-width: none; margin: 16px 0; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 26, 8, .88); }
.lightbox[open] { animation: einblenden .25s ease; }
.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox p { color: var(--himmel); text-align: center; margin: 10px 0 0; font-size: .95rem; }
.lightbox button {
  position: fixed; background: rgba(255,255,255,.14); color: var(--weiss); border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; transition: background .2s;
}
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lightbox .lb-zu { top: 16px; right: 16px; }
.lightbox .lb-zurueck { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-weiter { right: 16px; top: 50%; transform: translateY(-50%); }
@keyframes einblenden { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Zeitleiste (Chronik, Maibaum-Fahrplan) ---------- */

.zeitleiste { list-style: none; margin: 24px 0; padding: 0 0 0 28px; position: relative; }
.zeitleiste::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; background: var(--oliv-hell); border-radius: 2px; }
.zeitleiste li { position: relative; padding: 0 0 22px; }
.zeitleiste li::before {
  content: ""; position: absolute; left: -26px; top: 7px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--weiss); border: 3px solid var(--oliv);
}
.zeitleiste .jahr { font-weight: 700; color: var(--oliv-dunkel); font-family: var(--schrift-titel); font-size: 1.08rem; display: block; }
.zeitleiste.maibaum li::before { border-color: var(--bayern); }
.zeitleiste.maibaum .jahr { color: var(--bayern); }
.zeitleiste li.offen::before { background: var(--himmel); border-style: dashed; }

/* Tabellen */
.tabelle-rahmen { overflow-x: auto; margin: 20px 0; border-radius: var(--radius); box-shadow: var(--schatten); background: var(--weiss); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #e8eee0; vertical-align: top; }
thead th { background: var(--oliv-dunkel); color: var(--weiss); font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7faf2; }

/* Gedicht */
.gedicht { font-family: var(--schrift-titel); font-style: italic; background: var(--weiss); border-left: 5px solid var(--oliv); padding: 20px 26px; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--schatten); }
.gedicht p { margin: 0 0 1em; }
.gedicht footer { font-style: normal; font-family: var(--schrift); color: var(--text-leise); font-size: .92rem; }

/* Aufklapper (Rätsel, FAQ) */
details { background: var(--weiss); border-radius: 10px; box-shadow: var(--schatten); margin: 12px 0; }
summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--oliv-dunkel); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: transform .25s; color: var(--oliv); }
details[open] summary::after { transform: rotate(45deg); }
details > :not(summary) { padding: 0 18px; }
details > :last-child { padding-bottom: 16px; }

/* Buttons & Links */
.knopf {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: var(--oliv-dunkel); color: var(--weiss); text-decoration: none; font-weight: 600;
  transition: background .2s, transform .2s;
}
.knopf:hover { background: var(--oliv-tief); color: var(--weiss); transform: translateY(-1px); }
.knopf.hell { background: var(--weiss); color: var(--oliv-dunkel); }
.knopf.blau { background: var(--bayern); }
.knopf.blau:hover { background: #185a96; }
.zurueck { display: inline-block; margin-top: 36px; font-weight: 600; text-decoration: none; }
.zurueck::before { content: "← "; }

.datei { display: inline-flex; gap: 8px; align-items: center; }
.datei::before { content: "PDF"; font-size: .7rem; font-weight: 800; background: #b3261e; color: #fff; padding: 2px 6px; border-radius: 4px; }

/* Maibaum-Banner auf der Startseite */
.maibaum-banner {
  margin: 48px 0 0; border-radius: var(--radius); overflow: hidden; position: relative;
  background: repeating-linear-gradient(-45deg, #fff 0 22px, #e4f0fb 22px 44px);
  box-shadow: var(--schatten); display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px;
}
.maibaum-banner .stamm {
  height: 100%; min-height: 180px; background: repeating-linear-gradient(-30deg, var(--bayern) 0 18px, #fff 18px 36px);
  border-right: 4px solid var(--oliv);
}
.maibaum-banner .text { padding: 24px 28px 24px 16px; }
.maibaum-banner h2 { margin: 0 0 .3em; color: var(--bayern); }
.maibaum-banner p { margin: 0 0 1em; }
@media (max-width: 560px) { .maibaum-banner { grid-template-columns: 40px 1fr; } }

/* Unterstützen / Spenden */
.unterstuetzen {
  margin: 48px 0 0; padding: 26px 28px; border-radius: var(--radius); box-shadow: var(--schatten);
  background: var(--weiss); border-left: 6px solid var(--akzent);
  display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center;
}
.unterstuetzen h2 { margin: 0 0 .3em; }
.unterstuetzen p { margin: 0 0 .6em; }
.unterstuetzen .klein { font-size: .88rem; color: var(--text-leise); margin: 0; }
.knopf.paypal { background: #0070ba; font-size: 1.05rem; padding: 13px 26px; }
.knopf.paypal:hover { background: #005ea6; }
@media (max-width: 640px) { .unterstuetzen { grid-template-columns: 1fr; } }

.im-aufbau {
  background: #eaf3fd; border: 2px dashed var(--bayern); color: #0f4c85;
  padding: 14px 18px; border-radius: 10px; margin: 28px 0; font-size: .96rem;
}

/* ---------- Fuß ---------- */

.fuss { background: var(--oliv-tief); color: var(--himmel); padding: 40px 0 28px; font-size: .95rem; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 0 20px; display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.fuss a { color: var(--weiss); }
.fuss h2 { color: var(--weiss); font-size: 1.05rem; margin: 0 0 .6em; font-family: var(--schrift); }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin: 4px 0; }
.fuss .klein { grid-column: 1 / -1; border-top: 1px solid rgba(222,239,255,.2); padding-top: 18px; font-size: .85rem; opacity: .85; }
@media (max-width: 700px) { .fuss-innen { grid-template-columns: 1fr; } }

/* ---------- Dezente Einblend-Animation ---------- */

.js .einblenden { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .einblenden.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .einblenden { opacity: 1; transform: none; }
}

/* Druck */
@media print {
  .kopf, .fuss, .menue-knopf, .zurueck { display: none; }
  .hero { min-height: 0; background: none; color: #000; }
  .hero::before { display: none; }
  .hero h1 { color: #000; text-shadow: none; }
}
