/* -----------------------------------------------------------
   GLOBAL – Farben, Schrift, Basis
----------------------------------------------------------- */
:root {
  --epa-accent: #808042;
  --epa-green: #7fdc7a;
  --epa-white-soft: rgba(255,255,255,0.92);
  --epa-font: "Segoe UI", system-ui, -apple-system, sans-serif;

  --epa-orange: #e67e22;
  --epa-blue: #2980b9;
  --epa-gold: #bfa542;
  --epa-turquoise: #16a085;
  --epa-green-strong: #4caf50;
  --epa-grey: #5d6d7e;
}

/* -----------------------------------------------------------
   HEADER FIX – fetch() lädt Header → aber NICHT resetten!
----------------------------------------------------------- */
#header {
    min-height: 110px;
}

body {
  margin: 0;
  font-family: var(--epa-font);
  background: #ffffff;
  color: #0f1417;
}

a {
  text-decoration: none;
}

/* -----------------------------------------------------------
   HEADER – Logo + Titel + Navigation
----------------------------------------------------------- */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  padding: 0.6rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.top-header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.site-logo {
  width: 42px;
}

.site-title {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.site-title-main {
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--epa-accent);
}

.site-title-sub {
  font-size: 0.82rem;
  opacity: 0.85;
  color: var(--epa-accent);
}

.header-right {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
}

.header-right > a {
  color: #333;
  font-weight: 500;
  font-size: 0.92rem;
  transition: 0.25s ease;
}

/* ⭐ Navigation gleiche Höhe */
.header-right > a,
.nav-main {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

/* -----------------------------------------------------------
   NAVIGATION DROPDOWN – BEREINIGT & FUNKTIONIEREND
----------------------------------------------------------- */
.nav-dropdown {
  position: relative;
}

.nav-main {
  cursor: pointer;
  font-weight: 500;
  color: #333;
  padding: 0.5rem 0;
  font-size: 0.92rem;
}

/* Dropdown sichtbar machen */
.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  padding: 0.5rem 0;
  display: none;
  min-width: 240px;
  z-index: 9999;
}

.dropdown-menu a {
  display: block;
  padding: 0.7rem 1rem;
  color: #333;
  font-size: 0.92rem;
  font-weight: 500;
  transition: 0.2s ease;
}

/* -----------------------------------------------------------
   FIX: allgemeinen Hover neutralisieren
----------------------------------------------------------- */
.dropdown-menu a:hover {
  background: none !important;
  color: inherit !important;
}

/* -----------------------------------------------------------
   DROPDOWN – FARBCODIERTE KATEGORIEN (wie Leistungen)
----------------------------------------------------------- */

/* Statik – Orange */
#header .dropdown-menu a.dd-statik:hover {
  background: rgba(230,126,34,0.12) !important;
  color: #e67e22 !important;
}

/* CAD – Grün */
#header .dropdown-menu a.dd-cad:hover {
  background: rgba(76,175,80,0.12) !important;
  color: #4caf50 !important;
}

/* Bauleitung – Gold */
#header .dropdown-menu a.dd-bauleitung:hover {
  background: rgba(191,165,66,0.15) !important;
  color: #bfa542 !important;
}

/* Energie – Blau */
#header .dropdown-menu a.dd-energie:hover {
  background: rgba(41,128,185,0.12) !important;
  color: #2980b9 !important;
}

/* Heizung – Türkis */
#header .dropdown-menu a.dd-heizung:hover {
  background: rgba(22,160,133,0.15) !important;
  color: #16a085 !important;
}

/* Sanierung – Grau */
#header .dropdown-menu a.dd-sanierung:hover {
  background: rgba(93,109,126,0.15) !important;
  color: #5d6d7e !important;
}

/* -----------------------------------------------------------
   HERO
----------------------------------------------------------- */
.hero {
  height: 78vh;
  background: url("/Bilder/hero-baustelle.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 3.5rem 2rem;
  position: relative;
  margin-top: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
}

.hero-content {
  position: relative;
  max-width: 1100px;
  margin: auto;
}

.hero-title {
  font-size: clamp(3.4rem, 5vw, 4.6rem);
  font-weight: 500;
  margin-left: 0.5rem;
  margin-bottom: 0.15rem;
  color: #ffffff;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: clamp(1.65rem, 2.3vw, 2.05rem);
  font-weight: 500;
  margin-left: 0.5rem;
  margin-bottom: 0.1rem;
  color: var(--epa-white-soft);
}

.hero-typewriter {
  margin-left: 0.5rem;
  margin-bottom: 1.4rem;
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  font-weight: 600;
  color: #ffffff;
}

#typewriter {
  border-right: 3px solid var(--epa-green);
  padding-right: 5px;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
}

.hero-subline {
  max-width: 38rem;
  color: var(--epa-white-soft);
  margin: 0.5rem 0 2rem 0.5rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-left: 0.5rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.25s ease;
}

