/* ==========================================================================
   Frauenhaus Oberursel – Interimsseite
   Farben und Schrift nach dem bisherigen Erscheinungsbild,
   Kontraste nach WCAG 2.1 AA angepasst. Keine externen Ressourcen.
   ========================================================================== */

/* Schrift: Source Sans 3 (Open Font License), lokal eingebunden.
   Dateien nach assets/fonts/ legen – solange sie fehlen, greift die Systemschrift. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-700.woff2") format("woff2");
}

:root {
  /* Farben der bisherigen Website */
  --c-navy: #323563;          /* Überschriften, aktive Navigation, Footer */
  --c-cyan: #25a6ce;          /* Logo-Türkis: nur für Flächen, Linien, Deko */
  --c-pink: #e51b80;          /* Onlineberatung: nur für Flächen, Deko */

  /* Barrierearme Varianten für Text */
  --c-cyan-text: #1a7fa0;     /* Links im Fließtext (4,6:1 auf Weiß) */
  --c-cyan-nav: #1f98c0;      /* Navigation, großer fetter Text (3,3:1) */
  --c-pink-button: #d6197c;   /* Weiße Schrift darauf (4,9:1) */

  --c-bg: #ffffff;
  --c-surface: #f6f7fa;
  --c-text: #262a2d;
  --c-muted: #5b5f66;
  --c-line: #e4e4e4;
  --c-border: #cbcbcb;
  --c-cyan-soft: #e9f6fb;

  --c-urgent: #b3141f;
  --c-urgent-soft: #fdeceb;
  --c-focus: #ffbf47;

  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 4px;
  --space: clamp(1rem, 3vw, 1.5rem);
  --section-space: clamp(2.5rem, 6vw, 4rem);
  --max: 78rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* Höhe der fixierten Navigation */
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Beim Schnellweg den Inhalt sofort verbergen */
html.is-leaving body {
  visibility: hidden;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

a {
  color: var(--c-cyan-text);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--c-navy);
}

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

h1, h2, h3, h4 {
  color: var(--c-navy);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; margin-top: 1.25em; }

p, ul, ol, dl, address {
  margin: 0 0 1em;
}

address {
  font-style: normal;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--space);
}

.container--narrow {
  max-width: 52rem;
}

.plain-list {
  list-style: none;
  padding: 0;
}

/* Buttons --------------------------------------------------------------- */

.button {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: var(--c-navy);
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border-radius: var(--radius);
}

.button:hover {
  background: #23254a;
  color: #fff;
}

.button--pink {
  background: var(--c-pink-button);
}

.button--pink:hover {
  background: #b5135f;
}

/* Skip-Link ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--c-navy);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

/* Schnellweg-Button (immer sichtbar, unten rechts) ---------------------- */

.quick-exit {
  position: fixed;
  z-index: 100;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.7rem 1.1rem;
  background: var(--c-navy);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.3);
}

.quick-exit:hover {
  background: #23254a;
  color: #fff;
}

.quick-exit__hint {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.9;
}

/* Nach-oben-Button wie auf der bisherigen Website: pinkes Quadrat mit weißem Winkel,
   direkt über dem Schnellweg-Button */
.back-to-top {
  position: fixed;
  z-index: 100;
  right: 0.75rem;
  bottom: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  background: var(--c-pink-button);
  color: #fff;
  border-radius: 0;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover {
  background: #b5135f;
  color: #fff;
}

.back-to-top svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Kopfbereich: Logo + Service-Links ------------------------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 0.9rem;
}

.brand {
  color: var(--c-navy);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
}

.brand__logo {
  display: block;
  width: auto;
  max-height: 4.5rem;
}

@media (max-width: 40em) {
  .brand__logo { max-height: 3.25rem; }
}

.service-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-links__easy {
  color: var(--c-navy);
  font-weight: 600;
  text-decoration: none;
}

.service-links__easy:hover {
  text-decoration: underline;
}

/* Hauptnavigation (bleibt beim Scrollen oben) --------------------------- */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08);
}

