/* ============================================================================
   Ökumenische Sozialstation Kusel-Altenglan e.V.
   Teil 1: Gestaltung unveraendert aus der Entwurfsvorlage
           homepage_sozialstation.html (Betreiber, 2026-09-02).
   Teil 2 (unten): Ergaenzungen fuer den Betrieb als echte Website -
           Navigation mit Untermenues und Mobilgeraeten, Unterseiten-Inhalte.
   ============================================================================ */


:root {
  --paper: #faf7f2;
  --paper-dim: #f1ece2;
  --ink: #201f1d;
  --ink-muted: #6b6862;
  --red: #e2211c;
  --blue: #0098d8;
  --rose: #f2b3a4;
  --sky: #b7dcf2;
  --rule: rgba(32,31,29,0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: break-word;
  font-family: 'Work Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}
.arch-rule {
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--rose) 48%, var(--sky) 52%, var(--blue) 100%);
}

/* ---------- Header ---------- */
/* WICHTIG: Klasse, nicht das Element "header" ansprechen. TYPO3 legt um jede
   Inhaltsueberschrift ebenfalls ein <header>-Element - ein Selektor auf das
   blosse Element macht jede Ueberschrift klebend und faerbt sie ein. */
.kopfzeile {
  position: sticky;
  top: 0;
  /* Sandton statt Papierweiss: hebt die Navigation vom Textbereich ab. */
  background: var(--paper-dim);
  z-index: 20;
  border-bottom: 1px solid var(--rule);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Kopfzeile bewusst hoeher, damit das Logo Wirkung hat (30 % gegenueber
     der ersten Fassung: Innenabstand 18 -> 23 px, Logo 62 -> 81 px). */
  padding: 23px 0;
}
.nav-row .logo {
  /* Ohne flex-shrink:0 quetscht eine breite Navigation das Logo auf null
     Breite zusammen - genau das war passiert. */
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.nav-row img { height: 81px; width: auto; }
nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  font-size: 16px;
}
nav a { text-decoration: none; }
.kopfzeile nav a { white-space: nowrap; }
nav a:hover { color: var(--red); }
.nav-cta {
  border: 1.5px solid var(--ink);
  padding: 9px 20px;
  border-radius: 3px;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 84px;
}
.hero .kicker {
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 480px;
  margin-bottom: 26px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 64px;
  line-height: 1.12;
  max-width: 800px;
}
.hero p.lede {
  margin-top: 30px;
  font-size: 22px;
  line-height: 1.55;
  max-width: 560px;
  color: var(--ink-muted);
}
.hero-actions {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  padding: 14px 28px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}
.btn-primary:hover { background: #c11a16; }
.btn-secondary {
  padding: 14px 28px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 16px;
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.hero-stats {
  display: flex;
  gap: 64px;
  margin-top: 88px;
  padding-top: 36px;
  border-top: 2.5px solid var(--blue);
}
.hero-stats div:nth-child(2n) { border-color: var(--red); }
.hero-stats .num {
  font-family: 'Fraunces', serif;
  font-size: 44px;
  font-weight: 500;
}
.hero-stats .label {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 190px;
}

/* ---------- Section shared ---------- */
section { padding: 88px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  max-width: 520px;
  line-height: 1.18;
}
.section-head p {
  max-width: 340px;
  color: var(--ink-muted);
  font-size: 17px;
}

/* ---------- Leistungen ---------- */
.leistungen { background: var(--paper-dim); }
.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
}
.service-item {
  padding: 30px 0;
  border-top: 1.5px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
}
.service-item:last-child,
.service-item:nth-last-child(2) { }
.service-item h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 23px;
  max-width: 220px;
}
.service-item p {
  color: var(--ink-muted);
  font-size: 16px;
  max-width: 260px;
}

/* ---------- Tagespflege feature ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.feature-visual {
  aspect-ratio: 4/3;
  border-radius: 4px;
  background: linear-gradient(160deg, var(--sky), var(--paper-dim) 60%);
  position: relative;
  overflow: hidden;
}
.feature-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, var(--rose) 0%, transparent 55%);
  mix-blend-mode: multiply;
  opacity: 0.7;
}
.feature h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 22px;
}
.feature p { color: var(--ink-muted); font-size: 17px; max-width: 460px; }
.feature-facts {
  display: flex;
  gap: 40px;
  margin-top: 34px;
}
.feature-facts div { border-top: 2.5px solid var(--red); padding-top: 14px; max-width: 180px; }
.feature-facts div:nth-child(2) { border-color: var(--blue); }
.feature-facts p { font-size: 15px; color: var(--ink-muted); }

/* ---------- Träger / Ökumene ---------- */
.traeger { text-align: center; }
.traeger h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 40px;
  max-width: 700px;
  margin: 0 auto 26px;
  line-height: 1.2;
}
.traeger p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-muted);
  font-size: 18px;
}
.traeger-marks {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 52px;
}
.mark {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
}
.mark.caritas { background: var(--red); }
.mark.diakonie { background: var(--blue); }

