/* =============================================
   RÜHLE BAD & HEIZUNG - CI Design System
   Farbschema: Grau-Rot (wie altes Briefkopf-Design)
   ============================================= */

/* Schriften lokal eingebunden – KEIN Aufruf an Google Fonts.
   Die Dateien liegen in /fonts/inter/ (5 Schnitte, latin-Subset). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter/inter-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter/inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter/inter-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter/inter-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* CSS-Variablen (CI-Design) */
:root {
  /* CI-Design Farben */
  --rot: #c0392b;           /* Hauptrot */
  --rot-dunkel: #a93226;    /* Dunkleres Rot */
  --rot-hell: #e74c3c;      /* Helles Rot */
  --grau: #666666;          /* Mittelgrau */
  --grau-dunkel: #333333;   /* Dunkelgrau */
  --grau-hell: #f5f5f5;     /* Helles Grau (Hintergrund) */
  --grau-karte: #f8f9fa;    /* Karten-Hintergrund */
  --weiss: #ffffff;         /* Weiß */
  --schwarz: #1a1a1a;       /* Fast Schwarz */
  --grau-linie: #d0d0d0;    /* Trennlinien */
  
  /* Textfarben */
  --text-haupt: #333333;    /* Haupttext */
  --text-neben: #666666;    /* Nebentext */
  --text-hell: #999999;     /* Heller Text */
  --text-weiss: #ffffff;    /* Weißer Text */
  
  /* Schriften */
  --font-haupt: 'Inter', 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Ränder */
  --radius-klein: 4px;
  --radius-mittel: 8px;
  --radius-gross: 12px;
  
  /* Schatten */
  --schatten-leicht: 0 2px 8px rgba(0,0,0,0.08);
  --schatten-mittel: 0 4px 16px rgba(0,0,0,0.12);
  --schatten-stark: 0 8px 32px rgba(0,0,0,0.16);
}

/* =============================================
   RESET & GRUNDLAGEN
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-haupt);
  color: var(--text-haupt);
  background-color: var(--weiss);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rot);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--rot-dunkel);
}

/* =============================================
   TYPOGRAPHIE
   ============================================= */

h1, h2, h3, h4, h5, h6 {
  color: var(--schwarz);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

/* =============================================
   CONTAINER
   ============================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* =============================================
   HEADER
   ============================================= */

.header {
  background-color: var(--weiss);
  box-shadow: var(--schatten-leicht);
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: var(--spacing-sm) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.logo-image {
  height: 85px;
  width: auto;
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
  position: relative;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--spacing-sm);
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Dropdown für Unterpunkte */
.nav-list li {
  position: relative;
}

.nav-list li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--weiss);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-mittel);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 220px;
  z-index: 100;
}

.nav-list li:hover > ul,
.nav-list li:focus-within > ul {
  display: block;
}

.nav-list li > ul li a {
  display: block;
  padding: 0.5rem 1.2rem;
  color: var(--text-haupt);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-list li > ul li a:hover {
  color: var(--rot);
  background-color: var(--grau-hell);
}

.nav-link {
  color: var(--text-haupt);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-klein);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--rot);
  background-color: var(--grau-hell);
}

.nav-link.active {
  color: var(--rot);
  font-weight: 600;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn-cta {
  display: inline-block;
  background-color: var(--rot);
  color: var(--weiss);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-mittel);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.btn-cta:hover {
  background-color: var(--rot-dunkel);
  color: var(--weiss);
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: var(--weiss);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-mittel);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--weiss);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: var(--weiss);
  color: var(--rot);
}

.btn-submit {
  display: inline-block;
  background-color: var(--rot);
  color: var(--weiss);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-mittel);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-submit:hover {
  background-color: var(--rot-dunkel);
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
  background-color: var(--grau-dunkel);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: var(--spacing-xl) 0;
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
}

/* Über-uns-Hero: Bild etwas nach unten verschieben, damit die Köpfe sichtbar sind */
.page-id-9 .hero-image {
  background-position: center 25%;
}

