/* =========================================================
   Dennis Damrath Fussbodentechnik -- Theme-Stylesheet
   Farbwelt vom Firmenfahrzeug/Logo abgeleitet. Bewusst ohne
   externe Schriftarten (Datenschutz: nichts wird nachgeladen).
   ========================================================= */

:root {
  --dd-anthrazit: #1F1B16;
  --dd-anthrazit-hell: #2C2620;
  --dd-braun-dunkel: #6B4226;
  --dd-braun-hell: #A9754A;
  --dd-creme: #F7F3EC;
  --dd-weiss: #FFFFFF;
  --dd-text: #2A2520;
  --dd-text-mild: #5B5347;
  --dd-rand: #E3DACB;
  --dd-schatten: 0 10px 30px rgba(31, 27, 22, 0.12);
  --dd-radius: 14px;
  --dd-font-headline: Georgia, 'Times New Roman', Times, serif;
  --dd-font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --dd-max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--dd-font-text);
  color: var(--dd-text);
  background: var(--dd-weiss);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--dd-font-headline);
  color: var(--dd-anthrazit);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); text-align: center; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.dd-skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--dd-anthrazit);
  color: var(--dd-weiss);
  padding: 10px 16px;
  z-index: 1000;
}
.dd-skip-link:focus { left: 10px; top: 10px; }

.dd-container {
  max-width: var(--dd-max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.dd-container--eng { max-width: 820px; }

/* --- Topbar --- */
.dd-topbar {
  background: var(--dd-anthrazit);
  color: var(--dd-creme);
  font-size: 0.85rem;
}
.dd-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 8px 20px;
}
.dd-topbar__phone { font-weight: 600; }
.dd-topbar__phone:hover { color: var(--dd-braun-hell); }
.dd-topbar__rating { opacity: 0.9; }

/* --- Header / Navigation --- */
.dd-header {
  background: var(--dd-weiss);
  border-bottom: 1px solid var(--dd-rand);
  position: sticky;
  top: 0;
  z-index: 100;
}
.dd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
  flex-wrap: wrap;
}
.dd-logo img { height: 56px; width: auto; }
.dd-logo__text {
  font-family: var(--dd-font-headline);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--dd-anthrazit);
}

.dd-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.dd-burger span {
  width: 26px;
  height: 3px;
  background: var(--dd-anthrazit);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
/* Offenes Menue: Burger-Icon wird sichtbar zu einem X, damit klar ist,
   dass derselbe Button das Menue jetzt schliesst (Team-Runde-Fund Pia,
   06.10.2026). */
.dd-menu-toggle:checked ~ .dd-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.dd-menu-toggle:checked ~ .dd-burger span:nth-child(2) { opacity: 0; }
.dd-menu-toggle:checked ~ .dd-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.dd-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dd-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 22px;
  flex-wrap: wrap;
}
.dd-nav__link {
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.dd-nav__link:hover,
.dd-nav__item.is-active .dd-nav__link { border-bottom-color: var(--dd-braun-hell); }

.dd-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
}
.dd-btn--primary {
  background: var(--dd-braun-hell);
  color: var(--dd-weiss);
}
.dd-btn--primary:hover { background: var(--dd-braun-dunkel); transform: translateY(-1px); box-shadow: var(--dd-schatten); }
.dd-btn--ghost {
  background: transparent;
  color: var(--dd-anthrazit);
  border-color: var(--dd-anthrazit);
}
.dd-btn--ghost:hover { background: var(--dd-anthrazit); color: var(--dd-weiss); }

/* Button-Block im normalen Seiten-Editor: WordPress legt die dd-btn-Klassen
   auf den äußeren Block-Rahmen, das sichtbare Element ist aber der Link
   darin -- sonst greift die Gestaltung oben nicht, und der Button bekommt
   stattdessen WordPress' eigenes Standard-Aussehen (seit 08.10.2026). */

/* Der äußere Block-Rahmen trägt dieselben dd-btn-Klassen wie früher der
   Link selbst -- ohne diese Zeile rutscht er versehentlich auch in die
   .dd-btn-Regel ganz oben und malt eine zweite, größere Pille um die
   eigentliche (Fund 08.10.2026, Markus' Rückmeldung "zwei Pillen").
   Nur die eigene Farbe/Form wird ihm genommen, NICHT display:contents --
   das hätte einen zweiten Fehler ausgelöst: WordPress' eigene
   Flex-Layout-Regel streckt dann den Link auf die volle Breite, weil er
   ohne den Rahmen als direktes Flex-Kind gilt (selbst gefunden und
   verworfen, bevor es live ging). */
