/* =====================================================================
   wsr-responsive.css
   Responsives, in sich geschlossenes Stylesheet fuer die neuen Seiten
   (Startseite + Mitteilungsseite) auf Basis des Templates "wsr - responsive".
   Mobile-First. Nutzt KEIN main.css -> keine Konflikte mit dem 980px-Layout.
   Farbschema & Typo orientieren sich am bestehenden Auftritt (Navy/Rot/Amaranth).
   Stand: 14.06.2026
   ===================================================================== */

/* --- Design-Tokens --------------------------------------------------- */
:root {
  --navy:       #002b57;
  --navy-deep:  #001b38;
  --navy-link:  #0a4d8c;
  --red:        #b10b0b;
  --red-dark:   #8a0808;
  --paper:      #eef2f4;
  --card:       #ffffff;
  --ink:        #2a2f33;
  --muted:      #5d666c;
  --line:       #dde3e7;
  --maxw:       1040px;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 6px 22px rgba(0,16,40,.06);
}

/* --- Reset / Grundlagen (defensive Basics) --------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* WICHTIG: KEIN overflow-x:hidden auf html/body -> wuerde position:sticky brechen.
   H-Overflow wird stattdessen durch korrektes Layout vermieden (img max-width,
   nowrap-Nav passt, IBAN bricht bei Bedarf um). */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;        /* ~17px, gut lesbar (Zielgruppe) */
  line-height: 1.65;
}

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

a { color: var(--navy-link); }

/* Sichtbarer Tastatur-Fokus (Accessibility) */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Skip-Link */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Layout-Wrapper -------------------------------------------------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* --- Banner (Headergrafik, skaliert) --------------------------------- */
.banner { margin: 0; background: var(--navy-deep); }
.banner img { width: 100%; height: auto; }

/* --- Navigation ------------------------------------------------------ */
.nav-bar { background: var(--navy); position: sticky; top: 0; z-index: 30; }