/* Karriere-Hero: Bild etwas nach unten verschieben, damit die Köpfe sichtbar sind */
.page-id-45 .hero-image {
  background-position: center 25%;
}

/* Hero-Hintergrundbild – pro Seite per CSS-Variable gesetzt (--hero-img) */
.hero-image {
  background-image: var(--hero-img);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(51,51,51,0.65) 0%, rgba(51,51,51,0.35) 100%);
  z-index: 1;
}

/* Hero mit Hintergrund-Video (wie Startseite) */
.hero-video {
  overflow: hidden;
  background-image: url('../images/hero/hero-heizung-header.webp');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}

/* Startseiten-Video: Header so hoch, dass das Filmbild nicht beschnitten wird
   (Gesichter der Familie und Klimaanlage bleiben sichtbar). */
@media (min-width: 1025px) {
  .hero-video {
    min-height: min(88vh, 48vw);
  }
}

.hero-video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bild nach oben: oberer Filminhalt (Gesichter, Klimagerät) liegt über dem Text */
  object-position: 50% 3%;
  z-index: 0;
}

.hero-video .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(51,51,51,0.55) 0%, rgba(51,51,51,0.30) 60%, rgba(51,51,51,0.10) 100%);
  z-index: 1;
}

.hero-video .hero-content {
  position: relative;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 800px;
}

.hero-content h1 {
  color: var(--weiss);
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
}

.hero-subline {
  font-size: 1.15rem;
  max-width: 48rem;
}

/* =============================================
   HERO BADGE
   ============================================= */

.hero-badge {
  display: inline-block;
  background-color: var(--rot);
  color: var(--weiss);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-klein);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-sm);
}

/* =============================================
   HERO FEATURES
   ============================================= */

.hero-features {
  list-style: none;
  margin-bottom: var(--spacing-md);
}

.hero-features li {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.hero-features li::before {
  content: "✓";
  color: var(--rot);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* =============================================
   HERO BUTTONS
   ============================================= */

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* =============================================
   HERO RATING
   ============================================= */

.hero-rating-link {
  display: inline-flex;
  text-decoration: none;
  margin-top: var(--spacing-md);
}

.hero-rating-link:hover .rating-text {
  text-decoration: underline;
}

/* Wärmepumpen-Check Sektion */
.wp-check-section {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--grau-mittel);
}

.wp-check-section .heizreport {
  margin-top: var(--spacing-md);
}

/* Förderung Beispiel-Box */
.foerderung-beispiel {
  background: rgba(255,255,255,0.15);
  border-left: 4px solid var(--weiss);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-klein);
  color: var(--weiss);
  font-size: 1rem;
  line-height: 1.5;
}

/* Heizreport-Rechner (Wärmepumpen-Check & Förderrechner): Schriftgröße anpassen */
#wp_check_script.heizreport,
#heizreport-foerderrechner {
  font-size: 0.95rem;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

#wp_check_script.heizreport h1,
#wp_check_script.heizreport h2,
#wp_check_script.heizreport h3,
#heizreport-foerderrechner h1,
#heizreport-foerderrechner h2,
#heizreport-foerderrechner h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0;
}

#wp_check_script.heizreport p,
#wp_check_script.heizreport li,
#heizreport-foerderrechner p,
#heizreport-foerderrechner li {
  font-size: 0.95rem;
  line-height: 1.5;
}

#wp_check_script.heizreport input,
#wp_check_script.heizreport select,
#wp_check_script.heizreport button,
#heizreport-foerderrechner input,
#heizreport-foerderrechner select,
#heizreport-foerderrechner button {
  font-size: 0.9rem;
}

/* Heizreport-Rechner: keine Elemente über den Header ragen lassen */
#wp_check_script.heizreport,
#wp_check_script.heizreport *,
#heizreport-foerderrechner,
#heizreport-foerderrechner * {
  z-index: 1 !important;
  position: relative;
}

#wp_check_script.heizreport,
#heizreport-foerderrechner {
  overflow: visible;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: 0;
}

