/*
Theme Name: Zahnärzte Haidhausen
Theme URI: https://haidhausen-zahnaerzte.de
Author: Zahnärzte Haidhausen
Description: Eigenständiges Block-Theme für die Zahnarztpraxis Zahnärzte Haidhausen (München). Helle, ruhige Farbwelt aus den Praxisräumen, Rosé als einziger Buntton, scharfe Bildkanten, redaktioneller Rhythmus. Datenschutzfreundlich: keine Cookies, keine externen Schriften, keine externen Requests.
Version: 4.6.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zahnaerzte-haidhausen
Tags: block-theme, full-site-editing, one-column, accessibility-ready
*/

/* ------------------------------------------------------------------
   1. Grundlagen
------------------------------------------------------------------ */
:root {
  --zh-line: var(--wp--preset--color--linie);
  --zh-shift: clamp(3rem, 7vw, 6rem);
}

html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; overflow-x: hidden; }

::selection { background: var(--wp--preset--color--puder); color: var(--wp--preset--color--grafit); }

:where(a):focus-visible,
:where(button):focus-visible,
:where(summary):focus-visible,
:where(input, textarea, select):focus-visible {
  outline: 2px solid var(--wp--preset--color--rose-tief);
  outline-offset: 3px;
}

.zh-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--wp--preset--color--grafit); color: #fff;
  padding: .75rem 1.25rem; font-size: .875rem;
}
.zh-skip-link:focus { left: 0; }

/* Breitenklassen absichern.
   WordPress vergibt alignwide und alignfull über sein Layout-System. Bei
   Inhalten, die in HTML-Blöcken stehen, greift das nicht zuverlässig – dann
   landen ganze Abschnitte auf Inhaltsbreite und die Bilder werden winzig.
   Diese beiden Regeln stellen die gewünschte Breite unabhängig davon her. */
.alignwide {
  max-width: var(--wp--style--global--wide-size, 78rem);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.zh-main .alignfull, main .alignfull {
  max-width: none;
  width: 100%;
}

/* Lesbare Zeilenlänge dort, wo Fließtext steht.
   Die Grundbreite der Seite liegt bei 78rem (siehe theme.json). Abschnitte mit
   Rastern nutzen sie voll aus. Längere Texte werden hier wieder eingefangen –
   über max-width, nicht über Randtricks. */
.zh-prose,
.zh-faq,
.zh-team--two {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
/* Der Hero-Block steht durchgehend linksbündig an derselben Kante.
   WordPress zentriert Elemente mit max-width automatisch; die Angaben
   hier heben das für alle Teile des Hero-Blocks auf. */
.zh-hero .zh-label,
.zh-hero .zh-hero__title,
.zh-hero .zh-hero__subtitle,
.zh-hero .zh-lead,
.zh-hero .zh-hero__meta,
.zh-hero .wp-block-buttons {
  margin-left: 0 !important;
  margin-right: auto !important;
}
.zh-hero .zh-hero__title,
.zh-hero .zh-hero__subtitle { max-width: none; }
.zh-hero .zh-lead { max-width: 68ch; }
.zh-lead { max-width: 68ch; }

/* Bildpaare nebeneinander, Bilder oben bündig – nur auf großen Bildschirmen */
@media (min-width: 861px) {
  .zh-editorial {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Kleine Auszeichnungszeile über Überschriften */
.zh-label {
  font-size: var(--wp--preset--font-size--kleiner);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--wp--preset--color--text-sekundaer);
  font-weight: 500; margin-bottom: .75rem;
}
.zh-label--rose { color: var(--wp--preset--color--rose-tief); }

.zh-lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 300; line-height: 1.7;
  color: var(--wp--preset--color--text-sekundaer);
  max-width: 68ch;
}

.zh-rule { border-top: 1px solid var(--zh-line); }

/* ------------------------------------------------------------------
   2. Kopfbereich
------------------------------------------------------------------ */
.zh-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--wp--preset--color--alabaster);
  border-bottom: 1px solid var(--zh-line);
}
.zh-header__inner { min-height: 76px; }
.zh-brand { text-decoration: none; display: flex; align-items: center; gap: .7rem; }
.zh-brand img { width: 34px; height: 34px; display: block; }
.zh-brand__text {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.05rem; line-height: 1.15; color: var(--wp--preset--color--grafit);
  letter-spacing: .01em;
}
.zh-brand__text span {
  display: block; font-family: var(--wp--preset--font-family--sans);
  font-size: .625rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--wp--preset--color--text-sekundaer); margin-top: .15rem;
}
.zh-header .wp-block-navigation {
  font-family: var(--wp--preset--font-family--sans);
  font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
}
.zh-header .wp-block-navigation a { text-decoration: none; color: var(--wp--preset--color--grafit); }
.zh-header .wp-block-navigation a:hover { color: var(--wp--preset--color--rose-tief); }
.zh-header .wp-block-navigation .current-menu-item a,
.zh-header .wp-block-navigation-item.current-menu-item > a {
  box-shadow: inset 0 -1px 0 0 var(--wp--preset--color--rose);
}
.zh-header .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--alabaster);
  padding: 2.5rem 1.5rem;
}
.zh-header .wp-block-navigation__responsive-container.is-menu-open a { font-size: 1.05rem; }