/* ---------- Kontakt ---------- */
.kontakt { background: var(--paper-dim); }
.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.kontakt-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 25px;
  margin-bottom: 14px;
}
.kontakt-card p { color: var(--ink-muted); font-size: 16px; line-height: 1.65; }
.kontakt-card a.phone {
  display: inline-block;
  margin-top: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--red);
  font-weight: 500;
}
.kontakt-card:nth-child(2) a.phone { border-color: var(--blue); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}
.footer-name { font-family: 'Fraunces', serif; font-weight: 500; font-size: 19px; }
.footer-name span {
  font-family: 'Work Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-muted);
}
.fusszeile {
  padding: 56px 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.fusszeile img { height: 40px; }
.fusszeile .fine { font-size: 14px; color: var(--ink-muted); }
.fusszeile .flinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
}
.fusszeile a { text-decoration: none; }
.fusszeile a:hover { color: var(--red); }

@media (max-width: 860px) {
  .wrap { padding: 0 30px; }
  nav ul { display: none; }
  .hero h1 { font-size: 42px; }
  .hero-stats { flex-wrap: wrap; gap: 32px; }
  .service-list { grid-template-columns: 1fr; }
  /* Kacheln untereinander statt nebeneinander: in einer Zeile brauchten Titel
     und Text zusammen ueber 500 px, mehr als ein Telefon breit ist. Lange
     Einzelwoerter wie "Verhinderungspflege" liefen deshalb rechts heraus. */
  .service-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 22px 0;
  }
  .service-item h3, .service-item p { max-width: none; }

  /* Die uebrigen Reihen ebenfalls umbrechen lassen */
  .hero-actions { flex-wrap: wrap; }
  .feature-facts { flex-wrap: wrap; gap: 24px; }
  .traeger-marks { flex-wrap: wrap; }
  .feature { grid-template-columns: 1fr; }
  .kontakt-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .traeger-marks { gap: 28px; }
}

/* ============================================================================
   Teil 2 — Ergaenzungen
   ============================================================================ */

/* ---------- Navigation: Untermenues und Mobilgeraete ----------
   Die Vorlage kannte nur vier Ankerlinks und blendete das Menue unter 860px
   ersatzlos aus. Die echte Seite hat einen Seitenbaum mit Untermenues und
   braucht auf dem Telefon eine bedienbare Navigation. */
nav ul { margin: 0; }
nav li { position: relative; }
nav a { display: block; padding: 6px 0; }
nav .aktiv > a { color: var(--red); }
nav .aktiv > a::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--red);
  margin-top: 2px;
}
.nav-schalter {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  color: inherit;
}

/* ---------- Unterseiten ---------- */
.seiten-kopf {
  padding: 72px 0 34px;
  border-bottom: 1px solid var(--rule);
}
.seiten-kopf h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 46px;
  line-height: 1.15;
  max-width: 820px;
  margin-bottom: 26px;
}
.inhalt {
  padding: 52px 0 88px;
  /* Lange Links und Adressen umbrechen lassen - auf der Datenschutzseite
     stehen URLs, die sonst breiter als der Bildschirm werden. */
  overflow-wrap: break-word;
}
.inhalt .frame { margin-bottom: 44px; max-width: 780px; }
.inhalt h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 31px;
  line-height: 1.22;
  margin-bottom: 18px;
}
.inhalt h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 23px;
  margin: 30px 0 12px;
}
.inhalt h4 { font-size: 19px; font-weight: 600; margin: 24px 0 10px; }
.inhalt p { margin-bottom: 16px; color: var(--ink-muted); font-size: 17px; }
.inhalt p strong, .inhalt strong { color: var(--ink); font-weight: 600; }
.inhalt ul, .inhalt ol { margin: 0 0 18px 22px; color: var(--ink-muted); font-size: 17px; }
.inhalt li { margin-bottom: 8px; }
.inhalt a { color: var(--ink); border-bottom: 1.5px solid var(--red); text-decoration: none; }
.inhalt a:hover { color: var(--red); }
.inhalt img { border-radius: 4px; margin: 8px 0 20px; }
.inhalt table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 16px;
}
.inhalt th, .inhalt td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  overflow-wrap: break-word;
}
.inhalt table { table-layout: fixed; }
.inhalt th { font-weight: 600; background: var(--paper-dim); }
.inhalt-scroll { overflow-x: auto; }

