/*
Theme Name: GeneratePress Child (Relaunch)
Description: Ruhiges, klares Basis-Design für Relaunch-Seiten. Farben und Schriftgrößen kommen aus design/tokens.json (scripts/apply-design.php).
Template: generatepress
Version: 1.2.3
Text Domain: relaunch
*/

/* ---------- Schrift: lokal, variabel (Inter, OFL) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --rl-container: 1140px;
  --rl-measure: 68ch;
  --rl-gutter: clamp(20px, 4vw, 32px);
  --rl-section: clamp(56px, 8vw, 104px);
  --rl-gap: clamp(24px, 3vw, 40px);
  --rl-radius: 8px;
  --rl-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 4px 16px rgb(16 24 40 / .06);
}

/* ---------- Grundlagen ---------- */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
.entry-content > p,
.entry-content > ul,
.entry-content > ol { max-width: var(--rl-measure); }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
img { border-radius: var(--rl-radius); height: auto; }
.site-logo img, .header-image { border-radius: 0; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }

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

/* ---------- Header & Navigation ---------- */
.site-header { border-bottom: 1px solid var(--contrast-3); }
.main-navigation .main-nav ul li a { transition: color .15s ease; }
.main-navigation .main-nav ul li[class*="current-menu-"] > a { color: var(--accent); }

/* ---------- Sektionen (für ganzseitige Layouts) ---------- */
.rl-section {
  padding-block: var(--rl-section);
  padding-inline: var(--rl-gutter);
}
/* Klassische Themes: WordPress legt .wp-block-group__inner-container um den Inhalt,
   GeneratePress gibt ihm Content-Padding. In unseren Bausteinen steuern wir Abstände selbst. */
:is(.rl-section, .rl-card, .rl-narrow) > .wp-block-group__inner-container { padding: 0 !important; }
:where(.rl-section, .rl-card, .rl-narrow) > .wp-block-group__inner-container > :first-child { margin-top: 0; }
:where(.rl-section, .rl-card, .rl-narrow) > .wp-block-group__inner-container > :last-child { margin-bottom: 0; }

.rl-section > * {
  max-width: var(--rl-container);
  margin-inline: auto;
}
/* Schmale Textspalte: bündig mit dem Raster, nur die Zeilenlänge wird begrenzt */
.rl-narrow > *,
.rl-narrow > .wp-block-group__inner-container > * { max-width: var(--rl-measure); }
.rl-narrow > .wp-block-group__inner-container { max-width: none; }
.rl-section--alt { background: var(--base-2); }
.rl-section--accent { background: var(--accent); color: var(--base-3); }
.rl-section--accent :is(h1, h2, h3, p, a) { color: inherit; }
/* Zwei weiße Sektionen hintereinander: Abstand nicht verdoppeln */
.rl-section:not(.rl-section--alt):not(.rl-section--accent) + .rl-section:not(.rl-section--alt):not(.rl-section--accent) { padding-top: 0; }
.rl-section > :first-child { margin-top: 0; }
.rl-section > :last-child { margin-bottom: 0; }

.rl-center { text-align: center; }
.rl-center > *,
.rl-center .wp-block-group__inner-container > *,
.rl-center .rl-lead { margin-inline: auto; }
.rl-center .wp-block-buttons { justify-content: center; }

.rl-eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.rl-lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--contrast-2);
  max-width: var(--rl-measure);
}

/* Hero */
.rl-hero { padding-block: clamp(64px, 10vw, 128px); }
.rl-hero h1 { margin-bottom: 1.25rem; }

/* Spalten */
.rl-section .wp-block-columns { gap: var(--rl-gap); margin-bottom: 0; }

/* Karten-Raster: bricht nach Platz um statt erst bei 781px */
.wp-block-columns.rl-cards { flex-wrap: wrap !important; }
.wp-block-columns.rl-cards > .wp-block-column { flex: 1 1 260px; }
.rl-section > .wp-block-group__inner-container > .rl-cards,
.rl-section > .rl-cards { margin-top: clamp(24px, 3vw, 40px); }

