/* ═════════════════════════════════════════════════════════════════════
   Centro Risarcimenti — styles.css
   Conversione vanilla (no Tailwind / no framework). Mobile-first.
   Struttura: reset → custom properties → layout → componenti → media query
   ═════════════════════════════════════════════════════════════════════ */

/* ─── 1. RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; font-family: var(--font-sans); color: var(--slate-800); background: #fff; -webkit-font-smoothing: antialiased; line-height: 1.5; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; transition: color .2s; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

/* ─── 2. CUSTOM PROPERTIES (design tokens) ────────────────────────── */
:root {
  /* Brand */
  --brand-primary: #1a3a5c;
  --brand-primary-dark: #122844;
  --brand-primary-light: #2a5080;
  --brand-accent: #e8a020;
  --brand-accent-dark: #c8861a;
  --brand-accent-light: #f0b840;
  --brand-success: #16a34a;
  --brand-surface: #f8f9fb;
  --brand-border: #e2e8f0;
  --brand-navy-deep: #0f2236;

  /* Slate scale (Tailwind-equivalent) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Accent scale */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-700: #0f766e;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-700: #c2410c;
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-700: #7e22ce;
  --green-50: #f0fdf4;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-700: #15803d;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing & layout */
  --container: 80rem;             /* 1280px */
  --container-narrow: 56rem;      /* 896px */
  --section-pad-y: 4rem;
  --section-pad-y-lg: 6rem;

  /* Radius */
  --radius-sm: .375rem;
  --radius: .75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 34, 54, 0.05), 0 1px 3px rgba(15, 34, 54, 0.04);
  --shadow: 0 4px 12px rgba(15, 34, 54, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 34, 54, 0.10);
  --shadow-lg: 0 16px 40px rgba(15, 34, 54, 0.12);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --t-fast: 150ms;
  --t-base: 200ms;
  --t-slow: 300ms;
}

