/* ==========================================================================
   Fasten Ratgeber – Stylesheet
   Farben und Aufbau orientieren sich am bisherigen WordPress-Theme "fasten".
   Keine externen Ressourcen (Schriften, Bilder) – alles lokal.
   ========================================================================== */

:root {
  --blau: #32759c;
  --blau-dunkel: #245a7a;
  --text: #555;
  --link: #544236;
  --hintergrund: #fff0e4;
  --seite: #fff;
  --spalte: #e8f3fb;
  --linie: #d5e6f2;
  --schrift: Verdana, Geneva, "DejaVu Sans", Tahoma, sans-serif;
  --schrift-titel: Geneva, "Segoe UI", Arial, Helvetica, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

a { color: var(--link); }
a:hover, a:focus { color: var(--blau); }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--schrift-titel);
  color: var(--blau);
  font-weight: bold;
  letter-spacing: 0.03em;
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
}
h1 { font-size: 1.45rem; margin-top: 0.8em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }

strong { color: var(--blau); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blau); color: #fff; padding: 0.5em 1em; z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- Rahmen ---------- */

#wrap {
  background: var(--seite);
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.35);
}

/* ---------- Kopf ---------- */

#header { background: var(--blau); color: #fff; }

#header .logo { display: block; line-height: 0; }
#header .logo img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 1;
  object-fit: cover;
  object-position: left center;
}

.hauptmenue ul {
  list-style: none;
  margin: 0;
  padding: 0.35em 2%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.6em;
}
.hauptmenue a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}
.hauptmenue a:hover, .hauptmenue a:focus, .hauptmenue a[aria-current] { text-decoration: underline; }
.hauptmenue img { width: auto; height: 20px; }

/* ---------- Inhalt + Navigation ---------- */

#seite { display: flex; flex-direction: column; }

#inhalt { padding: 0.5em 4% 2em; min-width: 0; }
#inhalt a { color: #666; }
#inhalt a:hover, #inhalt a:focus { color: var(--blau); }

#navigation {
  padding: 1em 4% 2em;
  background: linear-gradient(90deg, #cfe7f7 0%, var(--spalte) 50%, #fff 100%);
  border-top: 3px solid var(--blau);
}
#navigation h2 { font-size: 0.95rem; margin: 1.4em 0 0.4em; }
#navigation h2:first-child { margin-top: 0.5em; }
#navigation ul { margin: 0; padding: 0 0 0 1.4em; list-style-image: url("/files/li.gif"); }
#navigation li { color: var(--blau); }
#navigation a {
  display: inline-block;
  padding: 0.3em 0;   /* großzügige Tippfläche auf Mobilgeräten */
  color: var(--blau);
  text-decoration: none;
}
#navigation a:hover, #navigation a:focus { text-decoration: underline; }
#navigation a[aria-current] { font-weight: bold; }

@media (min-width: 720px) {
  #seite { flex-direction: row-reverse; align-items: stretch; }
  #inhalt { flex: 1 1 auto; padding: 0.5em 3% 2em; }
  /* Wie im Original: Farbverlauf der linken Spalte läuft über die gesamte
     Seitenhöhe – auch hinter dem Fußbereich */
  #wrap { background: var(--seite) url("/assets/img/bg-text.jpg") repeat-y left top; }
  #navigation {
    flex: 0 0 30%;
    max-width: 290px;
    border-top: 0;
    padding: 1em 2% 2em 3%;
    background: none;
  }
  #navigation a { padding: 0.1em 0; }
  .menue-themen { display: none; }
}

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

#footer {
  clear: both;
  padding: 2.5em 4% 1em;
  text-align: center;
  font-size: 0.9em;
}
#footer a { color: var(--link); }

/* ---------- Bilder im Text (WordPress-Klassen beibehalten) ---------- */

.bild_links, .alignleft { float: left; margin: 0.3em 1em 0.5em 0; }
.bild_rechts, .alignright { float: right; margin: 0.3em 0 0.5em 1em; }
.aligncenter { display: block; margin: 1em auto; }
.alignnone { margin: 0.5em 0; }

@media (max-width: 480px) {
  /* Große Bilder auf schmalen Displays nicht mehr umfließen lassen */
  .bild_links, .alignleft, .bild_rechts, .alignright { max-width: 45%; }
}

#inhalt h2, #inhalt h3 { clear: both; }
#inhalt p, #inhalt ul, #inhalt ol { overflow-wrap: break-word; }
#inhalt::after { content: ""; display: block; clear: both; }

/* ---------- Bausteine ---------- */

.brotkrumen { font-size: 0.85em; margin-top: 0.8em; color: #888; }
.brotkrumen a { color: #888 !important; }

.recent-posts {
  background: var(--spalte);
  border-left: 4px solid var(--blau);
  padding: 0.2em 1.2em 0.6em;
  margin: 1.5em 0;
}
.recent-posts h2 { margin-top: 0.8em; }

.teaser { overflow: hidden; padding: 0.5em 0 1em; border-bottom: 1px solid var(--linie); }
.teaser h2 { margin-top: 0.6em; font-size: 1.1rem; }
.teaser h2 a { color: var(--blau) !important; text-decoration: none; }
.teaser h2 a:hover { text-decoration: underline; }
.teaser-bild { float: left; margin: 0.3em 1em 0.5em 0; max-width: 35%; }
.weiterlesen { white-space: nowrap; }

.produkt-hinweis {
  clear: both;
  border: 1px solid var(--linie);
  background: #fafcfe;
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
}
.produkt-hinweis a.button {
  display: inline-block;
  margin-top: 0.4em;
  padding: 0.45em 1em;
  background: var(--blau);
  color: #fff !important;
  text-decoration: none;
  border-radius: 3px;
}
.produkt-hinweis a.button:hover { background: var(--blau-dunkel); }
.produkt-hinweis small { display: block; margin-top: 0.5em; color: #888; }

.themen-uebersicht h2 { margin-top: 1.6em; }

table { border-collapse: collapse; width: 100%; }
td, th { border: 1px solid var(--linie); padding: 0.4em 0.6em; text-align: left; vertical-align: top; }
th { background: var(--spalte); color: var(--blau); }

@media (max-width: 600px) {
  /* Tabellen auf dem Handy als untereinanderstehende Karten */
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid var(--linie); margin-bottom: 0.8em; }
  td { border: 0; padding: 0.3em 0.8em; }
  td:first-child { background: var(--spalte); color: var(--blau); font-weight: bold; }
  td[data-label]:not(:first-child)::before {
    content: attr(data-label) ": ";
    font-weight: bold;
  }
}

/* ---------- Druck ---------- */

@media print {
  body { background: #fff; color: #000; }
  #wrap { box-shadow: none; max-width: none; }
  .hauptmenue, #navigation, .skip-link, .brotkrumen { display: none; }
  #header .logo img { aspect-ratio: auto; }
  a { color: #000; }
}

.unterstrichen { text-decoration: underline; }
