/* ==========================================================
   MFC Phönix Lohne e.V. – Stylesheet
   Farben zentral hier ändern (Abschnitt :root)
   ========================================================== */

:root {
  --himmel: #16263f;        /* dunkles Nachtblau: Kopf- und Fußbereich */
  --himmel-2: #22385a;
  --glut: #d7191f;          /* Vereinsrot aus dem Logo: Akzente, Buttons */
  --glut-dunkel: #a81217;
  --sand: #f7f3ec;          /* Seitenhintergrund */
  --papier: #ffffff;        /* Inhaltsflächen */
  --text: #1f2430;
  --text-leise: #5b6372;
  --linie: #e3ddd2;
  --radius: 10px;
  --breite: 1120px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand: #11161f;
    --papier: #1a2130;
    --text: #e8eaee;
    --text-leise: #a7afbd;
    --linie: #2c3546;
    --glut: #ff5d5d;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--sand);
}

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

a { color: var(--glut-dunkel); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { a { color: var(--glut); } }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p, ul, ol { margin: 0 0 1em; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--glut); color: #fff; padding: .5em 1em; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }

/* ---------- Kopfbereich ---------- */
.kopf {
  background: var(--himmel);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.kopf .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.marke {
  display: flex; align-items: center; gap: .7rem;
  color: #fff; text-decoration: none; font-weight: 700;
  line-height: 1.15;
}
.marke img { width: 46px; height: 46px; border-radius: 50%; background: #fff; object-fit: cover; }
.marke small { display: block; font-weight: 400; font-size: .78rem; opacity: .75; }

.menue-knopf {
  display: none;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 8px;
  padding: .45em .8em; font: inherit; font-size: .95rem; cursor: pointer;
}

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: .15rem; }
.nav li { position: relative; }
.nav a {
  display: block; color: #fff; text-decoration: none;
  padding: .55em .8em; border-radius: 8px; font-size: .97rem;
  white-space: nowrap;
}
.nav a:hover, .nav a:focus-visible { background: var(--himmel-2); }
.nav a[aria-current="page"] { background: var(--glut); color: #fff; }
.nav li.aktiv > a:not([aria-current]) { box-shadow: inset 0 -3px 0 var(--glut); border-radius: 8px 8px 0 0; }

/* Untermenüs (Desktop) */
.nav ul ul {
  position: absolute; left: 0; top: 100%;
  min-width: 230px; padding: .4rem;
  background: var(--himmel-2); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav ul ul a:hover, .nav ul ul a:focus-visible { background: var(--himmel); }
.nav li:hover > ul, .nav li:focus-within > ul { visibility: visible; opacity: 1; transform: none; }
.nav > ul > li:last-child > ul { left: auto; right: 0; }

/* Mobil */
@media (max-width: 900px) {
  .menue-knopf { display: inline-block; }
  .kopf .wrap { flex-wrap: wrap; }
  .nav { display: none; width: 100%; padding-bottom: 1rem; }
  .nav.offen { display: block; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav > ul { flex-direction: column; }
  .nav ul ul {
    position: static; visibility: visible; opacity: 1; transform: none;
    box-shadow: none; background: transparent; padding: 0 0 0 1rem; min-width: 0;
  }
  .nav > ul > li:last-child > ul { right: auto; }
  .nav a { white-space: normal; }
  .nav li.aktiv > a:not([aria-current]) { box-shadow: none; }
}
/* Ohne JavaScript: Menü immer zeigen */
.no-js .nav { display: block; }
.no-js .menue-knopf { display: none; }

/* ---------- Titelbild Startseite ---------- */
.banner { background: rgb(146,158,178); }
.banner img { width: 100%; max-width: 1280px; margin: 0 auto; }

.held {
  position: relative; color: #fff;
  background: var(--himmel) center/cover no-repeat;
  min-height: clamp(260px, 42vw, 440px);
  display: flex; align-items: flex-end;
}
.held::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,38,63,.15) 0%, rgba(22,38,63,.85) 100%);
}
.held .wrap { position: relative; padding-top: 3rem; padding-bottom: 2.4rem; width: 100%; }
.held h1 { color: #fff; margin: 0 0 .3rem; font-size: clamp(2rem, 5.5vw, 3.2rem); }
.held p { margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.3rem); opacity: .92; }

/* ---------- Inhalt + Seitenleiste ---------- */
.raster {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem; padding-top: 2.2rem; padding-bottom: 3rem;
}
@media (max-width: 900px) { .raster { grid-template-columns: 1fr; } }

.inhalt {
  background: var(--papier);
  border: 1px solid var(--linie); border-radius: var(--radius);
  padding: clamp(1.2rem, 3.5vw, 2.4rem);
  min-width: 0;
}
.inhalt > :last-child { margin-bottom: 0; }

.leiste { display: flex; flex-direction: column; gap: 1.2rem; }
.box {
  background: var(--papier);
  border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.2rem; font-size: .97rem;
}
.box h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.box img { border-radius: 6px; margin-bottom: .8rem; }
.box p:last-child { margin-bottom: 0; }

/* ---------- Bausteine ---------- */
.hinweis {
  border-left: 4px solid var(--glut);
  background: color-mix(in srgb, var(--glut) 9%, var(--papier));
  padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.4em 0;
}
.hinweis > :last-child { margin-bottom: 0; }

.kacheln {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem; margin: 1.6em 0;
}
.kachel {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; background: var(--sand);
  transition: border-color .15s, transform .15s;
}
.kachel:hover { border-color: var(--glut); transform: translateY(-2px); }
.kachel strong { display: block; font-size: 1.05rem; margin-bottom: .25rem; color: var(--text); }
.kachel span { color: var(--text-leise); font-size: .95rem; }

.knopf {
  display: inline-block; background: var(--glut); color: #fff !important;
  text-decoration: none; font-weight: 600;
  padding: .6em 1.1em; border-radius: 8px; margin: .2em .4em .2em 0;
}
.knopf:hover { background: var(--glut-dunkel); }
.knopf.zweit { background: transparent; color: var(--glut-dunkel) !important; border: 2px solid var(--glut); }

.bilder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.4em 0; }
.bilder img, .bild { border-radius: var(--radius); }
figure { margin: 1.4em 0; }
figcaption { font-size: .9rem; color: var(--text-leise); margin-top: .4rem; }

.liste-amt { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; }
.liste-amt th, .liste-amt td { text-align: left; padding: .55em .4em; border-bottom: 1px solid var(--linie); vertical-align: top; }
.liste-amt th { font-weight: 600; width: 46%; color: var(--text-leise); }

.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.4em 0; }
.fakt { background: var(--sand); border-radius: var(--radius); padding: .9rem 1rem; }
.fakt b { display: block; font-size: 1.35rem; color: var(--glut-dunkel); line-height: 1.2; }
@media (prefers-color-scheme: dark) { .fakt b { color: var(--glut); } }
.fakt span { font-size: .9rem; color: var(--text-leise); }

.linkliste { list-style: none; padding: 0; }
.linkliste li { padding: .5em 0; border-bottom: 1px solid var(--linie); }

/* ---------- Fußbereich ---------- */
.fuss { background: var(--himmel); color: rgba(255,255,255,.85); font-size: .95rem; }
.fuss .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; padding-top: 2.2rem; padding-bottom: 2.2rem;
}
.fuss h2 { color: #fff; font-size: 1rem; margin: 0 0 .5rem; }
.fuss a { color: #fff; }
.fuss p { margin: 0 0 .4em; }
.fuss .unten {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1rem 16px; text-align: center; font-size: .85rem; opacity: .7;
}
.sozial { display: flex; gap: .6rem; flex-wrap: wrap; }
.sozial a {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid rgba(255,255,255,.3); border-radius: 8px;
  padding: .35em .75em; text-decoration: none;
}
.sozial a:hover { background: var(--himmel-2); }
.sozial svg { width: 18px; height: 18px; fill: currentColor; }

@media print {
  .kopf, .leiste, .fuss, .menue-knopf { display: none !important; }
  .raster { display: block; padding: 0; }
  .inhalt { border: 0; padding: 0; }
}
