/* ─── Autocambio — global behavior styles (popup + phone availability) ─── */

/* ── Hero eyebrows row: categorial chip (.hero-badge) + territorial chip (.hero-badge--geo) ── */
.hero-eyebrows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-eyebrows .hero-badge { margin-bottom: 0; flex-shrink: 0; white-space: nowrap; }
.hero-badge--geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,96,16,.06);
  border: 1px solid rgba(232,96,16,.3);
  padding: 6px 14px 6px 12px;
  border-radius: 100px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(242,240,237,.88);
  white-space: nowrap;
}
.hero-badge--geo::before {
  content: '';
  width: 12px; height: 12px;
  flex-shrink: 0;
  background-color: #E86010;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/><circle cx='12' cy='10' r='3'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/><circle cx='12' cy='10' r='3'/></svg>") center / contain no-repeat;
}
@media (max-width: 720px) {
  .hero-eyebrows { gap: 8px; }
  .hero-badge--geo { white-space: normal; }
}


/* ── Modal/Popup "Richiedi assistenza" — multi-step wizard ── */
.ra-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 16px 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity .22s ease;
}
.ra-overlay.is-open { display: flex; opacity: 1; }
.ra-overlay.is-open .ra-modal { transform: scale(1); opacity: 1; }

.ra-modal {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: #0e0e0e;
  border: 1px solid #1e1e1e;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  color: #f2f0ed;
  font-family: 'Barlow', sans-serif;
  transform: scale(.96);
  opacity: 0;
  transition: transform .24s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
}

.ra-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  color: rgba(242,240,237,.6);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s, border-color .15s;
  z-index: 2;
}
.ra-close:hover { color: #f2f0ed; background: #1a1a1a; border-color: #2a2a2a; }
.ra-close svg { width: 18px; height: 18px; }

/* ── Header ── */
.ra-head {
  padding: 32px 36px 22px;
  border-bottom: 1px solid #1e1e1e;
}
.ra-eyebrow {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #E86010;
  margin-bottom: 14px;
}
.ra-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 36px);
  line-height: .98;
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin: 0 0 22px;
}

/* ── Progress bar + step dots ── */
.ra-progress { margin-top: 4px; }
.ra-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.ra-progress-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(242,240,237,.45);
  white-space: nowrap;
  flex-shrink: 0;
}
.ra-progress-bar {
  height: 4px;
  background: #1a1a1a;
  border-radius: 99px;
  overflow: hidden;
}
.ra-progress-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #E86010 0%, #ff8530 100%);
  border-radius: 99px;
  transition: width 460ms cubic-bezier(.4,0,.2,1);
}

/* ── Form / step container ── */
.ra-form {
  padding: 28px 36px 4px;
  overflow: hidden;
}
.ra-steps { position: relative; }
.ra-step {
  display: none;
}
.ra-step.is-active {
  display: block;
  animation: ra-step-in 260ms cubic-bezier(.4,0,.2,1) both;
}
.ra-step.is-active.dir-back {
  animation: ra-step-in-back 260ms cubic-bezier(.4,0,.2,1) both;
}
@keyframes ra-step-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ra-step-in-back {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ra-step-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0 0 6px;
  color: #f2f0ed;
}
.ra-step-sub {
  font-size: 14.5px;
  color: rgba(242,240,237,.6);
  line-height: 1.5;
  margin: 0 0 22px;
}