.zh-lang {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wp--preset--color--text-sekundaer);
}
.zh-lang a { text-decoration: none; color: var(--wp--preset--color--text-sekundaer); }
.zh-lang a:hover { color: var(--wp--preset--color--grafit); }
.zh-lang .is-active { color: var(--wp--preset--color--grafit); }

.zh-phone {
  font-size: .8125rem; letter-spacing: .06em; text-decoration: none;
  color: var(--wp--preset--color--grafit); white-space: nowrap;
}
@media (max-width: 900px) { .zh-phone, .zh-header .zh-lang { display: none; } }
@media (max-width: 600px) { .zh-header .zh-btn-header .wp-block-button__link { padding: .8rem 1rem; font-size: .6875rem; } }

/* ------------------------------------------------------------------
   3. Hero
------------------------------------------------------------------ */
/* Volle Fensterbreite, auch innerhalb eines begrenzten Inhaltsbereichs.
   HTML-Blöcke erhalten von WordPress kein alignfull, deshalb hier von Hand. */
.zh-hero__media {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.zh-hero__media img {
  display: block; width: 100%; height: clamp(320px, 56vh, 620px);
  object-fit: cover; border-radius: 0; align-self: start;
}
@media (max-width: 780px) {
  .zh-hero__media img { height: auto; aspect-ratio: 4 / 3; max-height: 60vh; }
}

.zh-hero__title {
  font-size: clamp(2.1rem, 5.4vw, 4rem); line-height: 1.06; font-weight: 400;
  letter-spacing: -0.01em;
}

/* Untertitel unter der Hauptüberschrift */
.zh-hero__subtitle {
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.3; font-weight: 400;
  color: var(--wp--preset--color--text-sekundaer);
  margin: 1rem 0 0; max-width: 34ch;
}
.zh-hero__meta {
  display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; align-items: center;
  padding-top: 1.75rem; border-top: 1px solid var(--zh-line); margin-top: 2.5rem;
}
.zh-hero__meta a.zh-tel {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.35rem; text-decoration: none; color: var(--wp--preset--color--grafit);
}
.zh-hero__meta a.zh-tel:hover { color: var(--wp--preset--color--rose-tief); }

/* ------------------------------------------------------------------
   4. Redaktionelle Abschnitte (Bildpaar + Text)
------------------------------------------------------------------ */
.zh-editorial { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.zh-editorial__images { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }

/* Bilder im Raster: Höhe fest ans Seitenverhältnis binden. Ohne das ziehen
   Browser Raster-Elemente auf die Zeilenhöhe – daher auch align-self und die
   zweite Auswahl, die greift, falls der innere Wrapper einmal fehlt. */
.zh-editorial__images img,
.zh-editorial > img {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; display: block; align-self: start;
}
.zh-editorial__images .zh-offset { margin-top: 2.5rem; }
.zh-editorial__text > * + * { margin-top: 1.1rem; }
@media (max-width: 860px) {
  .zh-editorial { grid-template-columns: 1fr !important; }
  .zh-editorial__images .zh-offset { margin-top: 0; }
}

.zh-figure img { width: 100%; display: block; border-radius: 0; }
.zh-figure figcaption {
  font-size: var(--wp--preset--font-size--kleiner);
  color: var(--wp--preset--color--text-sekundaer); margin-top: .6rem;
}

/* ------------------------------------------------------------------
   5. Leistungen – Karten und schlichte Liste
------------------------------------------------------------------ */
.zh-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--zh-line); border: 1px solid var(--zh-line); }
.zh-card { background: var(--wp--preset--color--weiss); padding: clamp(1.75rem, 3.4vw, 2.75rem); display: flex; flex-direction: column; }
.zh-card h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 0 0 .9rem; }
.zh-card p { margin: 0 0 1.5rem; font-size: 1rem; line-height: 1.7; color: var(--wp--preset--color--text-sekundaer); }
.zh-card__link {
  margin-top: auto; font-family: var(--wp--preset--font-family--sans);
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; color: var(--wp--preset--color--grafit);
  border-bottom: 1px solid var(--wp--preset--color--rose); padding-bottom: .35rem; align-self: flex-start;
}
.zh-card__link:hover { color: var(--wp--preset--color--rose-tief); border-color: var(--wp--preset--color--rose-tief); }
@media (max-width: 780px) { .zh-cards { grid-template-columns: 1fr; } }

