/* ===== Base & Vars ===== */
:root {
  --trust-dunkel: #005387;
  --trust-blau: #67bbd6; /* falls noch nicht gesetzt */
  --hellgrau: #f5f7f9;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #1C2930;
  background: #fff;
}

/* ===== Header ===== */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1C2930;
  padding: 40px 0; /* fix: negative padding entfernt */
  color: #fff;
  position: relative;
}

/* Logo */
.logo-wrapper {
  text-align: center;
  margin-bottom: 5px;
}

.logo-wrapper img {
  height: auto;
  max-width: 280px;
  width: 100%;
}

/* Slogan */
.slogan {
  font-size: 18px;
  font-weight: 500;
  color: #89cff0;
  text-align: center;
  font-style: italic;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

/* ===== Navigation (Desktop zuerst) ===== */
.nav-center {
  display: flex;
  gap: 30px;
}

.nav-center a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}

.nav-center a:hover {
  color: #89cff0;
}

/* Burger (gemeinsam, einmalig definiert) */
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* ===== Responsive Nav ===== */
@media (max-width: 768px) {
  .burger {
    display: block;
  }

  .nav-center {
    display: none;               /* mobil standard: hidden */
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #1C2930;
    width: 100%;
    padding: 20px 0;
    position: absolute;
    top: 70px;
    right: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  /* Toggle-Klassen, nur eine Variante beibehalten */
  .nav-center.active,
  .nav-center.show {
    display: flex;
  }

  .nav-center a {
    padding: 15px;
    border-bottom: 1px solid #2b3a42;
    width: 100%;
    text-align: center;
  }
}
/* ===== Hero ===== */
.hero {
  background-image: url('transport.jpg');
  background-size: cover;
  background-position: center left; /* fix: 'flex-start' ungültig */
  background-repeat: no-repeat;
  color: #1C2930;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  position: relative;
  padding-left: 10%;
}

/* optional: leicht linksbündige Variante */
.hero-content.left-aligned {
  max-width: 600px;
}

/* Overlay für bessere Lesbarkeit */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(28,41,48,0.4);
  z-index: 1;
}

/* Hero-Box (zusammengeführt) */
.hero-content {
  position: relative; /* über Overlay */
  z-index: 2;
  max-width: 700px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 40px;
  margin-right: 25%;
}

@media (max-width: 768px) {
  .hero-content {
    text-align: center;
    padding: 20px;
    margin-right: 0;
  }
}

.hero-content h2 {
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 20px;
}

.hero-content .subline {
  font-size: 42px;
  font-weight: 600;
  color: #89cff0;
  margin: 0 0 20px;
  line-height: 1.3;
}

.hero-content p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

/* CTA Box */
.trustcar-cta-box {
  background-color: #1C2930;
  border: 2px solid #89cff0;
  border-radius: 12px;
  padding: 20px;
  max-width: 380px;
  margin: 40px auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: left;
  color: #fff;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; /* mobile-friendly spacing */
}

.trustcar-cta-box:hover {
  transform: translateY(-3px);
}

.trustcar-cta-content strong {
  font-size: 18px;
  display: block;
  margin-bottom: 6px;
}

.trustcar-cta-content p {
  font-size: 14px;
  color: #d6d6d6;
  margin: 0;
}

.trustcar-cta-button {
  display: inline-block;
  padding: 12px 22px;
  background-color: #89cff0;
  color: #1C2930;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 18px;
  transition: background 0.3s ease;
}

.trustcar-cta-button:hover {
  background-color: #67bbd6;
}

/* Hero-spezifische CTA-Position */
.trustcar-cta-box.hero-cta {
  position: absolute;
  top: 30px;
  right: 40px;
  max-width: 300px;
  z-index: 10;
}

/* Stempel */
/* Base: Desktop */
/* Base: Desktop */
/* Base: Desktop */
.hero-stempel-wrapper {
  position: absolute;
  left: 40px;
  bottom: 0px;
  z-index: 3;
  width: clamp(160px, 22vw, 260px);
  transform: rotate(300deg); 
  transform-origin: center;
}

.hero-stempel-wrapper img {
  width: 100%;
  height: auto;
}

/* Tablet */
@media (max-width: 1024px) {
  .hero-stempel-wrapper {
    left: 24px;
    bottom: 32px;
    width: clamp(140px, 26vw, 220px);
    transform: rotate(300deg);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-stempel-wrapper {
    left: 16px;
    bottom: -1074px;
    width: clamp(120px, 34vw, 200px);
    transform: rotate(300deg);
  }
  .trustcar-cta-box.hero-cta {
    display: none;
}
}

/* Sehr kleine Geräte */
@media (max-width: 480px) {
  .hero-stempel-wrapper {
    left: 12px;
    bottom: 20px;
    width: clamp(100px, 40vw, 160px);
    transform: rotate(300deg);
  }
}

/* Optional: auf ultraklein ausblenden, falls nötig
@media (max-width: 360px) {
  .hero-stempel-wrapper { display: none; }
}
*/

/* ===== Berechnen ===== */
.berechnen-section {
  background: url('transport.png') center/cover no-repeat;
  padding: 80px 20px;
}

.berechnen-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.berechnen-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
}

