:root{
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.04);
  --panel2: rgba(255,255,255,0.06);
  --text: #e9eef6;
  --muted: rgba(233,238,246,0.7);
  --red: #ff1f2d;
  --red2:#ff4b57;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 12px 35px rgba(0,0,0,0.45);
  --radius: 18px;
}

/* ===== Webfont: Lucida Handwriting (WOFF2) ===== */
@font-face{
  font-family: "LucidaHandwritingWeb";
  src: url("/static/fonts/lucida-handwriting.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== Base ===== */
html, body { height: 100%; }
body{
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(255,31,45,0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(255,31,45,0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

/* ===== ESZI Schrift (Webfont) ===== */
.eszi-brand{
  font-family: "LucidaHandwritingWeb","Lucida Handwriting",cursive;
  color: #ff1f2d;
  letter-spacing: 2px;
  text-shadow:
    0 0 10px rgba(255,31,45,0.85),
    0 0 24px rgba(255,31,45,0.55),
    0 3px 8px rgba(0,0,0,0.9);
}

/* Mobile: Glow reduzieren (iOS wird sonst weich) */
@media (max-width: 576px){
  .eszi-brand{
    letter-spacing: 1px;
    text-shadow:
      0 0 4px rgba(255,31,45,0.55),
      0 2px 6px rgba(0,0,0,0.85);
  }
}

/* ===== Navbar ===== */
.navbar-eszi{
  position: fixed;       /* <-- WICHTIG */
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;         /* über Inhalt */

  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,31,45,0.35);
}
body{
  padding-top: 95px;   /* ggf. 90–110px je nach Logo-Höhe */
}

/* iPhone: Blur AUS (macht SVG/Logo unscharf) */
@media (max-width: 576px){
  .navbar-eszi{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0,0,0,0.80) !important;
  }

  /* rechte Button-Gruppe darf umbrechen */
  .navbar-eszi .d-flex.gap-2{
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* ===== Logo oben: immer eckig & scharf ===== */
.eszi-logo{
  display: block;
  height: 70px;
  width: auto;

  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  filter: none !important;
  transform: none !important;
}

@media (max-width: 576px){
  .eszi-logo{ height: 52px; }
}

/* ===== Buttons ===== */
.btn-eszi{
  border-radius: 0;
  padding: 10px 18px;
  border: 1px solid rgba(255,0,0,0.35);
  background: #000;
  color: #fff;
  box-shadow: 0 0 8px rgba(255,0,0,0.15);
  transition: 0.2s ease;
}
.btn-eszi:hover{
  border-color: #ff0000;
  box-shadow: 0 0 12px rgba(255,0,0,0.4);
  color: #fff;
}

.btn-eszi-primary{
  border-radius: 0;
  padding: 10px 20px;
  background: #000;
  border: 1px solid #ff0000;
  color: #ff0000;
  box-shadow: 0 0 10px rgba(255,0,0,0.3);
  transition: 0.2s ease;
}
.btn-eszi-primary:hover{
  background: #111;
  box-shadow: 0 0 16px rgba(255,0,0,0.6);
  color: #ff0000;
}

/* ===== Hero / Typography ===== */
.hero{ position: relative; padding: 56px 0 26px 0; }

.headline{
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.10;
  font-weight: 600;
  margin: 10px 0 12px;
}
.subline{
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
}
.headline-eszi{
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  margin-top: 8px;
}

/* ===== Hero Hintergrundbild (dein Setup) ===== */
.hero.hero-bg{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 110px 0;
  margin-top: 18px;
}
.hero.hero-bg::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--hero-url) center/cover no-repeat;
  filter: brightness(1.2) contrast(1.05);
  z-index: 0;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
  pointer-events: none;
  z-index: 1;
}
.hero-content, .hero-inner{
  position: relative;
  z-index: 2;
}
.hero-cta{
  margin-top: 22px;
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap:wrap;
}

/* Hero Buttons: einheitlich */
.hero-cta .btn-eszi,
.hero-cta .btn-eszi-primary{
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid #ff1f2d;
  box-shadow: 0 0 15px rgba(255,31,45,0.35);
  transition: all 0.25s ease;
}
.hero-cta .btn-eszi:hover,
.hero-cta .btn-eszi-primary:hover{
  background: #ff1f2d;
  color: #000;
  box-shadow: 0 0 25px rgba(255,31,45,0.7);
}

/* ===== Cards / Sections ===== */
.section-title{
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: 1.2rem;
  color: rgba(233,238,246,0.92);
}

.card-eszi{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,0.32);
  padding: 18px;
  height: 100%;
}
.card-eszi:hover{
  border-color: rgba(255,31,45,0.45);
  transform: translateY(-2px);
  transition: 160ms ease;
}

.icon-badge{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,31,45,0.10);
  border: 1px solid rgba(255,31,45,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 12px;
}
.icon-svg{ width: 22px; height: 22px; display:block; }

.small-muted{ color: var(--muted); }

/* ===== Footer ===== */
.footer-eszi{
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 44px;
  padding: 18px 0;
  color: rgba(233,238,246,0.65);
  font-size: 0.92rem;
}
.social-icon{
  color: #ffffff;
  font-size: 1.2rem;
  transition: 0.2s ease;
}
.social-icon:hover{
  color: #ff0000;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

/* ===== Drawer ===== */
.drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  z-index: 999;
}
.drawer-overlay.open{
  opacity: 1;
  pointer-events: auto;
}
.drawer{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 340px;
  max-width: 92vw;
  background: #000;
  border-right: 1px solid rgba(255,0,0,0.35);
  box-shadow: 0 0 20px rgba(255,0,0,0.25);
  transform: translateX(-105%);
  transition: 220ms ease;
  z-index: 1000;
  padding: 14px;
}
.drawer.open{ transform: translateX(0); }

.drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,0,0,0.25);
  margin-bottom: 12px;
}
.drawer-title{
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}
.drawer-section{ margin-top: 14px; }
.drawer-section-title{
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.drawer-link{
  display:block;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #000;
  border: 1px solid rgba(255,0,0,0.35);
  box-shadow: 0 0 8px rgba(255,0,0,0.12);
  transition: 0.2s ease;
}
.drawer-link:hover{
  border-color: #ff0000;
  box-shadow: 0 0 14px rgba(255,0,0,0.45);
}

/* ===== Layout helpers ===== */
.page-wrap{ max-width: 980px; margin: 0 auto; padding: 16px; }

.fixed-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  border-bottom: 1px solid #c00;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fixed-header h1{ margin:0; color:#f00; font-size:22px; }
.header-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.hint{
  color: #ddd;
  background: #111;
  border: 1px solid #333;
  padding: 12px;
  border-radius: 12px;
}

/* ===== Galerie ===== */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.thumb{
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 10px;
  overflow: visible !important;
  cursor: pointer;
}
.thumb img{
  width: 100%;
  height: auto !important;
  max-height: 220px;
  object-fit: contain !important;
  display: block;
  border-radius: 10px;
  background: #000;
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}
.lightbox.open{ display:flex; }
.lightbox-inner{ position:relative; max-width:1100px; width:100%; }
.lightbox-inner img{
  width:100%;
  max-height:85vh;
  object-fit: contain;
  border-radius:16px;
  border:1px solid #333;
  background:#000;
}
.lightbox-close{
  position:absolute;
  top:-10px;
  right:-10px;
  background:#111;
  border:1px solid #c00;
  color:#fff;
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
}

/* ===== Referenzen ===== */
.ref-grid{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.ref-media{ background:#000; padding:14px; }
.ref-media img{
  width:100%;
  height:auto;
  max-height:500px;
  object-fit:contain;
  display:block;
  background:#000;
  border-radius: 12px;
}
.ref-body{ padding:14px; }
.ref-title{ color:#fff; font-weight:800; font-size:18px; margin-bottom:4px; }
.ref-meta{ display:flex; gap:8px; color: rgba(233,238,246,0.75); font-size:13px; }
.ref-actions{ margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }

/* ===== Admin Preview / Lightbox ===== */
.preview-bar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom: 12px;
}
.preview-select{
  background:#000;
  color:#fff;
  border: 1px solid rgba(255,0,0,0.35);
  padding: 8px 10px;
}

.admin-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.admin-card{
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,0,0,0.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.admin-card-body{ padding: 12px 14px; }
.admin-title{ font-weight: 800; color:#fff; margin-bottom: 10px; }

.preview-box{
  background:#000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
}
.preview-img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: contain;
  background:#000;
  border-radius: 12px;
  cursor: zoom-in;
}
.size-s .preview-box{ height: 140px; }
.size-m .preview-box{ height: 220px; }
.size-l .preview-box{ height: 320px; }

.admin-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}
.admin-lightbox.open{ display:flex; }
.admin-lightbox-inner{ position:relative; max-width:1200px; width:100%; }
.admin-lightbox-inner img{
  width:100%;
  max-height:88vh;
  object-fit: contain;
  background:#000;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
}
.admin-lightbox-close{
  position:absolute;
  top:-10px;
  right:-10px;
  background:#111;
  border: 1px solid #c00;
  color:#fff;
  border-radius: 999px;
  padding: 10px 12px;
  cursor:pointer;
}

/* ===== Content-Bild Glow (NICHT Logo/Icons) ===== */
.split-img,
.ref-media img,
.thumb img,
.preview-img{
  border-radius: 18px;
  border: 1px solid rgba(255,31,45,0.45);
  box-shadow:
    0 0 12px rgba(255,31,45,0.45),
    0 0 30px rgba(255,31,45,0.25),
    0 0 55px rgba(255,31,45,0.15);
}

/* ===== Split Sections (optional) ===== */
.split-section{
  padding: 70px 0;
  opacity: 0;
  transform: translateY(35px);
  transition: all 0.8s ease;
}
.split-section.visible{
  opacity: 1;
  transform: translateY(0);
}
.dark-section{
  background: radial-gradient(900px 450px at 20% 10%, rgba(255,31,45,0.08), transparent 60%);
  border-radius: 18px;
  margin-top: 12px;
}
.split-img{
  width:100%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
  transition: 0.3s ease;
}
.split-img:hover{ transform: scale(1.03); }

.mini-points{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

/* ===== Mobile Optimierung ===== */
@media (max-width: 768px){
  .page-wrap{ padding: 12px !important; }

  .fixed-header{
    padding: 12px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .header-actions{
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero.hero-bg{
    padding: 70px 14px !important;
    border-radius: 14px !important;
  }

  .headline{ font-size: 1.6rem !important; line-height: 1.15 !important; }
  .headline-eszi{ font-size: 1.8rem !important; }
  .subline{ font-size: 0.98rem !important; }

  .hero-cta{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hero-cta a{
    width: 100% !important;
    text-align: center !important;
  }

  .ref-media img{ max-height: 280px !important; }

  .gallery-grid{
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .thumb img{ max-height: 160px !important; }

  .loxone-badges{
    margin-left: 0 !important;
    align-items: center !important;
  }
}

@media (max-width: 576px){
  .container.py-4{
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
}

/* ===== Loxone Badges (Desktop) ===== */
.loxone-badges{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
  margin-top: -10px;
  margin-left: 130px;
}
.loxone-badge{
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.62));
}
.drawer{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100dvh;
  padding-bottom: 30px;
}
/* Hängender Einzug (Label links, Wert rechts) */
.kv{ display:grid; gap:12px; }
.kv-row{
  display:grid;
  grid-template-columns: 220px 1fr;
  column-gap: 14px;
  align-items:start;
}
.kv-k{ color: rgba(233,238,246,0.92); font-weight: 700; }
.kv-v{ color: var(--muted); }
@media (max-width: 576px){
  .kv-row{ grid-template-columns: 1fr; }
}

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,31,45,0.28);
  background: rgba(255,31,45,0.10);
  color: rgba(233,238,246,0.90);
  box-shadow: 0 0 10px rgba(255,31,45,0.18);
  font-size: 0.9rem;
}
.portal-zone{
  padding: 6px 10px;
  border: 1px solid rgba(255,31,45,0.35);
  box-shadow: 0 0 20px rgba(255,31,45,0.25);
}
/* ===== HERO VIDEO ===== */
.hero-video{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  margin-top: 18px;
  padding: 110px 0;
}

.hero-video-bg{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: brightness(0.7);
}

.hero-video .hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
  z-index: 1;
}

.hero-video .hero-content{
  position: relative;
  z-index: 2;
}
/* ===== Loxone Headline ===== */
.headline-loxone{
  font-size: clamp(3rem, 6vw, 5rem);   /* deutlich größer */
  font-weight: 700;
  color: #00B140;                      /* Loxone Grün */
  text-shadow:
    0 0 12px rgba(0,177,64,0.7),
    0 0 30px rgba(0,177,64,0.4),
    0 4px 12px rgba(0,0,0,0.8);
  letter-spacing: 1px;
}
/* ===== Split Video (wie split-img) ===== */
.split-media{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,31,45,0.45);
  box-shadow:
    0 0 12px rgba(255,31,45,0.45),
    0 0 30px rgba(255,31,45,0.25),
    0 0 55px rgba(255,31,45,0.15);
}

.split-video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split-media:hover{
  transform: scale(1.03);
  transition: 0.3s ease;
}
/* ===== Loxone Hero Badges ===== */
.loxone-badges-hero{
  display:flex;
  flex-direction:column;
  gap: 22px;
  align-items:center;
  justify-content:center;
}

.loxone-badge-hero{
  max-width: 230px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(200, 18, 18, 0.89));
  transition: 0.25s ease;
}

.loxone-badge-hero:hover{
  transform: scale(1.04);
  filter: drop-shadow(0 0 35px rgba(0,177,64,0.85));
}

@media (max-width: 992px){
  .loxone-badges-hero{
    flex-direction: row;
    gap: 16px;
    margin-top: 8px;
  }
  .loxone-badge-hero{
    max-width: 150px;
  }
}
/* ===== Energy Flow (v2) ===== */
.energy-flow2{
  position: relative;
  margin: 18px auto 8px auto;
  max-width: 980px;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,31,45,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);

  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 18px;
  align-items: center;
}

.energy-flow2 .flow-col{
  display: grid;
  gap: 14px;
}

.energy-flow2 .flow-node{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  padding: 12px 12px;
  text-align: center;
}

.energy-flow2 .flow-ico{ font-size: 1.25rem; }
.energy-flow2 .flow-title{ font-weight: 800; margin-top: 4px; }
.energy-flow2 .flow-sub{ color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

.energy-flow2 .flow-node.core{
  border-color: rgba(255,31,45,0.35);
  box-shadow: 0 0 18px rgba(255,31,45,0.22);
}

.energy-flow2 .flow-node.source.spot{
  border-color: rgba(255,31,45,0.22);
}

.energy-flow2 .flow-node.storage{
  border-color: rgba(255,31,45,0.20);
}

/* SVG Linien */
.flow-svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.flow-path{
  fill: none;
  stroke: rgba(255,31,45,0.38);
  stroke-width: 3.2;
  filter: drop-shadow(0 0 10px rgba(255,31,45,0.18));
  stroke-linecap: round;

  stroke-dasharray: 10 14;
  animation: dash 2.6s linear infinite;
}

.flow-path.thin{
  stroke-width: 2.2;
  opacity: 0.7;
}

.flow-path.spot{
  stroke: rgba(0,177,64,0.40);
  filter: drop-shadow(0 0 10px rgba(0,177,64,0.18));
}

@keyframes dash{
  to { stroke-dashoffset: -240; }
}

/* Dots (fliegende Energiepunkte) */
.dot{
  position:absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px rgba(255,31,45,0.65);
  z-index: 2;
  opacity: 0.95;
}

/* Animationen entlang "gedachter" Pfade (Positionen passend zum SVG) */
@keyframes move1 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,80px);opacity:.15;} }
@keyframes move2 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,-10px);opacity:.15;} }
@keyframes move3 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,-140px);opacity:.15;} }

