:root {
  --brand: #103466;
  --brand-700: #0a264f;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .8);
  --hero-bg: url('../images/sfondoheader.png');

  --chip-bg: #EFF3F8;
  --chip-bd: #DFE7F3;
  --muted-text: #8B97A8;

}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial
}

a {
  color: inherit;
  text-decoration: none
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 65vh;
  display: grid;
  place-items: center;
  color: var(--text);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .45)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.hero__content {
  width: 100%;
  max-width: 1200px;
  padding: 48px 20px
}

.eyebrow {
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
  font-weight: 700
}

.title {
  margin: .2em 0 .25em;
  line-height: 1.05;
  font-weight: 900;
  font-size: 4rem;
}

.subtitle {
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--muted);
  margin-bottom: 28px
}

/* ===== SEARCH CARD ===== */
.search {
  background: #fff;
  color: #0e1726;
  border-radius: 16px;
  padding: 14px;

  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
  max-width: 880px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #f6f8fb
}

.label {
  font-weight: 700;
  color: #10243e
}

.hint {
  font-size: 14px;
  color: #5a6b86
}

.input,
.select {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 16px;
  outline: none
}

.btn {
  align-self: stretch;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-700)
}

/* HERO */
.hero__grid {
  max-width: 100%;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1fr minmax(420px, 560px);
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
}

.hero__left {
  max-width: 760px;
  justify-self: start
}

.hero .search {
  max-width: 880px
}

/* Card vetrina a destra */
.hero-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .28);
  backdrop-filter: saturate(120%);
}

.hero-card__media {
  position: relative;
  aspect-ratio: 60/60;
  background: #e6ebf2
}

.hero-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

/* badge arancione */
.hero-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  background: #ff7d1c;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}


.hero-card__bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  background: #1D539E;
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.hero-card__title {
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase
}

.hero-card__subtitle {
  opacity: .9;
  font-size: 14px
}

.hero-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price-lg {
  font-weight: 900;
  font-size: 28px
}

.btn--light {
  background: #fff;
  color: #0e2a55;
  border-radius: 10px;
  padding: 12px 80px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn--light:hover {
  background: #f2f5fb
}



/* ===== SEZIONI + TITOLO  ===== */
.cars {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(36px, 8vw, 80px) 20px 36px;
}

.section-title {
  position: relative;
  z-index: 1;
  font-weight: 900;
  color: #0e2a55;
  font-size: clamp(28px, 4.2vw, 44px);
  margin-top: 0;
}

.section-title::before {
  content: attr(data-title);
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  top: auto;
  transform: translateY(12%);
  line-height: 1;
  font-weight: 900;
  font-size: clamp(72px, 12vw, 100px);
  color: rgba(15, 32, 56, .12);
  white-space: nowrap;
  z-index: -1;
  pointer-events: none;
}

/* ===== GRID AUTO ===== */
.cars-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width:1000px) {
  .cars-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:640px) {
  .cars-grid {
    grid-template-columns: 1fr
  }

  .cars-track {
    --per-view: 1;
  }

  .cars-nav--prev {
    left: -6px
  }

  .cars-nav--next {
    right: -6px
  }
}

/* ===== CARD AUTO ===== */
.car-card {
  background: #fff;
  border: 1px solid #E2E8F3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(16, 52, 102, .04),
    0 10px 24px rgba(16, 52, 102, .10);
  display: flex;
  flex-direction: column;
}

.card__media {
  position: relative;
  aspect-ratio: 16/9;
  background: #e6ebf2
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.car-name {
  font-size: 24px;
  margin: 0;
  color: #1b2a41;
  font-weight: 800
}

.car-code {
  margin-top: -4px;
  font-size: 14px;
  color: var(--muted-text)
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-bd);
  font-weight: 700;
  color: #47566B;
  font-size: 14px;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.price {
  font-weight: 900;
  font-size: 24px;
  color: var(--brand)
}

.car-card .btn {
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}

.car-card .btn:hover {
  background: var(--brand-700)
}

.car-card .btn:focus {
  outline: 2px solid rgba(16, 52, 102, .25);
  outline-offset: 2px
}

.cars-carousel {
  position: relative;
  overflow: visible;
}

.cars-track {
  --gap: 28px;
  --per-view: 3;
  display: flex;
  gap: var(--gap);
  overflow: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: 6px;
}

.cars-track .car-card {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  scroll-snap-align: start;
}

/* frecce */
.cars-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(16, 52, 102, .18);
  z-index: 2;
}

.cars-nav--prev {
  left: -12px;
}

.cars-nav--next {
  right: -12px;
}

.cars-nav:hover {
  transform: translateY(-50%) scale(1.06)
}

.cars-nav:active {
  transform: translateY(-50%) scale(0.98)
}

.cars-nav[disabled] {
  opacity: .35;
  pointer-events: none
}


/* ===== CTA SPLIT  ===== */
.cta-split {
  position: relative;
  width: 100%;
  min-height: clamp(480px, 85vh, 400px);
  overflow: hidden;
}

.cta-split__bg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  transform: scale(1.02);
}

.cta-split__inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1200px, 92vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2.4vw, 24px);
  align-items: stretch;
}