.berechnen-group label {
  margin-bottom: 6px;
  font-weight: bold;
  color: #89cff0;
  font-size: 15px;
}

.berechnen-group input,
.berechnen-group select {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #ccc;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #1C2930;
}

.berechnen-box button {
  background: #89cff0;
  color: #1C2930;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  align-self: flex-end;
  height: 52px;
}

.berechnen-box button:hover {
  background: #0072ff;
  color: white;
}

/* Ergebnis (zusammengeführt, Start: hidden) */
.berechnungs-ergebnis {
  display: none;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  font-size: 16px;
  font-weight: bold;
  color: #1C2930;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* ===== Angebot ===== */
.angebot-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.angebot-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
}

.angebot-group label {
  margin-bottom: 6px;
  font-weight: bold;
  color: #89cff0;
  font-size: 15px;
}

.angebot-group input {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #ccc;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #1C2930;
}

#angebot-senden {
  background: #89cff0;
  color: #1C2930;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  align-self: flex-end;
  height: 52px;
}

#angebot-senden:hover {
  background: #0072ff;
  color: white;
}

/* ===== Über uns ===== */
.ueber-uns {
  max-width: 900px;
  margin: 80px auto;
  text-align: center;
}

.ueber-uns h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1C2930;
}

.ueber-uns p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 30px 0;
}

.ueber-uns hr {
  border: none;
  border-top: 2px solid #1C2930;
  width: 100%;
  margin: 0 auto;
}

/* ===== Kästen ===== */
.kaesten-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.kasten {
  flex: 1 1 calc(33.33% - 40px);
  max-width: calc(33.33% - 40px);
  height: 200px;
  transform: scale(0.9);
  transition: transform 0.4s ease, height 0.4s ease;
  opacity: 1;
}

.kasten:hover {
  transform: scale(1) translateY(-5px);
}

.kasten .icon {
  font-size: 40px;
  color: #0072ff;
}

.kasten .content {
  margin-top: 20px;
  opacity: 1;
  transition: opacity 0.3s;
}

.kasten:hover .content {
  opacity: 1;
}

/* ===== Bewertungen ===== */
.bewertungen {
  background: #1C2930;
  color: #f5f7f9;
  max-width: 100%;
  padding: 80px 20px;
  text-align: center;
}

.bewertungen h2 {
  font-size: 32px;
  margin-bottom: 40px;
  color: #ffffff;
}

.bewertungen-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.bewertung {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 20px;
  max-width: 220px;
  text-align: left;
  transition: transform 0.3s ease, background 0.3s ease;
}

.bewertung:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.1);
}

.stars {
  font-size: 18px;
  color: #89cff0;
  margin-bottom: 10px;
}

.bewertung strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: #ffffff;
}

.bewertung p {
  font-size: 14px;
  color: #d6d6d6;
  margin-bottom: 8px;
}

.bewertung small {
  font-size: 12px;
  color: #aaa;
}

.bewertung-footer {
  margin-top: 40px;
  font-size: 14px;
  color: #ccc;
}
/* ===== Kontakt ===== */
.kontakt-section {
  background: #f5f7f9;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 40px 20px;
  border-top: 2px solid #dce0e6;
}