.main-nav__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main-nav ul {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.main-nav a {
  display: block;
  padding: 1rem 0.45rem;
  color: var(--c-cyan-nav);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.main-nav li:first-child a {
  margin-left: -0.45rem;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current] {
  background: var(--c-navy);
  color: #fff;
}

/* Onlineberatung und Leichte Sprache in der Navigationsleiste,
   sobald der Kopfbereich aus dem Bild gescrollt ist */
.main-nav__extras {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav__extras[hidden] {
  display: none;
}

.main-nav .main-nav__cta {
  padding: 0.45rem 0.75rem;
  background: var(--c-pink-button);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.main-nav .main-nav__cta:hover,
.main-nav .main-nav__cta:focus-visible {
  background: #b5135f;
  color: #fff;
}

.main-nav .main-nav__easy {
  padding: 0.45rem 0;
  color: var(--c-navy);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.main-nav .main-nav__easy:hover,
.main-nav .main-nav__easy:focus-visible {
  background: none;
  color: var(--c-navy);
  text-decoration: underline;
}

/* Unter 1200 px reicht der Platz nur für die Onlineberatung;
   Leichte Sprache bleibt im Kopf- und Fußbereich erreichbar */
@media (max-width: 75em) {
  .main-nav .main-nav__easy {
    display: none;
  }

  /* Etwas kleinere Menüschrift; dafür das dunklere Türkis,
     damit der Kontrast auch bei normaler Textgröße reicht (WCAG AA) */
  .main-nav a {
    font-size: 1.05rem;
    color: var(--c-cyan-text);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .main-nav__extras:not([hidden]) {
    animation: cta-in 0.25s ease-out;
  }
}

@keyframes cta-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 40em) {
  .main-nav a {
    padding: 0.8rem 0.6rem;
    font-size: 1rem;
  }

  .main-nav .main-nav__cta {
    padding: 0.35rem 0.6rem;
    font-size: 0.95rem;
  }



  .main-nav li:first-child a {
    margin-left: -0.6rem;
  }
}

/* Menü-Button für kleinere Bildschirme ---------------------------------- */

.menu-toggle,
.main-nav__item--easy {
  display: none;
}

@media (max-width: 63.99em) {
  .has-js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 0;
    background: none;
    border: 0;
    color: var(--c-navy);
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
  }

  .menu-toggle__icon {
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    fill: none;
  }

  .menu-toggle__close,
  .is-open .menu-toggle__bars {
    display: none;
  }

  .is-open .menu-toggle__close {
    display: inline;
  }

  .has-js .main-nav__inner {
    flex-wrap: wrap;
  }

  .has-js .main-nav__extras {
    margin-left: auto;
  }

  /* Menüpunkte untereinander, standardmäßig eingeklappt */
  .has-js .main-nav ul {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    white-space: normal;
    padding-bottom: 0.5rem;
  }

  .has-js .main-nav.is-open ul {
    display: flex;
  }

  /* Leichte Sprache als letzter Menüpunkt, in normaler Schreibweise */
  .has-js .main-nav__item--easy {
    display: block;
  }

  .has-js .main-nav__item--easy a {
    color: var(--c-navy);
    text-transform: none;
  }

  .has-js .main-nav ul a,
  .has-js .main-nav li:first-child a {
    margin-left: 0;
    padding: 0.75rem 0.5rem;
    border-top: 1px solid var(--c-line);
  }
}

/* Hero ------------------------------------------------------------------ */

.hero {
  padding-block: var(--section-space);
}

.hero__image {
  display: block;
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  margin-bottom: var(--section-space);
}

.hero h1 {
  max-width: 26ch;
}

.hero__intro {
  max-width: 52rem;
  font-size: 1.2rem;
}

/* Abschnitte: getrennt durch eine graue Linie wie auf der alten Seite --- */

.section {
  padding-bottom: var(--section-space);
}

.section > .container::before {
  content: "";
  display: block;
  height: 5px;
  margin-bottom: calc(var(--section-space) * 0.75);
  background: var(--c-line);
}

.section__intro {
  max-width: 52rem;
  margin-bottom: 1.5rem;
}

.prose {
  max-width: 52rem;
}

.prose figure {
  margin: 1.5rem 0;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--c-cyan);
}

/* Hilfe-Kacheln --------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space);
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--c-surface);
  border-top: 4px solid var(--c-cyan);
  border-radius: 0;
}

.card--urgent {
  background: var(--c-urgent-soft);
  border-top-color: var(--c-urgent);
}

.card__icon {
  display: block;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.75rem;
}

.card--urgent .card__title,
.card--urgent .card__phone a {
  color: var(--c-urgent);
}

.card__phone {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__phone a {
  color: var(--c-navy);
  text-decoration: none;
  white-space: nowrap;
}

.card__text p:last-child {
  margin-bottom: 0;
}

.card__link {
  margin-top: auto;
  padding-top: 0.75rem;
  margin-bottom: 0;
}

/* Standorte ------------------------------------------------------------- */

/* Jede Kachel nutzt per Subgrid dieselben sechs Zeilen wie ihre Nachbarn:
   Titel, Adresse, Telefon, Überschrift Beratungszeiten, Beratungszeiten, Anfahrt.
   So stehen gleiche Angaben in allen Kacheln auf gleicher Höhe. */
.locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--space);
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.location {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 1.25rem;
  background: var(--c-surface);
  border-top: 4px solid var(--c-navy);
  border-radius: 0;
}

.location > *,
.location p,
.location address,
.location h3,
.location h4 {
  margin: 0;
}

/* Abstand nur unter Zeilen mit Inhalt, leere Zeilen bleiben ohne Höhe */
.location .location__title,
.location__address > :last-child,
.location__phone > :last-child,
.location__hours-title > :last-child,
.location__hours > :last-child {
  margin-bottom: 0.75rem;
}

.location__hours p + p {
  margin-top: 0.5em;
}

.location__directions summary {
  cursor: pointer;
  color: var(--c-cyan-text);
  font-weight: 600;
}

.location__directions details[open] summary {
  margin-bottom: 0.5rem;
}

/* Spenden --------------------------------------------------------------- */

.donate {
  display: grid;
  gap: var(--space) 3rem;
}

.section--donate > .container::before {
  grid-column: 1 / -1;
  margin-bottom: calc(var(--section-space) * 0.75 - var(--space));
}

/* Zweispaltig nur, wenn das Spendenkonto ausgefüllt ist */
@media (min-width: 52em) {
  .donate:has(.donate__account) { grid-template-columns: 3fr 2fr; align-items: start; }
}

.donate__account {
  padding: 1.5rem;
  background: var(--c-cyan-soft);
  border-top: 4px solid var(--c-cyan);
}

.donate__account dl {
  margin: 0;
}

.donate__account dt {
  font-size: 0.9rem;
  color: var(--c-muted);
}

.donate__account dd {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.iban {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* Textseiten ------------------------------------------------------------ */

.page {
  padding-block: var(--section-space);
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
}

/* Footer ---------------------------------------------------------------- */

.site-footer__main {
  padding-block: var(--section-space);
  background: var(--c-navy);
  color: #fff;
}

.site-footer__main a {
  color: #fff;
}

.site-footer__main a:hover {
  color: #9edcf0;
}

.site-footer h2 {
  font-size: 1.2rem;
  color: #fff;
}

.site-footer__grid {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.site-footer__logo {
  display: block;
  width: auto;
  max-height: 4.5rem;
  margin-bottom: 1.5rem;
}

.site-footer__legal {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.site-footer__funders {
  padding-block: 2rem 9rem; /* unten Platz für Schnellweg- und Nach-oben-Button */
  background: #fff;
}

.funders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem 4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.funders img {
  display: block;
  width: auto;
  max-height: 5rem;
}

/* Ohne Förderer-Leiste: Platz für den Schnellweg-Button */
.site-footer__main:last-child {
  padding-bottom: 9rem;
}

/* Downloads ------------------------------------------------------------- */

.downloads {
  display: grid;
  gap: 0.5rem;
  max-width: 52rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.downloads__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--c-surface);
  border-left: 4px solid var(--c-cyan);
  color: var(--c-navy);
  font-weight: 600;
  text-decoration: none;
}

.downloads__link:hover {
  background: var(--c-cyan-soft);
  color: var(--c-navy);
}

.downloads__title::before {
  content: "↓ ";
  color: var(--c-cyan-text);
}

.downloads__meta {
  color: var(--c-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Seite mit Spalten (Layout-Feld) ------------------------------------- */

.layout {
  display: grid;
  gap: 1.5rem 2.5rem;
  margin-bottom: 2rem;
}

.layout__column {
  grid-column: 1 / -1;
  min-width: 0; /* verhindert, dass große Bilder die Spalte sprengen */
}

.layout .prose {
  max-width: none;
}

.layout figure {
  margin: 0 0 1rem;
}

.layout figure img {
  display: block;
  width: 100%;
}

.layout figcaption {
  margin-top: 0.4rem;
  color: var(--c-muted);
  font-size: 0.95rem;
}

@media (min-width: 48em) {
  /* 12er-Raster erst ab Tablet-Breite, auf dem Handy eine Spalte */
  .layout { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  /* Viertel-Spalten auf dem Tablet als Hälften (4 Spalten → 2 × 2) */
  .layout__column.span-3,
  .layout__column.span-9  { grid-column: span 6; }
  .layout__column.span-4  { grid-column: span 4; }
  .layout__column.span-6  { grid-column: span 6; }
  .layout__column.span-8  { grid-column: span 8; }
  .layout__column.span-12 { grid-column: span 12; }
}

@media (min-width: 64em) {
  .layout__column.span-3  { grid-column: span 3; }
  .layout__column.span-9  { grid-column: span 9; }
}

/* Nur für Screenreader sichtbar ---------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
