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

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: #fff;
}

header {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 45px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: height 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}

.logo img {
  width: 210px;
  transition: width 0.35s ease;
}

nav a {
  text-decoration: none;
  color: #111;
  margin: 0 22px;
  font-weight: 700;
  font-size: 14px;
  transition: margin 0.35s ease, font-size 0.35s ease, padding-bottom 0.35s ease, color 0.25s ease;
}

nav a.active {
  color: #005bbb;
  border-bottom: 3px solid #005bbb;
  padding-bottom: 14px;
}

.phone {
  color: #005bbb;
  font-weight: 700;
  font-size: 16px;
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 40px;
  overflow: hidden;
  transition:
    font-size 0.35s ease,
    opacity 0.35s ease,
    transform 0.35s ease,
    max-height 0.35s ease;
}

header.scrolled {
  height: 56px;
  padding: 0 35px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

header.scrolled .logo img {
  width: 145px;
}

header.scrolled nav a {
  margin: 0 14px;
  font-size: 12px;
}

header.scrolled nav a.active {
  padding-bottom: 5px;
}

header.scrolled .phone {
  font-size: 14px;
}

.hero {
  height: 500px;
  display: flex;
  align-items: center;

  background-image:
    linear-gradient(
      90deg,
      rgba(0,35,75,0.95) 0%,
      rgba(0,35,75,0.75) 32%,
      rgba(0,35,75,0.10) 58%,
      rgba(0,35,75,0) 75%
    ),
    url("images/Auto-3.png");

  background-repeat: no-repeat, no-repeat;

  /* Verlauf bleibt immer über den ganzen Hero */
  background-size: 100% 100%, cover;

  /* Verlauf links, Bild nach rechts */
  background-position: left top, 68% center;

}

.hero-text {
  color: white;
  margin-left: 45px;
  max-width: 500px;
}

.hero-text h1 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 28px;
}

.hero-text p {
  font-size: 21px;
  margin-bottom: 28px;
}

.hero-text span {
  display: block;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  background: #006edc;
  color: white;
  padding: 16px 28px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 50px 35px;
  text-align: center;
  background: white;
}

.service {
  padding: 0 35px;
  border-right: 1px solid #ddd;
}

.service:last-child {
  border-right: none;
}