.btn-primary {
  background: var(--epa-green);
  border: 1px solid var(--epa-green);
  color: #ffffff; /* Weißer Text */
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.btn-primary {
  background: #5fc85a; /* etwas dunkleres EPA-Grün */
  border: 1px solid #5fc85a;
  color: #ffffff;
}


.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.7);
  color: #ffffff;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

/* -----------------------------------------------------------
   INTRO-COLLAGE
----------------------------------------------------------- */
.intro-collage {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.intro-collage-inner {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: nowrap;
}

.intro-collage-images {
  flex: 1.6;
  min-width: 600px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 160px;
  gap: 1.4rem;
}

.collage-item {
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  position: relative;
  cursor: pointer;
}

.collage-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.18);
}

.collage-item:hover::before { background: rgba(0,0,0,0); }
.collage-item:hover { filter: grayscale(0%); }

.intro-collage-text {
  max-width: 380px;
  flex: 1;
}

/* COLLAGE – Hintergrundbilder */
.collage-bewehrung { background-image: url("/Bilder/collage-bewehrung.jpg"); }
.collage-plan { background-image: url("/Bilder/collage-plan.jpg"); }
.collage-waermepumpe { background-image: url("/Bilder/collage-waermepumpe.jpg"); }
.collage-energieausweis { background-image: url("/Bilder/collage-energieausweis.jpg"); }

/* INTRO-COLLAGE TEXTFARBEN */
.intro-welcome {
  color: #000000;
}

.intro-epa {
  color: var(--epa-accent);
  font-weight: 600;
}

/* -----------------------------------------------------------
   LEISTUNGEN
----------------------------------------------------------- */
.leistungen {
  max-width: 1100px;
  margin: auto;
  padding: 4rem 1.5rem;
}

.leistungen h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--epa-accent);
  text-align: center;
  margin-bottom: 2.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  border: 2px solid transparent;
  transition: 0.25s ease;
}

.card h3 {
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: #333;
}

.card p {
  font-weight: 400;
  line-height: 1.45;
  color: #444;
}

/* Rahmenfarben */
.card-statik { border-color: rgba(230,126,34,0.35); }
.card-energie { border-color: rgba(41,128,185,0.35); }
.card-bauleitung { border-color: rgba(191,165,66,0.35); }
.card-heizung { border-color: rgba(22,160,133,0.35); }
.card-cad { border-color: rgba(76,175,80,0.35); }
.card-sanierung { border-color: rgba(93,109,126,0.35); }

/* SANFTE Hover-Farben */
.card-statik:hover { background: rgba(230,126,34,0.06); }
.card-energie:hover { background: rgba(41,128,185,0.06); }
.card-bauleitung:hover { background: rgba(191,165,66,0.06); }
.card-heizung:hover { background: rgba(22,160,133,0.06); }
.card-cad:hover { background: rgba(76,175,80,0.06); }
.card-sanierung:hover { background: rgba(93,109,126,0.06); }

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* -----------------------------------------------------------
   KONTAKTSEITE