/* Untermenue der aktuellen Rubrik, neben dem Inhalt */
.inhalt-raster {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 64px;
  align-items: start;
}
.rubrik {
  background: var(--paper-dim);
  border-top: 2.5px solid var(--blue);
  border-radius: 0 0 4px 4px;
  padding: 20px 22px 24px;
  position: sticky;
  top: 150px;
}
.rubrik h2 {
  font-size: 14px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.rubrik ul { list-style: none; margin: 0; }
.rubrik li { margin-bottom: 9px; }
.rubrik a { font-size: 15px; text-decoration: none; color: var(--ink-muted); }
.rubrik a:hover { color: var(--red); }
.rubrik .aktiv > a { color: var(--ink); font-weight: 500; }

/* Liste der Unterseiten auf einer Rubrikseite */
.unterseiten { margin-top: 8px; }
.unterseiten h2 {
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.unterseiten ul { list-style: none; margin: 0; }
.unterseiten li {
  padding: 22px 0;
  border-top: 1.5px solid var(--rule);
  margin: 0;
}
.unterseiten li a {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  border: none;
  text-decoration: none;
}
.unterseiten li a:hover { color: var(--red); }
.unterseiten li p {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--ink-muted);
}

/* Kontaktformular (TYPO3-Systemextension "form") */
.inhalt input[type=text], .inhalt input[type=email], .inhalt input[type=tel],
.inhalt textarea, .inhalt select {
  width: 100%;
  max-width: 520px;
  padding: 11px 13px;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  margin-bottom: 4px;
}
.inhalt input:focus, .inhalt textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.inhalt label { display: block; font-size: 15px; font-weight: 500; margin: 18px 0 6px; }
.inhalt .form-check label { display: inline; font-weight: 400; color: var(--ink-muted); }
.inhalt button, .inhalt input[type=submit] {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 3px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 24px;
}
.inhalt button:hover { background: #c11a16; }
.inhalt .help-block, .inhalt .error { font-size: 14px; color: var(--red); }

/* Sichtbarer Sprungpunkt fuer Tastaturbedienung */
.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

@media (max-width: 860px) {
  /* Die Vorlage blendete das Menue hier aus - hier kommt es zurueck. */
  .nav-schalter { display: block; }
  .kopfzeile nav {
    display: none;
    width: 100%;
    order: 3;
    padding: 14px 0 6px;
    border-top: 1px solid var(--rule);
    margin-top: 14px;
  }
  .kopfzeile nav.offen { display: block; }
  .nav-row {
    flex-wrap: wrap;
    /* Unten mehr Abstand als oben: sonst sitzt das Logo auf dem Farbstrich,
       der die Kopfzeile abschliesst. */
    padding: 18px 0 26px;
  }
  nav ul { display: block; }
  nav ul li { border-bottom: 1px solid var(--rule); padding: 4px 0; }
  .nav-cta { display: none; }
  .nav-row img { height: 68px; }

  /* Etwas mehr Luft, damit die Seite auf dem Telefon nicht gedraengt wirkt */
  .seiten-kopf { padding: 44px 0 26px; }
  .seiten-kopf h1 { font-size: 32px; }
  .inhalt { padding: 38px 0 64px; }
  .inhalt .frame { margin-bottom: 36px; }
  .inhalt-raster { grid-template-columns: 1fr; gap: 40px; }
  .rubrik { position: static; padding: 18px 20px 22px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 18px; }
  .fusszeile .flinks { gap: 10px 20px; }
  section { padding: 60px 0; }
  .hero { padding: 56px 0 60px; }
  .hero-stats { margin-top: 56px; }
}

/* Sehr schmale Telefone: Rand bleibt grosszuegig (26 px statt der urspruenglichen
   24 px), nur die grossen Ueberschriften werden zurueckgenommen. Logo bleibt
   auf voller Groesse - es passt neben dem Menue-Knopf auch bei 360 px Breite. */
@media (max-width: 420px) {
  .wrap { padding: 0 26px; }
  .seiten-kopf h1 { font-size: 28px; }
  .hero h1 { font-size: 34px; }
}