.rating-stars {
  position: relative;
  display: inline-block;
  font-size: 1.3rem;
  line-height: 1;
  color: #d0d0d0;
}

/* Basis: 5 graue Sterne */
.rating-stars-bg {
  display: flex;
  gap: 0.15rem;
}

/* Gold-Füllung: teilgefüllt über Breite gesteuert */
.rating-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  display: flex;
  gap: 0.15rem;
  color: #ffc107;
  white-space: nowrap;
}

.star-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.star-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rating-text {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}

.rating-text strong {
  color: var(--weiss);
}

/* =============================================
   SECTION
   ============================================= */

.section {
  padding: var(--spacing-lg) 0;
}

.section-bg-gray {
  background-color: var(--grau-hell);
}

.section-bg-dark {
  background-color: var(--schwarz);
  color: var(--weiss);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-label {
  display: inline-block;
  color: var(--rot);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-sm);
}

.section-title {
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  color: var(--text-neben);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* =============================================
   TWO COLUMNS
   ============================================= */

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

/* =============================================
   CARDS GRID
   ============================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

/* Abstand nach den Karten-Kacheln, damit es nicht gequetscht wirkt */
.page-content .cards-grid,
.content-area .cards-grid {
  margin-bottom: var(--spacing-lg);
}

/* =============================================
   FOTO-BAND (Karriereseite, Variante A)
   Drei Motive nebeneinander, einheitlich 3:2
   (Quellbilder vorab exakt auf 3:2 zugeschnitten)
   ============================================= */

.foto-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.foto-band-item {
  margin: 0;
}

.foto-band-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
  background-color: var(--grau-hell);
}

.foto-band-item figcaption {
  margin-top: 0.6rem;
  color: var(--text-neben);
  font-size: 0.9rem;
  line-height: 1.4;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

/* Geschaeftsfuehrung: zwei breite Karten */
.team-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
}

/* Ansprechpartner: mind. 300px pro Karte, damit jede E-Mail-Adresse einzeilig sitzt */
.team-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.team-grid .card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.team-grid .team-role {
  color: var(--rot);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card {
  background-color: var(--weiss);
  border-radius: var(--radius-gross);
  padding: var(--spacing-md);
  box-shadow: var(--schatten-leicht);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--schatten-mittel);
}

/* Ganze Leistungskarte als Link (Startseite) */
.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-link:focus-visible {
  outline: 3px solid var(--rot);
  outline-offset: 3px;
}

.card-link .card-tags {
  margin-top: auto;
  min-height: 4rem;              /* Platz fuer zwei Etikettenzeilen */
  align-content: flex-start;     /* erste Zeile sitzt oben -> in allen Karten buendig */
}

.card-link .card-more {
  padding-top: var(--spacing-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--rot);
  font-weight: 700;
  font-size: 0.9rem;
}

.card-link:hover h3 {
  color: var(--rot);
}

.card-link:hover .card-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--grau-hell);
  border-radius: 50%;
  padding: 1rem;
}

.card-icon .svg-icon {
  width: 32px;
  height: 32px;
  color: var(--rot);
  display: block;
}

.card-icon .svg-icon-lucide {
  width: 32px;
  height: 32px;
  color: var(--rot);
  margin-right: 0;
}

.svg-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  color: var(--rot);
}

.footer-social .svg-icon {
  width: 24px;
  height: 24px;
  color: var(--text-hell);
  transition: color 0.2s ease;
}

.footer-social .svg-icon:hover {
  color: var(--rot);
}

.cta-phone .svg-icon {
  width: 20px;
  height: 20px;
  color: var(--weiss);
  margin-right: 0.5rem;
}

.rating-stars .svg-icon {
  width: 1.2em;
  height: 1.2em;
  color: #ffc107;
  display: inline-block;
}

.card h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--schwarz);
}

.card p {
  color: var(--text-neben);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  display: inline-block;
  background-color: var(--grau-hell);
  color: var(--text-neben);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-klein);
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-rot {
  background-color: var(--rot);
  color: var(--weiss);
}

