/*
Theme Name: Klavierstimmen Neuss
Theme URI: https://www.klavierstimmen-neuss.de/
Author: Georg
Description: Eigenes Theme für Thomas Peters – Klavierstimmer Rheinkreis Neuss. Goldenes Ocker-Design, responsiv, SEO/GEO-ready (Rank Math).
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: klavierstimmen-neuss
*/
/* =========================================================
   0. LOKALE FONTS – Mulish (DSGVO-konform, kein Google CDN)
   ========================================================= */

@font-face {
  font-family: 'Mulish';
  src: url('assets/fonts/mulish-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mulish';
  src: url('assets/fonts/mulish-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Mulish';
  src: url('assets/fonts/mulish-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mulish';
  src: url('assets/fonts/mulish-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   1. DESIGN TOKENS  (zentrale Konfiguration – hier ändern)
   ========================================================= */
:root {
  /* Farben */
  --color-gold:        #5A2D0C;   /* Primärfarbe – Mahagoni (abgenommen Thomas Peters) */
  --color-gold-dark:   #3E1E08;   /* Hover, Ränder, Akzent */
  --color-gold-light:  #7A4520;   /* dezente Aufhellung */
  --color-white:       #FFFFFF;   /* Text auf Gold */
  --color-dark-text:   #333333;   /* Text auf Weiß (Formular) */
  --color-form-bg:     #FFFFFF;   /* Ausnahme: Kontaktformular */
  --color-overlay:     rgba(0, 0, 0, 0.45); /* Hero-Overlay */

  /* Typografie */
  --font-body:    "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fw-normal: 400;
  --fw-medium: 600;
  --fw-bold:   800;

  --fs-base:  1.0625rem;   /* 17px Fließtext */
  --fs-h1:    clamp(2.2rem, 5vw, 3.4rem);
  --fs-h2:    clamp(1.6rem, 3.5vw, 2.3rem);
  --fs-h3:    clamp(1.25rem, 2.5vw, 1.5rem);
  --lh-body:  1.7;
  --lh-head:  1.2;

  /* Layout */
  --content-max:   1200px;
  --content-pad:   24px;
  --section-gap:   clamp(48px, 8vw, 96px);
  --grid-gap:      clamp(32px, 5vw, 64px);
  --radius:        4px;

  /* Breakpoints (nur als Referenz – in Media Queries genutzt) */
  /* mobile  < 768px | tablet 768–1024px | desktop > 1024px */

  /* Header / Buttons */
  --header-h:      88px;
  --tap-min:       44px;          /* Mindest-Tippfläche mobil */
  --transition:    0.25s ease;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-body);
  color: var(--color-white);
  background-color: var(--color-gold);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.8; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-head);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-medium); }

p { margin: 0 0 1.2em; }

/* Sichtbarer Fokus für Tastatur-Navigation (Accessibility) */
:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 2px;
}

/* Skip-Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-white);
  color: var(--color-dark-text);
  padding: 12px 20px;
  z-index: 9999;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* =========================================================
   3. LAYOUT-HELFER
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

.section {
  padding-block: var(--section-gap);
}

/* horizontale Trennlinie zwischen Abschnitten */
.section + .section { border-top: 1px solid rgba(255, 255, 255, 0.25); }

/* 2-Spalten-Grid: Text + Bild */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  align-items: center;
}

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  min-height: var(--tap-min);
  padding: 13px 28px;
  font-weight: var(--fw-medium);
  border-radius: 0;          /* Buttons site-weit eckig */
  cursor: pointer;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.btn--outline {
  color: var(--color-white);
  background: transparent;
  border: 2px solid var(--color-white);
}
.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-gold);
  opacity: 1;
}

/* =========================================================
   5. HEADER + NAVIGATION
   ========================================================= */
.site-header {
  background: var(--color-gold);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}
.site-branding a {
  font-weight: var(--fw-bold);
  font-size: 1.15rem;
  color: var(--color-white);
  line-height: 1.2;
}
.site-branding img { max-height: 56px; width: auto; }

/* Primärnavigation */
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}
.primary-nav a {
  display: inline-block;
  padding: 6px 0;
  font-weight: var(--fw-medium);
  border-bottom: 3px solid transparent;
}
.primary-nav .current-menu-item > a,
.primary-nav a:hover {
  border-bottom-color: var(--color-white);
  opacity: 1;
}

/* Hamburger-Toggle (mobil) */
.nav-toggle {
  display: none;
  width: var(--tap-min);
  height: var(--tap-min);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; top: -7px; }
.nav-toggle__bar::after  { position: absolute; top: 7px; }