.nav-toggle {
  display: flex; align-items: center; gap: .55rem;
  width: 100%;
  margin: 0; padding: .85rem 1rem;
  border: 0; background: transparent;
  color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle .bars {
  position: relative; width: 24px; height: 2px; background: #fff;
  display: inline-block; transition: background .2s;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: #fff;
  transition: transform .2s, top .2s;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after  { top:  7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { top: 0; transform: rotate(-45deg); }

/* Mobile: Menue eingeklappt, oeffnet per .is-open */
.mainnav { display: none; border-top: 1px solid rgba(255,255,255,.12); }
.mainnav.is-open { display: block; max-height: calc(100vh - 56px); overflow-y: auto; }

.mainnav ul { list-style: none; margin: 0; padding: 0; }
.mainnav li { margin: 0; }
.mainnav a {
  display: block;
  padding: .8rem 1.2rem;
  color: #eaf1f8; text-decoration: none;
  font-family: "Amaranth", "Trebuchet MS", sans-serif;
  font-size: 1.08rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.mainnav a:hover, .mainnav a:focus { background: var(--navy-deep); color: #fff; }
.mainnav li.active > a { color: #fff; box-shadow: inset 4px 0 0 var(--red); }

/* --- Inhaltsbereich -------------------------------------------------- */
.content { padding: 1.25rem 1.15rem 2rem; }

/* Typografie der Inhalte */
.content h1 {
  margin: .2em 0 .5em;
  color: var(--navy);
  font-family: "Amaranth", "Trebuchet MS", sans-serif; font-weight: 400;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem); line-height: 1.15;
  border-bottom: 3px solid var(--red); padding-bottom: .25em;
}
.content h2 {
  margin: 1.6em 0 .4em;
  color: var(--red);
  font-family: "Amaranth", "Trebuchet MS", sans-serif; font-weight: 400; font-style: italic;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem); line-height: 1.2;
  border-bottom: 1px solid var(--red);
}
.content h3 {
  margin: 1.3em 0 .35em; color: var(--red);
  font-family: "Amaranth", "Trebuchet MS", sans-serif; font-weight: 400; font-style: italic;
  font-size: 1.2rem; border-bottom: 1px solid #adab9c;
}
.content p { margin: 0 0 1em; }
.content a:not(.btn) { color: var(--red); text-decoration: none; border-bottom: 1px solid #cbc8a9; }
.content a:not(.btn):hover, .content a:not(.btn):focus { color: #000; background: #f1efe1; }
.content ul, .content ol { margin: 0 0 1em 1.3em; padding: 0; }
.content li { margin: .25em 0; }

/* Bild-Hilfsklassen (aus main.css portiert) */
.alignleftnb { float: left;  margin: 0 1rem 1rem 0; }
.alignrightnb{ float: right; margin: 0 0 1rem 1rem; }
@media (max-width: 520px) {
  .alignleftnb, .alignrightnb { float: none; margin: 0 auto 1rem; }
}

/* Hinweis-/Notice-Box */
.notice {
  background: #fff3cd; border: 1px solid #f0ad4e; border-left-width: 5px;
  border-radius: 6px; color: #4a3a00;
  margin: 0 0 1.2em; padding: .8em 1em; text-align: left;
}

/* --- Signatur: Aktuelles-Teaser (Startseite) ------------------------- */
.aktuell {
  margin: 0 0 1.8em;
  background: linear-gradient(180deg, #fbfcfd, #f4f7f9);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}
.aktuell .eyebrow {
  margin: 0 0 .4em; color: var(--red);
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem;
}
.aktuell h2 {
  margin: 0 0 .15em; border: 0; padding: 0;
  color: var(--navy); font-style: normal;
  font-family: "Amaranth", "Trebuchet MS", sans-serif; font-weight: 400;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem); line-height: 1.12;
}
.aktuell .datum {
  margin: 0 0 .7em; color: var(--navy-link);
  font-family: "Amaranth", "Trebuchet MS", sans-serif;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
}
.aktuell .datum strong { color: var(--red); }
.aktuell p { margin: 0 0 1em; }
.aktuell .frist { font-size: .92rem; color: var(--muted); margin: .2em 0 0; }

/* Buttons / Call-to-Action
   Hoehere Spezifitaet als .content a:not(.btn) -> kein !important noetig.
   Kontrast in allen Zustaenden (hover/focus/active) gewahrt. */
.btn, .content a.btn {
  display: inline-block;
  background: var(--red); color: #fff;
  padding: .7em 1.25em; border-radius: 8px; border: 0;
  font-family: "Amaranth", "Trebuchet MS", sans-serif; font-size: 1.05rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover, .btn:focus, .btn:active,
.content a.btn:hover, .content a.btn:focus, .content a.btn:active {
  background: var(--red-dark); color: #fff; text-decoration: none;
}

.btn--ghost, .content a.btn.btn--ghost {
  background: transparent; color: var(--navy-link);
  border: 1px solid var(--navy-link);
}
.btn--ghost:hover, .btn--ghost:focus, .btn--ghost:active,
.content a.btn.btn--ghost:hover, .content a.btn.btn--ghost:focus, .content a.btn.btn--ghost:active {
  background: var(--navy-link); color: #fff;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .6rem .8rem; align-items: center; }

/* --- Programm-Ablauf (Definitionsliste, responsiv) ------------------- */
.programm { margin: 0 0 1.4em; }
.programm dl { margin: 0; }
.programm dt {
  font-family: "Amaranth", "Trebuchet MS", sans-serif;
  color: var(--navy); font-weight: 700; margin-top: .8em;
}
.programm dd { margin: 0 0 .2em; }

@media (min-width: 600px) {
  .programm dl {
    display: grid; grid-template-columns: 9.5rem 1fr; column-gap: 1rem; row-gap: .1rem;
  }
  .programm dt { margin-top: .35em; text-align: right; }
  .programm dd { margin: 0; padding-top: .35em; min-width: 0; } /* min-width:0 = Grid-Schutz */
  .programm dt + dt { margin-top: 0; }
}

/* Info-Box (Kosten / Bankverbindung) */
.infobox {
  background: #f4f7f9; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 0 0 1.4em;
}
.infobox h3 { margin-top: 0; }
.infobox dl { margin: 0; }
.infobox dt { font-weight: 700; color: var(--navy); }
.infobox dd { margin: 0 0 .5em; }
.iban { font-family: "Courier New", monospace; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 420px) { .iban { white-space: normal; word-break: break-word; } }

/* --- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep); color: #b8c4d2;
  padding: 1.3rem 1.15rem; font-size: .95rem; text-align: center;
}
.site-footer a { color: #cfe0f1; }

/* --- Zurueck-nach-oben ---------------------------------------------- */
.to-top {
  position: fixed; right: 16px; bottom: 24px; z-index: 50;
  background: var(--red); color: #fff; border: 0; border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.3rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .25s;
}
.to-top.show { opacity: .92; visibility: visible; }
.to-top:hover, .to-top:focus { background: var(--red-dark); opacity: 1; }

/* ===================================================================== */
/*  Ab 768px: Desktop/Tablet – horizontale Navigation, Hamburger weg     */
/* ===================================================================== */
/* ===================================================================== */
/*  768–1023px (Tablet): noch Hamburger, aber mehr Innenabstand           */
/* ===================================================================== */
@media (min-width: 768px) {
  .content { padding: 1.75rem 2.25rem 2.5rem; }
}

/* ===================================================================== */
/*  Ab 1024px: horizontale Navigation auf EINER Zeile (kein Umbruch),     */
/*  Hamburger weg. nowrap + kompaktes Padding -> passt sicher in 1 Zeile. */
/* ===================================================================== */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .mainnav { display: block; border-top: 0; max-height: none; overflow: visible; }
  .mainnav ul {
    display: flex; flex-wrap: nowrap; justify-content: center; align-items: stretch;
  }
  .mainnav li { border: 0; }
  .mainnav a {
    border-top: 0; border-bottom: 3px solid transparent;
    padding: .85rem .7rem;
    font-size: .98rem;
    white-space: nowrap;          /* einzelner Punkt bricht nie um */
  }
  .mainnav a:hover, .mainnav a:focus { background: var(--navy-deep); }
  .mainnav li.active > a {
    box-shadow: none; border-bottom-color: var(--red); color: #fff;
  }

  .content { padding: 2rem 3rem 3rem; }
}

/* --- Bewegung reduzieren (Accessibility) ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
