:root {
  --primary: #1F6FD6;
  --secondary: #2f363b;
  --dark: #15191c;
  --dark-soft: #1e2428;
  --text: #eaeaea;
  --muted: #9aa4aa;
  --accent: #3cc9ff;
  --success: #25d366;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: linear-gradient(180deg, #0e1214, #15191c);
  color: var(--text);
  line-height: 1.6;
}

/* ================= HEADER ================= */

header {
  background: var(--secondary);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-left {
  display: flex;
  flex-direction: column;
}

header img {
  height: 70px;
}

.social-mobile {
  display: none;
  justify-content: center;
  gap: 1.4rem;
  margin-top: .6rem;
}

.social-desktop {
  display: flex;
  gap: 1.2rem;
  margin-left: 1.5rem;
  margin-top: 18px;
}

.header-right {
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  align-items: flex-end;
  gap: 1.4rem;
  margin-top: 8px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

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

.whatsapp-link,
.insta-link {
  font-size: 1.5rem;
  color: #fff;
  transition: .25s ease;
}

.whatsapp-link:hover {
  color: var(--success);
  transform: scale(1.15);
}

.insta-link:hover {
  color: var(--primary);
  transform: scale(1.15);
}

@media (min-width: 769px) {
  .header-right {
    align-items: center;
  }
  nav {
    margin-top: 18px;
  }
}

@media(max-width: 768px) {
  header {
    padding: 0.8rem 1rem;
  }
  header img {
    height: 52px;
  }
  nav {
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
    font-size: 0.88rem;
  }
  .social-desktop {
    display: none;
  }
  .social-mobile {
    display: flex;
  }
  .section {
    padding: 0 1rem;
    margin: 2.5rem auto;
  }
  .card, .service, .imprint-card {
    padding: 1.4rem;
  }
  .stage {
    padding: 1.4rem;
  }
  .stage-grid {
    grid-template-columns: 1fr;
  }
  select, input, textarea {
    font-size: 16px; /* Prevents iOS auto-zoom */
  }
  .news-section {
    padding: 1.2rem;
  }
  .floating-cta {
    bottom: 1rem;
    left: 1rem;
    font-size: 0.85rem;
    padding: 0.7rem 1.1rem;
  }
}

/* ================= HERO ================= */

.hero {
  background: linear-gradient(rgba(21, 25, 28, .92), rgba(21, 25, 28, .92)),
    url("hero.jpg") center/cover no-repeat;
  padding: 4rem 1.2rem;
  text-align: center;
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1, .hero h2 {
    font-size: 1.8rem;
  }
}

/* Logo on index hero */
.hero > img {
  max-width: 320px;
  width: 55%;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .hero > img {
    max-width: 200px;
    width: 60%;
  }
}

.hero h1, .hero h2 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.hero p {
  max-width: 720px;
  margin: 0 auto 2.2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* ================= HERO SPLIT (Konfigurator) ================= */

.hero-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.hero-split-img {
  flex: 0 0 auto;
  width: 340px;
  max-width: 40%;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  object-fit: cover;
}

.hero-split-text {
  flex: 1;
}

@media (max-width: 768px) {
  .hero-split {
    flex-direction: column;
    text-align: center;
  }
  .hero-split-img {
    width: 100%;
    max-width: 100%;
  }
}

/* ================= FLOATING CTA (Fahrzeug nicht gefunden) ================= */

.floating-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: linear-gradient(135deg, #1db954, #17a049);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(29, 185, 84, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 999;
}

.floating-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(29, 185, 84, 0.6);
}

.floating-cta i {
  font-size: 1.2rem;
}

/* ================= SECTION & CARDS ================= */

.section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  border-left: 5px solid var(--primary);
  padding-left: 1rem;
}

.cards, .services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.card, .service, .imprint-card {
  background: linear-gradient(145deg, var(--dark-soft), var(--dark));
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .55);
}

