/* =============================
   Design Tokens
   ============================= */
:root {
  --grau: #3e4b51;
  --gelb: #f1b31f;
  --text-color: #fff;
  --bg-color: #f9f9f9;
  --card-bg: #ffffff;
  --card-text: #2f2f2f;
  --border-color: #e5e7eb;
}

/* =============================
   Base & Typography
   ============================= */
html { scroll-behavior: smooth; }

body {
  font-size: 14px;
  line-height: 1.65;
  font-family: 'Open Sans', sans-serif;
  background: var(--bg-color);
  color: var(--card-text);
}

h1, h2, h3 { font-family: 'Roboto Condensed', sans-serif; }
h2{margin-top:0;line-height:1;}
a { color: var(--grau); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =============================
   Layout
   ============================= */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }

header {
  background-color: var(--card-bg);
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}
.logo-full { max-width: 60%; height: auto; transition: all 0.3s ease; /* Stabilisiert Layout */ }
@media (max-width:768px){ .logo-full{ max-width:100%; margin:0.5rem; } }

section {
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.site-header { top: 0; background: var(--bg-color); z-index: 900; }

/* =============================
   Navigation
   ============================= */
.menu-toggle { display: none; }
.nav-v3 { position: sticky; top: 0; z-index: 950; background: #fff; backdrop-filter: saturate(180%) blur(4px); transition: box-shadow .25s ease; }
.nav-v3.is-scrolled { box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.nav-v3__inner { display: flex; align-items: center; justify-content: center; padding: .5rem 0; }
.nav-v3__toggle { display: none; gap: .5rem; align-items: center; background: transparent; border: 0; cursor: pointer; color: var(--grau); font: inherit; padding: .5rem .75rem; border-radius: .5rem; }
.nav-v3__toggle:hover { background: rgba(0,0,0,0.04); }
.nav-v3__links { list-style: none; display: flex; gap: 1.25rem; padding: 0; margin: 0; }
.nav-v3__links a { --underline-h: 3px; display: inline-block; padding: .75rem .25rem; font-family: 'Roboto Condensed', sans-serif; font-weight: 700; color: var(--grau); text-decoration: none; position: relative; }
.nav-v3__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: var(--underline-h); background: transparent; transform: scaleX(0); transform-origin: left; transition: transform .25s ease, background .25s ease; }
.nav-v3__links a:hover::after { background: var(--gelb); transform: scaleX(1); }
.nav-v3__links a.active { color: #000; }
.nav-v3__links a.active::after { background: var(--gelb); transform: scaleX(1); }

/* Mobile Nav */
@media (max-width: 900px) {
  .nav-v3__inner { justify-content: space-between; }
  .nav-v3__toggle { display: inline-flex; }
  .nav-v3__links { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 12px 24px rgba(0,0,0,.08); display: none; flex-direction: column; gap: .25rem; padding: .5rem 1rem 1rem; }
  .nav-v3__links.show { display: flex; }
  .nav-v3__links a { padding: .75rem 0; }
  .nav-v3__links a::after { bottom: 0; }
}
/* Mobile Nav – Positionierung fixen */
.nav-v3__inner { position: relative; } /* Anker für das absolute Menü */

@media (max-width: 900px) {
  .nav-v3__links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    display: none;
    flex-direction: column;
    gap: .25rem;
    padding: .5rem 1rem 1rem;
    z-index: 1000;                /* über allem */
    max-height: calc(100dvh - 56px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  .nav-v3__links.show { display: flex; }
  .nav-v3__toggle { min-height: 44px; }
  .nav-v3__links a { padding: 1rem 0; }
}

/* Scroll-Lock nur, wenn Menü offen – ist bereits in JS gesteuert */
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* =============================
   Components
   ============================= */
.faq-section details { background: var(--bg-color); border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); padding: 1.0rem 1rem; }
.faq-section summary { cursor: pointer; font-weight: bold; }

.toc-links .cta-button{ margin-right:.5rem; }
/* Stacked CTA-Buttons in der Einleitung */

@media (max-width: 768px) {
  .cta-button{
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;  /* verhindert Überbreite */
    display: block;          /* volle Zeile */
  }
}


.cta-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  background: var(--gelb);
  color: var(--grau);
  padding:.6rem 1rem;
  border-radius:6px;
  font-weight:600;
  font-size: inherit;
  line-height:1;
  min-height:24px;
  text-decoration:none;
  box-shadow:0 2px 5px rgba(0,0,0,.1);
  transition:background-color .25s ease, transform .06s ease;
  border:0;
  -webkit-appearance:none; appearance:none;
}
.cta-button:hover{ background-color:#fec904; text-decoration:none; }
.cta-secondary { background: #ffd967; }

/* Back-to-top */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  background-color: var(--gelb); color: var(--grau);
  border: none; width: 50px; height: 50px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 999;
  transition: background-color 0.3s ease, transform 0.2s ease, opacity .3s ease;
  opacity: 0;
}
#back-to-top.show { display: flex; opacity: 1; }
#back-to-top:hover { background-color: #e2b947; transform: scale(1.1); }
#back-to-top svg { width: 20px; height: 20px; fill: var(--grau); transition: transform 0.3s ease; }
#back-to-top:hover svg { transform: translateY(-2px); }

/* =============================
   Marken – Inline-Akkordeon
   ============================= */
.led-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:1.25rem;
  margin-top:1rem;
}
.brand-card{
  background:#fff;
  border:1px solid var(--border-color);
  border-radius:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  padding:.75rem;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.brand-card:hover{ border-color:#d5d9df; box-shadow:0 4px 10px rgba(0,0,0,.08); }
.brand-card > summary{ list-style:none; display:grid; grid-template-columns: 1fr auto; align-items:center; gap:.75rem; cursor:pointer; min-height:100px; }
.brand-card > summary::-webkit-details-marker{ display:none; }
.brand-card > summary span{ font-weight:700; color:var(--grau); }
.brand-card .marken-logo{ max-height: 96px; max-width:180px; width:auto; height:auto; object-fit:contain; }
.brand-card[open]{ border-color: var(--grau); background:#fff; box-shadow:0 6px 16px rgba(0,0,0,.08); }
.brand-content{ margin-top:.75rem; padding-top:.75rem; border-top:1px dashed #ddd; }
.brand-actions{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
.brand-actions .cta-button{ flex:1 1 180px; text-align:center; }

/* Kontakt */
.contact-section{ background:#fff; }
.contact-grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap:2rem; align-items:start; }
.contact-lead{ margin:.5rem 0 1rem 0; max-width: 60ch; }
.contact-actions{ display:flex; gap:.75rem; flex-wrap:wrap; }
.contact-logo{ width:180px; height:auto; display:block; margin:0 0 .5rem 0; }
.contact-address{ font-style:normal; color:#4b5563; margin: .5rem 0 1rem 0; }

/* Responsive */
@media (max-width: 768px) {
  .cta-button{ width:100%; min-height:44px; }
  .led-gallery{ grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1rem; }
  .brand-card .marken-logo{ max-height: 80px; }
  .brand-actions .cta-button{ flex-basis:100%; width:100%; }
  .contact-grid{ grid-template-columns: 1fr; }
  .contact-logo{ width:160px; }
}

/* Kleine UX-Details */
.brand-card{ position:relative; cursor:pointer; }
.brand-card::after{
  content:"+";
  position:absolute;
  right:10px;
  bottom:10px;
  width:24px; height:24px;
  border-radius:50%;
  border:1px solid var(--border-color);
  background:#fff; color:var(--grau);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; line-height:1;
  user-select:none; pointer-events:none;
  opacity:0; transition:opacity .2s ease;
}
.brand-card:hover::after{ opacity:1; }
.brand-card[open]::after{ opacity:0; }

/* Inline-Logo in Navi */
.nav-v3__logo-inline{
  position:absolute; left:1rem; top:50%; transform:translateY(-50%);
  width:220px; height:auto; z-index:5; opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .35s ease, visibility .35s ease, transform .35s ease;
}
body.is-stuck .nav-v3__logo-inline{
  opacity:1; visibility:visible; pointer-events:auto; transform:translateY(-50%) scale(1.02);
}
@media (max-width: 991px){ .nav-v3__logo-inline{ display:none; } }

/* Accessibility & Motion */
:root { --focus-ring: 2px solid #0b5fff; --focus-offset: 3px; }
:where(a, button, [role="button"], summary, .cta-button):focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.skip-link { position: absolute; top: -100px; left: 0; background: #000; color: #fff; padding: .75rem 1rem; z-index: 1000; border-radius: 0 0 .5rem .5rem; }
.skip-link:focus { top: 0; }
@media (prefers-reduced-motion: reduce) {
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.nav-v3__links a:focus-visible::after { background: var(--gelb); transform: scaleX(1); }
.logo-pws{width:220px;}

/* FAQ-Gruppen (neu) */
.faq-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .faq-groups { grid-template-columns: 1fr; } }
/* FAQ-Gruppen */
.faq-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.faq-group { background: var(--card-bg); border-radius: 8px; padding: 1rem; }
.faq-group summary { cursor: pointer; font-weight: 700; }

@media (max-width: 900px) {
  .faq-groups { grid-template-columns: 1fr; }
}

/* === Mobile fixes & accessibility overrides (2025-08-14) === */

/* 2) Umwelt-Accordion default hidden */
#umwelt-extra { display: none; }
#umwelt-extra.open { display: block; }

/* 3) Body scroll lock when mobile nav is open */
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* 4) Robust anchor offset accounting for sticky nav */
:root { --anchor-offset: 96px; }
@media (max-width: 900px){ :root { --anchor-offset: 112px; } }
section[id]{ scroll-margin-top: var(--anchor-offset); }

/* 6) Back-to-top button sizing on small screens */
@media (max-width: 768px){
  #back-to-top { right: 1rem; bottom: 1rem; width: 44px; height: 44px; }
  #back-to-top svg { width: 18px; height: 18px; }
}

/* 7) Mobile typography & spacing */
@media (max-width: 480px){
  body { font-size: 16px; line-height: 1.7; }
  section { margin: 1.75rem 0; padding: 1.25rem; }
  h2 { font-size: 1.35rem; }
}

/* 8) Larger tap targets for primary actions on brand cards */
.brand-actions .cta-button { min-height: 44px; font-weight: 700; }

/* 9) Stronger focus underline in nav */
.nav-v3__links a:focus-visible::after { height: 4px; }

/* 3b) Mobile menu improvements: max-height and inertial scroll */
@media (max-width: 900px) {
  .nav-v3__links {
    max-height: calc(100dvh - 56px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-v3__toggle { min-height: 44px; }
  .nav-v3__links a { padding: 1rem 0; }
}
/* === FAQ als Karten (2025-08-15) === */
.faq-group { 
  background: transparent; 
  padding: 0; 
}

.faq-group details {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 0;            /* Inhalt in <div> bekommt Padding */
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.faq-group details + details { margin-top: .75rem; }

.faq-group details:hover {
  border-color: #d5d9df;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.faq-group details[open] {
  border-color: var(--grau);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.faq-group details > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 3rem 1rem 1rem;
  position: relative;
  user-select: none;
}

.faq-group details > summary::-webkit-details-marker { display: none; }

/* Plus/Minus Icon rechts, analog zur Markenkarte */
.faq-group details > summary::after {
  content: "+";
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-color); background: #fff; color: var(--grau);
  display: grid; place-items: center; font-weight: 700;
}

.faq-group details[open] > summary::after { content: "–"; }

.faq-group details > div {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px dashed #ddd;
}

/* FAQ-Hauptgruppen im Kartenstil */
.faq-group {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.faq-group:hover {
  border-color: #d5d9df;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.faq-group h3 {
  margin-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #ddd;
}

/* === Fehler-Karten (2025-08-15) === */
.errors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .errors-grid { grid-template-columns: 1fr; }
}

.error-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.error-card:hover { 
  border-color: #d5d9df; 
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.error-card[open] { 
  border-color: var(--grau); 
  box-shadow: 0 6px 16px rgba(0,0,0,.08); 
}

.error-card > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 3rem 1rem 1rem;
  position: relative;
  user-select: none;
}

.error-card > summary::-webkit-details-marker { display: none; }

.error-card > summary::after {
  content: "+";
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-color); background: #fff; color: var(--grau);
  display: grid; place-items: center; font-weight: 700;
}

.error-card[open] > summary::after { content: "–"; }

.error-card > div { 
  padding: 0 1rem 1rem 1rem; 
  border-top: 1px dashed #ddd; 
}
/* === Brand-Seiten: Produktgrid & Karten (Wakol u.a.) === */
.product-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:1.25rem;
  margin-top:1rem;
}
@media (max-width: 1200px){ .product-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px){ .product-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px){ .product-grid{ grid-template-columns:minmax(0,1fr); } }

.product-card{
  background:#fff;
  border:1px solid var(--border-color);
  border-radius:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  display:flex;
  flex-direction:column;
  height:450px;                 /* feste Gesamthöhe */
  overflow:hidden;              /* verhindert Überstand */
  transition:border-color .2s ease, box-shadow .2s ease, transform .06s ease;
  box-sizing:border-box;
}
.product-card:hover{ border-color:#d5d9df; box-shadow:0 4px 10px rgba(0,0,0,.08); }

.product-media{
  flex:0 0 auto;
  display:grid; place-items:center;
  background:#f7f7f7;
  padding:.75rem;
  min-height:160px;             /* gleichmäßige Bildfläche */
}
.product-media img{ max-width:100%; height:120px; object-fit:contain; }

.product-body{
  flex:1 1 auto;                /* nimmt den verfügbaren Platz */
  min-height:0;                 /* erlaubt korrektes Schrumpfen in Flexbox */
  padding:1rem;
}
.product-title{
  font-family:'Roboto Condensed',sans-serif;
  font-weight:700;
  margin:.25rem 0 .5rem 0;
  color:var(--grau);
}
.product-features{ margin:.25rem 0 0 1rem; padding:0; }
.product-features li{ margin:.25rem 0; }

.product-actions{
  flex:0 0 auto;
  padding:1rem;
  margin-top:auto;              /* schiebt die Aktion zuverlässig an den Kartenboden */
}
.product-actions .cta-button{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  white-space:normal;
}

/* Option: leicht reduzierte Bildhöhe auf sehr kleinen Screens */
@media (max-width: 480px){
  .product-media{ min-height:140px; }
  .product-media img{ height:110px; }
}


/* === Overrides (2025-08-20): Produktkarten mit festem Button-Boden ===
   - Buttons werden zuverlässig am unteren Rand fixiert
   - Karten behalten feste Gesamthöhe von 450px
   - Grid-Layout: media | body (1fr) | actions
*/
.product-grid .product-card{
  display: grid;                      /* statt Flex */
  grid-template-rows: auto 1fr auto;  /* Kopf | Inhalt | Footer */
  height: 450px;
  box-sizing: border-box;
  overflow: hidden;
}
.product-grid .product-media{
  display: grid;
  place-items: center;
  background: #f7f7f7;
  padding: .75rem;
  min-height: 160px;
}
.product-grid .product-media img{
  max-width: 100%;
  height: 120px;
  object-fit: contain;
}
.product-grid .product-body{
  padding: 1rem;
  min-height: 0;                      /* erlaubt Schrumpfen von 1fr */
  overflow: hidden;                   /* verhindert Überlauf bei langen Texten */
}
.product-grid .product-actions{
  padding: 1rem;
  margin-top: 0 !important;           /* überschreibt alte flex-Regel */
  align-self: stretch;                 /* volle Breite */
}
.product-grid .product-actions .cta-button{
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  white-space: normal;
}


/* Über-Wakol: Logo links, Text rechts */
.about-grid{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: center;
}
.about-logo{
  width: 180px;
  height: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 560px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-logo{ width: 160px; }
}
/* Connected Systems Block (Logo links, Text rechts) */
.connected-systems{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: center;
}
.connected-logo{
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 640px){
  .connected-systems{ grid-template-columns: 1fr; }
  .connected-logo{ max-width: 200px; }
}


/* === Navigation Dropdown (Marken) === */
.nav-v3__links .has-submenu { position: relative; }
.nav-v3__links .has-submenu > a { display: inline-flex; align-items: center; gap: .35rem; }
.nav-v3__links .has-submenu > a::after {
   font-size: .85em; transform: translateY(-1px); opacity: .8;
}

@media (min-width: 901px) {
  .nav-v3__links .submenu {
    position: absolute;
    left: 0; top: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    padding: .5rem;
    min-width: 220px;
    display: none;
    z-index: 1000;
  }
  .nav-v3__links .submenu li { list-style: none; }
  .nav-v3__links .submenu a {
    display: block; padding: .5rem .75rem; border-radius: 8px;
  }
  .nav-v3__links .submenu a:hover { background: #f8f8f8; text-decoration: none; }
  .nav-v3__links .has-submenu:hover > .submenu,
  .nav-v3__links .has-submenu:focus-within > .submenu { display: block; }
}

@media (max-width: 900px) {
  .nav-v3__links .submenu { 
    display: block; padding: 0 0 .25rem 0; margin: 0; 
  }
  .nav-v3__links .submenu li a { padding: .5rem 0 .5rem 1rem; }
}
/* Responsive Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;        /* verhindert gequetschte Zellen, sorgt für horizontales Scrollen */
}

.table-responsive th,
.table-responsive td {
  text-align: left;
  padding: .75rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.table-responsive thead th {
  position: sticky;
  top: 0;
  background: #fff;
}

@media (max-width: 480px) {
  .table-responsive th,
  .table-responsive td { padding: .6rem .5rem; font-size: .95rem; }
}
/* Desktop: Buttons nebeneinander */
.toc-links {
  display: flex;
  gap: .5rem;              /* Abstand zwischen Buttons */
  flex-wrap: wrap;         /* falls es eng wird, umbrechen */
}

.toc-links .cta-button {
  width: auto;             /* nur so breit wie nötig */
  flex: 0 1 auto;          /* wächst nicht übermäßig */
}

/* Mobile: weiterhin volle Breite */
@media (max-width: 768px) {
  .toc-links {
    display: block;        /* stacked */
  }
  .toc-links .cta-button {
    width: 100%;
    display: block;
    margin-bottom: .5rem;
line-height: 1.5rem;
  }
}

.info-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap; /* sorgt dafür, dass es auf Mobile umbrechen kann */
}

.info-text {
  flex: 1 1 500px;
}

.info-image {
  flex: 0 0 auto;
}

.info-image img {
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  display: block;
}

