/* =========================
   GRUNDLAYOUT
========================= */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f7fa;
  color: #333;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20000;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #004080;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   HEADER / BRAND
========================= */
header {
  background: #004080;
  color: #fff;
  padding: 0px 0 10px;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

header .container {
  padding-left: 0;
}

header .topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  flex-wrap: nowrap;
}

/* ===== LOGO ===== */
header .brand {
  display: flex;
  align-items: flex-end;
  margin-left: -20px;
}

header .brand a {
  display: inline-flex;
  align-items: flex-end;
}

header .brand img {
  height: 170px;
  width: auto;
  display: block;
  margin-top: 18px;
}

/* =========================
   NAVIGATION
========================= */
header nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 34px;
}

header nav > ul > li {
  display: flex;
  align-items: center;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.35px;
  padding: 6px 0;
  position: relative;
  display: inline-block;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  height: 3px;
  width: 0;
  background: currentColor;
  transition: width 180ms ease;
}

header nav a:hover::after,
header nav a[aria-current="page"]::after {
  width: 100%;
}

/* =========================
   DROPDOWN
========================= */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-link {
  padding-right: 18px;
}

.nav-dropdown-arrow {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-55%);
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  width: 16px;
  height: 16px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.nav-dropdown-arrow:hover {
  opacity: 1;
}

.nav-dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 10px 0 0 0;
  padding: 6px 0;
  background: #0b3c5d;
  border-radius: 10px;
  z-index: 9999;

  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;

  transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.12);
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  max-height: 260px;
  pointer-events: auto;
}

.nav-dropdown.is-open .nav-dropdown-arrow {
  transform: translateY(-55%) rotate(180deg);
}

/* =========================
   CONTENT
========================= */
main h1 {
  color: #004080;
  font-size: 2.2rem;
  margin-top: 60px;
  margin-bottom: 20px;
}

