/* Stile comune delle pagine per categoria (sito-web-*.html).
   Stessi colori e caratteri della home (index.html). */

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

:root {
  --color-primary:      #2D3AC7;
  --color-primary-dark: #1E2B9E;
  --color-primary-soft: #ECEEFC;
  --color-text:         #1A1A2E;
  --color-text-muted:   #4A5568;
  --color-border:       #D4D1C8;
  --color-bg:           #F8F7F4;
  --color-surface:      #FFFFFF;
  --color-surface-alt:  #E8E4D9;
  --font-heading: 'Plus Jakarta Sans', 'PlusJakarta-fallback', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Inter-fallback', system-ui, -apple-system, sans-serif;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 9999px;
  --shadow-xs:   0 2px 8px rgba(26,26,46,0.10);
  --shadow-sm:   0 6px 20px rgba(26,26,46,0.14);
  --shadow-md:   0 12px 32px rgba(26,26,46,0.16);
}

@font-face {
  font-family: 'Inter-fallback';
  src: local('system-ui');
  ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; size-adjust: 107%;
}
@font-face {
  font-family: 'PlusJakarta-fallback';
  src: local('Segoe UI'), local('system-ui');
  ascent-override: 93%; descent-override: 24%; line-gap-override: 0%; size-adjust: 103%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1100px; margin-inline: auto; padding-inline: 24px; }
@media (min-width: 768px)  { .container { padding-inline: 40px; } }
@media (min-width: 1024px) { .container { padding-inline: 64px; } }

.label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

h1, h2, h3 { font-family: var(--font-heading); color: var(--color-text); line-height: 1.2; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }

/* ── Bottoni ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 16px; line-height: 1;
  padding: 14px 26px; border-radius: var(--radius-full); border: none; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background 200ms, transform 200ms, box-shadow 200ms, color 200ms;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-wa { background: #25D366; color: #0B3D20; font-weight: 600; }
.btn-wa:hover { background: #1FBE5B; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-white { background: #fff; color: var(--color-primary); font-weight: 600; }
.btn-white:hover { background: #e9e9f5; }

/* ── Barra in alto ───────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,247,244,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.topbar__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); }
.topbar__logo img {
  height: 34px; width: auto;
  /* stesso trucco della home: logo nel colore principale, visibile su sfondo chiaro */
  filter: brightness(0) saturate(100%) invert(20%) sepia(85%) saturate(1500%) hue-rotate(218deg) brightness(95%);
}
.topbar__logo span { font-family: var(--font-heading); font-weight: 700; font-size: 17px; }
.topbar .btn { padding: 10px 18px; font-size: 14px; }
@media (max-width: 420px) { .topbar__logo span { display: none; } }

/* ── Briciole ────────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--color-text-muted); padding-top: 20px; }
.crumbs a { color: var(--color-text-muted); }
.crumbs span[aria-current] { color: var(--color-text); }

/* ── Intestazione ────────────────────────────────────────── */
.hero { padding: 40px 0 64px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--color-primary); }
.hero__sub { font-size: 18px; color: var(--color-text-muted); max-width: 640px; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust { margin-top: 18px; font-size: 14px; color: var(--color-text-muted); }

/* ── Sezioni ─────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section--alt { background: var(--color-surface-alt); }
.section__intro { font-size: 17px; color: var(--color-text-muted); max-width: 680px; margin-bottom: 32px; }

.grid { display: grid; gap: 18px; }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.box p { color: var(--color-text-muted); font-size: 15px; }
.box__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: var(--color-primary-soft); color: var(--color-primary);
  font-family: var(--font-heading); font-weight: 700; margin-bottom: 12px;
}

.checks { list-style: none; display: grid; gap: 12px; }
@media (min-width: 700px) { .checks { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
.checks li { position: relative; padding-left: 30px; font-size: 16px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D3AC7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ── Prezzi ──────────────────────────────────────────────── */
.price-card { display: flex; flex-direction: column; gap: 14px; }
.price-card--featured { border: 2px solid var(--color-primary); box-shadow: var(--shadow-sm); }
.price-card__badge {
  align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--color-primary); color: #fff; padding: 4px 12px; border-radius: var(--radius-full);
}
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-family: var(--font-heading); }
.price__from { font-size: 14px; color: var(--color-text-muted); }
.price__value { font-size: 34px; font-weight: 700; color: var(--color-primary); line-height: 1; }
.price-card ul { list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--color-text-muted); }
.price-card ul li::before { content: "✓ "; color: var(--color-primary); font-weight: 700; }
.price-card .btn { margin-top: auto; align-self: flex-start; }
.price-note { margin-top: 22px; font-size: 14px; color: var(--color-text-muted); max-width: 720px; }

/* ── Esempio reale ───────────────────────────────────────── */
.example { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .example { grid-template-columns: 1.2fr 1fr; } }
.example img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.example__badge { display: inline-block; font-size: 13px; font-weight: 500; color: #166534; background: #DCFCE7; padding: 4px 12px; border-radius: var(--radius-full); margin-bottom: 12px; }

/* ── Domande frequenti ───────────────────────────────────── */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 22px; }
.faq summary { cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-primary); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--color-text-muted); }

/* ── Chiamata finale ─────────────────────────────────────── */
.cta { background: var(--color-primary); color: #fff; border-radius: var(--radius-lg); padding: 44px 28px; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 26px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Altre categorie + piè di pagina ─────────────────────── */
.others { display: flex; flex-wrap: wrap; gap: 10px; }
.others a { text-decoration: none; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 8px 16px; font-size: 15px; }
.others a:hover { border-color: var(--color-primary); }

.footer { background: #1A1A2E; color: rgba(255,255,255,0.7); padding: 40px 0 96px; font-size: 14px; margin-top: 64px; }
.footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; list-style: none; }

/* ── WhatsApp fisso ──────────────────────────────────────── */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 58px; height: 58px; border-radius: var(--radius-full); background: #25D366;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  transition: transform 200ms;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
@media (min-width: 1024px) { .wa-float { right: 32px; bottom: 32px; } }

/* ── Banner cookie ───────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: #1A1A2E; border-top: 2px solid rgba(45,58,199,0.45);
  padding: 16px 0; display: none; box-shadow: 0 -6px 24px rgba(0,0,0,0.2);
}
.cookie-banner.visible { display: block; }
.cookie-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-banner__text { color: rgba(255,255,255,0.85); font-size: 14px; max-width: 720px; }
.cookie-banner__text a { color: #fff; }
.cookie-banner__actions { display: flex; gap: 10px; }
.cookie-banner button { font: inherit; font-size: 14px; border-radius: var(--radius-full); padding: 9px 18px; cursor: pointer; }
.btn-cookie-accept { background: var(--color-primary); color: #fff; border: none; }
.btn-cookie-reject { background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.35); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .wa-float { transition: none; }
}