/* Dreierreihe, etwa im Abschnitt „Warum Zahnärzte Haidhausen“ */
@media (min-width: 981px) { .zh-cards--drei { grid-template-columns: repeat(3, 1fr); } }

.zh-list { border-top: 1px solid var(--zh-line); }
.zh-list__row {
  display: grid; grid-template-columns: minmax(12rem, 22%) 1fr auto; gap: 1rem 2rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--zh-line); align-items: baseline;
}
.zh-list__row h3 { font-size: 1.125rem; margin: 0; }
.zh-list__row p { margin: 0; font-size: .9375rem; color: var(--wp--preset--color--text-sekundaer); }
@media (max-width: 780px) { .zh-list__row { grid-template-columns: 1fr; gap: .4rem; } }

/* ------------------------------------------------------------------
   6. Team
------------------------------------------------------------------ */
.zh-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.4vw, 2rem); }
.zh-team--two { grid-template-columns: repeat(2, 1fr); }
.zh-team figure { margin: 0; }
.zh-team img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; align-self: start; filter: saturate(.96); }
.zh-team h3 { font-size: 1.0625rem; margin: .9rem 0 .15rem; }
.zh-team p { margin: 0; font-size: .875rem; color: var(--wp--preset--color--text-sekundaer); }
@media (max-width: 900px) { .zh-team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .zh-team { grid-template-columns: 1fr; } .zh-team--two { grid-template-columns: 1fr; } }