main h2 {
  color: #004080;
  font-size: 1.7rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.section {
  padding: 40px 0;
}

/* =========================
   HERO (BILD KOMPLETT RAUS)
========================= */
.hero {
  padding: 70px 0 40px;
  background: #ffffff;
}

.hero .muted {
  color: #5a6b7b;
  font-size: 1.1rem;
  margin-top: 10px;
  margin-bottom: 0;
}

/* =========================
   HERO GRID + TEXTBREITE
========================= */
.hero-grid{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.hero-text{
  max-width: 65ch;
}

/* =========================
   KONTAKTBOX POSITION (PIXEL)
   => HIER kannst du hoch/runter schieben
========================= */
.contact-block{
  position: relative;
  top: 160px; /* z.B. -30px = hoch | 20px = runter */
}

/* =========================
   CONTACT CARD (Block mit runden Ecken)
========================= */
.contact-card{
  max-width: 420px;
  background: #f5f7fa;
  border: 1px solid #dbe3ec;

  border-radius: 20px;

  padding: 22px 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.contact-card h3{
  margin: 0 0 10px 0;
  color: #004080;
  font-size: 1.15rem;
}

.contact-card p{
  margin: 0 0 12px 0;
  color: #5a6b7b;
  line-height: 1.45;
}

.contact-card a{
  color: #004080;
  text-decoration: none;
  font-weight: 600;
}

.contact-card a:hover{
  text-decoration: underline;
}

.contact-card__btn{
  display: inline-block;
  margin-top: 6px;
  background: #004080;
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.contact-card__btn:hover{
  background: #0066cc;
}

/* Kontaktbox (unten) */
.hero-contactbox {
  margin: 0 auto;
  padding: 18px 20px;
  background: #004080;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  max-width: 680px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-contactbox__text {
  margin: 0;
  line-height: 1.45;
  font-size: 1.05rem;
}

.hero-contactbox__btn {
  display: inline-block;
  background: #fff;
  color: #004080;
  text-decoration: none;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.hero-contactbox__btn:hover {
  background: #e6f0ff;
}

/* =========================
   CARDS
========================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Falls du irgendwo noch Bilder nutzt (stört nicht) */
.card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* =========================
   ICON CARDS + LINKBAR (DEINE ICONS WIEDER DRIN)
========================= */
.card-linkwrap {
  display: flex;
  flex-direction: column;
}

/* oben mittig */
.card-icon {
  width: 100%;
  height: 78px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 64px;
  height: 64px;
  color: #004080; /* SVG nutzt currentColor */
  display: block;
}

.card:hover .icon {
  color: #0066cc;
}

/* Blauer Balken/Link unten */
.card-linkbar {
  margin-top: auto;
  padding: 12px 16px;
  background: #004080;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  display: inline-block;
}

.card-linkbar:hover {
  background: #0066cc;
}

/* =========================
   ANIMATIONEN (DREHEN/TROPFEN/WÄRME/SCHNEE)
========================= */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes drip {
  0% { transform: translateY(-2px); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translateY(10px); opacity: 1; }
  100% { opacity: 0; }
}

@keyframes heat {
  0%,100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes snowFall {
  0% { transform: translateY(-2px); opacity: 0; }
  20% { opacity: 1; }
  70% { transform: translateY(12px); opacity: 1; }
  100% { opacity: 0; }
}

/* Basisgeschwindigkeit */
.icon--sanitaer .drop { animation: drip 1.8s ease-in-out infinite; }
.icon--heizung .heat  { animation: heat 1.6s ease-in-out infinite; }

/* Klima: Ventilator dreht zuverlässig */
.icon--klima .fan {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 1.4s linear infinite;
}

/* Kälte: Flocken fallen */
.icon--kaelte .flake { animation: snowFall 1.8s ease-in-out infinite; }
.icon--kaelte .flake1 { animation-delay: 0s; }
.icon--kaelte .flake2 { animation-delay: .35s; }
.icon--kaelte .flake3 { animation-delay: .7s; }

/* Hover: ALLE schneller */
.card:hover .icon--sanitaer .drop { animation-duration: 1.2s; }
.card:hover .icon--heizung .heat  { animation-duration: 1.1s; }
.card:hover .icon--klima .fan     { animation-duration: 0.9s; }
.card:hover .icon--kaelte .flake  { animation-duration: 1.2s; }

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  .icon * { animation: none !important; }
}

/* =========================
   FORMULARE
========================= */
form label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  margin-top: 15px;
  background: #004080;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

form button:hover {
  background: #0066cc;
}

/* =========================
   FOOTER
========================= */
footer {
  background: #00264d;
  color: #fff;
  padding: 20px 0;
  margin-top: 40px;
}

footer a,
footer a:visited {
  color: #d9ecff;
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
}

header nav a:visited {
  color: #fff;
}

#nav-energie {
  position: relative;
  margin-right: -14px;
}

#nav-energie .nav-dropdown-link {
  padding-right: 18px;
  display: inline-block;
}

#nav-energie .nav-dropdown-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#nav-energie .nav-dropdown-arrow::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  opacity: 0.9;
  transition: transform 180ms ease, opacity 180ms ease;
}

#nav-energie .nav-dropdown-arrow:hover::before {
  opacity: 1;
}

#nav-energie .nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin-top: 10px;
  padding: 6px 0;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease;
}

#nav-energie .nav-dropdown-menu li {
  display: block;
  width: 100%;
}

#nav-energie .nav-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 10px 14px;
  white-space: nowrap;
}

#nav-energie.is-open .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  max-height: 260px;
  pointer-events: auto;
}

#nav-energie.is-open .nav-dropdown-arrow::before {
  transform: rotate(180deg);
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 0.9fr) minmax(240px, auto);
  align-items: start;
  gap: 40px;
  padding: 28px 0;
}

.footer-contact {
  line-height: 1.6;
}

.footer-heading {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.footer-address {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-style: normal;
}

.footer-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}

.footer-hours-column {
  min-width: 0;
}

.footer-hours {
  line-height: 1.6;
}

.footer-hours__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  margin: 0;
}

.footer-emergency {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 18px;
}

.footer-links-column {
  display: flex;
  justify-content: flex-end;
  align-self: end;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 0;
  text-align: right;
}

.footer-separator {
  margin: 0 8px;
}

.footer-privacy-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9ecff;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.footer-privacy-button:hover,
.footer-privacy-button:focus-visible {
  color: #fff;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.24);
  color: #d9ecff;
  font-size: 0.9rem;
  line-height: 1.45;
  flex-wrap: wrap;
}

/* =========================
   MATOMO-EINWILLIGUNG
========================= */
.privacy-consent[hidden] {
  display: none;
}

.privacy-consent {
  position: fixed;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #c8d7e6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 38, 77, 0.24);
  color: #1f2a37;
}

.privacy-consent__content {
  max-width: 650px;
}

.privacy-consent h2 {
  margin: 0 0 8px;
  color: #004080;
  font-size: 1.25rem;
}

.privacy-consent p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.privacy-consent a {
  color: #004080;
  font-weight: 700;
}

