/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== COLORS ===== */
:root {
  --primary: #0d1f3c;
  --primary-light: #1a3260;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --gold: #d4a017;
  --white: #ffffff;
  --light-bg: #f5f7fa;
  --dark-bg: #0b1a30;
  --text-dark: #222;
  --text-light: #666;
  --text-white: #fff;
  --border: #ddd;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ===== HEADER / NAVIGATION ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: background 0.3s;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-icon i {
  font-size: 28px;
  color: var(--primary);
}

.logo-text h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
}

.header-cta .btn {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* Mobile Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(135deg, rgba(13,31,60,0.85) 0%, rgba(13,31,60,0.7) 100%),
              url('https://images.unsplash.com/photo-1509391366360-2e959784a276?w=1600') center/cover no-repeat;
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(13,31,60,0.95) 0%, rgba(13,31,60,0.6) 60%, rgba(13,31,60,0.3) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 80px;
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero h2 span {
  color: var(--gold);
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 35px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ===== SECTION BASE ===== */
.section {
  padding: 80px 0;
}

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

.section-light {
  background: var(--light-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.section-dark .section-title h2 {
  color: var(--white);
}

.section-title p {
  font-size: 1.05rem;
  color: var(--text-light);
}

.section-dark .section-title p {
  color: rgba(255,255,255,0.7);
}

/* ===== SERVICES / LEISTUNGEN ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
}

.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid #eee;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  background: var(--light-bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e6ef;
}

.service-icon i {
  font-size: 36px;
  color: var(--primary);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== VORTEILE / ALLES AUS EINER HAND ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  text-align: center;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.benefit-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e6ef;
}

.benefit-icon i {
  font-size: 28px;
  color: var(--primary);
}

.benefit-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ===== REFERENZEN ===== */
.referenzen-section {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #162d50 100%);
  color: var(--white);
}

.referenzen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.referenz-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.referenz-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.referenz-card:hover img {
  transform: scale(1.08);
}

.referenz-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  transition: opacity 0.3s;
}

/* ===== CONTACT / CTA FORM ===== */
.cta-form-section {
  padding: 80px 0;
  background: var(--white);
}

.cta-form-section .section-title h2 {
  font-size: 2rem;
}

.contact-form {
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,31,60,0.1);
}

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

.contact-form .btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  margin-top: 8px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about .logo-text h1 {
  color: var(--white);
}

.footer-about p {
  color: rgba(255,255,255,0.7);
  margin-top: 15px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer ul li a:hover {
  color: var(--gold);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-contact li i {
  color: var(--gold);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: color 0.3s;
}

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

.footer-legal {
  display: flex;
  gap: 20px;
}

/* ===== PAGE HERO (Subpages) ===== */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, rgba(13,31,60,0.9) 0%, rgba(13,31,60,0.7) 100%),
              url('https://images.unsplash.com/photo-1509391366360-2e959784a276?w=1600') center/cover no-repeat;
  color: var(--white);
  text-align: center;
}

.page-hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* ===== LEISTUNGEN PAGE ===== */
.leistung-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 60px 0;
  border-bottom: 1px solid #eee;
}

.leistung-detail:last-child {
  border-bottom: none;
}

.leistung-detail.reverse {
  direction: rtl;
}

.leistung-detail.reverse > * {
  direction: ltr;
}

.leistung-detail-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.leistung-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leistung-detail-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.leistung-detail-content p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.8;
}

.leistung-detail-content ul {
  margin-bottom: 20px;
}

.leistung-detail-content ul li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-light);
}

.leistung-detail-content ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== PHOTOVOLTAIK PAGE ===== */
.pv-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.pv-intro-img {
  border-radius: 16px;
  overflow: hidden;
}

.pv-intro-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.pv-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.pv-step {
  position: relative;
}

.pv-step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.pv-step h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.pv-step p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ===== REFERENZEN PAGE ===== */
.referenzen-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.referenz-page-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.referenz-page-card:hover {
  transform: translateY(-5px);
}

.referenz-page-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.referenz-page-card-content {
  padding: 20px;
}

.referenz-page-card-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.referenz-page-card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ===== KONTAKT PAGE ===== */
.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.kontakt-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.kontakt-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.kontakt-info-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 12px;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kontakt-info-icon i {
  font-size: 20px;
  color: var(--primary);
}

.kontakt-info-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.kontakt-info-item p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.kontakt-form-box {
  background: var(--light-bg);
  padding: 40px;
  border-radius: 16px;
}

.kontakt-form-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 25px;
}

.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kontakt-form input,
.kontakt-form select,
.kontakt-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.3s;
}

.kontakt-form input:focus,
.kontakt-form select:focus,
.kontakt-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,31,60,0.1);
}

.kontakt-form textarea {
  min-height: 130px;
  resize: vertical;
}

.map-container {
  margin-top: 50px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 380px;
  border: none;
}

/* ===== SCROLL-TO-TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  border: none;
  box-shadow: 0 4px 15px rgba(192,57,43,0.4);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .referenzen-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .pv-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    gap: 20px;
    transition: right 0.3s;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero .container {
    padding-top: 40px;
    padding-bottom: 50px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .referenzen-grid {
    grid-template-columns: 1fr;
  }

  .leistung-detail {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .leistung-detail.reverse {
    direction: ltr;
  }

  .pv-intro {
    grid-template-columns: 1fr;
  }

  .pv-steps {
    grid-template-columns: 1fr;
  }

  .referenzen-page-grid {
    grid-template-columns: 1fr;
  }

  .kontakt-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .page-hero {
    padding: 130px 0 60px;
  }

  .page-hero h2 {
    font-size: 1.8rem;
  }

  .section {
    padding: 50px 0;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.6rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }
}
