/* --- Globale Stile & Variablen --- */
:root {
  --primary-color: #2e7d32; /* Dunkles Grün */
  --secondary-color: #66bb6a; /* Helles Grün */
  --accent-color: #ffca28; /* Gelb/Gold Akzent */
  --text-color: #333;
  --light-text-color: #fff;
  --bg-color: #f8f9fa;
  --section-bg-color: #ffffff;
  --footer-bg-color: #212529;
  --border-color: #dee2e6;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --font-main: "Roboto", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset für feste Navi */
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
  font-size: 16px; /* Basis Schriftgröße */
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.8rem;
}
h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
h3 {
  font-size: 1.6rem;
  color: var(--secondary-color);
}
h4 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--secondary-color);
}

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

ul {
  list-style: none; /* Entfernt Standard-Listenpunkte */
  padding-left: 0; /* Entfernt Standard-Einrückung */
}

/* --- Header / Hero Carousel --- */
.hero-carousel {
  position: relative;
  height: 85vh;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--light-text-color);
    z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  color: var(--light-text-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background-color: #ffd75a; /* Etwas hellerer Akzentton */
  color: var(--text-color);
  transform: translateY(-3px);
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.3);
  border: none;
  z-index: 3;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* --- Navigation --- */
.main-nav {
  background-color: var(--primary-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0 1.5rem;
}

.main-nav a {
  color: var(--light-text-color);
  font-weight: 400;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 5px; /* Platz für den Hover-Effekt */
  position: relative; /* Für den Hover-Effekt */
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  /* Optional: Klasse für aktiven Link */
  width: 100%;
}

/* --- Content Sections --- */
.content-section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: 40px auto;
  background-color: var(--section-bg-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0; /* Für Animation */
  transform: translateY(20px); /* Für Animation */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.leistungen-details ul {
  list-style: disc; /* Standard Listenpunkte */
  padding-left: 20px; /* Einrückung für Listenpunkte */
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.leistungen-details li {
  margin-bottom: 0.5rem;
}

/* --- Preisliste --- */
.preis-info {
  text-align: center;
  font-style: italic;
  margin-bottom: 2rem;
  color: #666;
}

.preis-kategorie {
  margin-bottom: 3rem;
}

.preis-kategorie h3 {
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.table-wrapper {
  overflow-x: auto; /* Ermöglicht horizontales Scrollen auf kleinen Geräten */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  text-align: left;
}

th {
  background-color: var(--secondary-color);
  color: var(--light-text-color);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--primary-color);
}

.preis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.preis-item {
  background-color: #fdfdfd;
  padding: 1.5rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.preis-item h4 {
  margin-bottom: 1rem;
}

.preis-item ul {
  padding-left: 0;
  list-style: none;
}

.preis-item li {
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}
.preis-item li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.hinweis {
  font-size: 0.9rem;
  color: #555;
  margin-top: 1rem;
  font-style: italic;
}

/* --- Galerie (Endless Scroller) --- */
.gallery-section {
  background-color: var(
    --primary-color
  ); /* Dunklerer Hintergrund für Kontrast */
  color: var(--light-text-color);
  padding: 60px 0; /* Volle Breite */
  max-width: none; /* Volle Breite erlauben */
  margin: 40px 0; /* Volle Breite, kein seitlicher Margin */
  border-radius: 0;
}

.gallery-section h2 {
  color: var(--light-text-color);
  text-align: center;
  margin-bottom: 1rem; /* Angepasst */
}
.gallery-section p {
  color: #e0e0e0;
  text-align: center;
  margin-bottom: 2rem; /* Angepasst */
  max-width: 600px; /* Text nicht zu breit machen */
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px; /* Innenabstand für Text auf schmalen Screens */
}

.gallery-container {
  width: 100%;
  overflow: hidden; /* Wichtig: Versteckt den überlaufenden Teil */
  position: relative; /* Für mögliche Overlays oder Steuerelemente */
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  ); /* Optional: Weiche Kanten */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.gallery-scroller {
  display: flex;
  width: fit-content; /* Breite passt sich dem Inhalt an */
  /* Animation definieren */
  animation: scrollGallery 30s linear infinite; /* Geschwindigkeit anpassen (30s) */
}

.gallery-scroller img {
  height: 250px; /* Feste Höhe für Konsistenz */
  width: auto; /* Breite automatisch anpassen */
  margin: 0 10px; /* Abstand zwischen Bildern */
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0; /* Verhindert, dass Bilder schrumpfen */
}

/* Mouse Hover pausiert die Animation */
.gallery-container:hover .gallery-scroller {
  animation-play-state: paused;
}

/* Keyframes für die Scroll-Animation */
@keyframes scrollGallery {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Verschiebt um die Hälfte der Gesamtbreite (da Bilder verdoppelt sind) */
    transform: translateX(-50%);
  }
}

/* --- Kontakt & Impressum --- */
.kontakt-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.kontakt-info,
.kontakt-details {
  flex-basis: calc(50% - 1rem); /* Zwei Spalten mit Lücke */
  min-width: 280px; /* Mindestbreite für kleinere Screens */
}

.kontakt-info h3,
.kontakt-details h3 {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

.kontakt-info strong,
.kontakt-details strong {
  color: var(--primary-color);
}

.kontakt-info a {
  word-break: break-all; /* Verhindert Überlaufen langer Mailadressen */
}

/* --- Footer --- */
footer {
  background-color: var(--footer-bg-color);
  color: var(--light-text-color);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 40px;
  font-size: 0.9rem;
}

/* --- Animationen --- */
.fade-in {
  animation: fadeInAnimation 1s ease-in forwards;
}

@keyframes fadeInAnimation {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- Modal (Image Lightbox) --- */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1001; /* Sit on top */
  padding-top: 60px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform: scale(0)}
  to {transform: scale(1)}
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* --- Responsivität --- */
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero-content h1 {
    font-size: 3rem;
  }
  .hero-content p {
    font-size: 1.3rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }

  .content-section {
    padding: 40px 15px;
    margin: 30px auto;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  } /* Navbar Höhe anpassen */

  .hero {
    height: 70vh;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.2rem;
  }
  .cta-button {
    padding: 10px 25px;
    font-size: 1rem;
  }

  .main-nav {
    padding: 0.8rem 0;
  }
  .main-nav ul {
    justify-content: space-around;
  } /* Bessere Verteilung */
  .main-nav li {
    margin: 0 0.5rem;
  } /* Weniger Abstand */
  .main-nav a {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  h3 {
    font-size: 1.4rem;
  }

  .preis-grid {
    grid-template-columns: 1fr; /* Nur eine Spalte */
    gap: 1.5rem;
  }

  .kontakt-flex-container {
    flex-direction: column; /* Untereinander anordnen */
    gap: 1.5rem;
  }
  .kontakt-info,
  .kontakt-details {
    flex-basis: 100%; /* Volle Breite */
  }

  .gallery-scroller img {
    height: 200px; /* Kleinere Bilder auf Mobilgeräten */
  }
  @keyframes scrollGallery {
    /* Evtl. langsamere Animation für mobil */
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }

  /* Tabellen auf kleinen Screens scrollbar machen */
  td:last-child {
    min-width: 80px; /* Sicherstellen, dass Preisspalte genug Platz hat */
  }
}

@media (max-width: 576px) {
  .hero {
    height: 60vh;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }

  .main-nav {
    /* Evtl. Umbau zu Burger-Menü hier nötig, aktuell vereinfacht */
    padding: 0.5rem 0;
  }
  .main-nav li {
    margin: 0 0.3rem;
  }
  .main-nav a {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
  }

  th,
  td {
    padding: 8px 10px; /* Weniger Padding in Tabellen */
    font-size: 0.9rem;
  }

  .gallery-scroller img {
    height: 160px;
  }
}
