/* ==========================================================================
   Gemeinsame Styles für alle Page-Templates.
   Nutzt durchgängig die globalen --color-* Variablen, passt sich automatisch
   an jedes Theme an.
   ========================================================================== */

/* --------------------------------------------------------------------------
   HEADER-SICHERHEIT (greift für alle Themes)
   Verhindert, dass Module-Outputs (Hours-Badge, Contact-CTA, Reviews-Score,
   Darkmode-Toggle, Quicksearch …) im Hook `header_actions` die Navigation
   überlagern oder den Header sprengen, wenn mehrere Module gleichzeitig
   aktiv sind.
   -------------------------------------------------------------------------- */
.site-header { isolation: isolate; }            /* eigener stacking-context */
.site-header .header-inner { min-width: 0; }
.site-header .header-inner > * { min-width: 0; } /* Grid-Items dürfen schrumpfen */

/* Sammel-Container für Hook-Outputs darf umbrechen / schrumpfen */
.site-header .header-actions,
.site-header .header-cta {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}
.site-header .header-actions > *,
.site-header .header-cta > * {
  flex-shrink: 0;          /* Buttons selbst nicht zerquetschen */
  max-width: 100%;
}

/* Module-CTA aus dem contact-Modul (Termin anfragen) darf nicht zu breit werden */
.site-header .module-cta--contact {
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hours-Status-Badge: defensiv kappen damit kein Overflow */
.site-header .hours-badge {
  max-width: 16rem;
}

/* Nav-Liste: kein Overflow, sondern wrap (außer Theme überschreibt) */
.site-header .nav-list {
  min-width: 0;
}


/* --------------------------------------------------------------------------
   FULLWIDTH — Inhalt randlos, Hero + großer Content-Bereich
   -------------------------------------------------------------------------- */
.tpl-fullwidth__hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 4rem 0 3rem;
}
.tpl-fullwidth__hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.tpl-fullwidth__header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}
.tpl-fullwidth__header h1 {
  margin: 0;
  color: var(--color-primary);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.tpl-fullwidth__content {
  max-width: none !important;
  padding: 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.tpl-fullwidth__content h2 {
  margin: 2.5rem 0 1rem;
  color: var(--color-primary);
}
.tpl-fullwidth__content p { margin: 0 0 1rem; }

/* --------------------------------------------------------------------------
   SPLIT — Zwei Spalten: Bild links (sticky), Inhalt rechts
   -------------------------------------------------------------------------- */
.tpl-split { padding-top: 2rem; }
.tpl-split .breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: .85rem;
  color: var(--color-text);
  opacity: .7;
}
.tpl-split__layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 800px) {
  .tpl-split__layout { grid-template-columns: 1fr; }
}
.tpl-split__media {
  position: sticky;
  top: 2rem;
  border-radius: .5rem;
  overflow: hidden;
  background: var(--color-secondary);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpl-split__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.tpl-split__placeholder {
  color: var(--color-primary);
  opacity: .25;
}
.tpl-split__title {
  margin: 0 0 .75rem;
  color: var(--color-primary);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}
.tpl-split__lead {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--color-text);
  opacity: .85;
  margin: 0 0 1.5rem;
}
.tpl-split__content {
  font-size: 1.02rem;
  line-height: 1.7;
}
.tpl-split__content p { margin: 0 0 1rem; }
.tpl-split__content h2 {
  margin: 1.5rem 0 .5rem;
  color: var(--color-primary);
  font-size: 1.25rem;
}
.tpl-split__content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.tpl-split__content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin: .5rem 0;
}
.tpl-split__content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   COVER — Vollbild-Hero (100vh) + zentrierter Inhalt darunter
   -------------------------------------------------------------------------- */
.tpl-cover__hero {
  min-height: 100vh;
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  padding: 2rem;
}
.tpl-cover__hero-inner {
  max-width: 800px;
}
.tpl-cover__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .5);
}
.tpl-cover__lead {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.5;
  margin: 0;
  opacity: .95;
}
.tpl-cover__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, .6);
  border-radius: 12px;
  display: flex;
  justify-content: center;
}
.tpl-cover__scroll span {
  width: 3px; height: 8px;
  background: #fff;
  border-radius: 3px;
  margin-top: 5px;
  animation: tpl-cover-scroll 1.6s ease-in-out infinite;
}
@keyframes tpl-cover-scroll {
  0%   { transform: translateY(0); opacity: 1; }
  50%  { transform: translateY(8px); opacity: .4; }
  100% { transform: translateY(0); opacity: 1; }
}
.tpl-cover {
  padding: 5rem 0;
}
.tpl-cover__content {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.8;
}
.tpl-cover__content h2 {
  margin: 3rem 0 1rem;
  color: var(--color-primary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}
.tpl-cover__content p { margin: 0 0 1.25rem; }

/* --------------------------------------------------------------------------
   FOKUS — Schmaler, lesefokussierter Bereich, große Typografie
   -------------------------------------------------------------------------- */
.tpl-focus {
  padding: 4rem 0;
}
.tpl-focus__feature {
  width: min(900px, 95vw);
  margin: 0 auto 3rem;
  border-radius: .75rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.tpl-focus__feature img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tpl-focus__inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.tpl-focus__head {
  margin-bottom: 3rem;
}
.tpl-focus__head .breadcrumbs {
  font-size: .8rem;
  color: var(--color-text);
  opacity: .55;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tpl-focus__head h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--color-text);
}
.tpl-focus__lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--color-text);
  opacity: .8;
  margin: 0;
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
}
.tpl-focus__content {
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--color-text);
}
.tpl-focus__content p { margin: 0 0 1.5rem; }
.tpl-focus__content p:first-of-type::first-letter {
  font-size: 3.5em;
  line-height: 1;
  float: left;
  margin: .15em .12em 0 -.05em;
  font-weight: 700;
  color: var(--color-primary);
}
.tpl-focus__content h2 {
  margin: 3rem 0 .85rem;
  color: var(--color-text);
  font-size: 1.6rem;
  font-weight: 700;
}
.tpl-focus__content h3 {
  margin: 2rem 0 .5rem;
  color: var(--color-primary);
  font-size: 1.2rem;
}
.tpl-focus__content blockquote {
  margin: 2rem -1rem;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--color-secondary);
  border-left: 4px solid var(--color-accent);
  font-size: 1.3rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   FW-TABLE — vom Quill-Editor erzeugte Tabellen
   -------------------------------------------------------------------------- */