@keyframes move4 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,-60px);opacity:.15;} }
@keyframes move5 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,0px);opacity:.15;} }
@keyframes move6 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(290px,140px);opacity:.15;} }

@keyframes moveV1 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(-20px,95px);opacity:.15;} }
@keyframes moveV2 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(-20px,210px);opacity:.15;} }

@keyframes moveThin1 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(320px,-30px);opacity:.15;} }
@keyframes moveThin2 { 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(320px,0px);opacity:.15;} }

/* Startpositionen (ungefähr links/middle/right) */
.dot.d-pv{ left: 16%; top: 14%; animation: move1 2.4s linear infinite; }
.dot.d-grid{ left: 16%; top: 41%; animation: move2 2.9s linear infinite; animation-delay:.4s; }
.dot.d-spot{ left: 16%; top: 68%; background:#00B140; box-shadow:0 0 14px rgba(0,177,64,0.65); animation: move3 3.2s linear infinite; animation-delay:.8s; }

.dot.d-core-house{ left: 50%; top: 33%; animation: move4 2.6s linear infinite; }
.dot.d-core-hp{ left: 50%; top: 38%; animation: move5 2.8s linear infinite; animation-delay:.3s; }
.dot.d-core-ev{ left: 50%; top: 43%; animation: move6 3.0s linear infinite; animation-delay:.6s; }

.dot.d-core-batt{ left: 52%; top: 40%; animation: moveV1 2.7s linear infinite; animation-delay:.2s; }
.dot.d-core-buffer{ left: 52%; top: 42%; animation: moveV2 3.1s linear infinite; animation-delay:.5s; }

.dot.d-batt-hp{ left: 52%; top: 54%; animation: moveThin1 2.9s linear infinite; animation-delay:.2s; }
.dot.d-buffer-ev{ left: 52%; top: 74%; animation: moveThin2 3.1s linear infinite; animation-delay:.7s; }

/* Mobile: vereinfachen */
@media (max-width: 768px){
  .energy-flow2{
    grid-template-columns: 1fr;
  }
  .flow-svg, .dot{ display:none; }
}


/* Hero Text kräftiger (nur im Hero) */
.hero .headline,
.hero .headline-eszi,
.hero .subline{
  text-shadow: 0 3px 14px rgba(0,0,0,0.95);
}

.hero .headline,
.hero .headline-eszi{
  color: #fff;
}

.hero .subline{
  color: rgba(255,255,255,0.92); /* statt muted */
  font-weight: 500;             /* etwas kräftiger */
}

/* ===== Gebäudeleittechnik Diagramm ===== */
.bms-diagram{
  position: relative;
  margin: 18px auto 8px auto;
  max-width: 1100px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,31,45,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  overflow: hidden;
}

.bms-svg{
  width: 100%;
  height: auto;
  display:block;
}

/* Nodes */
.bms-node rect{
  fill: rgba(255,255,255,0.04);
  stroke: rgba(255,255,255,0.12);
  stroke-width: 2;
}
.bms-node.core rect{
  stroke: rgba(255,31,45,0.35);
  filter: drop-shadow(0 0 14px rgba(255,31,45,0.22));
}
.bms-node text{ fill: rgba(233,238,246,0.95); }
.bms-node .t-title{ font-size: 22px; font-weight: 900; letter-spacing: 0.5px; }
.bms-node .t-sub{ font-size: 16px; fill: rgba(233,238,246,0.70); }

/* Linien / Fluss */
.bms-path{
  fill: none;
  stroke: rgba(255,31,45,0.45);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 12 16;
  animation: bmsDash 2.4s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255,31,45,0.20));
}
.bms-path.thin{
  stroke-width: 2.5;
  opacity: 0.65;
}
@keyframes bmsDash{
  to { stroke-dashoffset: -250; }
}

