@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --navy:       #0B2D6E;
  --navy-dark:  #081F4E;
  --navy-light: #1A4EA8;
  --blue-pale:  #EEF3FB;
  --green:      #25A244;
  --green-h:    #1D8438;
  --white:      #FFFFFF;
  --bg:         #F2F4F8;
  --text:       #1A1A2E;
  --gray:       #5A6070;
  --gray-light: #9AA0AE;
  --border:     #DDE1E9;
  --shadow-sm:  0 2px 8px rgba(11,45,110,.08);
  --shadow:     0 4px 20px rgba(11,45,110,.12);
  --shadow-lg:  0 12px 40px rgba(11,45,110,.18);
  --r:          10px;
  --r-sm:       6px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ── NAVBAR ── */
.nav {
  position: sticky; top: 0; z-index: 300;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800;
  color: var(--navy); letter-spacing: -.02em;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  background: var(--navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 20px; height: 20px; fill: none; stroke: white; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-logo span { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px;
  font-size: .875rem; font-weight: 500;
  color: var(--gray);
  border-radius: var(--r-sm);
  transition: color .18s, background .18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); background: var(--blue-pale); }
.nav-cta {
  background: var(--green) !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: var(--r-sm) !important;
  padding: 9px 20px !important;
  margin-left: 8px;
  transition: background .18s !important;
}
.nav-cta:hover { background: var(--green-h) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ── PAGE HERO (secondary pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  padding: 56px 2rem 60px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -40%; right: -5%;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero-breadcrumb {
  display: flex; gap: .5rem; align-items: center;
  font-size: .75rem; color: rgba(255,255,255,.4);
  margin-bottom: .75rem;
}
.page-hero-breadcrumb a { color: rgba(255,255,255,.55); transition: color .18s; }
.page-hero-breadcrumb a:hover { color: rgba(255,255,255,.8); }
.page-hero-breadcrumb .sep { color: rgba(255,255,255,.2); }
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; color: white;
  letter-spacing: -.025em; line-height: 1.1;
  margin-bottom: .35rem;
}
.page-hero p { font-size: .9rem; color: rgba(255,255,255,.5); }

/* ── SECTION ── */
.section { padding: 64px 2rem; }
.container { max-width: 1280px; margin: 0 auto; }

.section-label {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--green); margin-bottom: .3rem;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800; color: var(--navy);
  letter-spacing: -.02em; line-height: 1.15;
}

/* ── FILTER TABS ── */
.filter-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.ftab {
  padding: 7px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .78rem; font-weight: 600;
  color: var(--gray); background: white;
  cursor: pointer; font-family: inherit;
  transition: all .18s;
}
.ftab:hover { border-color: var(--navy); color: var(--navy); }
.ftab.active { background: var(--navy); color: white; border-color: var(--navy); }

/* ── VEHICLE CARDS ── */
.veicoli-grid, .cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.vcard {
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .22s, transform .22s;
}
.vcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.vcard-img {
  position: relative; overflow: hidden;
  height: 200px; background: var(--bg); flex-shrink: 0;
}
.vcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.vcard:hover .vcard-img img { transform: scale(1.05); }

.vcard-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.vcard-placeholder svg { width: 80px; height: 80px; stroke: #CBD2E0; fill: none; stroke-width: 1; }

.badge-avail {
  position: absolute; top: 12px; left: 12px;
  background: var(--green); color: white;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 50px;
  display: flex; align-items: center; gap: 5px;
}
.badge-avail::before { content: ''; width: 5px; height: 5px; background: white; border-radius: 50%; }
.badge-type {
  position: absolute; top: 12px; right: 12px;
  background: rgba(11,45,110,.8); backdrop-filter: blur(4px);
  color: white; font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 50px;
}

.vcard-body { padding: 1.25rem 1.25rem .75rem; flex: 1; }
.vcard-name { font-size: 1.1rem; font-weight: 800; color: var(--navy); letter-spacing: -.015em; margin-bottom: .2rem; }
.vcard-desc { font-size: .8rem; color: var(--gray); margin-bottom: .9rem; line-height: 1.5; }
.vcard-specs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.spec-chip {
  display: flex; align-items: center; gap: 4px;
  background: var(--blue-pale); color: var(--navy);
  font-size: .68rem; font-weight: 600;
  padding: 3px 9px; border-radius: 50px; letter-spacing: .02em;
}

.price-tiers {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.price-tier { padding: .75rem 1rem; text-align: center; }
.price-tier + .price-tier { border-left: 1px solid var(--border); }
.pt-label { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-light); margin-bottom: 3px; }
.pt-val { font-size: 1.2rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1; }
.pt-unit { font-size: .65rem; font-weight: 500; color: var(--gray-light); }
.pt-na { font-size: .78rem; color: var(--gray-light); font-weight: 500; }

.vcard-footer { padding: 1rem 1.25rem; }
.btn-book {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--green); color: white;
  padding: 11px; border-radius: var(--r-sm);
  font-size: .83rem; font-weight: 700; letter-spacing: .02em;
  transition: background .18s;
}
.btn-book:hover { background: var(--green-h); }
.btn-book svg { width: 15px; height: 15px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── FILTER BAR (flotta) ── */
.filtri-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem; position: sticky; top: 68px; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.filtri-bar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.filtri-bar-label { font-size: .75rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.range-wrap { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.range-wrap label { font-size: .82rem; color: var(--gray); font-weight: 600; white-space: nowrap; }
input[type=range] { accent-color: var(--navy); cursor: pointer; }
.risultati-count { color: var(--gray); font-size: .875rem; margin-bottom: 1.5rem; }

/* ── FORM PAGES ── */
.prenotazione-layout {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 2rem; align-items: start;
}
.form-card {
  background: white; border-radius: var(--r);
  border: 1px solid var(--border); padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: .68rem; font-weight: 700;
  color: var(--gray); text-transform: uppercase;
  letter-spacing: .1em; margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: .9rem; color: var(--text); font-family: inherit;
  transition: border-color .18s; background: white;
}
.form-control:focus { outline: none; border-color: var(--navy); }
textarea.form-control { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section-title {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--gray-light);
  margin: 1.5rem 0 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: white;
  padding: 12px 24px; border-radius: var(--r-sm);
  font-size: .85rem; font-weight: 700;
  transition: background .18s;
  border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: var(--navy-light); }
.btn-primary:disabled { background: var(--gray-light); cursor: not-allowed; }

/* RIEPILOGO */
.riepilogo-card {
  background: white; border-radius: var(--r);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); position: sticky; top: 84px;
}
.riepilogo-card > h3 {
  background: var(--navy); color: white;
  padding: 1.25rem 1.5rem;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
}
.riepilogo-card > div { padding: 1.5rem; }

.veicolo-selezionato {
  display: flex; gap: 1rem; align-items: center;
  background: var(--bg); padding: 1rem; border-radius: var(--r-sm);
  margin-bottom: 1rem;
}
.veicolo-selezionato-info h4 { font-size: .95rem; font-weight: 700; color: var(--navy); }
.veicolo-selezionato-info p { font-size: .8rem; color: var(--gray); }

.disponibilita-box {
  padding: 10px 14px; font-size: .85rem; font-weight: 600;
  margin-bottom: 1rem; border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 8px;
}
.disponibile { background: rgba(37,162,68,.08); color: var(--green); border-left: 3px solid var(--green); }
.non-disponibile { background: rgba(220,38,38,.08); color: #DC2626; border-left: 3px solid #DC2626; }
.verifica { background: var(--bg); color: var(--gray); border-left: 3px solid var(--gray-light); }

.riepilogo-righe { margin-bottom: 1rem; }
.riepilogo-riga {
  display: flex; justify-content: space-between;
  padding: 7px 0; font-size: .875rem;
  border-bottom: 1px solid var(--border); color: var(--gray);
}
.riepilogo-riga:last-child { border: none; }
.riepilogo-totale {
  display: flex; justify-content: space-between;
  padding: 12px 0 0; font-weight: 800; font-size: 1.1rem;
  color: var(--navy); border-top: 2px solid var(--navy); margin-top: 4px;
}

.success-box {
  text-align: center; padding: 3rem;
  background: rgba(37,162,68,.05);
  border: 2px solid rgba(37,162,68,.2);
  border-radius: var(--r);
}
.success-box h2 { color: var(--green); margin-bottom: .5rem; }

/* ── CONTATTI ── */
.contatti-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.info-card {
  background: white; border-radius: var(--r);
  border: 1px solid var(--border); padding: 1.75rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.info-card:last-child { margin-bottom: 0; }
.info-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.5rem; }
.info-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.info-item:last-child { margin-bottom: 0; }
.info-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.info-item h4 { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-light); margin-bottom: 3px; }
.info-item p, .info-item a { font-weight: 600; color: var(--navy); font-size: .9rem; }
.info-item a:hover { color: var(--navy-light); }
.orari-row {
  display: flex; justify-content: space-between;
  font-size: .875rem; padding: 8px 0;
  border-bottom: 1px solid var(--border); color: var(--gray);
}
.orari-row:last-child { border: none; }
.orari-row strong { color: var(--navy); font-weight: 600; }

/* ── FOOTER ── */
footer {
  background: var(--navy-dark);
  padding: 64px 2rem 32px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.footer-logo-icon {
  width: 34px; height: 34px; background: var(--green); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.footer-logo-icon svg { width: 18px; height: 18px; fill: none; stroke: white; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.footer-logo-text { font-size: 1.1rem; font-weight: 800; color: white; letter-spacing: -.02em; }
.footer-desc { font-size: .82rem; color: rgba(255,255,255,.35); line-height: 1.75; margin-bottom: 1.5rem; }
.footer-contacts { display: flex; flex-direction: column; gap: .6rem; }
.fc-row { display: flex; align-items: baseline; gap: 10px; font-size: .8rem; color: rgba(255,255,255,.35); }
.fc-tag { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.2); min-width: 42px; }
.fc-row a { transition: color .18s; }
.fc-row a:hover { color: rgba(255,255,255,.75); }
.footer-col-ttl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.3); margin-bottom: 1.25rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { font-size: .82rem; color: rgba(255,255,255,.38); transition: color .18s; }
.footer-links a:hover { color: rgba(255,255,255,.75); }
.footer-orari { display: flex; flex-direction: column; }
.orario-row {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .8rem; color: rgba(255,255,255,.3);
}
.orario-row:last-child { border: none; }
.orario-row strong { color: rgba(255,255,255,.55); font-weight: 500; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; justify-content: space-between;
  font-size: .72rem; color: rgba(255,255,255,.2); flex-wrap: wrap; gap: .5rem;
}

/* ── FLOATING ── */
.floating { position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 500; display: flex; flex-direction: column; gap: .5rem; }
.fbtn {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  position: relative;
  transition: transform .18s, box-shadow .18s;
}
.fbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.fbtn.wa { background: #25D366; }
.fbtn.ph { background: var(--navy); }
.fbtn svg { width: 20px; height: 20px; }
.fl-label {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%);
  background: var(--navy-dark); color: rgba(255,255,255,.8);
  font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  padding: 5px 12px; border-radius: var(--r-sm);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .18s; box-shadow: var(--shadow-sm);
}
.fbtn:hover .fl-label { opacity: 1; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy); color: white;
  padding: 12px 22px; border-radius: var(--r-sm);
  font-size: .85rem; font-weight: 500;
  z-index: 9999; transition: transform .4s ease;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: #DC2626; }

/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border); border-top-color: var(--navy);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin: 4rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .prenotazione-layout { grid-template-columns: 1fr; }
  .riepilogo-card { position: static; }
  .contatti-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; flex-direction: column;
    position: fixed; top: 68px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--border);
    padding: 1rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .veicoli-grid, .cars-grid { grid-template-columns: 1fr; }
}
