/*
Theme Name:     WS Direktbau Child
Theme URI:      https://ws-direktbau.de
Description:    Child-Theme für ws-direktbau.de - Custom Design auf Basis des Appointment-Themes. Sektionen werden über Gutenberg wp:html-Blöcke auf der Startseite zusammengesetzt; das gesamte Styling liegt hier. CSS-Quelle: /index.html im Repo, geprefixt mit body.ws-direktbau, damit Appointment-Parent nicht überschrieben wird.
Author:         WS Direktbau
Author URI:     https://ws-direktbau.de
Template:       appointment
Version:        0.2.0
License:        GPL-2.0-or-later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    ws-direktbau-child
Tags:           construction, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ================================================================
   Design-Tokens - verbindlich aus WORDPRESS-HANDOFF.md §2 / index.html
   ================================================================ */

:root {
  --ink: #0E0F11;
  --paper: #F2EDE5;
  --paper-2: #E8E1D5;
  --line: rgba(14, 15, 17, .14);
  --line-strong: rgba(14, 15, 17, .32);
  --muted: rgba(14, 15, 17, .62);
  --accent: #E8552C;
  --accent-ink: #FFFFFF;

  --maxw: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 4px;

  --font-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ================================================================
   Base - alles geprefixt mit body.ws-direktbau, damit Appointment-Parent
   außerhalb dieses Body-Class nicht überschrieben wird (Block-Editor,
   wp-admin, Login-Seite etc. nutzen weiter Appointment-Defaults).
   ================================================================ */

body.ws-direktbau,
body.ws-direktbau * { box-sizing: border-box; }

body.ws-direktbau {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.ws-direktbau a { color: inherit; text-decoration: none; }
body.ws-direktbau img { max-width: 100%; display: block; }
body.ws-direktbau button { font: inherit; color: inherit; }

/* WordPress Admin-Bar Kompensation (Brief §7) */
body.admin-bar.ws-direktbau header.site { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar.ws-direktbau header.site { top: 46px; }
}

/* ================================================================
   Utility
   ================================================================ */

body.ws-direktbau .wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
body.ws-direktbau .mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
body.ws-direktbau .serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; }
body.ws-direktbau .rule { height: 1px; background: var(--line); width: 100%; }
body.ws-direktbau .rule-strong { height: 1px; background: var(--ink); }

/* ================================================================
   Top utility bar (Sektion 1)
   ================================================================ */

body.ws-direktbau .topbar { background: var(--ink); color: var(--paper); font-size: 12.5px; }
body.ws-direktbau .topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; gap: 24px; }
body.ws-direktbau .topbar .left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
body.ws-direktbau .topbar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; vertical-align: middle; }
body.ws-direktbau .topbar a.tel { font-weight: 600; letter-spacing: .01em; }
body.ws-direktbau .topbar .right { display: flex; gap: 18px; align-items: center; opacity: .8; font-size: 11.5px; }

/* ================================================================
   Header / Nav (Brief §4 v2)
   ================================================================ */

body.ws-direktbau header.site { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
body.ws-direktbau header.site .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; gap: 24px; }

/* Logo (SVG-Bild, Brief §4.1) */
body.ws-direktbau .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
body.ws-direktbau .logo img { height: 44px; width: auto; display: block; }
body.ws-direktbau .logo .mark-only { height: 40px; width: auto; display: none; }

/* Text-Fallback bis SVGs hochgeladen sind */
body.ws-direktbau .logo .logo-text { font-weight: 900; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
body.ws-direktbau .logo .logo-text strong { background: var(--accent); color: var(--accent-ink); padding: 6px 8px; border-radius: 2px; }
body.ws-direktbau .logo .logo-text .acc { color: var(--accent); }
@media (max-width: 720px) {
  body.ws-direktbau .logo img { display: none; }
  body.ws-direktbau .logo .mark-only { display: block; }
}

/* Primary nav - flat <nav><a> (Walker output) ODER ul/li (Fallback) */
body.ws-direktbau nav.primary { display: flex; gap: 28px; align-items: center; font-weight: 500; font-size: 14.5px; }
body.ws-direktbau nav.primary > ul,
body.ws-direktbau nav.primary > ul.menu {
  list-style: none; display: flex; gap: 28px; align-items: center; margin: 0; padding: 0;
}
body.ws-direktbau nav.primary li { margin: 0; padding: 0; }
body.ws-direktbau nav.primary a { position: relative; padding: 6px 0; color: var(--ink); display: inline-block; }
body.ws-direktbau nav.primary a:hover { color: var(--accent); }
body.ws-direktbau nav.primary li.current-menu-item a::after,
body.ws-direktbau nav.primary a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent);
}