form {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form input,
form textarea {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
}

form button {
  background: #89cff0;
  color: #1C2930;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

form button:hover {
  background: #0072ff;
  color: #fff;
}

.kontakt-info-box {
  background-color: #DCE0E6;
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  animation: fadeSlideIn 1.2s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kontakt-info-box h3 {
  margin-top: 0;
  font-size: 22px;
}

.kontakt-info-box p {
  margin: 16px 0;
  line-height: 1.6;
}

.kontakt-info-box small {
  display: block;
  margin-top: 4px;
  color: #555;
}

.kontakt-info-box img {
  margin-top: 20px;
  width: 80px;
  opacity: 0.8;
}

/* ===== Footer ===== */
footer {
  background: #1C2930;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

.footer-links {
  margin-bottom: 15px;
}

.footer-links a {
  color: #89cff0;
  margin: 0 15px;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* ===== Autocomplete ===== */
.autocomplete {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  background: white;
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  border-radius: 8px;
}

.autocomplete li {
  padding: 10px;
  cursor: pointer;
}

.autocomplete li:hover {
  background-color: #e0f0ff;
}

/* ===== Legal ===== */
.legal-wrapper {
  background: url('transport.png') center/cover no-repeat;
  min-height: 100vh;
  padding: 80px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.legal-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 40px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.legal-box h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #1C2930;
}

.legal-box p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* ===== Leistungen (Container) ===== */
.leistungen-neu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 60px 20px;
  background-color: #f5f7f9; /* alternativ: var(--hellgrau) */
}

/* ===== Karten & Hover / Flip (zusammengeführt) ===== */
.leistungskarte {
  position: relative;
  flex: 1 1 calc(33.333% - 40px); /* 3 Spalten mit Abstand */
  max-width: calc(33.333% - 40px);
  height: 490px; /* ursprüngliche Höhe */
  perspective: 1000px;
  opacity: 0;
  transform: translateX(-40px);
  transition: transform 1.5s ease, opacity 1.5s ease;
  cursor: pointer;
}

@media (max-width: 992px) {
  .leistungskarte {
    flex: 1 1 calc(50% - 40px); /* 2 Spalten */
    max-width: calc(50% - 40px);
  }
}

@media (max-width: 600px) {
  .leistungskarte {
    flex: 1 1 100%; /* 1 Spalte */
    max-width: 100%;
    height: auto; /* passt sich an Inhalt an */
  }
}


.leistungskarte.visible {
  opacity: 1;
  transform: translateX(0);
}

.leistungskarte:hover {
  transform: translateX(0) translateY(-6px);
}

/* Overlay-Farbe beim Hover */
.leistungskarte::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(137, 207, 240, 0); /* anfangs none */
  transition: background 0.4s ease;
  z-index: 1;
}

.leistungskarte:hover::before {
  background: rgba(137, 207, 240, 0.35);
}

/* Flip-Struktur */
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.leistungskarte:hover .flip-inner {
  transform: rotateY(180deg);
}
/* iOS/Safari 3D-Fix */
.flip-inner {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.flip-front,
.flip-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile: feste Höhe statt auto */
@media (max-width: 600px) {
  .leistungskarte {
    flex: 1 1 100%;
    max-width: 100%;
    height: 420px;   /* z.B. 400–460px je nach Look */
  }
  .flip-front img {
    height: 60%;     /* 60–65% wirkt mobil gut */
    object-fit: cover;
    display: block;
  }
}


/* Vorderseite */
.flip-front {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.flip-front img {
  width: 100%;
  height: 70%;
  object-fit: cover;
}

.flip-back {
  background: var(--trust-dunkel);
  color: #fff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* Text startet oben */
  align-items: center;           /* mittig horizontal */
  padding: 20px;
  text-align: center;

  overflow-y: auto;              /* Scrollbar, falls Text zu lang */
  max-height: 100%;              /* begrenzt auf Kartenhöhe */
  scrollbar-width: none;         /* Firefox: Scrollbar ausblenden */
}

.flip-back::-webkit-scrollbar {
  display: none; /* Chrome/Safari: Scrollbar verstecken */
}


.flip-back p {
  animation: none; /* Standardmäßig keine Animation */
}

.flip-back p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 80%;
  padding: 10px;
  word-break: break-word;
  justify-content: flex-start;
}

/* ===== Leistungs-Text (dedupe) ===== */
.leistungs-text {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

/* Standardkarten: Balken am Boden */
.leistungskarte .leistungs-text {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #1C2930;
}

/* Flip-Front: Balken-Stil */
.flip-front .leistungs-text {
  padding: 10px;
  background: var(--trust-blau);
}
/* 1) Globale Sicherheitsnetze gegen Horizontal-Scroll */
html, body {
  width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2) Mobile-Navigation: sauber im Viewport halten */
@media (max-width: 768px) {
  .nav-center {
    left: 0;
    right: 0;       /* statt nur right:0 + width:100% */
    width: 100%;    /* kein 100vw, das erzeugt gern einen Gutter */
    margin: 0;
  }
}

/* 3) Stempel: auf Mobile komplett ausblenden (vermeidet Overflow durch Rotation) */
@media (max-width: 768px) {
  .hero-stempel-wrapper {
    display: none;
  }
}

/* 4) Leistungskarten: Initial-Shift entfernt, damit nichts seitlich raussteht */
@media (max-width: 600px) {
  .leistungskarte {
    transform: none;     /* kein translateX(-40px) im Startzustand */
    height: 420px;       /* damit die Bilder sichtbar bleiben */
  }
}

/* Nur auf Mobile auto-scrollen */
@media (max-width: 768px) {
  .flip-back {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* Text startet oben */
    align-items: center;           /* horizontal zentriert (oder flex-start) */
    padding: 20px;
    text-align: center;
    overflow: hidden;              /* wichtig: keine native Scrollbar */
  }

  .flip-back .scroll-content {
    will-change: transform;
    transform: translateY(0);
    animation: autoScroll var(--scroll-duration, 5s) linear infinite;
    animation-delay: 2s;           /* 2s warten, dann los */
  }

  /* iOS/Safari Flip-Fix */
  .flip-inner { transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
  .flip-front, .flip-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
}

/* Keyframes: von oben bis zur berechneten Distanz */
@keyframes autoScroll {
  to { transform: translateY(var(--scroll-distance, -200px)); }
}

/* Nur wenn aktiv (per Hover oder JS gesetzt) */
.flip-back.active .scroll-content {
  animation: autoScroll var(--scroll-duration, 7s) linear infinite;
  animation-delay: 2s;
}

.flip-back {
  background: var(--trust-dunkel);
  color: #fff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  text-align: left;

  overflow-y: auto;    /* Benutzer kann scrollen */
  max-height: 100%;   /* begrenzt auf Kartengröße */
  scrollbar-width: none;  /* Firefox Scrollbar ausblenden */
}

.flip-back::-webkit-scrollbar {
  display: none;  /* Safari/Chrome: Scrollbar verstecken */
}
