﻿/* home.css */
#home_section {
  margin-top: 0;
  padding: 0;
  background: none;
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

/* Section-Überschriften mit rotem Unterstrich (60% Breite, zentriert) */
.section-title {
  position: relative;
  display: table; /* behält Textbreite + erlaubt Zentrierung */
  margin: 0 auto 0.75rem; /* zentriert die Überschrift */
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 61.8%; /* goldener Schnitt der Textbreite */
  height: 3px;
  background-color: #e63946;
  border-radius: 99px;
  transform: translateX(-50%); /* <<< exakt mittig */
}

/* =====================================
   Brand Button (ROT)
   ===================================== */
.btn.btn-brand {
  background-color: #e63946;
  color: #ffffff;
  border-color: #e63946;
}

.btn.btn-brand:hover,
.btn.btn-brand:focus {
  background-color: #c92f3b;
  border-color: #c92f3b;
  color: #ffffff;
}

#kfw_section i {
  color: #e63946;
}

/* =====================================
   HERO SLIDER (Bootstrap Carousel)
   ===================================== */
.hero-carousel {
  width: 100%;
  position: relative;
  z-index: 100;
}

#heroCarousel .carousel-caption {
  pointer-events: none;
}

#heroCarousel .carousel-caption a,
#heroCarousel .carousel-caption button {
  pointer-events: auto;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  z-index: 10;
}

/* Das eigentliche Slide als Background-Container */
.hero-slide {
  width: 100%;
  height: 61.8vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Dunkles Overlay wie vorher */
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* =====================================
   HERO TEXT ZENTRIERUNG (FINAL)
   ===================================== */
.hero-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; /* <-- DAS ist entscheidend */
  bottom: auto !important; /* Bootstrap-Default überschreiben */
  right: auto !important;
  left: 50% !important;
  width: 100%;
  max-width: 900px;
  padding: 0 1rem;
  z-index: 2;
}

/* Text-Styles (du kannst das anpassen) */
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.55rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* Indicators (Punkte) – bleiben mittig */
.carousel-indicators {
  margin-bottom: 1.25rem;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .hero-slide {
    height: 25vh;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Zeilenlänge in Solar/Balkon begrenzen (optimale Lesbarkeit ~65ch) */
@media (min-width: 992px) {
  #solar_section .col-lg-7 > p,
  #balcony_solar_section .col-lg-7 > p {
    max-width: 60ch;
  }
}

/* Mehr Luft für die erste und letzte schwere Section (py-5 × φ ≈ 4.85rem) */
@media (min-width: 992px) {
  #company_section,
  #contact_section {
    padding-top: 4.85rem;
    padding-bottom: 4.85rem;
  }
}

/* Mobile: Texte in Company/Solar/Balkon-Abschnitten zentrieren */
@media (max-width: 991.98px) {
  #company_section p,
  #company_section h3,
  #solar_section p,
  #solar_section h3,
  #balcony_solar_section p,
  #balcony_solar_section h3 {
    text-align: center;
  }

}