/* Header-Actions Container - Button + Burger */
body.ws-direktbau .header-actions { display: flex; gap: 10px; align-items: center; }

/* Burger Button (Mobile, Brief §4.7 + Spec aus index.html) */
body.ws-direktbau .burger {
  display: none;
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  cursor: pointer; border-radius: 2px; padding: 0;
}
body.ws-direktbau .burger span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
body.ws-direktbau .burger span::before,
body.ws-direktbau .burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: transform .2s;
}
body.ws-direktbau .burger span::before { top: -6px; }
body.ws-direktbau .burger span::after { top: 6px; }
body.ws-direktbau.nav-open .burger span { background: transparent; }
body.ws-direktbau.nav-open .burger span::before { transform: translateY(6px) rotate(45deg); }
body.ws-direktbau.nav-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* Button */
body.ws-direktbau .btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; border: 1px solid var(--ink); transition: transform .15s ease, background .15s ease; cursor: pointer; text-decoration: none; }
body.ws-direktbau .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.ws-direktbau .btn.ghost { background: transparent; color: var(--ink); }
body.ws-direktbau .btn.ghost:hover { background: var(--ink); color: var(--paper); }
body.ws-direktbau .btn .arr { display: inline-block; transition: transform .2s; }
body.ws-direktbau .btn:hover .arr { transform: translateX(3px); }

/* ================================================================
   Hero (Sektion 3)
   ================================================================ */