/* =============================================
   PARTNER LOGOS
   ============================================= */

.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  padding: var(--spacing-md) 0;
}

.partner-logo-item {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.partner-logo-item:hover {
  opacity: 1;
}

/* Kompakter Partner-Block (Heizung/Waermepumpe):
   flachere graue Flaeche, weniger Abstand zwischen Ueberschrift und Logo */
.partner-compact {
  padding: var(--spacing-md) 0;
}

.partner-compact .section-header {
  margin-bottom: var(--spacing-sm);
}

.partner-compact .partner-logos {
  padding: 0;
}

/* =============================================
   FEATURE LIST
   ============================================= */

.feature-list {
  list-style: none;
  margin-bottom: var(--spacing-md);
}

.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-haupt);
}

.feature-list li::before {
  content: "✓";
  color: var(--rot);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* =============================================
   PROCESS TIMELINE
   ============================================= */

.process-timeline {
  position: relative;
  padding-left: 2rem;
}

.process-timeline::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--rot);
}

.process-step {
  position: relative;
  padding-bottom: var(--spacing-lg);
}

.process-step:last-child {
  padding-bottom: 0;
}

.process-number {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 3rem;
  height: 3rem;
  background-color: var(--rot);
  color: var(--weiss);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  z-index: 1;
}

.process-content {
  padding-left: var(--spacing-md);
}

.process-content h3 {
  margin-bottom: var(--spacing-xs);
}

.process-content p {
  color: var(--text-neben);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

/* =============================================
   FAQ
   ============================================= */

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--grau-linie);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-haupt);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--schwarz);
  text-align: left;
}

.faq-toggle {
  font-size: 1.5rem;
  color: var(--rot);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding-bottom: var(--spacing-md);
  color: var(--text-neben);
  font-size: 0.95rem;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* =============================================
   CTA SECTION
   ============================================= */

.cta-section {
  background-color: var(--rot);
  color: var(--weiss);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--weiss);
  margin-bottom: var(--spacing-sm);
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

/* CTA-Buttons zentrieren (Button + Telefon + E-Mail in einer mittigen Zeile) */
.cta-section .hero-buttons {
  justify-content: center;
  flex-wrap: wrap;
}

.cta-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--weiss);
  font-weight: 600;
  font-size: 1.1rem;
}

.cta-phone:hover {
  color: var(--weiss);
}

/* =============================================
   FORM
   ============================================= */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--schwarz);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--grau-linie);
  border-radius: var(--radius-klein);
  font-family: var(--font-haupt);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rot);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Contact Form 7 (Kontaktseite) – Felder und Senden-Button im CI */
.wpcf7-form p {
  margin-bottom: var(--spacing-sm);
}

.wpcf7-form label {
  display: block;
  font-weight: 600;
  color: var(--schwarz);
}

.wpcf7-form .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.35rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--grau-linie);
  border-radius: var(--radius-klein);
  background-color: var(--weiss);
  color: var(--schwarz);
  font-family: var(--font-haupt);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--rot);
}

.wpcf7-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Senden-Button: CI-Rot statt Browser-Grau */
.wpcf7-form input[type="submit"],
.wpcf7-form button[type="submit"],
.wpcf7-submit {
  display: inline-block;
  width: auto;
  min-width: 240px;
  padding: 0.95rem 2rem;
  border: none;
  border-radius: var(--radius-klein);
  background-color: var(--rot);
  color: var(--weiss);
  font-family: var(--font-haupt);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form button[type="submit"]:hover,
.wpcf7-submit:hover {
  background-color: var(--rot-dunkel);
  color: var(--weiss);
}

.wpcf7-form input[type="submit"]:focus-visible,
.wpcf7-submit:focus-visible {
  outline: 3px solid var(--rot-hell);
  outline-offset: 2px;
}

/* Meldungen des Formulars (Erfolg / Fehler / Pflichtfeld) */
.wpcf7-form .wpcf7-response-output {
  margin-top: var(--spacing-sm);
  padding: 0.85rem 1rem;
  border: 1px solid var(--grau-linie);
  border-radius: var(--radius-klein);
  background-color: var(--grau-hell);
  font-size: 0.95rem;
}

.wpcf7-form .wpcf7-not-valid-tip {
  margin-top: 0.35rem;
  color: var(--rot);
  font-size: 0.9rem;
}

.wpcf7-form .wpcf7-spinner {
  margin-left: 0.5rem;
}

/* =============================================
   TIMELINE
   ============================================= */

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--rot);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-lg);
  padding-left: 5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-year {
  position: absolute;
  left: 0;
  top: 0;
  width: 4rem;
  height: 4rem;
  background-color: var(--rot);
  color: var(--weiss);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
  z-index: 1;
}

