html {
  background-color: #9b8f97;
}

/* 1. ALLGEMEINE STYLES & DESKTOP (PC) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #222;
  background: #61942f;
  line-height: 1.6;
}

section {
  padding: 80px 10%;
}

/* EINHEITLICHE ÜBERSCHRIFTEN FÜR SEKTIONEN */
.leistungen h2, 
.maschinen h2 {
  text-align: center;
  font-size: 2.6rem;
  color: #004d22;         /* Dein kräftiges Dunkelgrün */
  margin-bottom: 50px;
  position: relative;
  display: block;
  font-weight: 800;
}

/* Die grüne Linie unter den Überschriften */
.leistungen h2::after,
.maschinen h2::after {
  content: "";
  display: block;
  width: 80px;            /* Breite der Linie */
  height: 4px;            /* Dicke der Linie */
  background: #61942f;    /* Dein helleres Apfelgrün */
  margin: 15px auto 0;    /* Zentriert die Linie unter dem Text */
  border-radius: 2px;
}

/* HERO DESKTOP */
.hero {
  position: relative;
  height: 95vh;
  /* Verlauf und Bild kombiniert */
  background: 
    linear-gradient(to bottom, rgba(97, 148, 47, 0) 85%, #61942f 100%),
    url("../bilder/Eurocomag Bagger GGhuber.png");
  background-size: cover;
  background-position: center 18%;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  padding-bottom: 12%;
}

.hero-overlay {
  background: rgba(0, 90, 40, 0.75);
  padding: 50px;
  border-radius: 12px;
  max-width: 500px;
  color: white;
  z-index: 2;
}

.hero h1 { font-size: 3rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; margin-bottom: 20px; }

.hero button {
  padding: 14px 28px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background: #ffffff;
  color: #005a28;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  animation: heroPulse 3s infinite;
}

@keyframes heroPulse {
  0%, 75%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  85% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
}

/* BUTTON HOVER EFFEKT */
.hero button:hover {
  background-color: #ffffff; /* Bleibt weiß */
  transform: scale(1.05);    /* Wird 5% größer */
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); /* Das "Leuchten" außen herum */
  color: #004d22;            /* Text wird ein bisschen dunkler beim Hover */
  transition: all 0.3s ease; /* Macht alles geschmeidig */
}

/* WICHTIG: Damit das "all" oben funktioniert, sollte die Transition auch im normalen Button stehen: */
.hero button {
  /* ... deine bisherigen Styles ... */
  transition: all 0.3s ease;
}

.slider {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: 400px;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.3),
    0 0 20px rgba(255, 255, 255, 0.15);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active { opacity: 1; }

/* LEISTUNGEN & FAHRZEUGE DESKTOP (3 Spalten) */
.leistungen { background: white; }
.leistungen h2 { text-align: center; font-size: 2.4rem; margin-bottom: 50px; color: #005a28; }

.section-subtitle {
  text-align: center;
  color: #444;            /* Ein dunkles Grau, damit es dezent bleibt */
  font-size: 1.1rem;
  max-width: 700px;       /* Verhindert, dass der Text am PC zu breit läuft */
  margin: 0 auto 50px;    /* Zentriert den Block und gibt Abstand nach unten zu den Karten */
  line-height: 1.5;
  font-weight: 500;
}

/* HINTERGRUND FÜR DIE MASCHINEN-SEKTION */
.maschinen {
  background-color: #ffffff;
  /* Das Punkt-Muster */
  background-image: radial-gradient(rgba(0, 77, 34, 0.05) 1px, transparent 1px);
  background-size: 25px 25px; 
}

/* Falls die Überschrift darin zu hell ist, kannst du sie hier nochmal schärfen */
.maschinen h2 {
  color: #004d22; 
}

/* Optimierung für das Handy */
@media screen and (max-width: 768px) {
  .section-subtitle {
    font-size: 1rem;
    padding: 0 10px;      /* Kleiner Seitenabstand auf dem Smartphone */
    margin-bottom: 30px;
  }
}

.cards, .fahrzeuge {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 Spalten auf PC */
  gap: 30px;
}

.card {
  background: #f0f3f0;
  padding: 30px;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.fahrzeuge .card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}


/* HOVER-EFFEKT FÜR ALLE KARTEN */
.card:hover {
  transform: translateY(-10px); /* Die Karte schiebt sich 10px nach oben */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); /* Ein weicher Schatten unter der Karte */
  border-color: #61942f; /* Die feine Linie wird beim Drüberfahren grüner */
  cursor: pointer; /* Zeigt die Hand als Mauszeiger */
}