body.ws-direktbau .hero { padding-top: 64px; padding-bottom: 48px; position: relative; overflow: hidden; }
body.ws-direktbau .hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: end; }
body.ws-direktbau .hero .eyebrow { display: flex; align-items: center; gap: 14px; color: var(--muted); }
body.ws-direktbau .hero .eyebrow .bar { width: 32px; height: 1px; background: var(--ink); opacity: .5; }
body.ws-direktbau .hero h1 { font-weight: 900; font-size: clamp(48px, 7.2vw, 108px); line-height: .94; letter-spacing: -.035em; margin: 18px 0 0; }
body.ws-direktbau .hero h1 .it { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
body.ws-direktbau .hero h1 .acc { color: var(--accent); }
body.ws-direktbau .hero .lede { max-width: 520px; margin-top: 28px; color: var(--muted); font-size: 17px; line-height: 1.55; }
body.ws-direktbau .hero .lede strong { color: var(--ink); font-weight: 600; }
body.ws-direktbau .hero .ctas { display: flex; gap: 12px; margin-top: 32px; align-items: center; flex-wrap: wrap; }
body.ws-direktbau .hero .visual { position: relative; aspect-ratio: 4/5; min-height: 520px; }
body.ws-direktbau .hero .visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ws-direktbau .hero .badge { position: absolute; left: -24px; top: -24px; background: var(--paper); border: 1px solid var(--ink); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 170px; z-index: 2; }
body.ws-direktbau .hero .badge .num { font-family: var(--font-serif); font-style: italic; font-size: 56px; line-height: .85; letter-spacing: -.02em; }
body.ws-direktbau .hero .badge .num .acc { color: var(--accent); }
body.ws-direktbau .hero .badge .num sup { font-size: 18px; font-style: normal; font-family: var(--font-sans); font-weight: 600; vertical-align: top; margin-left: 2px; color: var(--accent); }
body.ws-direktbau .hero .badge .lbl { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.3; }

body.ws-direktbau .hero .ticker { margin-top: 64px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; background: var(--paper); }
body.ws-direktbau .hero .ticker-inner { display: flex; gap: 48px; padding: 14px 0; animation: ws-tick 40s linear infinite; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
body.ws-direktbau .hero .ticker-inner span { display: inline-flex; align-items: center; gap: 48px; }
body.ws-direktbau .hero .ticker-inner em { font-style: normal; color: var(--accent); }
@keyframes ws-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================================================================
   Section heading
   ================================================================ */

body.ws-direktbau .section { padding: 96px 0; border-top: 1px solid var(--line); }
body.ws-direktbau .section.tight { padding: 72px 0; }
body.ws-direktbau .section.invert { background: var(--ink); color: var(--paper); border-top: 0; }
body.ws-direktbau .section.invert .muted-ink { color: rgba(242, 237, 229, .62); }
body.ws-direktbau .section.invert .rule { background: rgba(242, 237, 229, .16); }
body.ws-direktbau .section-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: end; margin-bottom: 56px; }
body.ws-direktbau .section-head .index { display: flex; align-items: baseline; gap: 14px; color: var(--muted); }
body.ws-direktbau .section-head .index .n { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; }
body.ws-direktbau .section-head h2 { font-weight: 800; font-size: clamp(36px, 4.4vw, 58px); line-height: 1; letter-spacing: -.025em; margin: 18px 0 0; max-width: 14ch; }
body.ws-direktbau .section-head h2 .it { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -.015em; }
body.ws-direktbau .section-head .blurb { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 46ch; padding-bottom: 6px; }
body.ws-direktbau .section-head .blurb strong { color: inherit; font-weight: 600; }
body.ws-direktbau .section.invert .section-head .blurb { color: rgba(242, 237, 229, .7); }
body.ws-direktbau .section.invert .section-head .blurb strong { color: var(--paper); }

/* ================================================================
   Leistungen (Sektion 4)
   ================================================================ */

body.ws-direktbau .services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
body.ws-direktbau .service { background: var(--paper); padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; min-height: 380px; position: relative; transition: background .2s; }
body.ws-direktbau .service:hover { background: var(--paper-2); }
body.ws-direktbau .service .n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--accent); }
body.ws-direktbau .service h3 { font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
body.ws-direktbau .service p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; flex: 1; }
body.ws-direktbau .service ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
body.ws-direktbau .service ul li { display: flex; gap: 8px; align-items: flex-start; }
body.ws-direktbau .service ul li::before { content: ""; width: 6px; height: 6px; background: var(--ink); margin-top: 8px; flex: 0 0 6px; }
body.ws-direktbau .service .more { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
body.ws-direktbau .service .more .arr { transition: transform .2s; }
body.ws-direktbau .service:hover .more .arr { transform: translateX(4px); }

/* ================================================================
   Stats (Sektion 5 Über uns)
   ================================================================ */

body.ws-direktbau .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
body.ws-direktbau .stat { padding: 36px 28px; border-right: 1px solid var(--line); }
body.ws-direktbau .stat:last-child { border-right: 0; }
body.ws-direktbau .stat .num { font-family: var(--font-serif); font-style: italic; font-size: 88px; line-height: .9; letter-spacing: -.02em; }
body.ws-direktbau .stat .num sup { font-size: 24px; font-style: normal; font-family: var(--font-sans); font-weight: 600; vertical-align: top; margin-left: 4px; color: var(--accent); }
body.ws-direktbau .stat .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
body.ws-direktbau .stat .desc { margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: var(--muted); max-width: 24ch; }

/* ================================================================
   Referenzen (Sektion 6) - 11 Kacheln
   ================================================================ */

body.ws-direktbau .refs { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 160px; gap: 12px; }
body.ws-direktbau .ref { position: relative; overflow: hidden; background: var(--paper-2); border-radius: 2px; }
body.ws-direktbau .ref img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ws-direktbau .ref .meta { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; z-index: 2; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
body.ws-direktbau .ref .meta .loc { font-weight: 700; font-size: 15px; letter-spacing: -.005em; }
body.ws-direktbau .ref .meta .typ { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
body.ws-direktbau .ref .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .55) 100%); z-index: 1; pointer-events: none; }
body.ws-direktbau .ref.r1 { grid-column: span 5; grid-row: span 2; }
body.ws-direktbau .ref.r2 { grid-column: span 4; grid-row: span 2; }
body.ws-direktbau .ref.r3 { grid-column: span 3; grid-row: span 2; }
body.ws-direktbau .ref.r4 { grid-column: span 3; }
body.ws-direktbau .ref.r5 { grid-column: span 4; }
body.ws-direktbau .ref.r6 { grid-column: span 5; }
body.ws-direktbau .ref.r7 { grid-column: span 4; }
body.ws-direktbau .ref.r8 { grid-column: span 4; }
body.ws-direktbau .ref.r9 { grid-column: span 4; }
body.ws-direktbau .ref.r10 { grid-column: span 6; grid-row: span 2; }
body.ws-direktbau .ref.r11 { grid-column: span 6; grid-row: span 2; }