.icon {
  width: 70px;
  height: 70px;
  background: #005bbb;
  color: white;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.service h3 {
  margin-bottom: 15px;
}

.service p {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
}

.service a {
  color: #005bbb;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.vehicles {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 45px;
  padding: 60px 45px;
  background: #f7f9fc;
}

.vehicle-text small {
  color: #777;
  font-weight: 700;
  letter-spacing: 2px;
}

.vehicle-text h2 {
  font-size: 34px;
  margin: 15px 0;
}

.line {
  width: 60px;
  height: 4px;
  background: #005bbb;
  margin-bottom: 25px;
}

.vehicle-text p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.vehicle-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.vehicle-images img {
  width: 100%;
  border-radius: 8px;
  height: 350px;
  object-fit: cover;
}

.contact {
  background:
    linear-gradient(rgba(0,38,82,0.95), rgba(0,38,82,0.95)),
    url("images/Autohero.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  padding: 65px 45px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
}

.contact-left h2 {
  font-size: 30px;
  margin-bottom: 20px;
}

.contact-left p {
  line-height: 1.6;
  margin-bottom: 30px;
}

.call-btn {
  color: white;
  text-decoration: none;
  border: 2px solid white;
  padding: 14px 28px;
  border-radius: 5px;
  font-weight: 700;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

.contact-info div:last-child {
  grid-column: span 3;
}

.contact-info h3 {
  margin-bottom: 15px;
}

.contact-info a {
  color: white;
}

.contact-info p {
  line-height: 1.6;
}

footer {
  height: 75px;
  padding: 0 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  color: #555;
  font-size: 13px;
}

footer nav a {
  font-size: 13px;
  color: #333;
}

/* Ausklappbarer Bereich */
.accordion {
  background: none;
  border: none;
  color: #005bbb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.accordion:hover {
  color: #003f8a;
}

.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  text-align: left;
  margin-top: 10px;
}

.panel p {
  margin-bottom: 12px;
}

.requirements {
  padding-left: 20px;
  margin-top: 10px;
}

.requirements li {
  margin-bottom: 10px;
  line-height: 1.6;
  font-size: 14px;
  color: #333;
}


/* ===========================
   Fahrzeugbilder Animation
=========================== */

.vehicle-text,
.vehicle-images img {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.75s ease, transform 0.75s ease, box-shadow 0.35s ease;
}

.vehicle-text.is-visible,
.vehicle-images img.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vehicle-images img:nth-child(1) {
  transition-delay: 0.10s;
}

.vehicle-images img:nth-child(2) {
  transition-delay: 0.25s;
}

.vehicle-images img:hover {
  transform: translateY(-6px) scale(1.045);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-text,
  .vehicle-images img {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .vehicle-images img:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ===========================
   Handy-Ansicht / Responsive
=========================== */

@media (max-width: 768px) {

  header {
    height: auto;
    min-height: 86px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
  }

  header.scrolled {
    height: auto;
    min-height: 72px;
    padding: 14px 20px;
  }

  header.scrolled .logo img {
    width: 150px;
  }

  .logo img {
    width: 180px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    padding-top: 16px;
    position: relative;
  }

  nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg,#005bbb,#49a6ff,#005bbb);
    transform: scaleX(0);
    transform-origin: left;
    animation: mobileLine 0.6s ease forwards;
  }

  @keyframes mobileLine {
    to {
      transform: scaleX(1);
    }
  }

  nav a {
    margin: 0;
    font-size: 14px;
  }

  nav a.active {
    padding-bottom: 6px;
  }

  .phone {
    font-size: 15px;
  }


  /* Kompakter Sticky Header auf Smartphones */
  header.scrolled {
    gap: 6px;
    min-height: 0;
    padding: 8px 18px;
  }

  header.scrolled .phone {
    opacity: 0;
    transform: translateY(-8px) scale(0.92);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
  }

  header.scrolled .logo img {
    width: 130px;
  }

  header.scrolled nav {
    margin-top: 2px;
    padding-top: 8px;
  }

  header.scrolled nav a {
    font-size: 12px;
  }

  .hero {
    height: auto;
    min-height: 430px;
    padding: 60px 20px;
    background:
      linear-gradient(90deg, rgba(0,35,75,0.95) 0%, rgba(0,35,75,0.75) 100%),
      url("images/auto-hero.jpg");
    background-size: cover;
    background-position: center;
  }

  .hero-text {
    margin-left: 0;
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-text p {
    font-size: 18px;
  }

  .hero-text span {
    font-size: 15px;
  }

  .services {
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    gap: 0;
  }

  .service {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 28px 0;
  }

  .service:last-child {
    border-bottom: none;
  }

  .vehicles {
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    gap: 30px;
  }

  .vehicle-text h2 {
    font-size: 28px;
  }

  .vehicle-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .vehicle-images img {
    height: auto;
    max-height: 320px;
  }

  .contact {
    display: flex;
    flex-direction: column;
    padding: 45px 20px;
    gap: 35px;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }

  .contact-info div:last-child {
    grid-column: auto;
  }

  footer {
    height: auto;
    flex-direction: column;
    gap: 15px;
    padding: 25px 20px;
    text-align: center;
  }

  footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* ===========================
   Eleganter kleiner Handy-Header beim Scrollen
=========================== */

@media (max-width: 768px) {
  header {
    overflow: hidden;
  }

  header.scrolled {
    min-height: 0;
    padding: 6px 16px 8px;
    gap: 3px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
  }

  header.scrolled .logo img {
    width: 112px;
  }

  header.scrolled .phone {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
  }

  header.scrolled nav {
    margin-top: 0;
    padding-top: 7px;
    gap: 9px;
  }

  header.scrolled nav::before {
    height: 2px;
    left: 10%;
    width: 80%;
  }

  header.scrolled nav a {
    font-size: 11px;
    line-height: 1;
    margin: 0;
  }

  header.scrolled nav a.active {
    padding-bottom: 3px;
    border-bottom-width: 2px;
  }

  header.scrolled nav a[href="impressum.html"] {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    margin: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.9);
  }
}


/* ===========================
   Noch schmalerer Header NUR auf Smartphones
=========================== */
@media (max-width: 768px) {

  header {
    min-height: 68px;
    padding: 10px 16px;
    gap: 8px;
  }

  .logo img {
    width: 145px;
  }

  nav {
    margin-top: 6px;
    padding-top: 10px;
    gap: 10px;
  }

  nav a {
    font-size: 12px;
  }

  .phone {
    font-size: 13px;
  }
}

/* ===========================
   FINAL: Handy-Header schmal + beim Runterscrollen ausblenden
=========================== */

header {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    height 0.35s ease,
    padding 0.35s ease;
}

header.header-hidden {
  transform: translateY(-100%);
}

@media (max-width: 768px) {

  header {
    height: auto;
    min-height: 0;
    padding: 9px 16px 10px;
    gap: 7px;
    flex-direction: column;
    align-items: center;
  }

  .logo img {
    width: 142px;
  }

  .phone {
    display: none;
  }

  header nav {
    width: 100%;
    margin-top: 5px;
    padding-top: 10px;
    gap: 10px;
    justify-content: center;
  }

  header nav::before {
    height: 2px;
    left: 10%;
    width: 80%;
  }

  header nav a {
    font-size: 12px;
    margin: 0;
  }

  header nav a.active {
    padding-bottom: 4px;
    border-bottom-width: 2px;
  }

  header.scrolled {
    height: auto;
    min-height: 0;
    padding: 9px 16px 10px;
    gap: 7px;
  }

  header.scrolled .logo img {
    width: 142px;
  }

  header.scrolled nav {
    margin-top: 5px;
    padding-top: 10px;
    gap: 10px;
  }

  header.scrolled nav a {
    font-size: 12px;
  }

  header.scrolled .phone {
    display: none;
  }
}


/* Telefon-Icons im Kontaktbereich */
.contact-info .fa-phone-volume{
  color:#fff;
  width:18px;
  margin-right:8px;
}


/* FINAL: Einheitlicher schlanker Footer auf Desktop und Handy */
footer {
  height: 52px !important;
  min-height: 52px;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

footer nav {
  display: none !important;
}
