/* =========================================
   VARIABILI PRINCIPALI E RESET
   ========================================= */

:root {
  --primary-color: #1e293b;
  --accent-color: #3b82f6;
  --bg-color: #f8fafc;
  --card-bg: #fff;
  --text-color: #334155;
  --whatsapp: #25D366;
  --danger: #d71920;
  --orange: #ff6200;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 { font-size: 42px; color: #00050a; margin-bottom: 12px; letter-spacing: 1px; }
h2 { font-size: 25px; color: #00050a; margin-bottom: 12px; letter-spacing: 1px; }
h3 { font-size: 18px; color: #00050a; margin-bottom: 12px; letter-spacing: 1px; }
p  { font-size: 15px; color: #00050a; max-width: 760px; margin: 0 auto; }

/* =========================================
   HEADER PAGINA
   ========================================= */

header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #dbeafe;
  text-align: center;
  padding: 44px 18px;
}

header h1 { font-size: 42px; color: #dbeafe; margin-bottom: 12px; letter-spacing: 1px; }
header h2 { font-size: 20px; color: #dbeafe; margin-bottom: 12px; letter-spacing: 1px; }
header p  { font-size: 18px; color: #dbeafe; max-width: 760px; margin: 0 auto; }

/* Voce di menu attiva / selezionata */
.header-menu li a.active {
  background: #f2290a;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(242, 41, 10, 0.35);
}


/* =========================================
   NAVIGATION BAR & MENU
   ========================================= */

nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.8rem;
  background: #f2f55f;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
  border: 1px solid rgba(255, 255, 255, .08);
}

.logo-container {
  width: 150px;
  height: auto;
}

.logo-container img {
  width: 100%;
  height: auto;
  display: block;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-shadow: 0 3px 12px rgba(59, 130, 246, .35);
}

/* Menu Desktop */
.header-menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0;
  padding: 0;
}

.header-menu li a {
  position: relative;
  color: #f20c27;
  text-decoration: none;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  transition: color .3s ease, background-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.header-menu li a:hover {
  background: #f2290a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

/* Pulsante Hamburger Mobile */
.menu-toggle {
  display: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: #fff;
  background: rgb(0, 191, 255);
  border: 1px solid rgb(0, 191, 255);
  border-radius: 10px;
  padding: .35rem .65rem;
  transition: background-color .3s ease, transform .3s ease;
}

.menu-toggle:hover {
  background: rgba(59, 130, 246, .22);
  transform: scale(1.04);
}

/* Menu Mobile Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .header-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    background: #0f172a;
    padding: 1rem;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, .28);
    z-index: 999;
  }

  .header-menu.show {
    display: flex;
    animation: menuFade .25s ease;
  }

  .header-menu li {
    width: 100%;
    text-align: center;
  }

  .header-menu li a {
    display: block;
    padding: .9rem 1rem;
    color: #fff;
  }
}

@keyframes menuFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   SEZIONE FILTRI RICERCA AUTO
   ========================================= */

.filters-section {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.filter-group label {
  font-weight: 600;
  font-size: .9rem;
}

.filter-group select,
.filter-group input {
  padding: .55rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  font-size: 1rem;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent-color);
}

.btn-search,
.btn-reset {
  padding: .65rem 1rem;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-search { background: var(--accent-color); }
.btn-search:hover { background: #2563eb; }
.btn-reset { background: #64748b; }
.btn-reset:hover { background: #475569; }

/* =========================================
   GRIGLIA E SCHEDE AUTO
   ========================================= */

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.car-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
  transition: transform .2s;
}

.car-card:hover { transform: translateY(-5px); }

.gallery-container {
  position: relative;
  height: 250px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.gallery-img.active { display: block; }

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: 0;
  padding: .5rem;
  cursor: pointer;
  font-size: 1.2rem;
}

.gallery-btn:hover { background: rgba(0, 0, 0, .8); }
.btn-prev { left: 0; border-radius: 0 4px 4px 0; }
.btn-next { right: 0; border-radius: 4px 0 0 4px; }

.car-info { padding: 1.5rem; }
.car-title { font-size: 1.25rem; margin-bottom: .5rem; color: var(--primary-color); }
.car-price { font-size: 1.4rem; color: var(--accent-color); font-weight: 700; margin-bottom: 1rem; }

.tech-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  font-size: .85rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.spec-item { display: flex; flex-direction: column; }
.spec-label { color: #64748b; font-weight: 500; }
.spec-value { font-weight: 600; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #64748b;
  display: none;
}

/* =========================================
   PULSANTE WHATSAPP FISSO
   ========================================= */

.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--whatsapp);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}


@media (max-width: 768px) {
  .whatsapp-button {
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    font-size: 18px;
    padding: 16px 20px;
  }
}

/* =========================================
   FORM, PAGINA RINGRAZIAMENTI & VOLTURA
   ========================================= */

.thank-you-box {
  max-width: 760px;
  margin: 70px auto;
  padding: 45px 30px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.thank-you-box h1 { color: #111827; font-size: 34px; margin-bottom: 18px; }
.thank-you-box p { color: #4b5563; font-size: 18px; line-height: 1.6; }

.thank-you-button,
.thank-you-whatsapp {
  display: inline-block;
  margin: 12px 8px 0;
  padding: 13px 24px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.thank-you-button { background: var(--danger); }
.thank-you-button:hover { background: #b9151b; }
.thank-you-whatsapp { background: var(--whatsapp); }
.thank-you-whatsapp:hover { background: #1ebe5d; }

.privacy {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  font-size: 14px;
  font-weight: 400;
  color: #374151;
  line-height: 1.4;
}

.privacy input {
  width: auto !important;
  margin-top: 3px !important;
  flex-shrink: 0;
}

.privacy a { color: #2563eb; text-decoration: underline; }

.car-form {
  max-width: 700px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

.car-form h2 { text-align: center; margin-bottom: 10px; color: #222; }
.car-form p.intro { text-align: center; color: #666; margin-bottom: 25px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }

label { display: block; font-weight: 700; margin-bottom: 6px; color: #333; }
input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

textarea { min-height: 100px; resize: vertical; }
.full { grid-column: 1 / -1; }

.submit-btn {
  width: 100%;
  background: #d71920;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}

.submit-btn:hover { background: #b9151b; }
.submit-btn.secondary { background: #555; }
.note { font-size: 13px; color: #666; text-align: center; margin-top: 12px; }

.form-step { display: block; }
.step-actions { display: flex; gap: 15px; margin-top: 20px; }

/* Calcolatore Voltura */
#voltura-elbicars {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 14px 18px;
  box-sizing: border-box;
  background: transparent;
}

#voltura-elbicars .box {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: 30px;
  border-top: 5px solid var(--orange);
}

#voltura-elbicars h1 { text-align: center; font-size: 26px; margin-bottom: 8px; color: #111; }
#voltura-elbicars p { text-align: center; color: #666; margin-bottom: 25px; }

#voltura-elbicars input {
  width: 100%;
  padding: 14px;
  font-size: 20px;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
}

#voltura-elbicars input:focus { border-color: var(--orange); }

#voltura-elbicars .result {
  margin-top: 25px;
  padding: 20px;
  border-radius: 12px;
  background: #f7f7f7;
  border-left: 5px solid var(--orange);
}

#voltura-elbicars .price {
  font-size: 38px;
  font-weight: bold;
  color: #16a34a;
  text-align: center;
  margin-bottom: 15px;
}

#voltura-elbicars .details { font-size: 15px; color: #444; line-height: 1.8; }

#voltura-elbicars button {
  width: 100%;
  padding: 14px;
  margin-top: 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

#calcBtn { background: var(--orange); color: #fff; font-weight: bold; }
#whatsappBtn { background: var(--whatsapp); color: #fff; display: none; font-weight: bold; }

/* =========================================
   PAGINA CHI SIAMO
   ========================================= */

.intro-section {
  background-color: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  margin-bottom: 32px;
}

.intro-section p { margin-bottom: 16px; font-size: 17px; }
.intro-section ol { margin-left: 22px; margin-bottom: 16px; }
.intro-section li { margin-bottom: 8px; font-weight: 500; }

.services-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.service-card {
  background-color: #fff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border: 1px solid #cbd5e1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
}

.service-card h2 { font-size: 21px; color: var(--primary-color); margin-bottom: 12px; }
.service-card p { color: var(--text-color); font-size: 16px; }

/* =========================================
   FOOTER SITO
   ========================================= */

.site-footer {
  background: linear-gradient(135deg, #020617, #0f172a, #1e293b);
  color: #e2e8f0;
  padding: 48px 20px 22px;
  margin-top: 48px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-brand h2 { color: #fff; font-size: 28px; margin-bottom: 12px; }
.footer-content h3 { color: #fff; font-size: 17px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }

.footer-brand p,
.footer-contacts p,
.footer-services li { color: #cbd5e1; font-size: 15px; margin-bottom: 9px; }

.footer-services ul { list-style: none; padding: 0; margin: 0; display: block; }
.footer-services li { list-style: none; }
.footer-services li::before { content: '› '; color: var(--whatsapp); font-weight: 700; }

.footer-whatsapp {
  display: inline-block;
  margin-top: 12px;
  background-color: var(--whatsapp);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.footer-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1100px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.footer-note { margin-top: 6px; color: #64748b; font-size: 13px; }

/* =========================================
   MEDIA QUERIES GENERICHE E RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  header { padding: 44px 18px; }
  header h1 { font-size: 34px; }
  header p { font-size: 16px; }

  .intro-section, .service-card { padding: 24px; }

  .site-footer { padding: 38px 16px 20px; margin-top: 36px; }
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 26px; }
  .footer-brand h2 { font-size: 26px; }
  .footer-content h3 { font-size: 16px; margin-bottom: 10px; }
  .footer-brand p, .footer-contacts p, .footer-services li { font-size: 14px; margin-bottom: 8px; }
  .footer-whatsapp { display: inline-block; margin-top: 12px; padding: 11px 18px; font-size: 14px; }
  .footer-bottom { margin-top: 24px; padding-top: 16px; font-size: 13px; }
  .footer-note { font-size: 12px; }

  .thank-you-box { margin: 35px 15px; padding: 32px 20px; }
  .thank-you-box h1 { font-size: 27px; }
  .thank-you-box p { font-size: 16px; }
  .thank-you-button, .thank-you-whatsapp { display: block; margin: 12px auto 0; }
}

@media (max-width: 650px) {
  .form-row { grid-template-columns: 1fr; }
  body { padding: 0; }
  .car-form { padding: 20px; }
}

@media (max-width: 600px) {
  #voltura-elbicars .box { padding: 20px; }
  #voltura-elbicars .price { font-size: 32px; }
}

@media (max-width: 480px) {
  .site-footer { padding: 32px 14px 18px; }
  .footer-content { gap: 22px; }
  .footer-brand h2 { font-size: 23px; }
  .footer-content h3 { font-size: 15px; }
  .footer-brand p, .footer-contacts p, .footer-services li { font-size: 13.5px; }
  .footer-whatsapp { width: 100%; max-width: 260px; text-align: center; padding: 12px 16px; }
  .footer-bottom { font-size: 12.5px; }
  .footer-note { font-size: 12px; }
}