.timeline-content {
  padding-left: var(--spacing-sm);
}

.timeline-content p {
  color: var(--text-neben);
  font-size: 0.95rem;
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background-color: #e0e0e0;
  color: var(--schwarz);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-left: auto;
  white-space: nowrap;
}

.header-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-badge-image {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Kompakter "Jetzt beraten" Button im Header */
.btn-cta--header {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .header-badge {
    display: none;
  }
}

.footer-logos {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  width: 100%;
}

.footer-logo-box {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.footer-logo-box img {
  display: block;
  max-height: 61px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
}

.footer-logo-box--sm img {
  max-height: 43px;
  max-width: 108px;
}

.footer-contact-line {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.footer-logo-box--badge img {
  max-height: 30px;
  max-width: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--spacing-lg);
}

.footer h3, .footer h4 {
  color: var(--schwarz);
  margin-bottom: var(--spacing-sm);
}

.footer p {
  color: var(--schwarz);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer a {
  color: var(--schwarz);
}

.footer a:hover {
  color: var(--rot);
}

/* Jobboard-Einbettung (CatchTalents) */
.jobboard-wrapper {
  background: var(--weiss);
  border-radius: var(--radius-mittel);
  box-shadow: var(--schatten-mittel);
  overflow: hidden;
  margin-top: var(--spacing-md);
}

.jobboard-wrapper iframe {
  display: block;
  border: none;
  min-height: 600px;
}

/* Lucide-Icons (SVG) – einheitliche Größe */
.svg-icon-lucide {
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
  margin-right: 0.4rem;
  flex-shrink: 0;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}

.footer-list li {
  margin-bottom: var(--spacing-xs);
  display: block;
}

.footer-list a {
  color: var(--schwarz);
  font-size: 0.9rem;
}

.footer-list a:hover {
  color: var(--rot);
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.footer-social a {
  width: 36px;
  height: 36px;
  background-color: rgba(0,0,0,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--schwarz);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.footer-social a:hover {
  background-color: var(--rot);
  color: var(--weiss);
}

.footer-bottom {
  max-width: 1200px;
  margin: var(--spacing-md) auto 0;
  padding: var(--spacing-sm) var(--spacing-md) 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: var(--schwarz);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--schwarz);
  font-size: 0.85rem;
  margin-left: var(--spacing-sm);
}

.vaillant-logo {
  height: 40px;
  width: auto;
}

/* =============================================
   RESPONSIVE
   ============================================= */
/* Hinweis: Die Mobile-Media-Query steht am Ende der Datei,
   damit sie die Basis-Regeln (.mobile-menu-toggle etc.) korrekt überschreibt. */

/* =============================================
   MOBILE MENU TOGGLE
   ============================================= */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--schwarz);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* =============================================
   MOBILE RESPONSIVE (am Ende, damit es die Basis-Regeln überschreibt)
   ============================================= */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  /* Auf Mobile: komplettes Nav verstecken (Menüpunkte + Button + Badge) */
  .nav {
    display: none;
  }
  
  /* Burger-Menü anzeigen */
  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;   /* Burger an den rechten Rand (Header ist flex-start) */
  }
  
  /* Logo auf Mobile kleiner, damit es proportional wirkt */
  .logo-image {
    height: 50px;
  }
  
  /* Geöffnetes Menü als Dropdown unter dem Header */
  .nav.active {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--weiss);
    padding: var(--spacing-md);
    box-shadow: var(--schatten-mittel);
    z-index: 1000;
    gap: var(--spacing-sm);
  }
  
  /* Menüliste im Dropdown: vertikal, volle Breite */
  .nav.active .nav-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  .nav.active .nav-list li {
    width: 100%;
  }
  
  .nav.active .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--grau-linie);
  }
  
  /* Untermenü im Mobile-Dropdown */
  .nav.active .nav-list li > ul {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0 0 0 var(--spacing-md);
    min-width: 0;
  }
  
  .nav.active .nav-list li > ul li a {
    padding: 0.5rem 0;
  }
  
  /* Button + Badge im Dropdown unten anzeigen */
  .nav.active .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    margin-left: 0;
    margin-top: var(--spacing-md);
    white-space: normal;
  }
  
  .nav.active .header-badge {
    display: flex;
    justify-content: center;
  }
  
  .nav.active .btn-cta--header {
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .two-columns {
    grid-template-columns: 1fr;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Kontaktkarten auf dem Handy untereinander */
  .team-grid,
  .team-grid-2,
  .team-grid-3 {
    grid-template-columns: 1fr;
  }

  /* Foto-Band: auf dem Handy untereinander */
  .foto-band {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .process-timeline {
    padding-left: 1rem;
  }
  
  .process-number {
    left: -1rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  /* Zeitleiste Firmengeschichte: kleinere Kreise, Text muss hineinpassen */
  .timeline::before {
    left: 1.75rem;
  }

  .timeline-item {
    padding-left: 4.5rem;
  }

  .timeline-year {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 0.78rem;
  }
}

/* ===== HANDY/TABLET: eigene Hochformat-Hero-Bilder =====
   Steht bewusst am Dateiende, damit die Regeln alle vorherigen
   .hero-image-/.hero-video-Regeln ueberschreiben. */
@media (max-width: 768px) {
  .hero-image {
    background-image: var(--hero-img-m, var(--hero-img));
  }
  .hero-video {
    background-image: url('../images/hero/hero-startseite-mobil.webp');
    background-position: center center;
  }
  /* Hero auf dem Handy kuerzer -> Hintergrundbild wirkt deutlich groesser */
  .hero {
    padding-top: 7rem;
    padding-bottom: var(--spacing-lg);
    min-height: 520px;
  }
}

/* ===== HANDY: USP-LISTE UNTER DEM HERO =====
   Wird auf dem Handy per JS aus dem Hero herausgezogen (main.js Abschnitt 8),
   damit das Hero-Bild nicht durch die lange Liste in die Hoehe gedrueckt wird. */
.hero-usp {
  background-color: var(--grau-hell);
  border-top: 3px solid var(--rot);
  padding: var(--spacing-md) 0;
}

.hero-usp .hero-features {
  margin: 0;
  padding: 0;
}

.hero-usp .hero-features li {
  color: var(--text-haupt);
  font-size: 1rem;
  padding: 0.45rem 0 0.45rem 1.6rem;
  border-bottom: 1px solid var(--grau-linie);
}

.hero-usp .hero-features li:last-child {
  border-bottom: none;
}

.hero-usp .hero-features li::before {
  color: var(--rot);
}

/* ===== VORHER / NACHHER SLIDER (Bad-Seite) =====
   Aufbau: "Nachher"-Bild als Basis, darueber das "Vorher"-Bild in
   .ba-layer, das per clip-path auf die linke Seite beschnitten wird.
   Gesteuert wird alles ueber die CSS-Variable --pos (0-100 %). */
.ba-slider {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-gross);
  overflow: hidden;
  background-color: var(--grau-dunkel);
  box-shadow: var(--schatten-mittel);
  cursor: ew-resize;
  touch-action: pan-y;              /* senkrechtes Scrollen bleibt moeglich */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ba-slider .ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-slider .ba-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.ba-label {
  position: absolute;
  top: var(--spacing-sm);
  z-index: 4;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-klein);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-weiss);
  background-color: rgba(51, 51, 51, 0.78);
  pointer-events: none;
}

.ba-label-vorher { left: var(--spacing-sm); }

.ba-label-nachher {
  right: var(--spacing-sm);
  background-color: var(--rot);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 0;
  z-index: 5;
  outline: none;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  width: 4px;
  background-color: var(--weiss);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

.ba-handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--weiss);
  color: var(--grau-dunkel);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}