.card h3, .service h3 {
  color: var(--primary);
  margin-bottom: .6rem;
}

.card p, .service p {
  color: var(--muted);
}

/* ================= BUTTONS ================= */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #39d0ff);
  box-shadow: 0 15px 35px rgba(10, 163, 213, .45);
  transition: transform 0.25s, box-shadow 0.25s;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(10, 163, 213, .8);
}

@media (max-width: 600px) {
  .cta {
    font-size: 0.85rem;
    padding: 0.8rem 1.6rem;
    width: 100%;
    max-width: 320px;
  }
}

.cta.insta {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  box-shadow: 0 15px 35px rgba(253, 29, 29, .45);
}

.cta.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.cta.secondary:hover {
  background: rgba(10, 163, 213, .1);
}

/* ================= KONFIGURATOR ================= */

.select-grid {
  display: grid;
  gap: 1.2rem;
}

@media(min-width: 700px) {
  .select-grid { grid-template-columns: 1fr 1fr; }
}

@media(min-width: 1100px) {
  .select-grid { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
}

select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  padding: .9rem;
  border-radius: 8px;
  background: #101417;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .15);
  width: 100%;
}

select:disabled { opacity: .4; }

#selection-summary {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--muted);
}

#selection-summary strong { color: #fff; }

.stage-grid {
  display: grid;
  gap: 2.2rem;
  margin-top: 2.5rem;
}

@media(min-width: 900px) {
  .stage-grid { grid-template-columns: 1fr 1fr; }
}

.stage {
  background: #111518;
  border-radius: 16px;
  padding: 2.2rem;
  border: 1px solid rgba(255, 255, 255, .06);
  transition: .3s ease;
  position: relative;
}

.stage.primary {
  box-shadow: 0 0 0 2px var(--primary);
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(10, 163, 213, .4); }
  50% { box-shadow: 0 0 25px rgba(10, 163, 213, .9); }
}

.badge {
  background: linear-gradient(135deg, var(--primary), #39d0ff);
  padding: .45rem .9rem;
  border-radius: 7px;
  font-size: .75rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.percent-badge {
  display: block;
  margin-top: .4rem;
  font-size: .8rem;
  font-weight: 900;
  color: var(--accent);
}

.price {
  margin-top: 1.4rem;
  font-size: 1.7rem;
  font-weight: 900;
}

.price del {
  display: block;
  font-size: .9rem;
  color: #777;
}

/* Bars in Konfigurator */
.compare { margin-top: 1.6rem; }
.compare-row { margin-bottom: 1rem; }
.compare-label {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .35rem;
}

.autofarm-label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .7rem;
  align-items: center;
}

.autofarm-label img {
  height: 2.8em;
  width: auto;
  opacity: .9;
}

.autofarm-text {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: .1rem;
}

.autofarm-title {
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}

.autofarm-value {
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.1;
}

.compare-bar {
  height: 12px;
  background: #2a2f33;
  border-radius: 8px;
  overflow: hidden;
}

.compare-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 8px;
  transition: width 1.6s ease;
}