/* Bewegte Punkte */
.bms-dot{
  position:absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 16px rgba(255,31,45,0.70);
  opacity: 0.95;
}

/* Dots: grob entlang der Hauptpfade */
@keyframes bmsMove1{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(410px,85px);opacity:.15;} }
@keyframes bmsMove2{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(410px,10px);opacity:.15;} }
@keyframes bmsMove3{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(410px,-115px);opacity:.15;} }

@keyframes bmsMove4{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(430px,-50px);opacity:.15;} }
@keyframes bmsMove5{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(430px,25px);opacity:.15;} }
@keyframes bmsMove6{ 0%{transform:translate(0,0);opacity:.15;} 10%{opacity:1;} 90%{opacity:1;} 100%{transform:translate(430px,165px);opacity:.15;} }

/* Startpositionen */
.bms-dot.d1{ left: 18%; top: 22%; animation: bmsMove1 2.2s linear infinite; }
.bms-dot.d2{ left: 18%; top: 46%; animation: bmsMove2 2.7s linear infinite; animation-delay:.4s; }
.bms-dot.d3{ left: 18%; top: 70%; animation: bmsMove3 3.0s linear infinite; animation-delay:.8s; }

.bms-dot.d4{ left: 54%; top: 37%; animation: bmsMove4 2.4s linear infinite; animation-delay:.2s; }
.bms-dot.d5{ left: 54%; top: 45%; animation: bmsMove5 2.6s linear infinite; animation-delay:.5s; }
.bms-dot.d6{ left: 54%; top: 55%; animation: bmsMove6 2.9s linear infinite; animation-delay:.8s; }