body.ws-direktbau .refs-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
body.ws-direktbau .refs-foot .note { color: var(--muted); font-size: 14px; }

/* ================================================================
   Maschinenpark (Sektion 7)
   ================================================================ */

body.ws-direktbau .fleet { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
body.ws-direktbau .fleet-photo { position: relative; aspect-ratio: 5/4; min-height: 420px; }
body.ws-direktbau .fleet-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ws-direktbau .fleet-photo .tag { position: absolute; right: -12px; bottom: -12px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; z-index: 2; }
body.ws-direktbau .fleet-list { display: flex; flex-direction: column; }
body.ws-direktbau .fleet-list .item { display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); cursor: default; transition: padding-left .2s; }
body.ws-direktbau .fleet-list .item:first-child { border-top: 1px solid var(--ink); }
body.ws-direktbau .fleet-list .item:hover,
body.ws-direktbau .fleet-list .item:focus-visible { padding-left: 8px; cursor: pointer; outline: none; }
body.ws-direktbau .fleet-list .item.active { padding-left: 8px; background: var(--paper-2); }
body.ws-direktbau .fleet-list .item.active .n { color: var(--accent); font-weight: 700; }
body.ws-direktbau .fleet-photo img { transition: opacity .25s; }
body.ws-direktbau .fleet-photo.is-swapping img { opacity: .35; }
body.ws-direktbau .fleet-list .n { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
body.ws-direktbau .fleet-list .name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
body.ws-direktbau .fleet-list .name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
body.ws-direktbau .fleet-list .spec { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink); text-align: right; }

/* ================================================================
   Winterdienst (Sektion 8) - invertierter Hintergrund
   ================================================================ */

body.ws-direktbau .winter { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
body.ws-direktbau .winter-text h3 { font-weight: 900; font-size: clamp(40px, 4.6vw, 64px); line-height: .96; letter-spacing: -.025em; margin: 0; }
body.ws-direktbau .winter-text h3 .it { font-family: var(--font-serif); font-weight: 400; font-style: italic; }
body.ws-direktbau .winter-text p { color: rgba(242, 237, 229, .7); font-size: 16.5px; line-height: 1.55; margin: 24px 0 0; max-width: 46ch; }
body.ws-direktbau .winter-points { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
body.ws-direktbau .winter-points .p { padding: 18px 0; border-top: 1px solid rgba(242, 237, 229, .2); }
body.ws-direktbau .winter-points .p .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
body.ws-direktbau .winter-points .p .v { margin-top: 6px; font-weight: 600; font-size: 16px; }
body.ws-direktbau .winter-photo { position: relative; aspect-ratio: 4/5; min-height: 480px; }
body.ws-direktbau .winter-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ws-direktbau .winter-photo .sticker { position: absolute; top: -20px; right: -20px; width: 120px; height: 120px; background: var(--accent); color: var(--accent-ink); border-radius: 50%; display: grid; place-items: center; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; line-height: 1.3; padding: 14px; font-weight: 600; z-index: 2; text-transform: uppercase; }

body.ws-direktbau .section.invert .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.ws-direktbau .section.invert .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.ws-direktbau .section.invert .btn.ghost { background: transparent; color: var(--paper); border-color: rgba(242, 237, 229, .4); }
body.ws-direktbau .section.invert .btn.ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ================================================================
   Kontakt (Sektion 9)
   Hinweis: Contact Form 7 rendert sein eigenes Markup. Brief §6 verlangt
   unterstrichene Inputs. CF7-Klassen werden hier zusätzlich gestylt.
   ================================================================ */

body.ws-direktbau .contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; }
body.ws-direktbau .contact h2 { font-weight: 900; font-size: clamp(40px, 4.8vw, 72px); line-height: .96; letter-spacing: -.03em; margin: 0; }
body.ws-direktbau .contact h2 .it { font-family: var(--font-serif); font-weight: 400; font-style: italic; color: var(--accent); }
body.ws-direktbau .contact .form { background: var(--paper); border: 1px solid var(--ink); padding: 28px; }
body.ws-direktbau .contact .form .row,
body.ws-direktbau .contact .form .row.cf7 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
body.ws-direktbau .contact .form label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
body.ws-direktbau .contact .form input,
body.ws-direktbau .contact .form select,
body.ws-direktbau .contact .form textarea,
body.ws-direktbau .wpcf7-form-control[type="text"],
body.ws-direktbau .wpcf7-form-control[type="email"],
body.ws-direktbau .wpcf7-form-control[type="tel"],
body.ws-direktbau .wpcf7-form-control.wpcf7-textarea,
body.ws-direktbau .wpcf7-form-control.wpcf7-select { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); padding: 8px 0 10px; font: inherit; font-size: 15px; color: var(--ink); outline: none; transition: border-color .2s; border-radius: 0; }
body.ws-direktbau .contact .form input:focus,
body.ws-direktbau .contact .form select:focus,
body.ws-direktbau .contact .form textarea:focus,
body.ws-direktbau .wpcf7-form-control:focus { border-bottom-color: var(--accent); }
body.ws-direktbau .contact .form textarea,
body.ws-direktbau .wpcf7-form-control.wpcf7-textarea { resize: vertical; min-height: 88px; }
body.ws-direktbau .contact .form .submit { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 16px; flex-wrap: wrap; }
body.ws-direktbau .contact .form .submit .legal { font-size: 11.5px; color: var(--muted); max-width: 32ch; line-height: 1.45; }