/* ─── 3. TYPOGRAPHY ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; color: var(--brand-primary); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.5rem); }
h3 { font-size: clamp(1.125rem, 1vw + 0.75rem, 1.5rem); }
h4 { font-size: 1.0625rem; }
p { line-height: 1.7; }
p + p { margin-top: .85em; }
strong { font-weight: 600; }
em { font-style: italic; }
small { font-size: .85em; }

/* ─── 4. LAYOUT PRIMITIVES ────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: 1rem; }

.section { padding-block: var(--section-pad-y); }
.section--lg { padding-block: var(--section-pad-y-lg); }
.section--surface { background: var(--brand-surface); }
.section--brand { background: var(--brand-primary); color: #fff; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }
.section--dark { background: var(--brand-navy-deep); color: #fff; }

.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: var(--brand-primary); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ─── 5. BUTTONS ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: var(--radius); border: 1.5px solid transparent; transition: background var(--t-base), color var(--t-base), border-color var(--t-base), box-shadow var(--t-base), transform var(--t-fast); white-space: nowrap; line-height: 1.2; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-accent-dark); box-shadow: var(--shadow); }
.btn--secondary { background: var(--brand-primary); color: #fff; }
.btn--secondary:hover { background: var(--brand-primary-dark); }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghost:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.6); }
.btn--outline { background: transparent; color: var(--brand-primary); border-color: var(--brand-border); }
.btn--outline:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn--lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn--sm { padding: .5rem 1rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* ─── 6. HEADER + NAV ─────────────────────────────────────────────── */
.topbar { background: var(--brand-primary); color: #fff; font-size: .75rem; padding: .375rem 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.topbar__msg { display: none; }
.topbar__right { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.topbar__tel { display: none; align-items: center; gap: .375rem; }
.topbar__tel:hover { color: var(--amber-300); }
.topbar__divider { color: rgba(255,255,255,.4); }
.topbar__badge { color: var(--green-400); font-weight: 500; }

.site-header { position: sticky; top: 0; z-index: 40; width: 100%; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--slate-100); transition: box-shadow var(--t-slow); }
.site-header.is-scrolled { box-shadow: var(--shadow); }
.nav { max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.nav__row { display: flex; align-items: center; justify-content: space-between; height: 4.75rem; }
.nav__logo { display: block; flex-shrink: 0; }
.nav__logo img { height: 3.6rem; width: auto; }
.nav__links { display: none; align-items: center; gap: .125rem; }
.nav__link { padding: .5rem .875rem; font-size: .875rem; font-weight: 500; color: var(--slate-700); border-radius: .5rem; transition: background var(--t-fast), color var(--t-fast); }
.nav__link:hover, .nav__link[aria-current="page"] { background: var(--slate-50); color: var(--brand-primary); }
.nav__ctas { display: none; align-items: center; gap: .75rem; }
.nav__cta { padding: .625rem 1rem; background: var(--brand-accent); color: #fff; font-size: .8125rem; font-weight: 700; border-radius: .625rem; transition: background var(--t-fast); }
.nav__cta:hover { background: var(--brand-accent-dark); }
.nav__simulator { display: inline-flex; align-items: center; gap: .375rem; padding: .625rem 1rem; border: 1px solid var(--brand-border); color: var(--slate-700); font-size: .8125rem; font-weight: 500; border-radius: .625rem; background: #fff; transition: border-color var(--t-fast), color var(--t-fast); }
.nav__simulator:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.nav__burger { padding: .5rem; color: var(--slate-600); border-radius: .5rem; transition: background var(--t-fast); }
.nav__burger:hover { background: var(--slate-100); }
.nav__burger svg { width: 1.5rem; height: 1.5rem; }

/* Mobile menu (off-canvas) */
.mobile-menu { display: none; border-top: 1px solid var(--slate-100); background: #fff; max-height: 80vh; overflow-y: auto; animation: slide-down .25s cubic-bezier(0.16,1,0.3,1) both; }
.mobile-menu.is-open { display: block; }
.mobile-menu__item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .875rem 1rem; text-align: left; font-size: .875rem; font-weight: 600; color: var(--slate-800); border-bottom: 1px solid var(--slate-50); transition: background var(--t-fast); }
.mobile-menu__item:hover { background: var(--slate-50); }
.mobile-menu__icon { width: 1.75rem; height: 1.75rem; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mobile-menu__icon svg { width: 1rem; height: 1rem; }
.mobile-menu__chevron { margin-left: auto; width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--slate-400); transition: transform var(--t-base); }
.mobile-menu__item[aria-expanded="true"] .mobile-menu__chevron { transform: rotate(180deg); }
.mobile-menu__sublist { display: none; padding: .75rem 1rem 1rem 3rem; background: rgba(248,250,252,.6); }
.mobile-menu__item[aria-expanded="true"] + .mobile-menu__sublist { display: block; }
.mobile-menu__sublist a { display: block; padding: .5rem .75rem; font-size: .875rem; color: var(--slate-700); border-radius: .5rem; transition: background var(--t-fast), color var(--t-fast); }
.mobile-menu__sublist a:hover { background: #fff; color: var(--brand-primary); }
.mobile-menu__ctas { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; border-top: 1px solid var(--slate-100); }
.mobile-menu__ctas .btn { width: 100%; }

/* ─── 7. HERO ─────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: linear-gradient(140deg, #0f2236 0%, #1a3a5c 55%, #1e4570 100%); }
.hero__noise { position: absolute; inset: 0; opacity: .025; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); background-size: 200px; }
.hero__blob { position: absolute; border-radius: 50%; pointer-events: none; }
.hero__blob--gold { top: -8rem; right: -5rem; width: 500px; height: 500px; background: radial-gradient(circle, rgba(232,160,32,0.12) 0%, transparent 70%); }
.hero__blob--navy { bottom: -6rem; left: -4rem; width: 400px; height: 400px; background: radial-gradient(circle, rgba(42,80,128,0.4) 0%, transparent 70%); }
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 3rem; max-width: var(--container); margin-inline: auto; padding: 5rem 1rem; align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem 1rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-full); margin-bottom: 1.5rem; }
.hero__eyebrow-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--green-400); animation: pulse 2s infinite; }
.hero__eyebrow-text { font-size: .875rem; color: rgba(255,255,255,.9); font-weight: 500; }
.hero__title { color: #fff; margin-bottom: 1.5rem; text-wrap: balance; }
.hero__title em { color: var(--brand-accent); font-style: normal; }
.hero__sub { color: var(--slate-300); font-size: 1.125rem; line-height: 1.65; margin-bottom: 2rem; max-width: 36rem; }
.hero__badges { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2.5rem; }
.hero__badge { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: rgba(255,255,255,.9); }
.hero__badge svg { width: 1rem; height: 1rem; color: var(--green-400); flex-shrink: 0; }
.hero__actions { display: flex; flex-direction: column; gap: 1rem; }
.hero__microcopy { margin-top: 1.25rem; font-size: .75rem; color: var(--slate-400); }
.hero__image { display: block; max-width: 26rem; margin-inline: auto; }
.hero__image img { border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── 8. SECTION HEADING ──────────────────────────────────────────── */
.section-heading { margin-bottom: 3rem; }
.section-heading--centered { text-align: center; }
.section-heading--centered .section-heading__subtitle { margin-inline: auto; }
.section-heading__eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-accent); margin-bottom: .75rem; }
.section-heading--light .section-heading__eyebrow { color: var(--brand-accent-light); }
.section-heading__title { margin-bottom: 1rem; }
.section-heading--light .section-heading__title { color: #fff; }
.section-heading__subtitle { color: var(--slate-600); font-size: 1.0625rem; line-height: 1.65; max-width: 40rem; }
.section-heading--light .section-heading__subtitle { color: rgba(255,255,255,.65); }

/* ─── 9. CARDS / SERVICES ─────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius-xl); padding: 1.75rem; transition: box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-slow); color: inherit; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-200); }
.card__icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 1rem; border: 1px solid; margin-bottom: 1rem; }
.card__icon svg { width: 1.5rem; height: 1.5rem; }
.card__icon--blue { background: var(--blue-50); border-color: var(--blue-100); color: var(--brand-primary); }
.card__icon--teal { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-700); }
.card__icon--orange { background: var(--orange-50); border-color: var(--orange-100); color: var(--orange-700); }
.card__icon--purple { background: var(--purple-50); border-color: var(--purple-100); color: var(--purple-700); }
.card__title { font-size: 1.125rem; color: var(--brand-primary); margin-bottom: .5rem; text-wrap: balance; }
.card__desc { font-size: .875rem; color: var(--slate-600); line-height: 1.65; flex: 1; margin-bottom: 1rem; }
.card__link { display: inline-flex; align-items: center; gap: .25rem; font-size: .875rem; font-weight: 600; }
.card__link svg { width: 1rem; height: 1rem; transition: transform var(--t-fast); }
.card:hover .card__link svg { transform: translateX(3px); }

/* ─── 10. HOW IT WORKS / STEPS ────────────────────────────────────── */
.steps { display: grid; grid-template-columns: 1fr; gap: 2rem; position: relative; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step__icon-wrap { position: relative; margin-bottom: 1.5rem; }
.step__icon { width: 4rem; height: 4rem; border-radius: 1rem; background: var(--brand-primary); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 16px rgba(15, 34, 54, .15); }
.step__icon svg { width: 1.75rem; height: 1.75rem; color: #fff; }
.step__num { position: absolute; top: -.5rem; right: -.5rem; width: 1.5rem; height: 1.5rem; background: var(--brand-accent); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.step__title { font-size: 1.25rem; color: var(--brand-primary); margin-bottom: .75rem; }
.step__desc { color: var(--slate-600); font-size: .875rem; line-height: 1.65; margin-bottom: 1rem; }
.step__badge { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .75rem; background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); font-size: .75rem; font-weight: 600; border-radius: var(--radius-full); }
.step__badge svg { width: .625rem; height: .625rem; }

/* ─── 11. WHY US ──────────────────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.why-item { padding: 1.75rem; border-radius: var(--radius-xl); border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); transition: background var(--t-base); }
.why-item:hover { background: rgba(255,255,255,.1); }
.why-item__icon { width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: rgba(232,160,32,.15); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem; }
.why-item__title { color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.why-item__desc { color: rgba(255,255,255,.55); font-size: .875rem; line-height: 1.65; }

/* ─── 12. TESTIMONIALS ────────────────────────────────────────────── */
.testimonials__top { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.testimonials__img { display: none; }
.google-badge { display: inline-flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: .75rem 1.5rem; box-shadow: var(--shadow-sm); margin-inline: auto; }
.google-badge__stars { display: flex; align-items: center; gap: .125rem; }
.google-badge__stars span { font-size: .875rem; font-weight: 700; color: var(--slate-800); margin-left: .25rem; }
.google-badge__caption { font-size: .75rem; color: var(--slate-500); margin: 0; }
.testimonials__center { display: flex; justify-content: center; margin-bottom: 2.5rem; }
.testimonials__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.testimonial { background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius-xl); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.testimonial__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.testimonial__author { display: flex; align-items: center; gap: .75rem; }
.testimonial__avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 700; flex-shrink: 0; }
.testimonial__name { font-size: .875rem; font-weight: 600; color: var(--slate-800); }
.testimonial__service { font-size: .75rem; color: var(--slate-500); }
.testimonial__stars { display: flex; gap: .125rem; }
.testimonial__stars svg { width: 1rem; height: 1rem; fill: var(--amber-400); color: var(--amber-400); }
.testimonial__text { color: var(--slate-700); font-size: .875rem; line-height: 1.7; font-style: italic; }
.testimonials__note { text-align: center; margin-top: 2rem; font-size: .75rem; color: var(--slate-400); }

/* ─── 13. FAQ ─────────────────────────────────────────────────────── */
.faq { max-width: var(--container-narrow); margin-inline: auto; }
.faq__tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.faq__tabs-break { flex-basis: 100%; height: 0; }
.faq__tab { padding: .5rem 1rem; font-size: .875rem; font-weight: 500; border-radius: var(--radius-full); border: 1px solid var(--slate-200); background: #fff; color: var(--slate-600); transition: all var(--t-fast); }
.faq__tab:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.faq__tab.is-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.faq__items details { background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.faq__items details[open] { border-color: var(--brand-accent); box-shadow: var(--shadow-sm); }
.faq__items summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--brand-primary); display: flex; justify-content: space-between; align-items: center; gap: 1rem; list-style: none; }
.faq__items summary::-webkit-details-marker { display: none; }
.faq__items summary::after { content: ""; display: inline-block; width: .625rem; height: .625rem; border-right: 2px solid var(--brand-primary); border-bottom: 2px solid var(--brand-primary); transform: rotate(45deg); transition: transform var(--t-base), border-color var(--t-base); flex-shrink: 0; }
.faq__items details[open] summary::after { transform: rotate(-135deg); border-color: var(--brand-accent); }
.faq__items details > div { padding: 0 1.25rem 1.25rem; color: var(--slate-600); line-height: 1.7; font-size: .9375rem; }
.faq__bottom { text-align: center; margin-top: 2rem; font-size: .875rem; color: var(--slate-500); }
.faq__bottom a { color: var(--brand-primary); font-weight: 600; }
.faq__bottom a:hover { text-decoration: underline; }

/* ─── 14. CTA STRIP ───────────────────────────────────────────────── */
.cta-strip { background: var(--brand-primary); color: #fff; text-align: center; padding: 3.5rem 1rem; position: relative; overflow: hidden; }
.cta-strip::before { content: ""; position: absolute; top: -4rem; right: -4rem; width: 18rem; height: 18rem; border-radius: 50%; background: radial-gradient(circle, rgba(232,160,32,.15) 0%, transparent 70%); pointer-events: none; }
.cta-strip__inner { position: relative; max-width: 42rem; margin-inline: auto; }
.cta-strip h2 { color: #fff; margin-bottom: 1rem; }
.cta-strip p { color: rgba(255,255,255,.7); font-size: 1.0625rem; margin-bottom: 2rem; }
.cta-strip__actions { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; }

/* ─── 15. FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: var(--brand-navy-deep); color: rgba(255,255,255,.65); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-col h5 { color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: .625rem; }
.footer-col a { font-size: .875rem; color: rgba(255,255,255,.6); transition: color var(--t-fast); }
.footer-col a:hover { color: #fff; }
.footer__brand img { height: 3.6rem; width: auto; background: #fff; padding: .5rem .75rem; border-radius: .6rem; margin-bottom: 1rem; }
.footer__tagline { font-size: .8125rem; line-height: 1.65; color: rgba(255,255,255,.45); margin-bottom: 1.25rem; }
.footer__contact-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; font-size: .8125rem; }
.footer__contact-item svg { width: .875rem; height: .875rem; color: var(--brand-accent); flex-shrink: 0; margin-top: .25rem; }
.footer__contact-item a, .footer__contact-item span { color: rgba(255,255,255,.6); }
.footer__contact-item a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 1.5rem; }
.footer__bottom-inner { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; justify-content: space-between; }
.footer__legal { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .75rem; color: rgba(255,255,255,.3); align-items: center; }
.footer__legal a { color: rgba(255,255,255,.3); }
.footer__legal a:hover { color: rgba(255,255,255,.6); }
.footer__disclaimer { font-size: .6875rem; color: rgba(255,255,255,.22); line-height: 1.65; margin-top: 1rem; max-width: 100%; }

/* ─── 16. INTERIOR PAGES — page header + content ──────────────────── */
.page-header { background: linear-gradient(140deg, #0f2236 0%, #1a3a5c 100%); color: #fff; padding: 4rem 0 4.5rem; position: relative; overflow: hidden; }
.page-header::before { content: ""; position: absolute; top: -6rem; right: -6rem; width: 22.5rem; height: 22.5rem; border-radius: 50%; background: radial-gradient(circle, rgba(232,160,32,.10) 0%, transparent 70%); }
.page-header__inner { position: relative; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .75rem; color: rgba(255,255,255,.55); margin-bottom: 1.5rem; }
.breadcrumb a { color: rgba(255,255,255,.55); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: rgba(255,255,255,.3); }
.page-header h1 { color: #fff; margin-bottom: 1rem; }
.page-header .lead { color: rgba(255,255,255,.7); font-size: 1.125rem; max-width: 44rem; }
/* Hero pagina: testo a sinistra, immagine a destra da desktop; impilati su mobile */
.page-header__text { min-width: 0; }
@media (min-width: 64em) {
  .page-header__inner:has(.service-hero-img) { display: flex; align-items: center; gap: 3.5rem; }
  .page-header__inner:has(.service-hero-img) .page-header__text { flex: 1 1 auto; min-width: 0; }
  .page-header__inner > .service-hero-img { flex: 0 0 auto; width: clamp(320px, 34%, 420px); max-width: 420px !important; margin: 0 !important; }
}

/* Content body */
.content-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; max-width: var(--container); margin-inline: auto; padding: 4rem 1rem; }
.prose { max-width: 56rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.625rem; color: var(--brand-primary); margin-top: 2.5rem; margin-bottom: .75rem; }
.prose h3 { font-size: 1.25rem; color: var(--brand-primary); margin-top: 1.75rem; margin-bottom: .5rem; }
.prose p { font-size: 1rem; color: var(--slate-600); line-height: 1.75; }
.prose strong { color: var(--slate-800); font-weight: 600; }
.prose ul, .prose ol { margin: 1em 0; padding-left: 0; display: flex; flex-direction: column; gap: .625rem; }
.prose ul li { font-size: 1rem; color: var(--slate-600); line-height: 1.7; position: relative; padding-left: 1.5rem; }
.prose ul li::before { content: "—"; color: var(--brand-accent); font-weight: 700; position: absolute; left: 0; top: 0; }
.prose ol { counter-reset: pol; }
.prose ol li { font-size: 1rem; color: var(--slate-600); line-height: 1.7; position: relative; padding-left: 1.75rem; counter-increment: pol; }
.prose ol li::before { content: counter(pol) "."; color: var(--brand-accent); font-weight: 700; position: absolute; left: 0; top: 0; }
.prose a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--brand-accent-dark); }

.side-cta { background: var(--brand-primary); color: #fff; padding: 1.75rem; border-radius: var(--radius-xl); }
.side-cta h3 { color: #fff; font-size: 1.0625rem; margin-bottom: .5rem; }
.side-cta p { color: rgba(255,255,255,.7); font-size: .875rem; margin-bottom: 1.25rem; }
.side-cta .btn { width: 100%; }
.side-cta__tel { margin-top: .75rem; font-size: .8125rem; color: rgba(255,255,255,.5); text-align: center; }
.side-cta__tel a { color: var(--brand-accent-light); font-weight: 600; }

.process-step { display: grid; grid-template-columns: 3rem 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--slate-100); }
.process-step:last-child { border-bottom: none; }
.process-step__num { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--brand-primary); color: var(--brand-primary); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.process-step h4 { color: var(--brand-primary); margin-bottom: .25rem; font-size: 1rem; }
.process-step p { font-size: .875rem; color: var(--slate-600); line-height: 1.65; margin: 0; }

/* ─── 17. CONTACT PAGE / FORMS ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.contact-info { background: var(--brand-surface); border: 1px solid var(--slate-100); border-radius: var(--radius-xl); padding: 2rem; }
.contact-info h3 { color: var(--brand-primary); margin-bottom: 1.5rem; }
.contact-info ul { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info li { display: flex; align-items: flex-start; gap: .875rem; }
.contact-info__icon { width: 2.5rem; height: 2.5rem; border-radius: .625rem; background: rgba(232,160,32,.12); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; }
.contact-info strong { color: var(--brand-primary); font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: .25rem; font-weight: 700; }
.contact-info a, .contact-info p { color: var(--slate-700); font-size: .9375rem; line-height: 1.5; }
.contact-info a:hover { color: var(--brand-primary); }

.contact-form-card { background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-sm); }
.contact-form-card h3 { color: var(--brand-primary); margin-bottom: .5rem; }
.contact-form-card > p { color: var(--slate-500); font-size: .875rem; margin-bottom: 1.5rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-size: .8125rem; font-weight: 600; color: var(--brand-primary); display: block; margin-bottom: .375rem; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: .75rem .875rem; border: 1.5px solid var(--slate-200); border-radius: var(--radius); font-size: .9375rem; background: #fff; transition: border-color var(--t-fast); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand-primary); }
.contact-form textarea { min-height: 8rem; resize: vertical; }
.contact-form__checkbox { display: flex; gap: .625rem; align-items: flex-start; font-size: .8125rem; color: var(--slate-600); font-weight: 400; line-height: 1.5; }
.contact-form__checkbox input { width: 1rem; height: 1rem; margin-top: .125rem; flex-shrink: 0; }
.contact-form__checkbox a { color: var(--brand-primary); text-decoration: underline; }
.contact-form button[type="submit"] { width: 100%; margin-top: .5rem; }

.map-wrap { margin-top: 3rem; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--slate-200); max-width: 56rem; margin-inline: auto; }
.map-wrap iframe { width: 100%; height: 22rem; border: 0; display: block; }

/* ─── 18. COOKIE BANNER (GDPR completo) ───────────────────────────── */
.cookie-banner { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 30rem; margin-inline: auto; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-lg); z-index: 90; display: none; }
.cookie-banner.is-visible { display: block; animation: fade-in-up .4s ease-out both; }
.cookie-banner h4 { font-size: 1rem; color: var(--brand-primary); margin-bottom: .5rem; }
.cookie-banner p { font-size: .8125rem; color: var(--slate-600); margin-bottom: 1rem; line-height: 1.6; }
.cookie-banner__actions { display: flex; flex-direction: column; gap: .5rem; }
.cookie-banner__manage { display: none; border-top: 1px solid var(--slate-100); padding-top: 1rem; margin-top: .25rem; }
.cookie-banner.is-expanded .cookie-banner__manage { display: block; }
.cookie-banner.is-expanded .cookie-banner__actions { display: none; }
.cookie-banner__option { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem; background: var(--slate-50); border-radius: .5rem; margin-bottom: .5rem; }
.cookie-banner__option label { display: block; font-size: .8125rem; font-weight: 600; color: var(--brand-primary); margin-bottom: .25rem; cursor: pointer; }
.cookie-banner__option small { font-size: .75rem; color: var(--slate-500); line-height: 1.5; }
.cookie-banner__option input[type=checkbox] { margin-top: .25rem; }
.cookie-banner__option input[disabled] + div label::after { content: " (sempre attivi)"; color: var(--green-700); font-weight: 500; font-size: .7rem; }
.cookie-banner__save { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.cookie-floating { position: fixed; bottom: 1rem; left: 1rem; width: 2.5rem; height: 2.5rem; background: var(--brand-primary); color: #fff; border-radius: 50%; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-md); z-index: 80; transition: background var(--t-fast); }
.cookie-floating:hover { background: var(--brand-primary-dark); }
.cookie-floating.is-visible { display: flex; }
.cookie-floating svg { width: 1.125rem; height: 1.125rem; }
/* Da tablet in su: pulsanti affiancati; su mobile restano impilati a tutta larghezza */
@media (min-width: 40em) {
  .cookie-banner__actions { flex-direction: row; flex-wrap: wrap; }
  .cookie-banner__actions .btn--sm { flex: 1; min-width: 8rem; }
  .cookie-banner__save { flex-direction: row; }
  .cookie-banner__save .btn--sm { flex: 1; }
}

/* ─── 18b. MEGA MENU DESKTOP ──────────────────────────────────────── */
.nav__mega-trigger { display: inline-flex; align-items: center; gap: .25rem; padding: .5rem .875rem; font-size: .875rem; font-weight: 500; color: var(--slate-700); text-decoration: none; border-radius: .5rem; background: none; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.nav__mega-trigger:hover, .nav__mega-trigger[aria-expanded="true"] { background: var(--slate-50); color: var(--brand-primary); }
.nav__mega-trigger svg { width: .875rem; height: .875rem; transition: transform var(--t-base); }
.nav__mega-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--slate-100); box-shadow: var(--shadow-lg); z-index: 50; }
.mega-menu.is-open { display: block; animation: slide-down .25s ease-out both; }
.mega-menu__inner { max-width: var(--container); margin-inline: auto; padding: 2rem 1rem; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.mega-menu__hub h4 { font-size: .875rem; color: var(--brand-primary); display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.mega-menu__hub-icon { width: 1.75rem; height: 1.75rem; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mega-menu__hub-icon svg { width: 1rem; height: 1rem; }
.mega-menu__hub.is-blue .mega-menu__hub-icon { background: var(--blue-50); color: var(--brand-primary); }
.mega-menu__hub.is-teal .mega-menu__hub-icon { background: var(--teal-50); color: var(--teal-700); }
.mega-menu__hub.is-orange .mega-menu__hub-icon { background: var(--orange-50); color: var(--orange-700); }
.mega-menu__hub.is-purple .mega-menu__hub-icon { background: var(--purple-50); color: var(--purple-700); }
.mega-menu__hub h4 a { color: inherit; }
.mega-menu__hub h4 a:hover { color: var(--brand-accent-dark); }
.mega-menu__section { margin-bottom: 1rem; }
.mega-menu__section-title { font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--slate-400); margin-bottom: .5rem; }
.mega-menu__section ul { display: flex; flex-direction: column; gap: .125rem; }
.mega-menu__section a { display: block; padding: .25rem 0; font-size: .8125rem; color: var(--slate-600); transition: color var(--t-fast), transform var(--t-fast); }
.mega-menu__section a:hover { color: var(--brand-primary); transform: translateX(2px); }
.mega-menu__footer { border-top: 1px solid var(--slate-100); padding: 1rem; max-width: var(--container); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.mega-menu__footer-text { font-size: .75rem; color: var(--slate-500); }
.mega-menu__footer-text strong { color: var(--brand-primary); }
.mega-menu__footer a { color: var(--brand-accent-dark); font-size: .75rem; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }

@media (min-width: 64em) {
  .mega-menu__inner { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 18c. CHATBOT WIDGET ─────────────────────────────────────────── */
.chatbot-fab { position: fixed; bottom: 1rem; right: 1rem; width: 3.5rem; height: 3.5rem; background: var(--brand-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 80; transition: background var(--t-fast), transform var(--t-fast); }
.chatbot-fab:hover { background: var(--brand-primary-dark); transform: scale(1.05); }
.chatbot-fab svg { width: 1.5rem; height: 1.5rem; }
.chatbot-fab__pulse { position: absolute; top: -.25rem; right: -.25rem; width: 1rem; height: 1rem; background: var(--green-soft); border: 2px solid #fff; border-radius: 50%; animation: pulse 2s infinite; }
.chatbot-fab[data-new="1"] .chatbot-fab__pulse { background: #ef4444; }
.chatbot-fab[data-new="1"]::after { content: "1"; position: absolute; top: -.5rem; right: -.5rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; background: #ef4444; color: #fff; border: 2px solid #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 8px rgba(239, 68, 68, .35); }
.chatbot-toast { position: fixed; right: 1rem; bottom: 5.5rem; max-width: 17rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 1rem; box-shadow: var(--shadow-md); padding: .75rem .875rem; z-index: 79; display: none; cursor: pointer; }
.chatbot-toast.is-visible { display: block; animation: fade-in-up .35s ease-out both; }
.chatbot-toast__title { font-size: .8125rem; font-weight: 700; color: var(--brand-primary); margin-bottom: .125rem; display: flex; align-items: center; gap: .375rem; }
.chatbot-toast__title::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--green-soft); }
.chatbot-toast__body { font-size: .75rem; color: var(--slate-600); line-height: 1.5; }
.chatbot-toast__close { position: absolute; top: .25rem; right: .25rem; width: 1.25rem; height: 1.25rem; color: var(--slate-400); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.chatbot-toast__close:hover { background: var(--slate-100); color: var(--slate-700); }
.chatbot-toast__close svg { width: .75rem; height: .75rem; }
.chatbot-fab__label { position: absolute; right: 4rem; top: 50%; transform: translateY(-50%); background: var(--brand-primary); color: #fff; padding: .375rem .75rem; font-size: .8125rem; font-weight: 600; border-radius: .5rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--t-base); }
.chatbot-fab:hover .chatbot-fab__label { opacity: 1; }

.chatbot-panel { position: fixed; bottom: 1rem; right: 1rem; width: calc(100% - 2rem); max-width: 22rem; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl); z-index: 95; display: none; flex-direction: column; max-height: calc(100vh - 2rem); overflow: hidden; }
.chatbot-panel.is-open { display: flex; animation: fade-in-up .35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.chatbot-panel__head { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%); color: #fff; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; }
.chatbot-panel__avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; }
.chatbot-panel__title { font-weight: 700; font-size: .9375rem; line-height: 1.2; }
.chatbot-panel__sub { font-size: .75rem; color: rgba(255,255,255,.7); }
.chatbot-panel__close { margin-left: auto; padding: .25rem; opacity: .85; color: #fff; }
.chatbot-panel__close:hover { opacity: 1; }
.chatbot-panel__body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.chatbot-panel__intro { background: var(--slate-50); border-radius: .75rem; padding: .875rem; font-size: .8125rem; color: var(--slate-700); line-height: 1.6; margin-bottom: 1rem; }
.chatbot-panel__intro strong { color: var(--brand-primary); }
.chatbot-panel form { display: flex; flex-direction: column; gap: .75rem; }
.chatbot-panel label { font-size: .75rem; font-weight: 600; color: var(--brand-primary); margin-bottom: .25rem; display: block; }
.chatbot-panel input, .chatbot-panel select, .chatbot-panel textarea { width: 100%; padding: .625rem .75rem; border: 1.5px solid var(--slate-200); border-radius: .5rem; font-size: .875rem; transition: border-color var(--t-fast); }
.chatbot-panel input:focus, .chatbot-panel select:focus, .chatbot-panel textarea:focus { outline: none; border-color: var(--brand-primary); }
.chatbot-panel textarea { min-height: 4.5rem; resize: vertical; }
.chatbot-panel button[type=submit] { width: 100%; margin-top: .5rem; }
.chatbot-panel__success { display: none; padding: 1rem; background: var(--green-50); border: 1px solid var(--green-200); color: var(--green-700); border-radius: .5rem; font-size: .8125rem; line-height: 1.6; text-align: center; }
.chatbot-panel.is-sent .chatbot-panel__success { display: block; }
.chatbot-panel.is-sent form { display: none; }
.chatbot-panel__success svg { width: 2rem; height: 2rem; margin: 0 auto .5rem; color: var(--green-700); }

@media (min-width: 40em) {
  .chatbot-panel { width: 22rem; }
}

/* ─── 18d. FAQ SEARCH ─────────────────────────────────────────────── */
.faq__search { position: relative; max-width: 28rem; margin: 0 auto 1.5rem; }
.faq__search input { width: 100%; padding: .75rem 2.5rem .75rem 2.5rem; font-size: .9375rem; border: 1.5px solid var(--slate-200); border-radius: var(--radius); background: #fff; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.faq__search input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(26, 58, 92, .08); }
.faq__search svg { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); width: 1.125rem; height: 1.125rem; color: var(--slate-400); pointer-events: none; }
.faq__search-clear { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 1.75rem; height: 1.75rem; border-radius: 50%; color: var(--slate-400); display: none; align-items: center; justify-content: center; transition: background var(--t-fast); }
.faq__search-clear.is-visible { display: flex; }
.faq__search-clear:hover { background: var(--slate-100); color: var(--slate-700); }
.faq__search-clear svg { position: static; transform: none; width: 1rem; height: 1rem; color: inherit; }
.faq__no-results { text-align: center; padding: 2rem; font-size: .9375rem; color: var(--slate-500); }
.faq__items details[hidden] { display: none; }
.faq__highlight { background: rgba(232, 160, 32, .25); border-radius: 2px; padding: 0 1px; }

/* ─── 19. ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fade-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.fade-in-up { animation: fade-in-up .55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fade-in { animation: fade-in .45s ease-out both; }
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ─── 20. MEDIA QUERIES (mobile-first) ────────────────────────────── */

/* sm: ≥640px */
@media (min-width: 40em) {
  .container, .nav, .topbar__inner, .page-header__inner { padding-inline: 1.5rem; }
  .content-layout { padding-inline: 1.5rem; }
  .topbar__msg { display: inline; }
  .topbar__tel { display: inline-flex; }
  .hero__badges { flex-direction: row; flex-wrap: wrap; gap: .75rem 1.5rem; }
  .hero__actions { flex-direction: row; }
  .footer__bottom-inner { flex-direction: row; align-items: center; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .testimonials__grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-strip__actions { flex-direction: row; }
}

/* md: ≥768px */
@media (min-width: 48em) {
  .section { padding-block: 5rem; }
  .section--lg { padding-block: 7rem; }
  .steps { grid-template-columns: repeat(3, 1fr); position: relative; }
  .steps::before { content: ""; position: absolute; top: 2rem; left: 33%; right: 33%; height: 1px; background: linear-gradient(to right, transparent, var(--slate-200), transparent); }
  .step { align-items: flex-start; text-align: left; }
}

/* lg: ≥1024px */
@media (min-width: 64em) {
  .container, .nav, .topbar__inner, .page-header__inner { padding-inline: 2rem; }
  .content-layout { padding-inline: 2rem; padding-block: 5rem; grid-template-columns: 1fr 20rem; }
  .nav__row { height: 5.75rem; }
  .nav__logo img { height: 4.4rem; }
  .nav__links, .nav__ctas { display: flex; }
  .nav__burger { display: none; }
  .mobile-menu { display: none !important; }

  .hero__inner { grid-template-columns: 1fr 26rem; padding-block: 8rem; gap: 4rem; }
  .hero__title { font-size: 3.75rem; }
  .hero__image { display: block; }

  .cards { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonials__top { grid-template-columns: 1fr 20rem; }
  .testimonials__img { display: block; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* xl: ≥1280px */
@media (min-width: 80em) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}


/* ═══ Mega-menu Servizi: 4 pulsanti categoria ═══ */
.mega-menu__inner--buttons { grid-template-columns: 1fr; gap: .75rem; padding: 1.25rem 1rem; }
.mega-btn { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--slate-100); border-radius: 1rem; background: #fff; transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base); }
.mega-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.mega-btn__icon { width: 3.5rem; height: 3.5rem; border-radius: .875rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mega-btn__icon svg { width: 2rem; height: 2rem; }
.mega-btn__text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mega-btn__title { font-size: 1rem; font-weight: 700; color: var(--slate-900); line-height: 1.2; }
.mega-btn__desc { font-size: .8125rem; color: var(--slate-500); line-height: 1.3; }
.mega-btn__arrow { width: 1.1rem; height: 1.1rem; margin-left: auto; color: var(--slate-300); flex-shrink: 0; transition: transform var(--t-base), color var(--t-base); }
.mega-btn:hover .mega-btn__arrow { transform: translateX(3px); }
.mega-btn--blue   .mega-btn__icon { background: var(--blue-50);   color: var(--brand-primary); }
.mega-btn--teal   .mega-btn__icon { background: var(--teal-50);   color: var(--teal-700); }
.mega-btn--orange .mega-btn__icon { background: var(--orange-50); color: var(--orange-700); }
.mega-btn--purple .mega-btn__icon { background: var(--purple-50); color: var(--purple-700); }
.mega-btn--blue:hover   { border-color: var(--brand-primary); }
.mega-btn--teal:hover   { border-color: var(--teal-700); }
.mega-btn--orange:hover { border-color: var(--orange-700); }
.mega-btn--purple:hover { border-color: var(--purple-700); }
.mega-btn--blue:hover   .mega-btn__arrow { color: var(--brand-primary); }
.mega-btn--teal:hover   .mega-btn__arrow { color: var(--teal-700); }
.mega-btn--orange:hover .mega-btn__arrow { color: var(--orange-700); }
.mega-btn--purple:hover .mega-btn__arrow { color: var(--purple-700); }

/* mobile: intestazione + icone categoria piu' grandi */
.mobile-menu__heading { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--slate-400); padding: 1rem 1rem .35rem; }
.mobile-menu__item--cat { font-size: .9375rem; }
.mobile-menu__item--cat .mobile-menu__icon { width: 2.5rem; height: 2.5rem; border-radius: .625rem; }
.mobile-menu__item--cat .mobile-menu__icon svg { width: 1.4rem; height: 1.4rem; }

@media (min-width: 48em) {
  .mega-menu__inner--buttons { grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.75rem 1rem; }
}


/* ─── Flyout: lista a tendina che appare passando sul pulsante ─── */
.mega-btn-wrap { position: relative; }
.mega-btn-wrap .mega-btn:hover { transform: none; box-shadow: none; }
.mega-btn__flyout {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--slate-100); border-radius: .875rem;
  box-shadow: var(--shadow-lg); padding: .4rem;
  max-height: min(70vh, 30rem); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}
.mega-btn-wrap:hover .mega-btn__flyout,
.mega-btn-wrap:focus-within .mega-btn__flyout { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-btn__flyout ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .05rem; }
.mega-btn__flyout li { margin: 0; }
.mega-btn__flyout a { display: block; padding: .45rem .6rem; font-size: .8125rem; color: var(--slate-600); border-radius: .5rem; transition: background var(--t-fast), color var(--t-fast); }
.mega-btn__flyout a:hover { background: var(--slate-50); color: var(--brand-primary); }
.mega-btn__flyout-all { font-weight: 700; color: var(--brand-primary) !important; margin-top: .15rem; border-top: 1px solid var(--slate-100); }
.mega-btn__flyout-all:hover { background: var(--blue-50) !important; }


/* Evidenziazione chiara al passaggio del cursore sui link delle liste */
.prose li a { border-radius: .2rem; transition: background var(--t-fast), box-shadow var(--t-fast), color var(--t-fast); }
.prose li a:hover { background: var(--blue-50); box-shadow: 0 0 0 .2rem var(--blue-50); color: var(--brand-primary); }
.mega-btn__flyout a:hover { background: var(--blue-50); color: var(--brand-primary); }


/* Esito invio form (Web3Forms) */
.form-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 1.25rem 1.5rem; border-radius: .75rem; font-size: .95rem; line-height: 1.5; }
.form-error { color: #b91c1c; font-size: .85rem; margin-top: .6rem; font-weight: 600; }

/* Directory servizi completa (pagina servizi.html) */
.svc-dir { display: grid; grid-template-columns: 1fr; gap: 1.75rem; margin-top: 2rem; }
@media (min-width: 40em) { .svc-dir { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.5rem; } }
@media (min-width: 64em) { .svc-dir { grid-template-columns: repeat(4, 1fr); } }
.svc-dir__title { font-size: 1rem; font-weight: 700; color: var(--brand-primary); margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.svc-dir__dot { width: .625rem; height: .625rem; border-radius: 50%; flex-shrink: 0; }
.svc-dir__dot--blue { background: var(--brand-primary); }
.svc-dir__dot--teal { background: var(--teal-700); }
.svc-dir__dot--orange { background: var(--orange-700); }
.svc-dir__dot--purple { background: var(--purple-700); }
.svc-dir__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.svc-dir__col li a { display: block; padding: .4rem .55rem; font-size: .875rem; color: var(--slate-600); border-radius: .45rem; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.svc-dir__col li a:hover { background: var(--blue-50); color: var(--brand-primary); }
.svc-dir__all { font-weight: 700; color: var(--brand-primary) !important; margin-top: .15rem; }
.svc-areas { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--slate-200); }
.svc-areas__title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--slate-400); margin-bottom: .75rem; }
.svc-areas__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.svc-areas__list a { font-size: .8125rem; color: var(--slate-600); text-decoration: none; padding: .35rem .75rem; border: 1px solid var(--slate-200); border-radius: 999px; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.svc-areas__list a:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* Blog: filtro per categoria */
.blog-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.blog-tab { padding: .5rem 1rem; font-size: .875rem; font-weight: 600; color: var(--slate-600); background: #fff; border: 1px solid var(--slate-200); border-radius: 999px; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.blog-tab:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.blog-tab.is-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.blog-empty { text-align: center; color: var(--slate-500); padding: 2.5rem 1rem; font-size: .95rem; }
.blog-empty a { color: var(--brand-primary); font-weight: 600; }