/* Rückmelde-Dots */
@keyframes bmsReturn{ 0%{transform:translate(0,0);opacity:.12;} 15%{opacity:1;} 85%{opacity:1;} 100%{transform:translate(-360px,90px);opacity:.12;} }
.bms-dot.d7{ left: 86%; top: 30%; animation: bmsReturn 3.3s linear infinite; animation-delay:.6s; }
.bms-dot.d8{ left: 86%; top: 72%; animation: bmsReturn 3.6s linear infinite; animation-delay:1.1s; }

/* Mobile: Diagramm bleibt, aber Dots reduzieren */
@media (max-width: 768px){
  .bms-dot{ display:none; }
  .bms-node .t-title{ font-size: 18px; }
  .bms-node .t-sub{ font-size: 14px; }
}

/* Sonderlösungen Medien */
.eszi-video,
.eszi-image{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,31,45,0.35);
  box-shadow:
    0 0 15px rgba(255,31,45,0.35),
    0 0 35px rgba(255,31,45,0.15);
  background: #000;
  transition: 0.25s ease;
}

.eszi-video:hover,
.eszi-image:hover{
  box-shadow:
    0 0 25px rgba(255,31,45,0.6),
    0 0 45px rgba(255,31,45,0.25);
}

/* ===== Wartung Hero ===== */
.hero-eszi.hero-wartung{
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
}