/* offener Zustand → X */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   6. FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-gold);
  padding-block: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.site-footer__inner {
  display: flex;
  justify-content: flex-end;
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a { font-weight: var(--fw-medium); }

/* =========================================================
   7. WHATSAPP FLOATING BUTTON (alle Seiten)
   ========================================================= */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  opacity: 1;
}
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }

/* =========================================================
   7b. SIGNAL FLOATING BUTTON (alle Seiten)
   Sitzt direkt über dem WhatsApp-Button (bottom: 88px).
   ========================================================= */
.signal-float {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #3A76F0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.signal-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  opacity: 1;
}
.signal-float svg { width: 30px; height: 30px; fill: #fff; }

/* =========================================================
   8. KONTAKTFORMULAR-BEREICH (Ausnahme: weißer Hintergrund)
   ========================================================= */
.section--light {
  background: var(--color-form-bg);
  color: var(--color-dark-text);
}
.section--light h1,
.section--light h2,
.section--light h3 { color: var(--color-dark-text); }

/* =========================================================
   9. RESPONSIVE
   ========================================================= */

/* Tablet & darunter: Navigation → mobiles Klappmenü */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }

  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-gold);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .primary-nav.is-open { max-height: 80vh; }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  .primary-nav li { width: 100%; }
  .primary-nav a {
    display: block;
    min-height: var(--tap-min);
    padding: 12px var(--content-pad);
    border-bottom: 0;
  }
  .primary-nav .current-menu-item > a {
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.12);
  }
}

/* Mobile: 2-Spalten → 1-Spalte gestapelt */
@media (max-width: 767px) {
  .grid-2 { grid-template-columns: 1fr; }

  .site-footer__inner { justify-content: center; }
  .footer-nav ul { justify-content: center; }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    right: 16px;
    bottom: 16px;
  }
  .signal-float {
    width: 54px;
    height: 54px;
    right: 16px;
    bottom: 86px;
  }
}

/* =========================================================
   10. PHASE 2 – HERO (Startseite)
   ========================================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px var(--content-pad);
  background-color: var(--color-gold-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-white);
  overflow: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
}
.hero__content h1 {
  margin-bottom: 0.4em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero__content p {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.8em;
}

/* Scroll-Pfeil */
.scroll-arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  animation: ksn-bounce 2s infinite;
}
.scroll-arrow svg { width: 28px; height: 28px; }
@keyframes ksn-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, 10px); }
  60% { transform: translate(-50%, 5px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-arrow { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   11. SEITEN-HEADER + INHALT (page.php / Gutenberg)
   ========================================================= */
.page-header { margin-bottom: 0.8em; }
.entry-title { margin-bottom: 0; }

.entry-content > * { margin-block: 0 1.2em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { margin-top: 1.6em; }

/* Gutenberg: responsive Abstand über direkte Heading/Columns-Blöcke */
.entry-content > .wp-block-heading,
.entry-content > .wp-block-columns { margin-top: clamp(48px, 6vw, 80px); }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.5em; }

/* heller Bereich: Links dunkel-gold statt weiß */
.section--light a { color: var(--color-gold-dark); }

/* =========================================================
   12. GUTENBERG-BLÖCKE (gestylt fürs Theme)
   ========================================================= */

/* Spalten: auf Mobile gestapelt (WP stapelt < 782px selbst) */
.wp-block-columns { gap: var(--grid-gap) !important; align-items: center; }

/* Verhindert Margin-Top am ersten Element einer Spalte */
.wp-block-column > *:first-child { margin-top: 0; }

/* Bilder */
.wp-block-image img { border-radius: var(--radius); }
.wp-block-image figcaption { opacity: 0.85; font-size: 0.9rem; }

/* Galerie (Restaurierung 2×2 → 1 Spalte auf Mobile) */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: var(--radius); }
@media (max-width: 767px) {
  .wp-block-gallery.columns-2,
  .wp-block-gallery.columns-3,
  .wp-block-gallery.columns-4 { grid-template-columns: 1fr !important; }
}

/* Tabellen */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td,
.wp-block-table th {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 14px;
}
.section--light .wp-block-table td,
.section--light .wp-block-table th { border-color: rgba(0, 0, 0, 0.15); }

/* Zitat – Standard */
blockquote, .wp-block-quote {
  border-left: 4px solid var(--color-white);
  padding-left: 1.2em;
  margin-inline: 0;
  font-style: italic;
}

/* Zitat – Stil „Beethoven" (register_block_style) */
.wp-block-quote.is-style-beethoven {
  border: 0 !important;
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: 0.6em 0 !important;
  text-align: center;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-style: italic;
  line-height: 1.4;
}
.wp-block-quote.is-style-beethoven::before {
  content: "\201C";
  display: block;
  font-size: 3.5em;
  line-height: 0.2;
  opacity: 0.35;
  margin-bottom: 0.2em;
}
.wp-block-quote.is-style-beethoven cite {
  display: block;
  margin-top: 0.8em;
  font-size: 0.85rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Gruppe – Stil „Heller Bereich" (weißer Kasten, dunkler Text) */
.wp-block-group.is-style-light-section {
  background: var(--color-form-bg);
  color: var(--color-dark-text);
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
}
.wp-block-group.is-style-light-section :where(h1,h2,h3,h4) { color: var(--color-dark-text); }
.wp-block-group.is-style-light-section a { color: var(--color-gold-dark); }

/* FAQ – natives „Details"-Akkordeon (core/details) */
.wp-block-details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 14px 0;
}
.wp-block-details summary {
  cursor: pointer;
  font-weight: var(--fw-medium);
  font-size: 1.1rem;
  list-style: none;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details[open] summary { margin-bottom: 0.6em; }
.section--light .wp-block-details,
.is-style-light-section .wp-block-details { border-bottom-color: rgba(0, 0, 0, 0.15); }

/* Preis-Hervorhebung (Utility-Klasse) */
.ksn-price {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}

/* Fußnote (Utility-Klasse) */
.ksn-footnote {
  font-size: 0.85rem;
  opacity: 0.85;
  text-align: center;
}

/* =========================================================
   13. KONTAKTFORMULAR (Contact Form 7, im hellen Bereich)
   ========================================================= */
.ksn-contact-form { max-width: 760px; margin-inline: auto; }

.wpcf7-form p { margin-bottom: 1em; }

.wpcf7-form label { display: block; font-weight: var(--fw-medium); }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: 12px 14px;
  margin-top: 6px;
  font: inherit;
  color: var(--color-dark-text);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: var(--radius);
}
.wpcf7-form textarea { min-height: 140px; resize: vertical; }
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

/* 3-spaltige Zeile (Name | E-Mail | Telefon) per Wrapper */
.ksn-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 767px) {
  .ksn-form-row { grid-template-columns: 1fr; }
}

/* DSGVO-Checkbox */
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-form .wpcf7-acceptance label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: var(--fw-normal);
  font-size: 0.92rem;
}