.fw-table {
  margin: 1.5rem 0;
  overflow-x: auto;
}
.fw-table table {
  border-collapse: collapse;
  width: 100%;
}
.fw-table th,
.fw-table td {
  border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
  padding: .6rem .8rem;
  vertical-align: top;
  text-align: left;
}
.fw-table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--color-text) 4%, transparent);
}
.fw-table td img,
.fw-table td .fw-table-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: .25rem 0;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   CONTENT-BTN — Inline-Knopf via Shortcode  [/pfad:Label]
   Erscheint im Page-Inhalt als Call-to-Action-Knopf in Theme-Primärfarbe.
   -------------------------------------------------------------------------- */
/* Spezifität erhöht (a.content-btn statt nur .content-btn), damit
   .prose a aus dem Theme den Text-Color nicht überschreiben kann. */
a.content-btn,
.content-btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: .4rem;
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.2;
  margin: .35rem .4rem .35rem 0;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  text-decoration-thickness: 0;
  text-underline-offset: 0;
}
a.content-btn:hover,
.content-btn:hover {
  background: var(--color-primary-dark, color-mix(in srgb, var(--color-primary) 85%, black));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
a.content-btn:active,
.content-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
a.content-btn:focus-visible,
.content-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-primary) 60%, transparent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   NAV-SEPARATOR — Trennlinien / Überschriften im Header-Menü
   Wird von allen Themes via .nav-list / .nav-submenu genutzt.
   Macht eindeutig sichtbar, dass es sich NICHT um einen klickbaren Link
   handelt — keine Hover-Effekte, kein Cursor, dezent vom Rest abgesetzt.
   -------------------------------------------------------------------------- */
.nav-separator {
  pointer-events: none;
  user-select: none;
  cursor: default;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.1rem;          /* einen Tick größer als normale Nav-Items (~0.95rem) */
  letter-spacing: .01em;
  white-space: nowrap;
}

/* In horizontaler Top-Nav:
   - mit Label  → größere Headline in Primärfarbe, eindeutig kein Link
   - ohne Label → schmaler vertikaler Strich zwischen den Items */
.nav-list > .nav-separator {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 0 .55rem;
  margin: 0 .15rem;
}
.nav-list > .nav-separator:empty {
  padding: 0;
  margin: 0 .65rem;
  width: 1px;
  height: 1.2rem;
  background: color-mix(in srgb, var(--color-text, #1f2937) 22%, transparent);
}

/* In Submenu (vertikales Dropdown):
   - mit Label  → Section-Header in Primärfarbe oberhalb einer Trennlinie
   - ohne Label → reine Trenn-Linie */
.nav-submenu > .nav-separator {
  display: block;
  margin: .55rem 0 .2rem;
  padding: .55rem .8rem .3rem;
  border-top: 1px solid color-mix(in srgb, var(--color-text, #1f2937) 12%, transparent);
}
.nav-submenu > .nav-separator:first-child {
  margin-top: 0;
  border-top: 0;
}
.nav-submenu > .nav-separator:empty {
  height: 0;
  margin: .4rem .4rem;
  padding: 0;
  border-top: 1px solid color-mix(in srgb, var(--color-text, #1f2937) 15%, transparent);
}

/* Mobile-Drawer: viele Themes klappen die Top-Nav auf Mobile zu einer
   vertikalen Liste um. Dort wirkt der Header noch größer mit Top-Border. */
@media (max-width: 768px) {
  .nav-list > .nav-separator {
    display: block;
    margin: .6rem 0 .2rem;
    padding: .5rem .8rem .3rem;
    border-top: 1px solid color-mix(in srgb, var(--color-text, #1f2937) 12%, transparent);
  }
  .nav-list > .nav-separator:empty {
    width: auto;
    height: 0;
    background: transparent;
    border-top: 1px solid color-mix(in srgb, var(--color-text, #1f2937) 18%, transparent);
    margin: .5rem .8rem;
  }
}