.hero-inner{
  position:relative;
  z-index:2;
  width:100%;
}

.hero-box{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 22px;
  text-align:center;
}

.hero-box h1{
  margin:0 0 12px;
  letter-spacing: .3px;
}

.hero-sub{
  max-width: 860px;
  margin: 0 auto 18px;
  font-size: 1.15rem;
  line-height: 1.55;
  opacity: .95;
}

.hero-actions{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 12px;
}

.btn-eszi-outline{
  background: transparent !important;
  border: 1px solid #e3000f;
  color: #fff;
}

.hero-trust{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 18px;
  opacity: .92;
  font-size: .95rem;
}

.hero-trust span{
  border: 1px solid rgba(227,0,15,.55);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
}

/* ===== Sections ===== */
.section-eszi{
  padding: 56px 0;
}

/* ===== Ablaufdiagramm ===== */
.flow-wrap{
  margin-top: 34px;
  display:flex;
  align-items:stretch;
  justify-content:center;
  gap:16px;
  flex-wrap:wrap;
}

.flow-step{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding: 16px 16px;
  border: 1px solid rgba(227,0,15,.35);
  border-radius: 16px;
  background: rgba(0,0,0,.12);
  max-width: 320px;
  min-width: 260px;
}

.flow-icon{
  width:44px;
  height:44px;
  border-radius: 50%;
  background:#e3000f;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  flex:0 0 44px;
}