/* WICHTIG: Damit die Bewegung weich ist, muss das hier in den normalen .card Block: */
.card {
  /* ... deine bisherigen Styles ... */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover img {
  transform: scale(1.05); /* Das Bild wird 5% größer */
  transition: transform 0.3s ease;
}

/* Damit das Bild nicht über den Kartenrand hinausragt: */
.card {
  overflow: hidden;
}

/* VIDEO VOLLBILD-BREITE */
/* Gilt für alle Geräte */
.promo-video {
  width: 100%;
  padding: 0 !important; /* Das hier ist der wichtigste Teil! */
  margin: 0;
}

.promo-video video {
  width: 100vw;
  height: 60vh;
  object-fit: cover;
  display: block;
}

/* KONTAKT & FOOTER */
.kontakt {
  background-color: #61942f;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

.footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 20px 10%;
  font-size: 0.9rem;
}

/* ----------------------------------------------------------- */
/* 2. MOBILE OPTIMIERUNG (Nur für Handy/Tablet) */
/* ----------------------------------------------------------- */

@media screen and (max-width: 768px) {
  /* 1. Alles was stört ausblenden */
  .slider {
    display: none !important;
  }

/* 2. Hero-Bereich (Hintergrundbild) Handy */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 80dvh;
  min-height: 500px;
  padding: 0 !important;
  padding-bottom: 25% !important;
  
  /* Verlauf und Bild kombiniert für Handy */
  background: 
    linear-gradient(to bottom, rgba(97, 148, 47, 0) 60%, #61942f 100%),
    url("../bilder/Eurocomag Bagger GGhuber.png");
  background-size: cover;
  background-position: center 0% !important; 
  background-attachment: scroll;
}

  /* 3. Der grüne Textkasten mittig im Bild */
  .hero-overlay {
    max-width: 90%;
    width: 90%;
    padding: 30px 20px;
    background: rgba(0, 90, 40, 0.85);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  /* 4. Karten untereinander stapeln */
  .cards, .fahrzeuge {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* 5. Sektionen am Handy */
  section {
    padding: 40px 20px;
  }

  /* 6. Video randlos */
  section.promo-video {
    padding: 0 !important;
    margin: 0 !important;
    height: 40vh;
  }

@media screen and (max-width: 768px) {
  .promo-video video {
    height: 40vh; /* Etwas flacher am Handy, damit es nicht den ganzen Schirm einnimmt */
  }
}

@media screen and (max-width: 768px) {
  .leistungen h2, .maschinen h2 {
    font-size: 1.8rem;
  }
}

  .promo-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

.floating-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #ff6b00;
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, background 0.3s ease;
  animation: pulse 2s infinite;
}

.floating-btn:hover {
  transform: scale(1.1);
  background: #ff8c33;
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 0 0 0 rgba(255, 107, 0, 0.6);
  }
  70% {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 0 0 20px rgba(255, 107, 0, 0);
  }
  100% {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 0 0 0 rgba(255, 107, 0, 0);
  }
}

.floating-contact {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@media screen and (max-width: 768px) {
  .floating-contact {
    bottom: 16px;
    right: 16px;
  }
}

.floating-popup {
  display: none;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 14px;
  gap: 10px;
  min-width: 220px;
}

.floating-popup.show {
  display: flex;
}

.floating-popup a {
  text-decoration: none;
  color: #222;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.floating-popup a:hover {
  background: #f0f3f0;
}