----------------------------------------------------------- */
.kontakt-page-wrapper {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.kontakt-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.kontakt-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.kontakt-form-block h2,
.kontakt-info-block h2 {
    margin-bottom: 10px;
}

.kontakt-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kontakt-form input,
.kontakt-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.kontakt-form input:focus,
.kontakt-form textarea:focus {
    border-color: #0066cc;
    outline: none;
}

.kontakt-btn {
    background: #0066cc;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.kontakt-btn:hover {
    background: #004c99;
}

@media (max-width: 900px) {
    .kontakt-page-grid {
        grid-template-columns: 1fr;
    }
}

body.kontakt-page {
    padding-top: 140px;
}

/* -----------------------------------------------------------
   TRUST
----------------------------------------------------------- */
.trust {
  padding: 3rem 1.5rem;
  text-align: center;
}

.trust-logos {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.trust-logos img {
  height: 55px;
  width: auto;
  object-fit: contain;
}

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */
.footer {
  background: #000;
  color: #fff;
  padding: 2.4rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-inner {
  max-width: 1400px; /* viel breiter für große Abstände */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
}

.footer h3,
.footer h4 {
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.footer a {
  display: block;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  margin-bottom: 0.3rem;
  transition: 0.2s ease;
}

.footer a:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .footer-right {
    text-align: center;
  }
}

/* -----------------------------------------------------------
   LIGHTBOX
----------------------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  font-size: 50px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* ============================================
   EPA BURGER – EDEL & ANIMIERT
   ============================================ */

.burger {
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: none;
  z-index: 10000;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--epa-accent);
  border-radius: 3px;
  transition: 0.35s ease;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }

.burger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

@media (max-width: 900px) {
  .burger {
    display: block;
  }
}

/* ============================================
   DESKTOP-NAVIGATION AUF HANDY VERSTECKEN
   ============================================ */

@media (max-width: 900px) {
  .header-right {
    display: none !important;
  }
}

/* ============================================
   UNIVERSAL MOBILE MENU – FÜR ALLE HANDYS KALIBRIERT
   ============================================ */

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;

  /* UNIVERSAL BREITE */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  /* SAFE AREA SUPPORT (iPhones) */
  padding-left: max(1.2rem, env(safe-area-inset-left));
  padding-right: max(1.2rem, env(safe-area-inset-right));
  padding-top: 1rem;
  padding-bottom: 1rem;

  background: #ffffff;
  color: #333;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);

  display: none;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 9999;
}

/* Aktiv */
.mobile-menu.active {
  display: flex;
}

/* Mobile Links */
.mobile-menu a {
  color: #444;
  font-size: 1rem;
  padding: 0.4rem 0;
}

/* Desktop: Mobile Menü aus */
@media (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ============================================
   ACCORDION – LEISTUNGEN MIT PFEIL
   ============================================ */

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  padding: 0.4rem 0;
}

.accordion-header .arrow {
  transition: transform 0.3s ease;
}

.accordion.open .arrow {
  transform: rotate(90deg);
}

.accordion-content {
  display: none;
  flex-direction: column;
  padding-left: 0.8rem;
  gap: 0.4rem;
}

.accordion.open .accordion-content {
  display: flex;
}

/* ============================================
   LIEBLINGSFARBEN BEIM HOVER (MOBILE)
   ============================================ */

.mobile-menu a.dd-statik:hover { color: #e67e22; }
.mobile-menu a.dd-cad:hover { color: #4caf50; }
.mobile-menu a.dd-bauleitung:hover { color: #bfa542; }
.mobile-menu a.dd-energie:hover { color: #2980b9; }
.mobile-menu a.dd-heizung:hover { color: #16a085; }
.mobile-menu a.dd-sanierung:hover { color: #5d6d7e; }


/* ============================================
   KOMPAKTER HEADER-TITEL (einzeilig, kleiner)
   ============================================ */

.site-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

/* Haupttitel kleiner */
.site-title-main {
  font-size: 1.05rem;
  white-space: nowrap; /* zwingt EINZEILIG */
}

/* Untertitel kleiner */
.site-title-sub {
  font-size: 0.72rem;
  white-space: nowrap; /* zwingt EINZEILIG */
}

/* Handy noch kompakter */
@media (max-width: 900px) {
  .site-title-main {
    font-size: 0.95rem;
  }
  .site-title-sub {
    font-size: 0.65rem;
  }
}

/* Sehr kleine Geräte (iPhone SE, ältere Androids) */
@media (max-width: 400px) {
  .site-title-main {
    font-size: 0.88rem;
  }
  .site-title-sub {
    font-size: 0.6rem;
  }
}


/* =========================================================
   EPA ENERGIE-CHECK – Apple-Style, edel, minimalistisch
   Komplett isoliert – KEINE Konflikte mit bestehendem CSS
   ========================================================= */

.energiecheck {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 3rem 1.5rem;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
  text-align: center;
}

.ec-container {
  max-width: 700px;
  margin: auto;
}

/* Titel */
.ec-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #777;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.ec-subtitle {
  font-size: 2.1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.6rem;
}

.ec-text {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 2.4rem;
}

/* Felder */
.ec-field {
  margin-bottom: 2rem;
  text-align: left;
}

.ec-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #333;
}

/* Auswahl-Buttons */
.ec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ec-options button {
  flex: 1;
  min-width: 120px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.25s ease;
}

.ec-options button:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.ec-options button.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Number Picker (Baujahr) */
.ec-number-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ec-number-picker button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fafafa;
  font-size: 1.4rem;
  cursor: pointer;
  transition: 0.25s ease;
}

.ec-number-picker button:hover {
  background: #f0f0f0;
}

.ec-number-picker .ec-value {
  font-size: 1.4rem;
  font-weight: 600;
  width: 80px;
  text-align: center;
}

/* Slider */
.ec-field input[type="range"] {
  width: 100%;
}

.ec-range-value {
  margin-top: 0.4rem;
  font-size: 1rem;
  color: #333;
}

/* Kontaktfelder */
.ec-field input[type="text"],
.ec-field input[type="tel"],
.ec-field input[type="email"] {
  width: 100%;
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  transition: 0.25s ease;
}

.ec-field input:focus {
  border-color: #000;
  outline: none;
}

/* Submit */
.ec-submit {
  width: 100%;
  padding: 1rem;
  border-radius: 14px;
  background: #000;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
  margin-top: 1rem;
}

.ec-submit:hover {
  background: #333;
}

/* =========================================================
   EPA ENERGIE-CHECK – Hintergrund mit transparentem E
   ========================================================= */

.energiecheck {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 4rem auto;
  padding: 3rem 1.5rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

/* Hintergrund-E */
.energiecheck::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/Bilder/logo.png") center/45% no-repeat;
  opacity: 0.20; /* sehr dezent */
  filter: blur(4px);
  z-index: 0;
}

/* Inhalt über dem Hintergrund */
.ec-container {
  position: relative;
  z-index: 2;
}