.wp-block-buttons .wp-block-button.dd-btn {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.wp-block-button.dd-btn .wp-block-button__link {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
  text-decoration: none;
}
.wp-block-button.dd-btn--primary .wp-block-button__link {
  background: var(--dd-braun-hell);
  color: var(--dd-weiss);
}
.wp-block-button.dd-btn--primary .wp-block-button__link:hover {
  background: var(--dd-braun-dunkel);
  transform: translateY(-1px);
  box-shadow: var(--dd-schatten);
}
.wp-block-button.dd-btn--ghost .wp-block-button__link {
  background: transparent;
  color: var(--dd-anthrazit);
  border-color: var(--dd-anthrazit);
}
.wp-block-button.dd-btn--ghost .wp-block-button__link:hover {
  background: var(--dd-anthrazit);
  color: var(--dd-weiss);
}
.dd-cta-final .wp-block-button.dd-btn--ghost .wp-block-button__link {
  color: var(--dd-weiss);
  border-color: var(--dd-weiss);
}
.dd-cta-final .wp-block-button.dd-btn--ghost .wp-block-button__link:hover {
  background: var(--dd-weiss);
  color: var(--dd-braun-dunkel);
}

.dd-link { font-weight: 700; color: var(--dd-braun-dunkel); }
.dd-link:hover { text-decoration: underline; }
.dd-link-button {
  background: none; border: none; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}

.dd-menu-toggle { display: none; }

/* --- Hero --- */
.dd-hero {
  background: linear-gradient(135deg, var(--dd-creme) 0%, #EFE6D6 100%);
  padding: clamp(40px, 6vw, 90px) 0;
  overflow: hidden;
}
.dd-hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.dd-hero__sub { color: var(--dd-text-mild); font-size: 1.15rem; max-width: 46ch; }
.dd-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

.dd-hero__visual {
  display: flex;
  justify-content: center;
  width: 100%;
  /* Seit dem Child-Theme-Umbau (08.10.2026) liegt dieser Block innerhalb
     eines Gutenberg-"constrained"-Layouts. Dessen Core-CSS setzt auf jedes
     direkte Kind automatische Außenabstände (margin-left/right: auto),
     wodurch Grid-Kinder ohne explizite Breite nicht mehr automatisch den
     ganzen Grid-Track ausfüllen, sondern auf ihre Inhaltsbreite
     schrumpfen -- die darunterliegende min(360px, 90%)-Breite der
     Plankbox konnte sich dadurch nicht mehr sinnvoll auflösen (90% von
     einer unbestimmten Breite wird vom Browser als 0 behandelt). Die
     explizite width: 100% hier bricht diese Kette sauber auf. */
}
.dd-hero__plankbox {
  width: min(360px, 90%);
  aspect-ratio: 1 / 1;
  background: var(--dd-anthrazit);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  box-shadow: var(--dd-schatten);
  padding: 20px;
}
.dd-plank {
  width: 78%;
  height: 24px;
  border-radius: 12px;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}
.dd-plank--a { background: var(--dd-braun-hell); }
.dd-plank--b { background: var(--dd-braun-dunkel); }

/* --- Sections --- */
.dd-section { padding: clamp(48px, 6vw, 84px) 0; }
.dd-section--dunkel { background: var(--dd-anthrazit); color: var(--dd-creme); }
.dd-section--dunkel h2 { color: var(--dd-weiss); }
.dd-section__intro { text-align: center; color: var(--dd-text-mild); max-width: 60ch; margin: 0 auto 2.5em; }
.dd-section--dunkel .dd-section__intro { color: #D8CDBA; }
.dd-section__more { text-align: center; margin-top: 2em; }

.dd-grid { display: grid; gap: 24px; margin-top: 2em; }
.dd-grid--3 { grid-template-columns: repeat(3, 1fr); }
.dd-grid--4 { grid-template-columns: repeat(4, 1fr); }

.dd-card {
  background: var(--dd-weiss);
  border: 1px solid var(--dd-rand);
  border-radius: var(--dd-radius);
  padding: 28px;
  box-shadow: var(--dd-schatten);
}
.dd-card__icon { font-size: 2rem; margin-bottom: 10px; }
.dd-card--dunkel {
  background: var(--dd-anthrazit-hell);
  border-color: #3A3228;
}
.dd-card--dunkel h3 { color: var(--dd-weiss); }
.dd-card--dunkel p { color: #D8CDBA; margin-bottom: 0; }

.dd-review {
  background: var(--dd-creme);
  border-left: 4px solid var(--dd-braun-hell);
  border-radius: 0 var(--dd-radius) var(--dd-radius) 0;
  padding: 22px 24px;
  margin: 0;
}
.dd-review p { font-style: italic; margin-bottom: 10px; }
.dd-review cite { font-weight: 700; font-style: normal; color: var(--dd-braun-dunkel); }

.dd-schritt { text-align: center; }
.dd-schritt__nr {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--dd-braun-hell);
  color: var(--dd-weiss);
  font-family: var(--dd-font-headline);
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}

.dd-cta-final {
  background: var(--dd-braun-dunkel);
  color: var(--dd-weiss);
  text-align: center;
}
.dd-cta-final h2, .dd-cta-final p { color: var(--dd-weiss); }
.dd-cta-final__inner .dd-hero__cta { justify-content: center; }
.dd-cta-final .dd-btn--ghost { color: var(--dd-weiss); border-color: var(--dd-weiss); }
.dd-cta-final .dd-btn--ghost:hover { background: var(--dd-weiss); color: var(--dd-braun-dunkel); }

/* --- Unterseiten --- */
.dd-page-hero {
  background: var(--dd-creme);
  padding: 50px 0 30px;
  text-align: center;
}
.dd-rechtstext h2 { text-align: left; font-size: 1.3rem; margin-top: 1.6em; }
.dd-rechtstext p, .dd-rechtstext li { color: var(--dd-text-mild); }

/* --- Kontaktseite --- */
.dd-kontakt-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 48px;
  align-items: start;
}
.dd-kontakt-info {
  background: var(--dd-creme);
  border-radius: var(--dd-radius);
  padding: 30px;
}
.dd-kontakt-info__zeile { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.dd-kontakt-info__rating { margin-top: 20px; font-weight: 600; }

/* Contact Form 7: etwas Luft und saubere Feldoptik ohne eigenes CSS-Plugin */
.wpcf7-form p { margin-bottom: 1.1em; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--dd-rand);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.wpcf7-form textarea { min-height: 140px; resize: vertical; }
.wpcf7-form input[type="submit"] {
  background: var(--dd-braun-hell);
  color: var(--dd-weiss);
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.wpcf7-form input[type="submit"]:hover { background: var(--dd-braun-dunkel); }
.wpcf7-not-valid-tip { color: #B3261E; font-size: 0.88rem; }
.wpcf7-response-output { border-radius: 8px; padding: 12px 16px; border-width: 1px; border-style: solid; }
.wpcf7-mail-sent-ok { background: #E7F3E8; border-color: #2E7D32; color: #1B5E20; }
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng,
.wpcf7-spam-blocked { background: #FDECEA; border-color: #B3261E; color: #7A1812; }

/* Geschäftsangaben-Box auf der Kontaktseite: Anruf-Button mit Luft nach oben */
.dd-kontakt-info__cta { margin-top: 22px; }

/* --- Footer --- */
.dd-footer { background: var(--dd-anthrazit); color: #D8CDBA; padding: 50px 0 10px; }
.dd-footer__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #3A3228;
}
.dd-footer__brand { font-family: var(--dd-font-headline); color: var(--dd-weiss); font-size: 1.2rem; }
.dd-footer a:hover { color: var(--dd-weiss); }
.dd-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dd-footer__copyright { text-align: center; padding: 16px 20px; font-size: 0.85rem; color: #A89C87; }

/* --- Responsive --- */
@media (max-width: 880px) {
  .dd-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .dd-hero__cta { justify-content: center; }
  .dd-grid--3, .dd-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .dd-kontakt-grid { grid-template-columns: 1fr; }
  /* Formular zuerst zeigen, Kontaktinfos danach -- wer am Handy auf der
     Kontaktseite landet, soll nicht erst an den Eingabefeldern vorbei-
     scrollen muessen (Team-Runde-Fund Pia, 06.10.2026). */
  .dd-kontakt-formular { order: -1; }
  .dd-footer__inner { grid-template-columns: 1fr; text-align: center; }
  .dd-kontakt-info__zeile { justify-content: center; }
}

@media (max-width: 480px) {
  /* Die dekorative Dielen-Grafik im Hero ist reines Beiwerk (aria-hidden)
     und kostet auf kleinen Handys nur Scroll-Strecke bis zum eigentlichen
     Inhalt (Team-Runde-Fund Pia, 06.10.2026). */
  .dd-hero__visual { display: none; }
}

@media (max-width: 680px) {
  .dd-burger { display: flex; }
  .dd-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    background: var(--dd-weiss);
    border-top: 1px solid var(--dd-rand);
    padding-top: 16px;
  }
  .dd-nav__list { flex-direction: column; gap: 4px; }
  .dd-menu-toggle:checked ~ .dd-nav { display: flex; }
  .dd-nav__cta { text-align: center; margin-top: 10px; }
  .dd-grid--3, .dd-grid--4 { grid-template-columns: 1fr; }
  .dd-topbar__inner { justify-content: center; text-align: center; }
}

/* --- Barrierefreiheit: sichtbarer Fokus-Rahmen --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--dd-braun-hell);
  outline-offset: 2px;
}