/* Absende-Button (grau, zentriert – wie Bestandsseite) */
.wpcf7-form .wpcf7-submit {
  display: block;
  margin: 8px auto 0;
  min-height: var(--tap-min);
  padding: 13px 36px;
  font: inherit;
  font-weight: var(--fw-medium);
  color: #fff;
  background: #777;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.wpcf7-form .wpcf7-submit:hover { background: #555; }

/* Hinweis, wenn CF7 noch nicht eingerichtet ist */
.ksn-form-placeholder {
  border: 1px dashed #bbb;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--color-dark-text);
}

/* =========================================================
   14. UTILITY – Bild füllt volle Spaltenhöhe (Text+Bild-Zeile)
   Klasse "ksn-media-fill" auf die BILD-SPALTE (Spalten-Block) setzen.
   ========================================================= */
.wp-block-column.ksn-media-fill {
  align-self: stretch !important;
  display: flex;
  flex-direction: column;
}
.wp-block-column.ksn-media-fill .wp-block-image {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}
.wp-block-column.ksn-media-fill .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
}

/* Mobile: Spalten stapeln → Bild normal im Fluss */
@media (max-width: 781px) {
  .wp-block-column.ksn-media-fill { display: block; }
  .wp-block-column.ksn-media-fill .wp-block-image { display: block; flex: none; }
  .wp-block-column.ksn-media-fill .wp-block-image img { height: auto; }
}

/* =========================================================
   15. GUTENBERG-BUTTONS – site-weit eckig (Standard)
   So müssen neue Buttons nicht manuell entrundet werden.
   ========================================================= */
.wp-block-button__link { border-radius: 0; }

/* =========================================================
   16. BLOCKSATZ (überall im Inhaltsbereich)
   hyphens:auto für automatische Silbentrennung (braucht lang="de-DE"
   im HTML, was language_attributes() in header.php liefert).
   ========================================================= */
.entry-content p,
.entry-content li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Blockquotes (Beethoven-Zitat) behalten ihre Ausrichtung (zentriert) */
.entry-content blockquote p {
  text-align: inherit;
  hyphens: inherit;
}