.ba-slider:hover .ba-handle-grip {
  transform: translate(-50%, -50%) scale(1.06);
}

.ba-handle:focus-visible .ba-handle-grip {
  outline: 3px solid var(--rot);
  outline-offset: 3px;
}

.ba-slider.is-dragging .ba-handle-grip {
  transform: translate(-50%, -50%) scale(1.1);
}

.ba-hinweis {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-neben);
  text-align: center;
}

@media (max-width: 768px) {
  .ba-slider {
    border-radius: var(--radius-mittel);
  }

  .ba-label {
    top: 0.6rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .ba-label-vorher { left: 0.6rem; }
  .ba-label-nachher { right: 0.6rem; }

  .ba-handle-grip {
    width: 46px;
    height: 46px;
  }
}

/* Bei reduzierter Bewegung: kein Dauerlauf, Regler bleibt bedienbar */
@media (prefers-reduced-motion: reduce) {
  .ba-handle-grip { transition: none; }
}


/* Impressum + Datenschutz: helles Bildmotiv -> staerkeres Overlay fuer Textkontrast
   (gemessen: hellste Stellen lagen sonst unter 3:1) */
.page-id-11 .hero::before,
.page-id-12 .hero::before {
  background: linear-gradient(135deg, rgba(51, 51, 51, 0.78) 0%, rgba(51, 51, 51, 0.58) 100%);
}


/* =============================================
   KONTAKT-KARTE (statische Karte, OpenStreetMap-Kacheln, lokal gehostet)
   Bewusst kein Google-Maps-iframe: es wird nichts an Dritte uebertragen,
   solange der Besucher nicht selbst den Route-Link anklickt.
   ============================================= */
.kontakt-karte {
  margin: 0.5rem 0 0;
}

.kontakt-karte-titel {
  margin: 2.25rem 0 0.5rem;
}

.kontakt-karte img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--grau-hell);
  border-radius: var(--radius-mittel);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
}