/* Karten */
.rl-card {
  background: var(--base-3);
  border: 1px solid var(--contrast-3);
  border-radius: var(--rl-radius);
  padding: clamp(24px, 3vw, 32px);
  height: 100%;
}
.rl-section--alt .rl-card { border-color: transparent; box-shadow: var(--rl-shadow); }
.rl-card > :last-child { margin-bottom: 0; }
.rl-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }

/* Buttons */
.wp-block-button__link,
button, input[type="submit"], .button {
  border-radius: 6px;
  padding: .8em 1.4em;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--accent);
  color: var(--base-3);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--accent-hover);
}
.wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid currentColor;
  color: var(--accent);
  background: transparent;
}
.rl-section--accent .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--base-3);
  color: var(--accent);
}
.rl-section--accent .wp-block-button.is-style-outline .wp-block-button__link { color: var(--base-3); }

/* FAQ */
.wp-block-details {
  border-bottom: 1px solid var(--contrast-3);
  padding-block: 1.1rem;
}
.wp-block-details summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: outside;
}
.wp-block-details[open] summary { margin-bottom: .75rem; }
.wp-block-details > :last-child { margin-bottom: 0; }

/* Zitat */
.wp-block-quote.rl-quote {
  border: 0;
  padding: 0;
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
}
.wp-block-quote.rl-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  font-style: normal;
  color: var(--contrast-2);
}

/* Kontakt-Liste */
.rl-plain-list { list-style: none; margin-left: 0; }
.rl-plain-list li { margin-bottom: .35rem; }

/* Footer */
.site-footer .site-info { border-top: 1px solid var(--contrast-3); font-size: .9375rem; }

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

/* ---------- Sprechzeiten ---------- */
.rl-hours { list-style: none; margin: 0; }
.rl-hours li {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) 1fr;
  gap: .25rem 1.5rem;
  padding-block: .7rem;
  border-bottom: 1px solid var(--contrast-3);
  margin: 0;
}
.rl-hours li:last-child { border-bottom: 0; }
.rl-hours strong { font-weight: 600; }
@media (max-width: 480px) { .rl-hours li { grid-template-columns: 1fr; } }

/* Große Telefonnummer */
.rl-phone { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: .75rem; }
.rl-phone a { text-decoration: none; }

/* Foto-Reihe: gleiche Höhe, Bildausschnitt statt Verzerrung */
.rl-photos .wp-block-image,
.rl-photos .wp-block-image img { height: 100%; margin: 0; }
.rl-photos .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Logo im Header nicht zu groß auf dem Handy */
@media (max-width: 768px) { .site-logo img { max-width: 170px; } }

/* Einleitung vor Spalten: Luft lassen */
.rl-narrow + .wp-block-columns { margin-top: var(--rl-gap); }

/* Footer-Leiste: ruhig, ohne harte Kante */
.site-footer .site-info { border-top: 0; }
.site-info .copyright-bar a { text-decoration: none; }
.site-info .copyright-bar a:hover { text-decoration: underline; }

/* Mobiles Menü-Symbol ohne graue Fläche */
.menu-toggle, .menu-toggle:hover, .menu-toggle:focus { background: transparent; color: var(--contrast); }

/* Fotoreihe: bleibt bis ~560px nebeneinander, statt früh zu stapeln */
.wp-block-columns.rl-photos { flex-wrap: wrap !important; gap: clamp(12px, 2vw, 24px); }
.wp-block-columns.rl-photos > .wp-block-column { flex: 1 1 160px; }

/* Sprungmarken im Menü (One-Pager) nicht als "aktuelle Seite" einfärben */
.main-navigation .main-nav ul li[class*="current-menu-"] > a[href*="#"] { color: var(--contrast); }
.main-navigation .main-nav ul li > a[href*="#"]:hover,
.main-navigation .main-nav ul li > a[href*="#"]:focus { color: var(--accent); }
