/*
Theme Name: KAGO Dachtechnik 1.3
Theme URI: https://kago-dachtechnik.de/
Author: KAGO Dachtechnik
Description: Dunkles Premium-WordPress-Theme für Dachtechnik, Dachsanierung, Zimmerei und Referenzprojekte. Responsive und leicht anpassbar.
Version: 2.5.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: kago-dachtechnik
*/
:root{--bg:#e9edf1;--panel:#f5f7f9;--panel2:#171e24;--text:#f5f6f7;--muted:#aab3bb;--line:#2a333b;--red:#1769aa;--red2:#b90e17;--max:1220px;--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}a{color:inherit;text-decoration:none}a:hover{color:#ff656b}img{max-width:100%;height:auto;display:block}.wrap{width:min(var(--max),calc(100% - 44px));margin:auto}.topline{height:4px;background:linear-gradient(90deg,var(--red),#ff6a52 38%,transparent 38%)}.site-header{position:absolute;top:4px;left:0;right:0;z-index:50;background:transparent;border-bottom:1px solid #ffffff20;transition:background .25s,top .25s,box-shadow .25s}.site-header.is-scrolled{position:fixed;top:0;background:rgba(10,13,16,.92);backdrop-filter:blur(16px);border-bottom:1px solid #ffffff18;box-shadow:0 8px 28px #0006}.nav{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px;transition:min-height .25s}.site-header.is-scrolled .nav{min-height:62px}.site-header.is-scrolled .brandmark{width:38px;height:35px}.site-header.is-scrolled .brand{font-size:23px}.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.04em;line-height:1;font-size:26px}.brand small{display:block;color:var(--red);font-size:12px;letter-spacing:.14em;margin-top:5px}.brandmark{width:46px;height:42px}.main-nav{display:flex;align-items:center;gap:25px;font-size:13px;color:#d8dde1}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:13px 18px;border-radius:6px;background:var(--red);border:1px solid var(--red);color:white!important;font-weight:750;font-size:14px;transition:.2s}.btn:hover{background:#ff343c;transform:translateY(-1px)}.btn.outline{background:transparent;border-color:#68737d}.btn.outline:hover{border-color:white}.menu-toggle{display:none;background:transparent;color:white;border:1px solid var(--line);padding:8px 12px;border-radius:8px}
.hero{position:relative;isolation:isolate;overflow:hidden;min-height:620px;display:flex;align-items:center;border-bottom:1px solid var(--line);background:#111820}.hero:before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(7,10,13,.98) 0%,rgba(7,10,13,.88) 32%,rgba(7,10,13,.28) 100%),var(--hero-image) center/cover}.hero:after{content:"";position:absolute;inset:auto 0 0;height:100px;z-index:-1;background:linear-gradient(transparent,var(--bg))}.hero-inner{padding:80px 0 70px;max-width:680px}.eyebrow{display:flex;align-items:center;gap:11px;text-transform:uppercase;letter-spacing:.2em;font-size:11px;font-weight:800;color:#d2d8dd}.dot{width:6px;height:6px;background:var(--red);display:inline-block}.hero h1{font-size:clamp(46px,7vw,86px);letter-spacing:-.055em;line-height:.92;margin:22px 0 20px;font-weight:950}.hero h1 span{display:block;color:var(--red)}.hero p{font-size:clamp(18px,2.2vw,23px);line-height:1.4;color:#e1e5e8;max-width:520px;margin:0 0 28px}.actions{display:flex;flex-wrap:wrap;gap:12px}.proof{display:flex;flex-wrap:wrap;gap:24px;margin-top:42px;color:#d3d9dd;font-size:12px}.proof span{display:flex;gap:9px;align-items:center}.proof b{font-size:19px;color:white}.section{padding:82px 0}.section-head{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:34px}.kicker{color:var(--red);font-weight:850;text-transform:uppercase;letter-spacing:.16em;font-size:11px}.section h2{font-size:clamp(30px,4vw,48px);line-height:1.08;letter-spacing:-.04em;margin:9px 0 0}.section-head p,.muted{max-width:460px;color:var(--muted);margin:0}.services{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.service{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(145deg,var(--panel2),var(--panel));padding:26px;min-height:205px;transition:.2s}.service:hover{border-color:#6d3437;transform:translateY(-3px)}.icon{width:44px;height:44px;border:1px solid #4b2529;border-radius:12px;display:grid;place-items:center;color:#ff555b;background:#2a1115;font-size:22px}.service h3{font-size:20px;margin:18px 0 7px}.service p{color:var(--muted);font-size:14px;margin:0}.construction{background:linear-gradient(180deg,#10151a,#0b0e11);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.build-grid{display:grid;grid-template-columns:.88fr 1.12fr;gap:44px;align-items:center}.build-copy p{color:var(--muted)}.layers{display:flex;flex-direction:column;gap:11px;margin:26px 0}.layer{display:flex;align-items:center;gap:13px;color:#e8ecef;font-size:14px}.layer i{width:32px;height:4px;background:var(--red);border-radius:4px;display:block;flex:none}.layer small{margin-left:auto;color:#8f9ba5;font-size:11px}.roof-card{position:relative;background:#121a20;border:1px solid #33404a;border-radius:20px;padding:18px;overflow:hidden}.roof-card svg{width:100%;height:auto;display:block}.roof-note{margin-top:10px;padding:12px 14px;border-radius:10px;background:#090c0f;border:1px solid #ffffff20;font-size:12px;color:#cbd3d9}.projects{display:grid;grid-template-columns:1.1fr .9fr;gap:16px}.project-main,.project-small{position:relative;overflow:hidden;border-radius:16px;border:1px solid var(--line);background:#171e24;min-height:270px}.project-main{min-height:470px}.project-main img,.project-small img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;transition:transform .5s}.project-main:hover img,.project-small:hover img{transform:scale(1.04)}.project-main:after,.project-small:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#080b0df2,transparent 70%)}.project-label{position:absolute;z-index:1;bottom:22px;left:23px;right:23px}.project-label small{color:#ff5b61;text-transform:uppercase;letter-spacing:.15em;font-weight:800}.project-label h3{font-size:25px;margin:6px 0 0}.project-side{display:grid;grid-template-columns:1fr 1fr;gap:16px}.project-small{min-height:225px}.project-small .project-label{bottom:16px;left:17px}.project-small h3{font-size:17px}.cta{padding:45px 0 65px}.cta-box{border:1px solid #44272b;background:radial-gradient(ellipse at 80% 0%,#411a20 0%,#191317 40%,#121519 100%);border-radius:22px;padding:42px;display:flex;align-items:center;justify-content:space-between;gap:30px}.cta-box h2{font-size:clamp(28px,4vw,42px);line-height:1.1;margin:8px 0}.cta-box p{color:#c2c8cd;margin:0;max-width:570px}.site-footer{border-top:1px solid var(--line);padding:54px 0 22px;color:var(--muted);font-size:13px;background:#080a0d}.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:30px;padding-bottom:34px}.footer-brand{font-size:25px;font-weight:900;color:white;line-height:1.2}.footer-brand span{display:block;color:var(--red);font-size:11px;letter-spacing:.18em;margin-top:6px}.footer-col h3{font-size:12px;color:white;text-transform:uppercase;letter-spacing:.13em;margin:0 0 14px}.footer-col a{display:block;color:var(--muted);margin:7px 0}.footer-col a:hover{color:white}.footer-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding-top:20px;border-top:1px solid var(--line)}.footer-bottom strong{color:white}.content-area{padding:60px 0;min-height:45vh}.content-area article{max-width:850px;margin:auto}.content-area h1,.content-area h2{line-height:1.15}.content-area a{color:#ff656b;text-decoration:underline}
@media(max-width:900px){.main-nav{gap:14px}.main-nav a:nth-child(3),.main-nav a:nth-child(4){display:none}.build-grid{grid-template-columns:1fr}.projects{grid-template-columns:1fr}.project-main{min-height:360px}}
@media(max-width:900px){.footer-grid{grid-template-columns:1fr 1fr}}\n@media(max-width:680px){.wrap{width:min(var(--max),calc(100% - 30px))}.nav{min-height:70px}.site-header.is-scrolled .nav{min-height:58px}.main-nav{display:none;position:absolute;top:70px;left:0;right:0;padding:18px 22px;background:#0b0e11;border-bottom:1px solid var(--line);flex-direction:column;align-items:flex-start}.main-nav.is-open{display:flex}.main-nav a:nth-child(n){display:block}.nav>.btn{display:none}.menu-toggle{display:block}.hero{min-height:600px}.hero:before{background:linear-gradient(90deg,rgba(7,10,13,.95),rgba(7,10,13,.62)),var(--hero-image) center/cover}.hero-inner{padding:70px 0}.proof{gap:15px}.section{padding:60px 0}.section-head{display:block}.section-head p{margin-top:14px}.services{grid-template-columns:1fr}.service{min-height:0}.project-side{gap:10px}.project-small{min-height:180px}.project-small h3{font-size:15px}.cta-box{padding:28px;align-items:flex-start;flex-direction:column}}


/* Header-Fix: Unterseiten erhalten einen eigenen, gut lesbaren Kopfbereich. */
body:not(.home):not(.front-page) .site-header{
  position:relative;
  top:0;
  background:rgba(10,13,16,.97);
  border-bottom:1px solid var(--line);
  box-shadow:0 8px 28px #0003;
}
body:not(.home):not(.front-page) .site-header.is-scrolled{
  position:fixed;
  top:0;
}
body:not(.home):not(.front-page) .content-area{
  padding-top:clamp(42px, 6vw, 76px);
  padding-bottom:80px;
}
body:not(.home):not(.front-page) .content-area h1{
  margin-top:0;
  line-height:1.15;
  overflow-wrap:anywhere;
}


/* Abstandskorrektur v1.3: mindestens 20px zusätzlicher Abstand unter der Navigation */
body:not(.home):not(.front-page) .content-area{
  padding-top: calc(clamp(42px, 6vw, 76px) + 20px) !important;
}
body:not(.home):not(.front-page) .content-area article{
  margin-top: 20px !important;
}
body:not(.home):not(.front-page) .content-area h1:first-child{
  margin-top: 20px !important;
}


/* v1.4: robuste Header-/Titel-Trennung auf sämtlichen Unterseiten */
@media (min-width: 681px) {
  body:not(.home):not(.front-page) .site-header {
    position: relative !important;
    top: auto !important;
    margin-bottom: 0 !important;
  }
  body:not(.home):not(.front-page) .site-header .nav {
    min-height: 92px !important;
  }
  body:not(.home):not(.front-page) main.content-area {
    display: flow-root;
    padding-top: 60px !important;
    margin-top: 0 !important;
  }
  body:not(.home):not(.front-page) main.content-area > article {
    margin-top: 20px !important;
  }
  body:not(.home):not(.front-page) main.content-area > article > h1:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    z-index: 1;
  }
}
@media (max-width: 680px) {
  body:not(.home):not(.front-page) .site-header {
    position: relative !important;
    top: auto !important;
  }
  body:not(.home):not(.front-page) main.content-area {
    padding-top: 42px !important;
    margin-top: 0 !important;
  }
  body:not(.home):not(.front-page) main.content-area > article {
    margin-top: 16px !important;
  }
}


/* v1.6 – Einheitlicher KAGO-Look für Unterseiten */
body:not(.home):not(.front-page) .site-header {
  position: absolute !important;
  top: 4px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  background: rgba(12,16,21,.16) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
body:not(.home):not(.front-page) .site-header.is-scrolled {
  position: fixed !important;
  top: 0 !important;
  background: rgba(12,16,21,.32) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 5px 24px rgba(0,0,0,.08) !important;
}
.subpage-hero {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #111820;
}
.subpage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7,10,13,.94) 0%, rgba(7,10,13,.72) 58%, rgba(7,10,13,.42) 100%),
    var(--subpage-image, url('https://kago-dachtechnik.de/wp-content/uploads/2026/03/sanier1-scaled.jpg')) center 48%/cover no-repeat;
}
.subpage-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 85px;
  z-index: -1;
  background: linear-gradient(transparent, var(--bg));
}
.subpage-hero .wrap { width: min(var(--max),calc(100% - 44px)); }
.subpage-hero .eyebrow { margin-bottom: 12px; color: #ff656b; }
.subpage-hero h1 {
  margin: 0;
  max-width: 900px;
  color: var(--text);
  font-size: clamp(36px,5.2vw,64px);
  line-height: 1.02;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.subpage-hero .subpage-description {
  max-width: 720px;
  margin: 18px 0 0;
  color: #d5dce1;
  font-size: clamp(16px,2vw,20px);
}
body:not(.home):not(.front-page) main.content-area {
  padding: 54px 0 80px !important;
  margin: 0 auto !important;
  display: flow-root;
}
body:not(.home):not(.front-page) .content-area article {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}
body:not(.home):not(.front-page) .content-area h1:first-child { display: none; }
.content-area .entry-content { color: #e4e8eb; }
.content-area .entry-content h2,
.content-area .entry-content h3 { color: #fff; line-height: 1.15; margin-top: 1.6em; }
.content-area .entry-content p { color: #c5cdd3; margin: 0 0 1.2em; }
.content-area .entry-content a { color: #ff656b; text-decoration: underline; text-underline-offset: 3px; }
.content-area .entry-content img { border-radius: 12px; }
.content-area .entry-content blockquote {
  margin: 28px 0; padding: 20px 24px;
  border-left: 3px solid var(--red); background: var(--panel);
  border-radius: 0 12px 12px 0;
}
@media(max-width:680px) {
  .subpage-hero { min-height: 245px; padding: 125px 0 34px; }
  .subpage-hero .wrap { width: min(var(--max),calc(100% - 30px)); }
  body:not(.home):not(.front-page) main.content-area { padding: 36px 0 56px !important; }
}


/* v1.7 – integrierte KAGO-Feinheiten: Glas-Header, Hero-Abstände, Footer-Hammer */
.site-header {
  transition: background .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  background: rgba(12, 16, 21, .32) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 5px 24px rgba(0,0,0,.08) !important;
}
body:not(.home):not(.front-page) .site-header {
  background: rgba(12,16,21,.16) !important;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
body:not(.home):not(.front-page) .site-header.is-scrolled {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  background: rgba(12,16,21,.32) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}
.hero .hero-inner { padding-top: 140px; }
.subpage-hero { scroll-margin-top: 90px; }
body:not(.home):not(.front-page) main.content-area {
  padding-top: 54px !important;
}
.site-footer .footer-bottom a[href*="top"],
.site-footer .footer-bottom a[aria-label*="oben"],
.site-footer .footer-bottom a[title*="oben"] {
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(239,32,40,.65);
  border-radius: 50%;
  background: rgba(18,23,28,.82);
  text-decoration: none !important;
  transition: transform .25s ease, background .25s ease;
}
.site-footer .footer-bottom a[href*="top"]::after,
.site-footer .footer-bottom a[aria-label*="oben"]::after,
.site-footer .footer-bottom a[title*="oben"]::after {
  content: "🔨";
  font-size: 25px;
  display: inline-block;
  transform: rotate(-35deg);
}
.site-footer .footer-bottom a[href*="top"]:hover::after,
.site-footer .footer-bottom a[aria-label*="oben"]:hover::after,
.site-footer .footer-bottom a[title*="oben"]:hover::after {
  animation: kago-hammer-hit .45s ease-in-out;
}
.site-footer .footer-bottom a[href*="top"]:hover,
.site-footer .footer-bottom a[aria-label*="oben"]:hover,
.site-footer .footer-bottom a[title*="oben"]:hover {
  transform: translateY(-3px);
  background: rgba(239,32,40,.16);
}
@keyframes kago-hammer-hit {
  0%,100% { transform: rotate(-35deg); }
  45% { transform: rotate(15deg) translateY(2px); }
  70% { transform: rotate(-45deg); }
}
@media (max-width: 680px) {
  .hero .hero-inner { padding-top: 120px; }
  body:not(.home):not(.front-page) main.content-area { padding-top: 36px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-bottom a::after { animation: none !important; }
}


/* v1.8 – KAGO-Blau und freundliches Grau */
:root {
  --red: #1769aa;
  --red-dark: #0e4f86;
  --accent: #1769aa;
  --bg: #e9edf1;
  --panel: #f5f7f9;
  --panel-2: #ffffff;
  --text: #172330;
  --muted: #526170;
  --line: rgba(23, 45, 66, .14);
}
body { background: #e9edf1 !important; color: #172330 !important; }
.site-header {
  background: rgba(233,237,241,.82);
  border-bottom-color: rgba(23,45,66,.12);
}
.site-header.is-scrolled {
  background: rgba(233,237,241,.78) !important;
  border-bottom: 1px solid rgba(23,45,66,.12) !important;
  box-shadow: 0 5px 24px rgba(25,43,60,.10) !important;
}
.site-header .main-nav a { color: #172330; }
.site-header .btn, .btn, button, input[type="submit"] {
  background-color: #1769aa;
  border-color: #1769aa;
}
.btn:hover, button:hover, input[type="submit"]:hover {
  background-color: #0e4f86;
  border-color: #0e4f86;
}
.btn.outline { color: #172330; border-color: rgba(23,45,66,.28); background: rgba(255,255,255,.38); }
.section, .content-area { background-color: #e9edf1; color: #172330; }
.service, .project-card, .contact-panel, .content-area article,
.site-footer .footer-col, .subpage-content {
  background-color: #f5f7f9;
  color: #172330;
  border-color: rgba(23,45,66,.12);
}
.section h2, .section h3, .content-area h1, .content-area h2,
.content-area h3, .site-footer h3, .footer-brand { color: #172330; }
.section p, .content-area p, .site-footer p, .site-footer a { color: #526170; }
.kicker, .eyebrow { color: #1769aa !important; }
.service:hover, .project-card:hover { border-color: rgba(23,105,170,.5); }
.subpage-hero::before {
  background:
    linear-gradient(90deg, rgba(19,35,49,.82) 0%, rgba(19,35,49,.58) 58%, rgba(19,35,49,.32) 100%),
    var(--subpage-image, url('https://kago-dachtechnik.de/wp-content/uploads/2026/03/sanier1-scaled.jpg')) center 48%/cover no-repeat;
}
.subpage-hero::after { background: linear-gradient(transparent, #e9edf1); }
.subpage-hero h1, .subpage-hero .subpage-description { color: #fff; }
.site-footer { background: #dce3e9; border-top: 1px solid rgba(23,45,66,.14); }
.site-footer .footer-bottom { border-top-color: rgba(23,45,66,.14); }
.site-footer .footer-bottom a[href*="top"],
.site-footer .footer-bottom a[aria-label*="oben"],
.site-footer .footer-bottom a[title*="oben"] {
  border-color: rgba(23,105,170,.5);
  background: rgba(255,255,255,.8);
}
.site-footer .footer-bottom a[href*="top"]::after,
.site-footer .footer-bottom a[aria-label*="oben"]::after,
.site-footer .footer-bottom a[title*="oben"]::after { color: #1769aa; }
@media (prefers-color-scheme: dark) {
  /* Das Farbschema bleibt bewusst hell, unabhängig von der Systemeinstellung. */
  body { color-scheme: light; }
}


/* v1.9 – Lesbarkeit: klare Kontraste auf hellen UND dunklen Abschnitten */
:root {
  --text: #172330;
  --muted: #526170;
}
body { color: #172330; }
h1, h2, h3, h4, h5, h6 { color: #172330; }
p, li { color: #435160; }
a:not(.btn):not(.button) { color: #125b96; }
a:not(.btn):not(.button):hover { color: #0b426f; }

/* Dachtechnik-Diagramm und dunkle Technikflächen bleiben dunkel – Text wird hell */
.roof-section, .roof-technology, .technology-section, .roof-detail,
.dachtechnik-section, .roof-diagram-section, .section-dark,
section[ class*="roof" ], section[class*="technik"] {
  color: #f5f7fa;
}
.roof-section h1, .roof-section h2, .roof-section h3,
.roof-technology h1, .roof-technology h2, .roof-technology h3,
.technology-section h1, .technology-section h2, .technology-section h3,
.roof-detail h1, .roof-detail h2, .roof-detail h3,
.dachtechnik-section h1, .dachtechnik-section h2, .dachtechnik-section h3,
.roof-diagram-section h1, .roof-diagram-section h2, .roof-diagram-section h3,
.section-dark h1, .section-dark h2, .section-dark h3,
section[class*="roof"] h1, section[class*="roof"] h2, section[class*="roof"] h3,
section[class*="technik"] h1, section[class*="technik"] h2, section[class*="technik"] h3 {
  color: #f7f9fc !important;
}
.roof-section p, .roof-technology p, .technology-section p, .roof-detail p,
.dachtechnik-section p, .roof-diagram-section p, .section-dark p,
section[class*="roof"] p, section[class*="technik"] p {
  color: #c5d0dc !important;
}
.roof-section li, .roof-technology li, .technology-section li, .roof-detail li,
.dachtechnik-section li, .roof-diagram-section li, .section-dark li,
section[class*="roof"] li, section[class*="technik"] li {
  color: #edf2f7 !important;
}
.roof-section .btn, .roof-technology .btn, .technology-section .btn,
.roof-detail .btn, .dachtechnik-section .btn, .roof-diagram-section .btn,
.section-dark .btn {
  color: #fff !important;
  background: #1769aa !important;
  border-color: #1769aa !important;
}
.section:not(.section-dark):not(.roof-section):not(.roof-technology),
.content-area, .service, .project-card, .contact-panel {
  color: #172330;
}
.section:not(.section-dark):not(.roof-section):not(.roof-technology) h1,
.section:not(.section-dark):not(.roof-section):not(.roof-technology) h2,
.section:not(.section-dark):not(.roof-section):not(.roof-technology) h3 {
  color: #172330 !important;
}
.site-header .main-nav a { color: #172330; }
.site-header .btn, .site-header .button { color: #fff !important; }
.site-footer h1, .site-footer h2, .site-footer h3 { color: #172330 !important; }
.site-footer p, .site-footer li, .site-footer a { color: #435160; }


/* v2.0 – CTA „Ein gutes Dach beginnt mit einem Gespräch“ lesbar machen */
.contact-cta,
.cta-section,
.contact-section,
section[class*="contact"],
section[class*="cta"],
.contact-banner {
  color: #f7f9fc !important;
}
.contact-cta h1, .contact-cta h2, .contact-cta h3,
.cta-section h1, .cta-section h2, .cta-section h3,
.contact-section h1, .contact-section h2, .contact-section h3,
section[class*="contact"] h1, section[class*="contact"] h2, section[class*="contact"] h3,
section[class*="cta"] h1, section[class*="cta"] h2, section[class*="cta"] h3,
.contact-banner h1, .contact-banner h2, .contact-banner h3 {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.contact-cta p, .cta-section p, .contact-section p,
section[class*="contact"] p, section[class*="cta"] p, .contact-banner p {
  color: #dce6ef !important;
  opacity: 1 !important;
}
.contact-cta a, .cta-section a, .contact-section a,
section[class*="contact"] a, section[class*="cta"] a, .contact-banner a {
  color: #ffffff !important;
}
.contact-cta .btn, .cta-section .btn, .contact-section .btn,
section[class*="contact"] .btn, section[class*="cta"] .btn, .contact-banner .btn {
  color: #ffffff !important;
  background: #1769aa !important;
  border: 1px solid #1769aa !important;
}


/* v2.1 – weiße Schrift auf allen dunklen Hintergründen */
:root {
  --dark-text: #ffffff;
  --dark-muted: #e2e8ef;
}

/* Dunkle Bereiche anhand der bekannten Theme-Sektionen */
.hero, .hero *,
.section-dark, .section-dark *,
.roof-section, .roof-section *,
.roof-technology, .roof-technology *,
.technology-section, .technology-section *,
.roof-detail, .roof-detail *,
.dachtechnik-section, .dachtechnik-section *,
.roof-diagram-section, .roof-diagram-section *,
.contact-cta, .contact-cta *,
.cta-section, .cta-section *,
.contact-banner, .contact-banner *,
.site-header.is-scrolled, .site-header.is-scrolled *,
.site-footer.dark, .site-footer.dark * {
  color: #ffffff;
}

/* Beschreibungstexte ebenfalls hell, aber etwas weicher */
.hero p, .section-dark p, .roof-section p, .roof-technology p,
.technology-section p, .roof-detail p, .dachtechnik-section p,
.roof-diagram-section p, .contact-cta p, .cta-section p,
.contact-banner p, .site-footer.dark p, .site-footer.dark li {
  color: #e2e8ef !important;
}

/* Überschriften immer klar weiß auf dunklen Abschnitten */
.hero h1, .hero h2, .hero h3, .section-dark h1, .section-dark h2,
.section-dark h3, .roof-section h1, .roof-section h2, .roof-section h3,
.roof-technology h1, .roof-technology h2, .roof-technology h3,
.technology-section h1, .technology-section h2, .technology-section h3,
.roof-detail h1, .roof-detail h2, .roof-detail h3,
.dachtechnik-section h1, .dachtechnik-section h2, .dachtechnik-section h3,
.roof-diagram-section h1, .roof-diagram-section h2, .roof-diagram-section h3,
.contact-cta h1, .contact-cta h2, .contact-cta h3,
.cta-section h1, .cta-section h2, .cta-section h3,
.contact-banner h1, .contact-banner h2, .contact-banner h3 {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Dunkle Flächen im allgemeinen Abschnittslayout */
section[style*="background: #0"],
section[style*="background-color: #0"],
section[style*="background: rgb(0"],
section[style*="background-color: rgb(0"] {
  color: #ffffff !important;
}
section[style*="background: #0"] h1,
section[style*="background: #0"] h2,
section[style*="background: #0"] h3,
section[style*="background-color: #0"] h1,
section[style*="background-color: #0"] h2,
section[style*="background-color: #0"] h3 {
  color: #ffffff !important;
}

/* KAGO Dachtechnik v2.4 – responsive across desktop, tablet and mobile */
.site-footer,
.site-footer .wrap,
.site-footer .footer-grid,
.site-footer .footer-col {
  box-sizing: border-box;
}
.site-footer {
  background: #101f2c !important;
  color: #f4f7fb !important;
  width: 100%;
  overflow-wrap: anywhere;
}
.site-footer .footer-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 42px);
  align-items: start;
  width: 100%;
}
.site-footer .footer-grid > div,
.site-footer .footer-col {
  min-width: 0;
  max-width: 100%;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #eaf1f8 !important;
}
.site-footer .footer-brand,
.site-footer h3,
.site-footer .footer-col h3 {
  color: #fff !important;
}
.site-footer p,
.site-footer a,
.site-footer li,
.site-footer .footer-bottom,
.site-footer .footer-bottom a {
  color: #eaf1f8 !important;
  opacity: 1 !important;
  overflow-wrap: anywhere;
}
.site-footer a { display: inline-block; max-width: 100%; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-footer a:hover, .site-footer a:focus-visible { color: #75baff !important; }
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid rgba(255,255,255,.18) !important;
}
.site-header, .site-header * { box-sizing: border-box; }
.site-header { width: 100%; }
.site-header .wrap { width: min(100% - 32px, 1240px); margin-inline: auto; }
.site-header .main-nav { min-width: 0; }
.site-header .main-nav a { overflow-wrap: anywhere; }
img, video, iframe, svg { max-width: 100%; }
html, body { max-width: 100%; overflow-x: clip; }

@media (max-width: 980px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }
  .site-footer .footer-grid > div:first-child { grid-column: 1 / -1; }
  .site-header .wrap { width: min(100% - 28px, 100%); }
}
@media (max-width: 600px) {
  .site-footer { padding: 36px 0 18px !important; }
  .site-footer .wrap { width: calc(100% - 36px); }
  .site-footer .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .site-footer .footer-grid > div:first-child { grid-column: auto; }
  .site-footer .footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer .footer-col h3 { margin: 0 0 4px; }
  .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 18px; }
  .site-footer a { min-height: 24px; }
  .site-header .wrap { width: calc(100% - 28px); }
  .contact-banner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .contact-banner h2 { font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1.15; }
  .contact-banner .btn, .contact-banner a { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* KAGO 2.5 – Responsive-Rework: Navigation, Inhaltsraster und Footer */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 320px; overflow-wrap: break-word; }
img, picture, video, canvas, iframe, svg { max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 48px)); }
.site-header { width: 100%; }
.site-header .nav { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; gap: clamp(10px, 2vw, 24px); }
.site-header .brand { flex: 0 0 auto; min-width: 0; }
.site-header .main-nav { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 1.5vw, 22px); }
.site-header .main-nav a { white-space: normal; overflow-wrap: anywhere; }
.site-header .nav > .btn { flex: 0 0 auto; white-space: nowrap; }

/* Inhaltselemente dürfen nicht breiter als ihr Container werden. */
.section, .content-area, .construction, .cta, .site-footer { min-width: 0; }
.services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.build-grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
.projects { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.project-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.service, .roof-card, .cta-box, .project-main, .project-small { min-width: 0; }
.content-area article, .content-area .entry-content, .content-area .wp-block-group { min-width: 0; max-width: 100%; }
.content-area .wp-block-columns { gap: clamp(16px, 3vw, 32px); }
.content-area .wp-block-column { min-width: 0; }
.content-area table { display: block; max-width: 100%; overflow-x: auto; }
.content-area pre, .content-area code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Tablet und kleine Laptops: echte mobile Navigation statt ausgeblendeter Menüeinträge. */
@media (max-width: 1024px) {
  .site-header .nav,
  .site-header.is-scrolled .nav { min-height: 72px; }
  .site-header .nav { width: calc(100% - 36px); gap: 14px; }
  .site-header .main-nav { display: none !important; position: absolute; top: 100%; left: 0; right: 0; z-index: 100; width: 100%; max-height: calc(100dvh - 82px); overflow-y: auto; padding: 18px max(22px, calc((100% - 760px) / 2)); background: rgba(13, 27, 39, .98); border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.16); box-shadow: 0 18px 32px rgba(0,0,0,.24); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
  .site-header .main-nav.is-open { display: flex !important; }
  .site-header .main-nav a { display: block !important; width: 100%; padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.10); color: #fff !important; font-size: 16px; line-height: 1.4; }
  .site-header .main-nav a:last-child { border-bottom: 0; }
  .site-header .nav > .btn { margin-left: auto; padding: 11px 13px; font-size: 13px; }
  .site-header .menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 44px; min-width: 48px; cursor: pointer; border-color: rgba(255,255,255,.35); }
  .site-header.is-scrolled .main-nav { top: 100%; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project-main { min-height: clamp(280px, 48vw, 420px); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .wrap, .site-header .nav { width: calc(100% - 32px); }
  .site-header { top: 0; }
  .site-header .nav, .site-header.is-scrolled .nav { min-height: 66px; gap: 10px; }
  .site-header .brand { font-size: clamp(17px, 5vw, 22px); gap: 8px; letter-spacing: .015em; }
  .site-header .brandmark { width: 36px; height: 34px; }
  .site-header .brand small { font-size: 9px; letter-spacing: .1em; }
  .site-header .nav > .btn { display: none; }
  .site-header .main-nav { max-height: calc(100dvh - 66px); padding: 12px 20px 20px; }
  .site-header .menu-toggle { font-size: 0; padding: 8px 12px; min-width: 46px; min-height: 44px; }
  .site-header .menu-toggle::before { content: '☰'; font-size: 22px; line-height: 1; }
  .hero { min-height: min(680px, calc(100svh - 66px)); }
  .hero-inner { padding: 112px 0 54px; }
  .hero h1 { font-size: clamp(39px, 12vw, 62px); line-height: .98; overflow-wrap: anywhere; }
  .hero p { font-size: 18px; }
  .actions { align-items: stretch; }
  .actions .btn { width: 100%; text-align: center; }
  .proof { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .section { padding: 52px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 14px; }
  .section h2 { font-size: clamp(29px, 8vw, 39px); overflow-wrap: anywhere; }
  .services, .project-side { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 22px; }
  .project-main { min-height: 300px; }
  .project-small { min-height: 220px; }
  .project-label { left: 18px; right: 18px; bottom: 18px; }
  .project-label h3 { font-size: 21px; }
  .cta { padding: 30px 0 44px; }
  .cta-box { padding: 24px 20px; border-radius: 16px; flex-direction: column; align-items: stretch; gap: 20px; }
  .cta-box h2 { font-size: clamp(26px, 7.5vw, 34px); overflow-wrap: anywhere; }
  .cta-box .btn { width: 100%; white-space: normal; text-align: center; }
  .site-footer { padding: 36px 0 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 26px; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-col { min-width: 0; }
  .footer-col a { padding: 4px 0; margin: 2px 0; overflow-wrap: anywhere; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .content-area { padding: 34px 0; }
  .content-area h1 { font-size: clamp(30px, 9vw, 42px); overflow-wrap: anywhere; }
  .content-area h2 { font-size: clamp(25px, 7vw, 34px); }
  .content-area .wp-block-columns { flex-direction: column; }
  .content-area .wp-block-image img, .content-area figure img { width: 100%; height: auto; }
  .btn, button, input[type="submit"] { min-height: 44px; }
}

@media (max-width: 380px) {
  .site-header .nav, .wrap { width: calc(100% - 24px); }
  .site-header .brand { font-size: 16px; }
  .site-header .brandmark { width: 31px; height: 30px; }
  .site-header .menu-toggle { min-width: 42px; padding: 7px 9px; }
  .hero h1 { font-size: 37px; }
}