.flow-text h3{
  margin:0 0 6px;
  font-size: 1.05rem;
}

.flow-text p{
  margin:0;
  opacity:.92;
  line-height:1.35;
}

.flow-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
  opacity: .9;
  color: #e3000f;
}

/* Mobile: Pfeile verstecken, Steps untereinander */
@media (max-width: 900px){
  .flow-arrow{ display:none; }
  .flow-step{ max-width: 680px; width:100%; }
}

/* ===== Kartenbereich ===== */
.cards-eszi{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1100px){
  .cards-eszi{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px){
  .cards-eszi{ grid-template-columns: 1fr; }
}

/* CTA Text */
.cta-sub{
  max-width: 860px;
  margin: 10px auto 18px;
  font-size: 1.1rem;
  line-height:1.55;
  opacity:.95;
}
.cta-mini{
  margin-top: 16px;
  opacity: .9;
  font-size: .95rem;
}

/* ===== Planung Hero (wie Wartung) ===== */
.hero-eszi.hero-planung{
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
/* ===== Split 2 Bilder / Planungsbüro ===== */
.split-eszi{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.split-card{
  border: 1px solid rgba(255,31,45,0.20);
  background: rgba(0,0,0,0.30);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  padding: 16px;
}

.split-card h3{
  margin-top: 14px;
  font-weight: 800;
}

.split-card p{
  color: rgba(233,238,246,0.80);
  margin-bottom: 0;
  line-height: 1.45;
}

/* Bild in Split Card */
.split-card .split-img{
  width:100%;
  height: 280px;
  object-fit: cover;
  border-radius: 18px;
}

/* Mobile */
@media (max-width: 900px){
  .split-eszi{ grid-template-columns: 1fr; }
  .split-card .split-img{ height: 220px; }
}
.drawer .loxone-link{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}

.drawer .loxone-link .drawer-icon{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  min-height:18px !important;
  max-height:18px !important;
  object-fit:contain !important;
  display:block !important;
  flex:0 0 18px !important;
}