.zh-portrait { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.zh-portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; align-self: start; }
.zh-portrait blockquote {
  margin: 0 0 1.25rem; padding-left: 1.25rem; border-left: 2px solid var(--wp--preset--color--rose);
  font-family: var(--wp--preset--font-family--serif); font-size: 1.25rem; line-height: 1.5;
}
@media (max-width: 860px) { .zh-portrait { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   7. Dunkles Band / Termin-CTA
------------------------------------------------------------------ */
.zh-band { background: var(--wp--preset--color--grafit); color: var(--wp--preset--color--alabaster); }
.zh-band h2, .zh-band h3 { color: var(--wp--preset--color--alabaster); }
.zh-band p { color: #CFC9C3; }
.zh-band a:not(.wp-element-button) { color: var(--wp--preset--color--puder); }
.zh-band .wp-element-button { background: var(--wp--preset--color--alabaster); color: var(--wp--preset--color--grafit); }
.zh-band .wp-element-button:hover { background: var(--wp--preset--color--puder); color: var(--wp--preset--color--grafit); }

.zh-quiet { background: var(--wp--preset--color--leinen); }
.zh-panel { background: var(--wp--preset--color--weiss); border: 1px solid var(--zh-line); padding: clamp(1.5rem, 3vw, 2.5rem); }
.zh-note { background: var(--wp--preset--color--puder); padding: clamp(1.25rem, 2.5vw, 1.75rem); border-left: 2px solid var(--wp--preset--color--rose); }

/* ------------------------------------------------------------------
   8. Zitate / Bewertungen
------------------------------------------------------------------ */
.zh-reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.zh-review { background: var(--wp--preset--color--weiss); border: 1px solid var(--zh-line); padding: clamp(1.5rem, 3vw, 2.25rem); }
.zh-review p { font-family: var(--wp--preset--font-family--serif); font-size: 1.0625rem; line-height: 1.65; margin: 0 0 1.25rem; }
.zh-review cite { font-style: normal; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--text-sekundaer); }
@media (max-width: 860px) { .zh-reviews { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   9. Öffnungszeiten, Kontakt, Anfahrt
------------------------------------------------------------------ */
.zh-hours { width: 100%; border-collapse: collapse; }
.zh-hours th, .zh-hours td { text-align: left; padding: .7rem 0; border-bottom: 1px solid var(--zh-line); font-weight: 400; font-size: .9375rem; }
.zh-hours th { width: 40%; color: var(--wp--preset--color--grafit); }
.zh-hours td { color: var(--wp--preset--color--text-sekundaer); font-variant-numeric: tabular-nums; }

.zh-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
@media (max-width: 860px) { .zh-contact-grid { grid-template-columns: 1fr; } }

.zh-map { border: 1px solid var(--zh-line); background: var(--wp--preset--color--weiss); }
.zh-map svg { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------
   10. FAQ (natives details/summary, kein JavaScript)
------------------------------------------------------------------ */
.zh-faq { border-top: 1px solid var(--zh-line); }
.zh-faq details { border-bottom: 1px solid var(--zh-line); }
.zh-faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-family: var(--wp--preset--font-family--serif); font-size: 1.0625rem; line-height: 1.4;
}
.zh-faq summary::-webkit-details-marker { display: none; }
.zh-faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.6rem;
  width: 11px; height: 11px; border-right: 1px solid var(--wp--preset--color--taupe);
  border-bottom: 1px solid var(--wp--preset--color--taupe); transform: rotate(45deg); transition: transform .2s ease;
}
.zh-faq details[open] summary::after { transform: rotate(225deg); top: 1.9rem; }
.zh-faq details > *:not(summary) { margin: 0 0 1.4rem; max-width: 62ch; font-size: .9375rem; color: var(--wp--preset--color--text-sekundaer); }
@media (prefers-reduced-motion: reduce) { .zh-faq summary::after { transition: none; } }

/* ------------------------------------------------------------------
   11. Terminbuchung – Zwei-Klick-Lösung (Dr. Flex)
------------------------------------------------------------------ */
.zh-booking { background: var(--wp--preset--color--weiss); border: 1px solid var(--zh-line); padding: clamp(1.5rem, 3vw, 2.5rem); }
.zh-booking__hint { font-size: .9375rem; color: var(--wp--preset--color--text-sekundaer); max-width: 60ch; }
.zh-booking__frame { width: 100%; min-height: 780px; border: 0; display: block; }
.zh-booking button {
  font-family: var(--wp--preset--font-family--sans); font-size: .8125rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  background: var(--wp--preset--color--grafit); color: #fff; border: 0; border-radius: 2px; padding: 1rem 1.9rem;
}
.zh-booking button:hover { background: var(--wp--preset--color--rose-tief); }

/* ------------------------------------------------------------------
   12. Fußbereich
------------------------------------------------------------------ */
.zh-footer { background: var(--wp--preset--color--alabaster); border-top: 1px solid var(--zh-line); }
.zh-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(1.75rem, 3vw, 3rem); }
.zh-footer h3 {
  font-family: var(--wp--preset--font-family--sans); font-size: .75rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--text-sekundaer);
  margin: 0 0 1.1rem;
}
.zh-footer p, .zh-footer li { font-size: .9375rem; line-height: 1.8; color: var(--wp--preset--color--text-sekundaer); margin: 0; }
.zh-footer ul { list-style: none; margin: 0; padding: 0; }
.zh-footer a { color: var(--wp--preset--color--text-sekundaer); text-decoration: none; }
.zh-footer a:hover { color: var(--wp--preset--color--grafit); text-decoration: underline; }
.zh-footer__bottom {
  border-top: 1px solid var(--zh-line); margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between;
  font-size: .8125rem; color: var(--wp--preset--color--taupe);
}
@media (max-width: 900px) { .zh-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .zh-footer__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   13. Inhaltsseiten (Impressum, Datenschutz)
------------------------------------------------------------------ */
.zh-prose h2 { margin-top: 2.75rem; }
.zh-prose h3 { margin-top: 2rem; font-size: 1.1875rem; }
.zh-prose p, .zh-prose li { font-size: 1rem; line-height: 1.8; }
.zh-prose ul, .zh-prose ol { padding-left: 1.25rem; }

/* Bildnachweise */
.zh-credits { border-top: 1px solid var(--zh-line); }
.zh-credits__row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; padding: .9rem 0; border-bottom: 1px solid var(--zh-line); font-size: .875rem; }
.zh-credits__row span:last-child { color: var(--wp--preset--color--text-sekundaer); }
@media (max-width: 640px) { .zh-credits__row { grid-template-columns: 1fr; } }

/* Platzhalter für noch fehlende Bilder */
.zh-placeholder {
  aspect-ratio: 4/5; background: var(--wp--preset--color--leinen);
  border: 1px dashed var(--wp--preset--color--stein);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wp--preset--color--taupe); padding: 1rem;
}

/* ------------------------------------------------------------------
   13b. Grundsicherung für Bilder
------------------------------------------------------------------ */
main img, .zh-header img, .zh-footer img { max-width: 100%; }
.zh-cards img, .zh-review img, .zh-panel img { height: auto; }

/* ------------------------------------------------------------------
   14. Druck
------------------------------------------------------------------ */
@media print {
  .zh-header, .zh-footer, .wp-block-buttons, .zh-booking { display: none !important; }
  body { background: #fff; }
}