.stock { background: #555; }
.tuned { background: linear-gradient(90deg, var(--primary), var(--accent)); }

.compare-gain {
  margin-top: .35rem;
  font-size: .85rem;
  font-weight: 900;
  color: var(--accent);
}

.compare-gain.right { text-align: right; padding-right: .2rem; }

.stage-footer {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.2rem;
}

@media(max-width: 600px) {
  .stage-footer { grid-template-columns: 1fr; gap: 1rem; }
}

/* ================= LEISTUNGEN SLIDER ================= */

.slider-section {
  background: linear-gradient(180deg, var(--dark-soft), var(--dark));
  padding: 3rem 2rem;
}

.slider {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  width: calc(260px * 20); /* Adjusted for duplicates */
  animation: scroll 40s linear infinite;
}

.slider-track img {
  width: 260px;
  height: 140px;
  object-fit: cover;
  margin-right: 15px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .slider-track img {
    width: 180px;
    height: 100px;
  }
  .slider-track {
    width: calc(180px * 20);
  }
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.leistungen-liste {
  list-style: none;
  padding-left: 0;
  margin-top: 1.5rem;
}

.leistungen-liste li {
  padding-left: 1.8rem;
  margin-bottom: 0.6rem;
  position: relative;
  color: var(--muted);
}

.leistungen-liste li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ================= CONTACT & FOOTER ================= */

.contact {
  background: var(--secondary);
  text-align: center;
  padding: 4rem 2rem;
}

.contact p {
  margin: .4rem 0;
  color: var(--muted);
}

.contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

footer {
  background: #0e1113;
  color: #777;
  text-align: center;
  padding: 1.2rem;
  font-size: .9rem;
}

footer a {
  color: #777;
  text-decoration: none;
  margin: 0 0.5rem;
}

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

/* ================= NEWS SECTION & BADGES ================= */

.news-badge {
  background: #ff3e3e;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  vertical-align: middle;
  margin-left: 0.5rem;
  text-transform: uppercase;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.news-section {
  background: rgba(31, 111, 214, 0.05);
  border: 1px solid rgba(31, 111, 214, 0.2);
  padding: 2rem;
  border-radius: 18px;
  margin-bottom: 3rem;
}

/* ================= COOKIE POPUP ================= */

#cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--dark-soft);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  #cookie-popup {
    left: auto;
    width: 450px;
  }
}

#cookie-popup p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--muted);
}

#cookie-popup .btn-accept {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
}

#cookie-popup .btn-accept:hover {
  background: #2b7de8;
}

#cookie-popup .btn-decline {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}

#cookie-popup .btn-decline:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--text);
}

/* ================= IMPRESSUM ================= */

.imprint-card h1, .imprint-card h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.imprint-card p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ================= HAMBURGER MOBILE MENU & MOBILE OPTIMIZATIONS ================= */

.hamburger-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .hamburger-menu-btn {
    display: block;
  }
  
  header {
    position: relative;
  }

  .header-right nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: var(--dark-soft);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border-radius: 0 0 0 12px;
    border-left: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10000;
  }

  .header-right nav.active {
    display: flex;
  }

  .floating-cta {
    display: none; /* Initially hidden on mobile, script reveals on scroll */
  }
}


/* ================= AKTIONS-BANNER (gesteuert ueber aktion.php) ================= */
.aktion-banner {
  background: linear-gradient(90deg, #1a0f05 0%, #3a1c04 50%, #1a0f05 100%);
  border-bottom: 2px solid #ff7a00;
  color: #fff;
}
.aktion-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.aktion-banner-icon {
  color: #ff7a00;
  font-size: 1.6rem;
  animation: aktion-float 3s ease-in-out infinite;
}
.aktion-banner-text {
  margin: 0;
  line-height: 1.4;
  text-align: center;
}
.aktion-banner-text strong {
  color: #ff9a2e;
  font-size: 1.05rem;
  margin-right: .4rem;
}
.aktion-banner-text span {
  color: #f1e3d3;
  font-size: .92rem;
}
.aktion-banner-links {
  display: flex;
  gap: .5rem;
}
.aktion-banner-links a {
  background: #ff7a00;
  color: #120a03;
  font-weight: 700;
  font-size: .85rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.aktion-banner-links a:hover { background: #ffa04d; }
.aktion-hinweis {
  margin-top: 1rem;
  font-size: .9rem;
  color: #ff9a2e;
  text-align: center;
  font-weight: 700;
}
@keyframes aktion-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .aktion-banner-icon { animation: none; }
}
@media (max-width: 600px) {
  .aktion-banner-inner { gap: .5rem; padding: .6rem .8rem; }
  .aktion-banner-icon { display: none; }
  .aktion-banner-text strong { display: block; margin: 0 0 .15rem; }
  .aktion-banner-text span { font-size: .85rem; }
}