/* ── Form grid (within a step) ── */
.ra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.ra-fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ra-fld--full { grid-column: 1 / -1; }
.ra-fld label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(242,240,237,.55);
}
.ra-fld label .req { color: #E86010; }
.ra-fld label .opt { color: rgba(242,240,237,.32); font-weight: 500; }
.ra-fld input,
.ra-fld textarea,
.ra-fld select {
  width: 100%;
  background: #161616;
  border: 1px solid #1e1e1e;
  border-radius: 2px;
  color: #f2f0ed;
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  padding: 11px 13px;
  transition: border-color .15s, background .15s;
  outline: none;
}
.ra-fld textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.ra-fld input:focus,
.ra-fld textarea:focus,
.ra-fld select:focus {
  border-color: #E86010;
  background: #1a1a1a;
}
.ra-fld.is-error input,
.ra-fld.is-error textarea,
.ra-fld.is-error select { border-color: #E86010; background: rgba(232,96,16,.06); }
.ra-fld .ra-err {
  display: none;
  font-size: 12px;
  color: #E86010;
  margin-top: 2px;
  font-family: 'Barlow', sans-serif;
}
.ra-fld.is-error .ra-err { display: block; }
.ra-fld .ra-helper {
  display: block;
  font-size: 12.5px;
  color: rgba(242,240,237,.42);
  line-height: 1.5;
  margin-top: 4px;
  font-style: italic;
}
.ra-fld.is-error .ra-helper { display: none; }

.ra-fld input::placeholder,
.ra-fld textarea::placeholder { color: rgba(242,240,237,.32); }

/* ── Chips (sintomo) ── */
.ra-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ra-chip {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  color: rgba(242,240,237,.78);
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 99px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ra-chip:hover { border-color: #3a3a3a; color: #f2f0ed; }
.ra-chip.is-selected {
  background: rgba(232,96,16,.12);
  border-color: #E86010;
  color: #ff8530;
}
.ra-chip:focus-visible {
  outline: 2px solid #E86010;
  outline-offset: 2px;
}

/* ── Privacy checkbox ── */
.ra-priv {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0 0;
  font-size: 13px;
  color: rgba(242,240,237,.72);
  line-height: 1.5;
  cursor: pointer;
}
.ra-priv input {
  accent-color: #E86010;
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px; height: 16px;
  cursor: pointer;
}
.ra-priv a { color: #E86010; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ra-priv.is-error { color: #E86010; }
.ra-priv .req { color: #E86010; }

/* ── Step 4: summary box + submit ── */
.ra-summary {
  background: #141414;
  border: 1px solid #1e1e1e;
  border-radius: 3px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ra-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: rgba(242,240,237,.85);
  line-height: 1.45;
}
.ra-summary-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: #E86010;
  display: flex; align-items: center; justify-content: center;
}
.ra-summary-icon svg { width: 18px; height: 18px; }
.ra-summary-text { word-break: break-word; }

.ra-modify {
  background: none;
  border: none;
  color: rgba(242,240,237,.55);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 0;
  margin: 0 0 22px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
  align-self: flex-start;
  display: inline-block;
}
.ra-modify:hover { color: #E86010; border-bottom-color: #E86010; }

.ra-submit-big {
  width: 100%;
  padding: 18px 28px !important;
  font-size: 14px !important;
}

/* ── Buttons (shared) ── */
.ra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background .18s, transform .12s, border-color .18s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
}
.ra-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.ra-btn .ra-btn-label { display: inline-flex; align-items: center; gap: 9px; }
.ra-btn--primary { background: #E86010; color: #fff; }
.ra-btn--primary:hover:not(:disabled) { background: #ff6d14; }
.ra-btn--primary:active:not(:disabled) { transform: scale(.98); }
.ra-btn--primary:disabled { opacity: .65; cursor: wait; }

.ra-spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.32);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: ra-spin 0.7s linear infinite;
}
@keyframes ra-spin { to { transform: rotate(360deg); } }

/* ── Footer nav (back / next) ── */
.ra-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 36px 32px;
  margin-top: 4px;
}
.ra-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  background: transparent;
  color: rgba(242,240,237,.7);
  border: 1px solid #2a2a2a;
}
.ra-nav-btn svg { width: 14px; height: 14px; }
.ra-nav-btn:hover:not(:disabled) {
  color: #f2f0ed;
  border-color: #3a3a3a;
  background: #1a1a1a;
}
.ra-nav-next {
  background: #E86010;
  color: #fff;
  border-color: #E86010;
}
.ra-nav-next:hover:not(:disabled) {
  background: #ff6d14;
  border-color: #ff6d14;
  color: #fff;
}
.ra-nav-next:disabled {
  background: #1a1a1a;
  color: rgba(242,240,237,.3);
  border-color: #1e1e1e;
  cursor: not-allowed;
}

/* ── Success / Error state ── */
.ra-state {
  display: none;
  padding: 48px 36px 40px;
  text-align: center;
}
.ra-modal.is-success .ra-state--success,
.ra-modal.is-error .ra-state--error { display: block; }
.ra-modal.is-success .ra-form,
.ra-modal.is-success .ra-nav,
.ra-modal.is-error .ra-form,
.ra-modal.is-error .ra-nav,
{ display: none; }
.ra-modal.is-success .ra-head .ra-title,
.ra-modal.is-error .ra-head .ra-title,
.ra-modal.is-success .ra-head .ra-eyebrow,
.ra-modal.is-error .ra-head .ra-eyebrow { display: none; }
.ra-modal.is-success .ra-head,
.ra-modal.is-error .ra-head {
  padding-bottom: 22px;
  border-bottom: 1px solid #1e1e1e;
}
.ra-state-icon {
  width: 68px; height: 68px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232,96,16,.1);
  color: #E86010;
}
.ra-state-icon--ok { background: rgba(28,122,64,.14); color: #2bb86c; }
.ra-state-icon--warn { background: rgba(232,96,16,.12); color: #E86010; }
.ra-state-icon svg { width: 34px; height: 34px; }
.ra-state h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  color: #f2f0ed;
}
.ra-state p { font-size: 15.5px; color: rgba(242,240,237,.7); line-height: 1.6; max-width: 440px; margin: 0 auto 24px; }
.ra-state-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.ra-state-actions .ra-btn { padding: 13px 28px; min-width: 160px; flex: 0 0 auto; }
.ra-state-fallback {
  display: inline-block;
  margin-top: 22px;
  font-family: 'Barlow', sans-serif;
  font-size: 13.5px;
  color: rgba(242,240,237,.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(242,240,237,.18);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.ra-state-fallback:hover {
  color: #25D366;
  border-bottom-color: #25D366;
}

/* ── Contextual link styling (intervento 11) ── */
.ac-link {
  color: #E86010;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.ac-link:hover { border-bottom-color: #E86010; }

/* ── Mappa wrapper for homepage / contatti ── */
.ac-map-wrap {
  position: relative;
  background: #0e0e0e;
  border: 1px solid #1e1e1e;
  border-radius: 2px;
  overflow: hidden;
}
.ac-map-wrap iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  filter: grayscale(.3) contrast(1.05);
}
.ac-map-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.ac-map-actions a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #E86010;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .15s;
}
.ac-map-actions a:hover { color: #ff6d14; }
.ac-map-actions svg { width: 14px; height: 14px; }

/* ── Tecnico affiancato — figura scontornata accanto a testo ── */
.tc-fig-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px 56px;
  align-items: end;
  margin-top: 44px;
}
.tc-fig-img {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.tc-fig-img img {
  width: 260px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 20px rgba(0,0,0,.35));
}

/* ── Garanzia section (officina.html#garanzia) ── */
.gz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #1e1e1e;
  border: 1px solid #1e1e1e;
  margin-top: 44px;
}
.gz-card {
  background: #0e0e0e;
  padding: 32px 26px;
  border-top: 2px solid transparent;
  transition: border-color .2s, background .2s;
}
.gz-card:hover { border-top-color: #E86010; background: #151515; }
.gz-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 44px;
  color: #E86010;
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -.03em;
}
.gz-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  color: #f2f0ed;
}
.gz-body { font-size: 14.5px; color: #aaa; line-height: 1.6; }
.gz-micro {
  margin-top: 32px;
  padding: 22px 26px;
  background: rgba(232,96,16,.06);
  border-left: 2px solid #E86010;
  font-size: 14.5px;
  color: rgba(242,240,237,.78);
  line-height: 1.65;
  font-style: italic;
}

@media (max-width: 768px) {
  .ra-overlay { padding: 0; }
  .ra-modal { margin: 0; max-width: 100%; border-radius: 0; min-height: 100vh; }
  .ra-head { padding: 26px 22px 18px; }
  .ra-title { font-size: 26px; margin-bottom: 18px; }
  .ra-form { padding: 24px 22px 4px; }
  .ra-grid { grid-template-columns: 1fr; }
  .ra-nav { padding: 12px 22px 28px; }
  .ra-nav-btn { padding: 12px 16px; font-size: 12px; flex: 1; justify-content: center; }
  .ra-nav-back:disabled, .ra-nav-back[style*="hidden"] { display: none; }
  .ra-state { padding: 36px 22px 32px; }
  .ra-state-actions .ra-btn { width: 100%; min-width: 0; }
  .ra-progress-label { font-size: 10px; letter-spacing: .1em; }
  .ra-summary { padding: 16px 18px; }
  .ra-summary-row { font-size: 13.5px; }
  .ra-chip { font-size: 13px; padding: 7px 12px; }
  .gz-grid { grid-template-columns: 1fr; }
  .tc-fig-grid { grid-template-columns: 1fr; }
  .tc-fig-img { display: none; }
  .ac-map-wrap iframe { height: 280px; }
}
