/* Eurosuccessioni – style.css
  slate-900 header/footer, slate-800 subnav, slate-50 body, amber-400 accent
  index rileva lingua, adattato per smartphone (< 640px) e tablet (640–900px)
*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; font-weight: 400; line-height: 1.5;
  color: #0f172a; background: #f8fafc;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ── BARRA 1: HEADER ─────────────────────────────────── */
.site-header { background: #0f172a; color: white; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.4); }
.header-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; height: 4rem;
}
.logo-link { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: white; }
.logo-link:hover { opacity: 0.9; }
.logo-icon { width: 1.75rem; height: 1.75rem; color: #fbbf24; flex-shrink: 0; }
.logo-text { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.015em; }
.header-right { display: flex; align-items: center; gap: 0.75rem; }
.cta-header {
  display: none;
  align-items: center; gap: 0.375rem;
  background: #fbbf24; color: #0f172a;
  font-weight: 600; font-size: 0.875rem;
  padding: 0.375rem 1rem; border-radius: 0.5rem;
  text-decoration: none; transition: background 0.15s;
}
@media (min-width: 640px) { .cta-header { display: inline-flex; } }
.cta-header:hover { background: #f59e0b; }
.lang-switcher { display: flex; align-items: center; gap: 0.125rem; }
.lang-btn {
  padding: 0.25rem 0.5rem; border-radius: 0.25rem;
  font-size: 0.875rem; font-weight: 500;
  border: none; cursor: pointer; background: transparent;
  color: #94a3b8; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 0.25rem;
}
.lang-btn:hover { color: white; background: #334155; }
.lang-btn.active { background: #fbbf24; color: #0f172a; }
.lang-flag { font-size: 1rem; }
.lang-code { font-size: 0.75rem; display: none; }
@media (min-width: 640px) { .lang-code { display: inline; } }

/* ── BARRA 2: SUBNAV ─────────────────────────────────── */
.site-subnav { background: #1e293b; border-top: 1px solid #334155; }
.subnav-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; gap: 0.25rem;
  overflow-x: auto; padding-top: 0.5rem; padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  white-space: nowrap; padding: 0.375rem 0.75rem; border-radius: 0.25rem;
  font-size: 0.875rem; color: #94a3b8; text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: white; background: #334155; }
.nav-link.active { background: #f59e0b; color: #0f172a; font-weight: 500; }

/* ── MAIN ─────────────────────────────────────────────── */
main { flex: 1; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: white; padding: 5rem 1rem; text-align: center;
}
.hero-inner { max-width: 56rem; margin: 0 auto; }
.hero-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(251,191,36,0.2); border-radius: 9999px;
  padding: 1rem; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
  line-height: 1.15; margin-bottom: 1rem;
}
.hero-subtitle { font-size: 1.25rem; color: #cbd5e1; max-width: 48rem; margin: 0 auto 1rem; line-height: 1.6; }
.hero-service  { font-size: 1.125rem; color: #fcd34d; max-width: 48rem; margin: 0 auto 2rem; line-height: 1.6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.btn-amber {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fbbf24; color: #0f172a; font-weight: 700;
  padding: 1rem 2rem; border-radius: 0.75rem; font-size: 1.125rem;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: background 0.15s;
}
.btn-amber:hover { background: #f59e0b; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.1); color: white; font-weight: 600;
  padding: 1rem 2rem; border-radius: 0.75rem; font-size: 1.125rem;
  text-decoration: none; border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.15s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* ── SECTION WRAPPER ─────────────────────────────────── */
.section { max-width: 56rem; margin: 0 auto; padding: 2.5rem 1rem; }
.section + .section { padding-top: 0; }

/* ── PAGE BANNER ─────────────────────────────────────── */
.page-banner { background: #0f172a; color: white; padding: 3rem 1rem; }
.page-banner-inner { max-width: 56rem; margin: 0 auto; }
.page-banner h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; margin-bottom: 0.75rem; }
.page-banner p { color: #cbd5e1; font-size: 1.125rem; line-height: 1.6; }

/* ── CARD ─────────────────────────────────────────────── */
.card {
  background: white; border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07); padding: 1.5rem;
}
.card-dark { background: #1e293b; border-color: #334155; color: white; }
.card-amber-light { background: #fffbeb; border: 1px solid #fde68a; border-radius: 0.5rem; padding: 1rem; }
.card-red { background: linear-gradient(to right,#fef2f2,#fffbeb); border: 1px solid #fecaca; border-radius: 1rem; padding: 2rem; }
.card-border-l { border-left: 4px solid #fbbf24; }
.card-border-amber2 { border: 2px solid #fcd34d; }

/* ── GRID ─────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* ── STEP ROW ─────────────────────────────────────────── */
.step-row { display: flex; gap: 1rem; }
.step-num {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 9999px;
  background: #fbbf24; color: #0f172a; font-weight: 700; font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center; margin-top: 0.125rem;
}
.step-num-lg {
  flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 9999px;
  background: #fbbf24; color: #0f172a; font-weight: 700; font-size: 1.125rem;
  display: flex; align-items: center; justify-content: center;
}
.step-label { font-size: 0.65rem; font-weight: 700; color: #f59e0b; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── HOW-STEP CARD ───────────────────────────────────── */
.how-card { display: flex; align-items: flex-start; gap: 1.25rem; }
.how-icon-wrap { flex-shrink: 0; background: #fffbeb; border-radius: 0.5rem; padding: 0.75rem; }

/* ── GUARANTEE ───────────────────────────────────────── */
.gar-dark-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(255,255,255,0.05); border-radius: 0.5rem; padding: 0.75rem 1rem;
}
.gar-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #fbbf24; flex-shrink: 0; }

/* ── TOPIC CARD ──────────────────────────────────────── */
.topic-card {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border-radius: 0.75rem; border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07); padding: 1.25rem;
  text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.topic-card:hover { border-color: #fbbf24; box-shadow: 0 4px 6px rgba(0,0,0,0.08); }
.topic-card-l { display: flex; align-items: center; gap: 0.75rem; }
.topic-icon-wrap { background: #f1f5f9; border-radius: 0.5rem; padding: 0.625rem; transition: background 0.15s; }
.topic-card:hover .topic-icon-wrap { background: #fffbeb; }
.topic-icon { width: 1.25rem; height: 1.25rem; color: #64748b; transition: color 0.15s; }
.topic-card:hover .topic-icon { color: #d97706; }
.topic-label { font-weight: 500; color: #0f172a; font-size: 0.9375rem; }
.topic-arrow { width: 1rem; height: 1rem; color: #94a3b8; transition: color 0.15s; }
.topic-card:hover .topic-arrow { color: #f59e0b; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq-item { background: white; border-radius: 0.75rem; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.07); overflow: hidden; }
.faq-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; text-align: left; background: none; border: none; cursor: pointer; transition: background 0.15s; }
.faq-btn:hover { background: #f8fafc; }
.faq-q { font-weight: 600; color: #0f172a; padding-right: 1rem; font-size: 0.9375rem; line-height: 1.5; }
.faq-chevron-d { width: 1.25rem; height: 1.25rem; color: #94a3b8; flex-shrink: 0; }
.faq-chevron-u { width: 1.25rem; height: 1.25rem; color: #f59e0b; flex-shrink: 0; display: none; }
.faq-answer { padding: 1rem 1.5rem 1.25rem; font-size: 0.875rem; color: #475569; line-height: 1.7; border-top: 1px solid #f1f5f9; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-chevron-d { display: none; }
.faq-item.open .faq-chevron-u { display: block; }

/* ── FORM ─────────────────────────────────────────────── */
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.25rem; }
.form-input, .form-textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 0.5rem;
  padding: 0.75rem 1rem; font-size: 1rem; color: #0f172a;
  background: white; font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-textarea:focus { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,0.2); }
.form-textarea { resize: vertical; min-height: 8rem; }
.form-check-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.form-check { width: 1rem; height: 1rem; margin-top: 0.125rem; accent-color: #fbbf24; flex-shrink: 0; }
.form-check-label { font-size: 0.875rem; color: #374151; font-weight: 500; line-height: 1.5; }
.form-disclaimer { font-size: 0.75rem; color: #64748b; line-height: 1.6; }
.btn-submit {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: #fbbf24; color: #0f172a; font-weight: 700; font-size: 1.125rem;
  padding: 1rem 2rem; border-radius: 0.75rem; border: none; cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15); transition: background 0.15s; font-family: inherit;
}
.btn-submit:hover { background: #f59e0b; }

/* ── CONTACT BUTTONS ─────────────────────────────────── */
.btn-tg { display: inline-flex; align-items: center; gap: 0.5rem; background: #2AABEE; color: white; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.75rem; text-decoration: none; transition: background 0.15s; }
.btn-tg:hover { background: #229ED9; }
.btn-wa { display: inline-flex; align-items: center; gap: 0.5rem; background: #25D366; color: white; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.75rem; text-decoration: none; transition: background 0.15s; }
.btn-wa:hover { background: #20BD5A; }

/* ── MISC ─────────────────────────────────────────────── */
.link-amber { color: #d97706; text-decoration: none; font-weight: 500; }
.link-amber:hover { color: #b45309; }
.link-back { display: inline-flex; align-items: center; gap: 0.25rem; color: #d97706; text-decoration: none; font-weight: 500; font-size: 0.875rem; }
.link-back:hover { color: #b45309; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.shield-icon { display: block; margin: 0 auto 0.75rem; color: #fbbf24; }
.info-box { display: flex; gap: 0.75rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.75rem; padding: 1.25rem; }
.success-box { background: #f0fdf4; border: 1px solid #86efac; border-radius: 0.75rem; padding: 1.5rem; text-align: center; color: #166534; font-weight: 500; display: none; }
.proto-box { background: #f8fafc; border-radius: 0.5rem; padding: 0.75rem 1rem; margin-bottom: 1.5rem; border-left: 3px solid #fbbf24; }
.proto-label { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.proto-num { font-size: 1rem; font-weight: 600; color: #d97706; font-family: monospace; }
.amber-table-title { font-weight: 600; color: #78350f; margin-bottom: 0.75rem; }
.amber-li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #92400e; margin-bottom: 0.5rem; }
.amber-num { width: 1.25rem; height: 1.25rem; background: #fbbf24; color: #78350f; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #475569; margin-bottom: 0.5rem; }
.dot-li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #475569; margin-bottom: 0.5rem; }
.dot-li::before { content: "•"; color: #f59e0b; flex-shrink: 0; margin-top: 0.1rem; }
.arrow-li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #475569; margin-bottom: 0.5rem; }
.arrow-li::before { content: "›"; color: #f59e0b; flex-shrink: 0; font-size: 1rem; line-height: 1.3; }
.dark-li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #cbd5e1; margin-bottom: 0.5rem; }
.dark-li::before { content: "›"; color: #fbbf24; flex-shrink: 0; font-size: 1rem; line-height: 1.3; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.gap-3 { gap: 0.75rem; }

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer { background: #0f172a; color: #64748b; font-size: 0.875rem; padding: 2rem 0; margin-top: 4rem; }
.footer-inner { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.footer-updated { color: #94a3b8; font-weight: 500; margin-bottom: 0.5rem; }
.footer-disclaimer { font-size: 0.75rem; line-height: 1.6; max-width: 64rem; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 639px) {
  /* Hero */
  .hero { padding: 2.5rem 1rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-service  { font-size: 0.9375rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas a { text-align: center; justify-content: center; font-size: 1rem !important; padding: 0.75rem 1rem !important; }

  /* Sections */
  .section { padding: 1.5rem 1rem; }
  .page-banner { padding: 1.75rem 1rem; }
  .page-banner h1 { font-size: 1.5rem; }
  .page-banner p { font-size: 0.9375rem; }

  /* Cards */
  .card { padding: 1.25rem; }
  .step-num-lg { width: 2.25rem; height: 2.25rem; font-size: 1rem; flex-shrink: 0; }

  /* Header: hide "Richiedi assistenza" button, keep lang switcher */
  .cta-header-outline { display: none !important; }

  /* Lang switcher: smaller */
  .lang-btn-plain { padding: 0.2rem 0.375rem; font-size: 0.75rem; }

  /* Subnav: already scrollable, ensure touch-friendly */
  .nav-link { font-size: 0.8125rem; padding: 0.375rem 0.625rem; }
  .subnav-inner { gap: 0.125rem; }

  /* Two-column grids → single column */
  .grid-2 { grid-template-columns: 1fr !important; gap: 1rem; }
  .grid-3 { grid-template-columns: 1fr !important; gap: 0.75rem; }

  /* Richiedi assistenza two-col layout */
  div[style*="grid-template-columns:1fr 320px"],
  div[style*="grid-template-columns: 1fr 320px"] {
    grid-template-columns: 1fr !important;
  }

  /* Form rows */
  .form-row { grid-template-columns: 1fr !important; }

  /* Metrics (procedure page) */
  .metrics { flex-direction: column; }
  .metric { min-width: unset; }

  /* Timeline (procedure page) */
  .tl-card-top { flex-direction: column; gap: 0.5rem; }
  .tl-timing { align-self: flex-start; }

  /* Footer */
  .site-footer-new { padding: 1.75rem 0; }
  .footer-new-inner div[style*="display:flex"] { flex-direction: column; align-items: center; }

  /* Garanzie dark section */
  div[style*="background:#0f172a"] .grid-2 { grid-template-columns: 1fr !important; }

  /* Urgenza section icons */
  div[style*="display:flex;gap:1rem;justify-content:center"] { flex-wrap: wrap; gap: 0.75rem !important; }

  /* Topic cards grid */
  .grid-3.topic-grid { grid-template-columns: 1fr !important; }
}

/* Medium screens (tablets) */
@media (min-width: 640px) and (max-width: 900px) {
  .hero h1 { font-size: 2.25rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  div[style*="grid-template-columns:1fr 320px"],
  div[style*="grid-template-columns: 1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
}