/* CF7 Submit-Button in Akzentfarbe (Brief: passend zur Brand-Orange) */
body.ws-direktbau .wpcf7-form .wpcf7-submit,
body.ws-direktbau .contact .form input[type="submit"] {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .01em;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
  margin-top: 8px;
}
body.ws-direktbau .wpcf7-form .wpcf7-submit:hover,
body.ws-direktbau .contact .form input[type="submit"]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}
body.ws-direktbau .wpcf7-form .wpcf7-submit:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
body.ws-direktbau .wpcf7-spinner { vertical-align: middle; margin-left: 10px; }
body.ws-direktbau .contact .info { display: flex; flex-direction: column; gap: 8px; }
body.ws-direktbau .contact .info .blk { padding: 22px 0; border-top: 1px solid var(--line); }
body.ws-direktbau .contact .info .blk:first-child { border-top: 1px solid var(--ink); }
body.ws-direktbau .contact .info .blk .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
body.ws-direktbau .contact .info .blk .v { margin-top: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.005em; }
body.ws-direktbau .contact .info .blk .v.big { font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
body.ws-direktbau .contact .info .blk .v.big a { color: var(--ink); }
body.ws-direktbau .contact .info .blk .v.big a:hover { color: var(--accent); }
body.ws-direktbau .contact .info .blk small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 6px; }

/* ================================================================
   Footer (Sektion 10)
   ================================================================ */

body.ws-direktbau footer.site { background: var(--ink); color: var(--paper); padding: 64px 0 28px; font-size: 14px; }
body.ws-direktbau footer.site .grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(242, 237, 229, .2); }
body.ws-direktbau footer.site .col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(242, 237, 229, .55); margin: 0 0 16px; font-weight: 500; }
body.ws-direktbau footer.site .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
body.ws-direktbau footer.site .col a:hover { color: var(--accent); }
body.ws-direktbau footer.site .brand { display: flex; flex-direction: column; gap: 14px; max-width: 36ch; }
body.ws-direktbau footer.site .brand .bigmark { font-weight: 900; font-size: 34px; letter-spacing: -.025em; line-height: .95; }
body.ws-direktbau footer.site .brand .bigmark .acc { color: var(--accent); }
body.ws-direktbau footer.site .brand p { color: rgba(242, 237, 229, .65); font-size: 14px; line-height: 1.5; margin: 0; }
body.ws-direktbau footer.site .bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; color: rgba(242, 237, 229, .55); font-size: 12.5px; gap: 24px; flex-wrap: wrap; }