.cta-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 2.4vw, 24px);
  border-radius: 12px;
  color: #fff;
  height: 100%;
  min-height: clamp(140px, 22vh, 220px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.cta-pill h3 {
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: clamp(18px, 2.2vw, 26px);
}

.cta-pill p {
  margin: 0;
  line-height: 1.45;
  font-size: clamp(13px, 1.6vw, 16px)
}

.cta-pill--blue {
  background: #1D539E;
}

.cta-pill--orange {
  background: rgba(255, 125, 28, .86);
}

.brands .logos-carousel {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.brands .logos-track {
  padding-left: 0 !important;
  padding-right: 0 !important;
  scroll-padding-inline: 0 !important;
}

.brands .logos-nav--prev {
  left: -12px !important;
}

.brands .logos-nav--next {
  right: -12px !important;
}

.brands .logos-nav {
  z-index: 999 !important;
}

.search {
  display: grid;
  gap: 12px;

  grid-template-columns: repeat(12, minmax(0, 1fr));
}


.field--city {
  grid-column: 1 / -1;
}

.field--start-date {
  grid-column: 1 / span 6;
}

.field--start-time {
  grid-column: 7 / span 6;
}

.field--end-date {
  grid-column: 1 / span 6;
}

.field--end-time {
  grid-column: 7 / span 6;
}


.search .btn {
  grid-column: 1 / -1;
  width: 100%;
}

@media (max-width:900px) {
  .cta-split__inner {
    grid-template-columns: 1fr;
    gap: 16px
  }

  .cta-pill {
    min-height: 160px
  }
}

/* ===== BRANDS / CAROSELLO (isolato sotto .brands) ===== */
.brands {
  padding: 56px 20px 80px
}

.brands .brands__wrap {
  max-width: 1200px;
  margin: 0 auto
}

.brands .section-title {
  margin-top: clamp(24px, 6vw, 72px);
}

.brands .logos-carousel {
  position: relative;
  overflow: visible;
}

.brands .logos-carousel {
  position: relative;
  display: block;
  padding-inline: 60px;
  overflow: visible;
}

.brands .logos-track {
  --card-w: 190px;
  --gap: 40px;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - var(--card-w)/2);
  padding-inline: calc(50% - var(--card-w)/2);
  padding-block: 50px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.brands .logos-track::-webkit-scrollbar {
  display: none
}


.brands .logo-card {
  flex: 0 0 var(--card-w);
  height: 220px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #E8EEF7;
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(16, 52, 102, .08);
  scroll-snap-align: center;
  transform-origin: center center;
  transform: scale(var(--scale, 1));
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.brands .logo-card img {
  max-width: 74%;
  height: auto
}

.brands .logo-card.is-center {
  box-shadow: 0 18px 38px rgba(16, 52, 102, .25);
  z-index: 3
}


.brands .logos-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 52, 102, .18);
  color: #103466;
  font-size: 20px;
  line-height: 1;
  z-index: 4;
}

.brands .logos-nav--prev {
  left: 8px;
}

.brands .logos-nav--next {
  right: 8px;
}

.brands .logos-nav:hover {
  transform: translateY(-50%) scale(1.06)
}

.brands .logos-nav:active {
  transform: translateY(-50%) scale(0.98)
}

.brands .logos-nav[disabled] {
  opacity: .35;
  pointer-events: none
}

/* Nav per i caroselli auto/offerte */
.cars-carousel--with-nav {
  position: relative;
}

.cars-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inline-size: 48px;
  block-size: 48px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  display: grid;
  place-items: center;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 2;
}

.cars-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.cars-nav:disabled {
  opacity: .35;
  cursor: default;
  transform: translateY(-50%);
}

.cars-nav--prev {
  left: .5rem;
}

.cars-nav--next {
  right: .5rem;
}

.btn-light,
.btn--light {
  display: inline-block;
  white-space: nowrap;
}

.hero-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  /* spazio tra prezzo e bottone */
}

.price-lg {
  white-space: nowrap;
}


/* ===== RESPONSIVE ===== */
@media (max-width:900px) {

  .btn {
    height: 52px
  }

  .hero__grid {
    grid-template-columns: 1fr
  }

  .section-title::before {
    font-size: 45px;
    transform: translateY(-4%);
  }

  .brands .logos-track {
    --gap: 32px;
    padding-block: 18px
  }

  .brands .logo-card {
    height: 200px;
    border-radius: 20px
  }
}

@media (max-width:560px) {
  .brands .logos-track {
    --card-w: 200px;
    --gap: 24px;
    padding-block: 16px
  }

  .brands .logo-card {
    height: 180px;
    border-radius: 18px
  }
}

@media (max-width:1000px) {
  .cars-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:640px) {
  .cars-grid {
    grid-template-columns: 1fr
  }

  .cars-track {
    --per-view: 1;
  }

  .cars-nav--prev {
    left: -6px
  }

  .cars-nav--next {
    right: -6px
  }

  .btn--light {
    padding: 12px 14px;
    font-size: 12px;

  }

  .price-lg {
    font-size: 16px;
  }

  .title {
    font-size: 2.5rem;
  }

  .section-title::before {
    font-size: 40px;
  }

  .cta-pill {
    min-height: 120px;
  }

  .search {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .field--start-date,
  .field--start-time,
  .field--end-date,
  .field--end-time {
    grid-column: 1 / -1;
  }
}

@media (max-width:578px) {
  .title {
    font-size: 2rem;
  }
  .price-lg {
    font-size: 15px;
  }

  .section-title::before {
    font-size: 34px;
  }

  .cars-nav--prev {
    left: .25rem;
  }

  .cars-nav--next {
    right: .25rem;
  }
}