/* Rinderer – Augen-Spezialpraxis: reproduces the design of the former site augen-spezialpraxis.de
   (measured from the live Joomla site: 1170px container, Open Sans 14px/20px, red top bar,
   beige teaser band and side box, per-page accent colour for links, grey footer box).
   Customer changes 11/2026: menu behind the "three lines" button, red line on all pages, no cross-links. */

:root {
  --top-bar: #e30713;                         /* header bar: always red, like the logo */
  --accent: var(--wp--preset--color--red);    /* per page, see body.accent-* below */
  --beige: var(--wp--preset--color--beige);
  --line: var(--top-bar);                     /* red line under the menu (all pages) */
  --gutter: 20px;
}

/* Accent colour of links per page (page sidebar → "Seitenkopf" → "Akzentfarbe"), as on the old site:
   Praxis/Bücher/Datenschutz red, Therapie blue, Über mich brown, Kontakt green.
   "black" (Impressum, customer request 11/2026): black links in bold. */
body.accent-red   { --accent: var(--wp--preset--color--red); }
body.accent-blue  { --accent: var(--wp--preset--color--blue); }
body.accent-brown { --accent: var(--wp--preset--color--brown); }
body.accent-green { --accent: var(--wp--preset--color--green); }
body.accent-black { --accent: #000; }
body.accent-black .wp-block-post-content a { font-weight: 700; }

/* The old site displayed running text in the bold cut of Open Sans and <strong> text in the
   regular cut (a quirk of its font setup). Reproduced here; set both to "normal" values
   (400 / 700) for conventional weights. */
body { font-weight: 700; }
strong, b { font-weight: 400; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header, teaser, menu, content and footer follow each other without block gaps */
.wp-site-blocks > * + * { margin-block-start: 0; }
.site-header, .site-nav, .site-main { padding-inline: var(--gutter); }

/* ---------- Header ---------- */

.site-header > .wp-block-site-logo { border-top: 5px solid var(--top-bar); padding: 20px 0; line-height: 0; }
.site-header .wp-block-site-logo img { display: block; width: auto; height: 50px; max-width: 100%; object-fit: contain; object-position: left; }

/* ---------- Teaser band (block "Seiten-Teaser") ---------- */

.teaser { background: var(--beige); color: #fff; }
.teaser-inner { max-width: 1210px; margin: 0 auto; }
.teaser-image { margin: 0; overflow: hidden; }
.teaser-image img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: top; filter: sepia(80%); }
.teaser-text { padding: 15px var(--gutter) 20px; text-align: center; }
.teaser-text p { margin: 0 0 10px; }
.teaser-text .teaser-title { margin: 0 0 10px; font-size: 1.5rem; line-height: 1.4; }
.teaser-call {
  display: inline-block;
  margin-bottom: 10px;
  padding: 8px 14px;
  border-radius: 4px;
  background: #fff;
  color: var(--accent);
}
.teaser-call svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; fill: currentColor; }

@media (min-width: 768px) {
  .teaser-inner {
    display: grid;
    grid-template-columns: minmax(0, 770fr) minmax(0, 370fr);
    column-gap: 30px;
    padding: 0 var(--gutter);
  }
  .teaser--no-image .teaser-inner { grid-template-columns: 1fr; }
  .teaser-image { height: 300px; }
  .teaser-image img { height: 300px; }
  .teaser-text { padding: 50px 0 20px; text-align: left; }
  .teaser-text .teaser-title { margin: 10px 0; line-height: 40px; }
}

/* ---------- Content ---------- */

.site-main { padding-top: 21px; padding-bottom: 20px; }
.wp-block-post-content { overflow-wrap: break-word; }

.wp-block-columns { column-gap: 30px; margin-bottom: 0; }
@media (min-width: 782px) { .wp-block-columns { align-items: flex-start; } }

/* Page heading 18px; sub-headings in running text look like the old bold-paragraph headings */
h1.wp-block-heading { margin-top: 10px; margin-bottom: 10px; }
h1.wp-block-heading a { color: inherit; }
:is(h2, h3, h4).wp-block-heading { margin-top: 10px; font-size: 0.875rem; line-height: 20px; font-weight: 400; }

ul.wp-block-list, ol.wp-block-list { padding-left: 25px; }
li { margin: 0; }

/* Beige side box */
.wp-block-group.is-style-box { background: var(--beige); color: #000; padding: 10px; }
.is-style-box > :is(h2, h3, h4).wp-block-heading { margin-top: 10px; font-size: 1.125rem; font-weight: 700; }
.is-style-box li::marker { color: #fff; }

.wp-block-image.is-style-portrait { margin-top: 10px; }

/* ---------- Map block (click-to-load OpenStreetMap) ---------- */

.wp-block-rinderer-osm-map.map { position: relative; width: 100%; height: 550px; background: #f2efe9; }
@media (max-width: 767px) { .wp-block-rinderer-osm-map.map { height: auto; aspect-ratio: 4 / 3; } }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}
.map-consent p { margin: 0; max-width: 34rem; }
.map-consent .wp-element-button { cursor: pointer; border: 0; }

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

.site-footer {
  max-width: 1170px;
  margin: 60px max(var(--gutter), calc((100% - 1170px) / 2)) 0;
  padding: 25px 0 5px;
  border-bottom: 5px solid var(--beige);
}
.site-footer .wp-block-rinderer-footer { max-width: 970px; margin: 0 auto 10px !important; }
.wp-block-rinderer-footer .footer-links { border-color: rgba(0, 0, 0, .15); font-weight: 400; }

/* ---------- Phones: slightly larger text for readability ---------- */

@media (max-width: 599px) {
  body { font-size: 1rem; line-height: 1.5; }
  .site-header .wp-block-site-logo img { height: auto; width: 100%; max-width: 420px; }
  :is(h2, h3, h4).wp-block-heading { font-size: 1rem; line-height: 1.5; }
}

@media print {
  .site-nav, .teaser, .footer-links, .map { display: none; }
}

/* ======================================================================
   Shared components (identical in both themes; source: shared/assets/components.css)
   ====================================================================== */

/* ---------- Menu: button with three lines + language switcher, red line below ---------- */

.site-nav .nav-row { align-items: center; gap: 16px; min-height: 50px; border-bottom: 1px solid var(--line); }
.site-nav .wp-block-navigation__responsive-container-open {
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: none;
  border: 0;
  color: #000;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}
.site-nav .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
.site-nav .wp-block-navigation__responsive-container-open::after { content: "Menü"; font-weight: 400; }
:lang(en) .site-nav .wp-block-navigation__responsive-container-open::after { content: "Menu"; }
:lang(fr) .site-nav .wp-block-navigation__responsive-container-open::after { content: "Menu"; }
:lang(es) .site-nav .wp-block-navigation__responsive-container-open::after { content: "Menú"; }
:lang(zh) .site-nav .wp-block-navigation__responsive-container-open::after { content: "菜单"; }

/* Menu items: black, selected item bold with a frame */
.site-nav .wp-block-navigation .wp-block-navigation-item__content {
  display: block;
  padding: 6px 12px;
  border: 1px solid transparent;
  color: #000;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}
.site-nav .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-nav .wp-block-navigation .wp-block-navigation-item__content:focus-visible { border-color: #ccc; }
.site-nav .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { font-weight: 700; border-color: var(--line); }

/* Opened menu: white page, items one below the other, aligned with the page content */
.site-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 20px; }
.site-nav .is-menu-open .wp-block-navigation__responsive-container-content {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding-top: 48px;
  align-items: flex-start;
}
.site-nav .is-menu-open .wp-block-navigation__container { gap: 6px; align-items: flex-start; }
.site-nav .is-menu-open .wp-block-navigation-item { font-size: 1.125rem; }
.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { margin-left: -13px; padding: 6px 12px; }
.site-nav .wp-block-navigation__responsive-container-close { top: 24px; right: 20px; }
.site-nav .wp-block-navigation__responsive-container-close svg { width: 32px; height: 32px; }

/* Language switcher (DE · EN · 中文 · FR · ES) */
.wp-block-rinderer-language-switcher ul { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.wp-block-rinderer-language-switcher a { color: #000; font-weight: 400; text-decoration: none; }
.wp-block-rinderer-language-switcher a:hover, .wp-block-rinderer-language-switcher a:focus-visible { text-decoration: underline; }
.wp-block-rinderer-language-switcher a[aria-current] { font-weight: 700; }

/* ---------- Footer: black text ---------- */

.wp-block-rinderer-footer { color: #000; }
.wp-block-rinderer-footer .copyright { margin: 0 0 10px; text-align: center; font-weight: 700; }
.wp-block-rinderer-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 9.5px 10px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 20px;
}
.wp-block-rinderer-footer .footer-links a { color: #000; }

/* ---------- Content components ---------- */

/* Group style "Platzhalter": hidden on the website, visible (yellow) in the editor */
.is-style-placeholder { display: none; }

/* Group style "Termin / Artikel" (events, press) */
.wp-block-group.is-style-event { margin-top: 20px; padding-top: 10px; border-top: 1px solid #ccc; }

/* Audio sample and QR codes (Bücher) */
.wp-block-audio { max-width: 420px; margin: 0; }
.wp-block-audio audio { width: 100%; }
.wp-block-audio figcaption, .qr-codes figcaption { margin-top: 4px; font-size: 13px; }
.wp-block-group.qr-codes { gap: 24px; }
.qr-codes .wp-block-image { margin: 0; }

/* Zufalls-Inspiration */
.wp-block-rinderer-inspiration { max-width: 46rem; }
.wp-block-rinderer-inspiration .wp-block-quote {
  margin: 0 0 16px;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--line);
  font-size: 1.375rem;
  line-height: 1.45;
}
.wp-block-rinderer-inspiration .wp-block-quote p { margin: 0; }
.wp-block-rinderer-inspiration .wp-block-quote cite { display: block; margin-top: 10px; color: #666; font-size: 0.875rem; font-style: normal; }
.wp-block-rinderer-inspiration .inspiration-next { margin-top: 4px; border: 0; cursor: pointer; }