/* ================================================================
   Inner-Page-Layout (Impressum, Stellenangebote, Referenz-Detailseiten,
   Maschinenpark-Page etc.) - alles außer Front-Page
   ================================================================ */

body.ws-direktbau .inner-page { padding: 64px 0 96px; }
body.ws-direktbau .inner-page .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
body.ws-direktbau .inner-page .section-head h2 { font-size: clamp(36px, 5.6vw, 72px); max-width: none; }
body.ws-direktbau .inner-page .section-head .index a { color: var(--muted); }
body.ws-direktbau .inner-page .section-head .index a:hover { color: var(--accent); }

body.ws-direktbau .entry-content {
  max-width: 880px;
  font-size: 17px;
  line-height: 1.65;
}
body.ws-direktbau .entry-content > * + * { margin-top: 24px; }
body.ws-direktbau .entry-content h2 { font-size: 32px; line-height: 1.15; margin-top: 56px; letter-spacing: -.02em; }
body.ws-direktbau .entry-content h3 { font-size: 22px; line-height: 1.2; margin-top: 40px; letter-spacing: -.01em; font-weight: 700; }
body.ws-direktbau .entry-content h4 { font-size: 18px; font-weight: 700; margin-top: 32px; }
body.ws-direktbau .entry-content p { margin: 0; }
body.ws-direktbau .entry-content ul,
body.ws-direktbau .entry-content ol { padding-left: 1.4em; }
body.ws-direktbau .entry-content li + li { margin-top: 6px; }
body.ws-direktbau .entry-content a { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
body.ws-direktbau .entry-content a:hover { color: var(--ink); }
body.ws-direktbau .entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--muted);
}
body.ws-direktbau .entry-content img { border-radius: 2px; margin: 16px 0; height: auto; }
body.ws-direktbau .entry-content table { width: 100%; border-collapse: collapse; }
body.ws-direktbau .entry-content th,
body.ws-direktbau .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
body.ws-direktbau .entry-content th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* Bilder/Galerien volle Breite, nicht durch 880px-Limit eingeengt */
body.ws-direktbau .entry-content .wp-block-gallery,
body.ws-direktbau .entry-content .wp-block-image,
body.ws-direktbau .entry-content .ngg-gallery-thumbnail-box,
body.ws-direktbau .entry-content [class*="ngg-galleryoverview"],
body.ws-direktbau .entry-content [class*="ngg-album"] { max-width: none; }
body.ws-direktbau .entry-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 32px;
}
body.ws-direktbau .entry-content .wp-block-image img { width: 100%; }

/* NextGEN-Gallery Anpassungen - entschärft das Default-Styling */
body.ws-direktbau .entry-content .ngg-galleryoverview { margin: 0 !important; }
body.ws-direktbau .entry-content .ngg-galleryoverview .ngg-gallery-thumbnail { padding: 4px !important; border: 0 !important; background: transparent !important; }
body.ws-direktbau .entry-content .ngg-galleryoverview .ngg-gallery-thumbnail img { border: 0 !important; box-shadow: none !important; }

/* ================================================================
   Klickbare Referenz-Kacheln auf der Startseite
   ================================================================ */

body.ws-direktbau .ref a.ref-link {
  position: absolute; inset: 0; z-index: 3;
  display: block;
  text-decoration: none;
  /* Inhalt liegt darunter im normalen Flow */
}
body.ws-direktbau .ref a.ref-link::after {
  content: ""; position: absolute; inset: 0; transition: background .2s;
}
body.ws-direktbau .ref a.ref-link:hover::after,
body.ws-direktbau .ref a.ref-link:focus-visible::after { background: rgba(232, 85, 44, .14); }
body.ws-direktbau .ref a.ref-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

/* ================================================================
   Skip-link Accessibility (Brief §12 ≥95)
   ================================================================ */

body.ws-direktbau .skip-link.screen-reader-text {
  position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
body.ws-direktbau .skip-link.screen-reader-text:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; z-index: 9999;
  border-radius: 2px; font-family: var(--font-sans); font-weight: 600; font-size: 14px;
}

/* ================================================================
   Mobile Reflow (grobe Breakpoints aus index.html)
   ================================================================ */