.kontakt-karte a:hover img,
.kontakt-karte a:focus-visible img {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.kontakt-karte figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--grau);
  line-height: 1.45;
}

.kontakt-karte-links {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.kontakt-karte-links a {
  font-weight: 600;
}

.kontakt-karte-links span {
  margin: 0 0.4rem;
  color: var(--grau);
}

/* =============================================
   TABLET/LAPTOP 769-1210 px
   Ohne diese Regeln schiebt die Kopfzeile das Dokument seitlich raus:
   gemessen nav 817 px (769-900 px), Header 881 px, Dokument scrollWidth 974 px.
   Ab 1025 px kommt das Header-Badge (144 px) dazu -> Ueberlauf bis ~1210 px.
   Loesung: Navigation enger stellen (Gaps + Innenabstand, nicht Schriftgroesse
   allein) und die Fussleiste zweispaltig. Ab 769 px bleibt alles wie bisher,
   unter 769 px greift das Handy-Menue (eigener Block weiter oben).
   ============================================= */
@media (max-width: 1210px) and (min-width: 769px) {
  .nav-list {
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.5rem 0.45rem;
    font-size: 0.88rem;
  }

  .btn-cta--header {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
  }
}

/* ===== KARTENRASTER 769-1024 px: Karten und Fussleiste ohne Querscrollen ===== */
@media (max-width: 1024px) and (min-width: 769px) {
  .cards-grid { gap: var(--spacing-sm); }
  .card { padding: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }
}