.privacy-consent__actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.privacy-consent__button {
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid #004080;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.privacy-consent__button--decline {
  background: #004080;
  color: #fff;
}

.privacy-consent__button--accept {
  background: #004080;
  color: #fff;
}

.privacy-consent__button:hover,
.privacy-consent__button:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.25);
  outline-offset: 2px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

/* =========================
   RESPONSIVE (DEIN BESTEHENDES)
========================= */
@media (max-width: 960px) {
  header {
    padding: 12px 0;
  }

  header .topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
  }

  header .brand {
    margin-left: 0;
  }

  header .brand img {
    height: clamp(96px, 13vw, 120px);
    margin-top: 0;
  }

  header nav a {
    font-size: 1.15rem;
  }

  /* HERO GRID -> untereinander */
  .hero-grid{
    grid-template-columns: 1fr;
  }

  .hero-text{
    max-width: 100%;
  }

  /* mobil keine Verschiebung */
  .contact-block{
    top: 0;
  }
}

@media (max-width: 700px) {
  .hero-contactbox {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-contactbox__btn {
    width: 100%;
    text-align: center;
  }

  .privacy-consent {
    right: 8px;
    bottom: 8px;
    left: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100vh - 16px);
    padding: 18px;
    overflow-y: auto;
  }

  .privacy-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 26px 0 22px;
  }

  .footer-contact,
  .footer-hours-column,
  .footer-links-column {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .footer-hours-column,
  .footer-links-column {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.18);
  }

  .footer-hours {
    max-width: none;
    margin: 0;
  }

  .footer-links-column {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 8px 18px;
    text-align: left;
  }

  .footer-separator {
    display: none;
  }

  .footer-links a,
  .footer-privacy-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-meta {
    align-items: flex-start;
    gap: 12px;
    padding-top: 18px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  header .brand img {
    height: 96px;
    margin-top: 0;
  }

  header nav a {
    font-size: 1.08rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-layout {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    flex-direction: column;
  }

  .privacy-consent__actions {
    grid-template-columns: 1fr;
  }

  .privacy-consent h2 {
    font-size: 1.15rem;
  }

  .privacy-consent p {
    font-size: 0.95rem;
  }
}

/* =========================================================
   MOBILE FLYER OVERRIDE (NUR BEI KNAPPER BREITE <= 960px)
   -> breitere Ansichten bleiben im Desktop-Layout
========================================================= */
@media (max-width: 960px){

  :root{
    --brand:#004080;
    --brand-2:#0b3c5d;
    --bg:#f5f7fa;
    --paper:#ffffff;
    --text:#1f2a37;
    --muted:#5a6b7b;
    --border:#dbe3ec;
    --shadow: 0 12px 34px rgba(0,0,0,0.10);
    --shadow-soft: 0 8px 22px rgba(0,0,0,0.08);
    --radius: 18px;
    --radius-2: 22px;
  }

  body{
    background: var(--bg);
    color: var(--text);
  }

  .container{
    width: 92%;
    max-width: 680px;
    margin: 0 auto;
  }

  /* =========================
     MOBILE NAV (Burger + Panel)
     (funktioniert mit base.html + body.nav-open)
  ========================= */
  .nav-toggle{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255,255,255,0.10);
    color:#fff;
    cursor:pointer;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-toggle:focus-visible{
    outline: 3px solid rgba(255,255,255,0.65);
    outline-offset: 3px;
  }

  .nav-toggle__bar{
    display:block;
    width: 26px;
    height: 3px;
    background:#fff;
    margin: 5px 0;
    border-radius: 2px;
  }

  .nav-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.40);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 998;
  }

  body.nav-open .nav-backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  header nav{
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 360px);
    height: 100vh;
    background: var(--brand-2);
    padding: 18px 14px;
    transform: translateX(110%);
    transition: transform 200ms ease;
    z-index: 999;
    overflow:auto;
    box-shadow: -10px 0 30px rgba(0,0,0,0.25);
  }

  body.nav-open header nav{
    transform: translateX(0);
  }

  header nav > ul{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 6px;
  }

  header nav > ul > li{
    position: relative;
  }

  header nav a{
    width: 100%;
    padding: 12px 12px;
    font-size: 1.08rem;
    border-radius: 10px;
  }

  /* Dropdown im Panel */
  .nav-dropdown{
    padding-right: 44px;
  }

  .nav-dropdown-arrow{
    position: absolute;
    right: 6px;
    top: 6px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    opacity: 1;
  }

  .nav-dropdown-menu{
    position: static;
    min-width: 0;
    width: 100%;
    margin: 6px 0 0 0;
    padding: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;

    opacity: 0;
    max-height: 0;
    transform: none;
    pointer-events: none;
    overflow: hidden;
  }

  .nav-dropdown.is-open .nav-dropdown-menu{
    opacity: 1;
    max-height: 450px;
    pointer-events: auto;
  }

  .nav-dropdown-menu a{
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
  }

  /* =========================
     FLYER LOOK FÜR DEINE BESTEHENDE STARTSEITE
     -> ohne HTML zu ändern
  ========================= */
  .hero{
    padding: 18px 0 10px;
    background: transparent;
  }

  .hero .container.hero-grid{
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    box-shadow: var(--shadow);
    padding: 18px 16px;
  }

  .hero-grid{
    gap: 14px;
  }

  main h1{
    color: var(--brand);
    font-size: 1.9rem;
    margin: 0 0 10px 0;
    line-height: 1.15;
  }

  .hero .muted{
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    margin-top: 0;
  }

  /* Kontaktbox als CTA zuerst */
  .contact-block{
    order: -1;
    top: 0;
  }

  .contact-card{
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  }

  .contact-card__btn{
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  main h2{
    color: var(--brand);
    font-size: 1.45rem;
    margin-top: 22px;
    margin-bottom: 12px;
  }

  .section{
    padding: 16px 0 18px;
  }

  .dashboard-grid{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card{
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  }

  .card-linkbar{
    text-align: center;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .hero-contactbox{
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-contactbox__text{
    text-align: center;
    font-size: 1.05rem;
  }

  .hero-contactbox__btn{
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1.05rem;
  }
} /* Ende des 960px-Blocks */

/* Umschaltung Desktop/Mobile-Content (AUSSERHALB der Media Query) */
.desktop-home { display: block !important; }
.mobile-flyer { display: none !important; }

@media (max-width: 960px){
  .desktop-home { display: none !important; }
  .mobile-flyer { display: block !important; }
}


/* Desktop: Burger aus */
.nav-toggle{ display: none; }

.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle__label--close,
.nav-toggle[aria-expanded="true"] .nav-toggle__label--open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__label--close {
  display: inline;
}

/* Mobile: Burger an + sauberer Look (kein Balken) */
@media (max-width: 960px){
  .nav-toggle{
    display: inline-flex !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;

    height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;

    border: 1px solid rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.14) !important; /* heller, nicht dunkelblau */
    border-radius: 12px !important;

    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    position: relative;
    z-index: 1002;
    gap: 6px;
  }

  .nav-toggle:hover{
    background: rgba(255,255,255,0.22) !important;
  }

  .nav-toggle__bar{
    display: block !important;
    width: 26px !important;
    height: 2px !important;
    margin: 0 !important;
    background: #fff !important;
    border-radius: 2px !important;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-toggle {
    position: fixed;
    top: 18px;
    right: 4%;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Keep the energy submenu inside the mobile navigation panel. The ID-based
   desktop rules above intentionally need equally specific mobile overrides. */
@media (max-width: 960px){
  header{
    z-index: 1000;
  }

  .nav-backdrop{
    z-index: 999;
  }

  header nav{
    z-index: 1001;
    box-sizing: border-box;
    width: min(calc(100% - 24px), 360px);
    padding: 78px 16px 24px;
  }

  header nav a::after{
    display: none;
  }

  header nav > ul > li{
    width: 100%;
  }

  header nav a:hover,
  header nav a:focus-visible,
  header nav a[aria-current="page"]{
    background: rgba(255,255,255,0.11);
  }

  #nav-energie{
    margin-right: 0;
    padding-right: 0;
    display: block;
  }

  #nav-energie .nav-dropdown-link{
    display: block;
    width: 100%;
    padding-right: 54px;
    box-sizing: border-box;
  }

  #nav-energie .nav-dropdown-arrow{
    right: 6px;
    top: 6px;
    width: 42px;
    height: 42px;
    transform: none;
    border-radius: 10px;
    display: grid;
    place-items: center;
  }

  #nav-energie .nav-dropdown-menu{
    position: static;
    min-width: 0;
    width: 100%;
    margin: 6px 0 0;
    padding: 6px;
    transform: none;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    box-sizing: border-box;
  }

  #nav-energie.is-open .nav-dropdown-menu{
    max-height: 450px;
  }

  #nav-energie .nav-dropdown-menu a{
    padding: 10px 12px;
    white-space: normal;
    border-radius: 10px;
  }
}