@media (max-width: 980px) {
  body.ws-direktbau .hero .grid { grid-template-columns: 1fr; gap: 48px; }
  body.ws-direktbau .hero .visual { min-height: 420px; }
  body.ws-direktbau .section-head { grid-template-columns: 1fr; gap: 18px; }
  body.ws-direktbau .services { grid-template-columns: repeat(2, 1fr); }
  body.ws-direktbau .stats { grid-template-columns: repeat(2, 1fr); }
  body.ws-direktbau .stat { border-bottom: 1px solid var(--line); }
  body.ws-direktbau .stat:nth-last-child(-n+2) { border-bottom: 0; }
  body.ws-direktbau .stat:nth-child(2n) { border-right: 0; }
  body.ws-direktbau .refs { grid-template-columns: repeat(6, 1fr); }
  body.ws-direktbau .ref.r1,
  body.ws-direktbau .ref.r2,
  body.ws-direktbau .ref.r3,
  body.ws-direktbau .ref.r4,
  body.ws-direktbau .ref.r5,
  body.ws-direktbau .ref.r6,
  body.ws-direktbau .ref.r7,
  body.ws-direktbau .ref.r8,
  body.ws-direktbau .ref.r9,
  body.ws-direktbau .ref.r10,
  body.ws-direktbau .ref.r11 { grid-column: span 3; grid-row: span 1; }
  body.ws-direktbau .ref.r10,
  body.ws-direktbau .ref.r11 { grid-column: span 6; grid-row: span 2; }
  body.ws-direktbau .fleet,
  body.ws-direktbau .winter,
  body.ws-direktbau .contact { grid-template-columns: 1fr; gap: 32px; }

  /* Fleet auf Mobile: Foto kleiner und sticky — der Rest unverändert */
  body.ws-direktbau .fleet-photo {
    aspect-ratio: 16 / 10;
    min-height: 220px;
    max-height: 55vh;
    position: sticky;
    top: 72px;
    z-index: 5;
    background: var(--paper);
  }
  body.admin-bar.ws-direktbau .fleet-photo { top: 104px; }
  body.ws-direktbau .fleet-photo .tag { right: 8px; bottom: 8px; }
  body.ws-direktbau .contact .form .row,
  body.ws-direktbau .contact .form .row.cf7 { grid-template-columns: 1fr; }
  body.ws-direktbau footer.site .grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Mobile nav: full-screen slide-in panel (Brief §4.7) */
  body.ws-direktbau .burger { display: inline-flex; }
  body.ws-direktbau nav.primary {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 24px var(--gutter);
    font-size: 22px;
    font-weight: 600;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 30;
    border-top: 1px solid var(--line);
  }
  body.ws-direktbau nav.primary a { padding: 18px 0; width: 100%; border-bottom: 1px solid var(--line); }
  body.ws-direktbau nav.primary a.active::after,
  body.ws-direktbau nav.primary li.current-menu-item a::after { display: none; }
  body.ws-direktbau.nav-open nav.primary { transform: translateX(0); }
  body.ws-direktbau.nav-open { overflow: hidden; }
  body.ws-direktbau header.site .header-actions .btn { display: none; }
}

@media (max-width: 560px) {
  body.ws-direktbau .services { grid-template-columns: 1fr; }
  body.ws-direktbau .stats { grid-template-columns: 1fr; }
  body.ws-direktbau .stat { border-right: 0 !important; }
  body.ws-direktbau .refs { grid-template-columns: repeat(2, 1fr); }
  body.ws-direktbau .ref.r1,
  body.ws-direktbau .ref.r2,
  body.ws-direktbau .ref.r3,
  body.ws-direktbau .ref.r4,
  body.ws-direktbau .ref.r5,
  body.ws-direktbau .ref.r6,
  body.ws-direktbau .ref.r7,
  body.ws-direktbau .ref.r8,
  body.ws-direktbau .ref.r9,
  body.ws-direktbau .ref.r10,
  body.ws-direktbau .ref.r11 { grid-column: span 2; grid-row: span 1; }
  body.ws-direktbau .topbar .right { display: none; }
  body.ws-direktbau .hero .badge { left: 0; top: 0; }
  body.ws-direktbau footer.site .grid { grid-template-columns: 1fr; }
}
