:root {
  --color-bg: #f6f7fb;
  --color-bg-alt: #ffffff;
  --color-primary: #0c6b4f;   /* grünlich – anpassbar an dein Logo */
  --color-secondary: #1e88e5; /* blau – anpassbar */
  --color-text: #1c1f23;
  --color-muted: #6b7280;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --max-width: 1120px;
  --transition: 0.3s ease;
  --header-height: 140px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(246,247,251,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
}

.branding img {
  height: 120px;
  width: auto;
  border-radius: 8px;
}

.branding-text {
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 3.15rem;
  line-height: 1.2;  /* reduziert Grundabstand */
  display: flex;
  flex-direction: column;
}

.branding-text small {
  font-weight: 500;
  font-size: 1.4rem;
  margin-top: -4px;  /* feinsteuerbarer Abstand */
  margin-left: 0.3rem;
}

.branding-sub {
  font-size: 0.75rem;      /* sehr klein */
  color: var(--color-muted);
  margin-top: -1px;        /* enger an die Zeile darüber */
  margin-left: 0.3rem;     /* leicht eingerückt wie “Energiesysteme” */
  letter-spacing: 0.03em;  /* etwas feiner */
  opacity: 0.8;
}


/* NAVIGATION */
.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--color-muted);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width var(--transition);
}

.nav a:hover {
  color: var(--color-text);
}

.nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
}

/* HERO */
.hero {
  max-width: var(--max-width);
  margin: 2.5rem auto 1.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, #ffffff, #f0f5ff);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.7rem);
  margin: 0 0 1rem;
}

.hero p {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  max-height: 360px; /* oder jede gewünschte Höhe */
 
  height: 100%;
  object-fit: contain;

}

.hero-placeholder {
  width: 100%;
  min-height: 220px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.btn.primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(12,107,79,0.2);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(12,107,79,0.22);
}

.btn.secondary {
  background: #ffffff;
  color: var(--color-text);
  border-color: rgba(0,0,0,0.08);
}

.btn.secondary:hover {
  border-color: var(--color-secondary);
}

/* SECTIONS */
.section {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-alt {
  background: #f3f6fb;
}

.section-header {
  text-align: left;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
}

/* CARDS – horizontal, mobil; ab Desktop Grid */
.cards-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;                 /* horizontaler Scrollbalken bei Bedarf */
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.cards-grid::-webkit-scrollbar {
  height: 8px;
}

.cards-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}

.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.02);
  flex: 0 0 80%;               /* mobil = fast volle Breite */
  scroll-snap-align: start;
}

/* ÜBER UNS */
.section-content {
  max-width: 60ch;
}

.checks {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.checks li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
}

.section-alt {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 2rem;
}

/* Gewerbespeicher-Abschnitt NICHT als 2-Spalten-Grid, sondern vollbreit */
#gewerbespeicher.section-alt {
  display: block;
}

.info-box {
  background: #ffffff;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* GALLERY – Standard */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.gallery-item {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #e3f2fd, #f1f8e9);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}

.gallery-item small {
  display: block;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.gallery-note {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* GALLERY – Speziallayout für Abschnitt „Gewerbespeicher“ */
#gewerbespeicher .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Spalten auf Desktop */
  gap: 2rem;
  align-items: start;
}

#gewerbespeicher .gallery-item {
  padding: 1.5rem; /* etwas größer wirken lassen */
}

/* Bildgröße im Abschnitt „Gewerbespeicher“ begrenzen */
#gewerbespeicher .gallery-item img {
  max-width: 800px;      /* maximale Breite → nach Wunsch anpassen */
  width: 100%;           /* skaliert innerhalb des Rahmens */
  height: auto;          /* hält das Seitenverhältnis */
  object-fit: contain;   /* nichts wird abgeschnitten */
  display: block;
  margin: 0 auto 1rem;   /* zentriert das Bild + Abstand nach unten */
}

/* KONTAKT */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 0.6rem 0.7rem;
  font: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 1px rgba(30,136,229,0.2);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.checkbox a {
  color: var(--color-secondary);
  text-decoration: none;
}

.checkbox a:hover {
  text-decoration: underline;
}

.contact-info h3 {
  margin-top: 0;
}

.contact-info p {
  margin-bottom: 0.75rem;
}

/* FOOTER */
.footer {
  padding: 1.2rem 1.5rem 2rem;
  color: var(--color-muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer a {
  color: var(--color-muted);
  text-decoration: none;
}

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

/* SLIDER */
.slider {
  position: relative;
  width: 100%;
  height: 500px; /* gewünschte Höhe → kannst du anpassen */
  border-radius: var(--radius-lg);
  overflow: hidden; /* wichtig für saubere Kanten */
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* sorgt für perfekte, gleichmäßige Skalierung */
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slider img.active {
  opacity: 1;
}

/* Buttons */
.slider-controls {
  position: absolute;
  bottom: 15px;          /* Abstand vom Bild unten */
  left: 50%;             /* horizontale Mitte */
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.slider-controls button {
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 1.4rem;
}

.slider-controls button:hover {
  background: rgba(255,255,255,0.9);
}

.team-member img {
  max-width: 450px;   /* oder jede gewünschte Größe */
  height: auto;
  border-radius: 8px; /* optional */
}


/* RESPONSIVE */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-alt {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Gewerbespeicher-Gallery mobil einspaltig */
  #gewerbespeicher .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    background: rgba(246,247,251,0.98);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.2rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle {
    display: block;
  }
}

@media (min-width: 900px) {
  .card {
    flex: 0 0 calc(33.333% - 1rem); 
  }
}