/* ==========================================================================
   Soldi Extra — stylesheet del sito
   Estratto dalla pagina MEP (Mise en place) dei mockup Claude Design.
   Palette Navy/Teal, tipografia Space Grotesk (titoli) + Inter (corpo).
   Bootstrap 5 (CDN) fornisce la griglia/reset; qui solo i componenti custom.
   ========================================================================== */

:root {
  /* Palette */
  --navy: #1B2A4A;
  --teal: #1D9E75;
  --teal-dark: #167A5B;
  --teal-tint: #E5F5EF;
  --surface: #F5F6F8;
  --white: #FFFFFF;
  --text-body: #2B2F36;
  --text-body-2: #374151;
  --text-muted: #6B7280;
  --text-muted-2: #9CA3AF;
  --border-subtle: #E3E5E9;
  --border-subtle-2: #EEF0F2;

  --success: #1D9E75;
  --warning: #F0B429;
  --warning-bg: #FFF7E8;
  --warning-border: #F0B429;
  --warning-text: #8A5A00;
  --warning-text-2: #7A5200;
  --danger: #D64545;
  --danger-bg: #FBEAEA;
  --danger-border: #E8A3A3;
  --danger-text: #8A2626;

  /* Tipografia */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spaziature (scala dalla MEP) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-body);
}

a { text-decoration: none; color: inherit; }
a:hover { opacity: .72; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin: 0 0 var(--sp-2);
}

p { line-height: 1.6; }

img { max-width: 100%; display: block; }

/* Container fluido: max-width 1200px, gutter clamp come da MEP */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

.section-py { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container-custom {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-logo { display: flex; align-items: center; gap: 9px; }
.site-logo-mark {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  background: var(--teal); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.site-logo-mark-img { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.site-logo-text {
  font-family: var(--font-heading); font-weight: 700; font-size: 19px;
  color: var(--navy); letter-spacing: -0.01em;
}
.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a { font-size: 14.5px; font-weight: 500; color: #4B5563; }
.site-nav a.active { color: var(--navy); }

/* Toggle mobile: checkbox nascosto + label come bottone hamburger.
   Nessun JS: la label attiva lo stato :checked del checkbox, il CSS
   fa il resto. Sotto i 768px il nav e la CTA vanno a capo su tutta
   la larghezza e restano nascosti finché il menu non viene aperto. */
.nav-toggle-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--white); color: var(--navy);
  font-size: 19px; cursor: pointer;
}
.nav-toggle-btn .icon-close { display: none; }
.nav-toggle-checkbox:focus-visible ~ .nav-toggle-btn { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Il wrapper esiste solo per poter aprire/chiudere nav + CTA insieme come
   un unico pannello sotto i 768px. Sopra i 768px "sparisce" (display:
   contents): nav e bottone tornano a essere figli diretti del container,
   identico al layout desktop di prima, nessuna differenza visiva. */
.site-nav-panel { display: contents; }

@media (max-width: 767px) {
  .nav-toggle-btn { display: flex; }
  .site-nav-panel {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px 14px;
    margin-top: 4px;
  }
  .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .site-nav a { padding: 12px 2px; border-top: 1px solid var(--border-subtle-2); }
  .site-nav a:first-child { border-top: none; }
  .btn-primary-custom { display: block; width: 100%; text-align: center; margin: 10px 0; }

  .nav-toggle-checkbox:checked ~ .site-nav-panel { display: flex; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-btn .icon-open { display: none; }
  .nav-toggle-checkbox:checked ~ .nav-toggle-btn .icon-close { display: inline-block; }
}

/* ==========================================================================
   Bottoni
   ========================================================================== */
.btn-primary-custom {
  display: inline-block;
  background: var(--teal); color: var(--white);
  font-weight: 600; font-size: 14.5px;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: none;
}
.btn-primary-custom:hover { background: var(--teal-dark); opacity: 1; }

.btn-secondary-custom {
  display: inline-block;
  background: var(--white); border: 1.5px solid var(--navy); color: var(--navy);
  font-weight: 600; font-size: 14.5px;
  padding: 11px 23px; border-radius: var(--radius-md);
}
.btn-secondary-custom:hover { background: var(--surface); opacity: 1; }

.btn-secondary-inverse {
  display: inline-block;
  background: transparent; border: 1px solid #445780; color: var(--white);
  font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: var(--radius-md);
}
.btn-secondary-inverse:hover { background: rgba(255,255,255,.08); opacity: 1; }

.btn-ghost-custom {
  display: inline-block;
  background: transparent; color: var(--teal);
  font-weight: 600; font-size: 14.5px;
  padding: 12px 16px; border-radius: var(--radius-md);
}
.btn-ghost-custom:hover { background: var(--teal-tint); opacity: 1; }

.btn-disabled-custom {
  display: inline-block;
  background: var(--border-subtle); color: var(--text-muted-2);
  font-weight: 600; font-size: 14.5px;
  padding: 12px 24px; border-radius: var(--radius-md);
  cursor: not-allowed;
}

/* ==========================================================================
   Card
   ========================================================================== */
.card-article {
  display: block;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card-article-body { padding: 20px; }
.card-article-title {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  color: var(--navy); margin-bottom: 6px; line-height: 1.35;
}
.card-article-excerpt { font-size: 13.5px; color: var(--text-muted); margin: 0; }

.card-category {
  display: block;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--sp-4);
}
.card-category-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3); font-size: 20px; color: var(--teal);
}
.card-category-title {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  color: var(--navy); margin-bottom: 6px;
}
.card-category-excerpt { font-size: 14px; line-height: 1.55; color: var(--text-muted); margin: 0 0 14px; }
.card-category-cta { font-size: 13.5px; font-weight: 600; color: var(--teal); }

.card-comparison { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.card-comparison-head { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--navy); }
.card-comparison-head div { padding: 10px 14px; font-weight: 600; font-size: 12px; color: var(--white); }
.card-comparison-row { display: grid; grid-template-columns: 1.4fr 1fr; }
.card-comparison-row div:first-child { padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--navy); }
.card-comparison-row div:last-child { padding: 10px 14px; }

/* card orizzontale usata negli hub categoria (elenco articoli) */
.card-article-row {
  display: flex; gap: 20px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px;
}
.card-article-row .card-article-body { flex: 1; min-width: 200px; padding: 0; }

/* ==========================================================================
   Badge / tag
   ========================================================================== */
.badge-category {
  display: inline-block;
  background: var(--teal-tint); color: var(--teal-dark);
  font-weight: 600; font-size: 12.5px;
  padding: 4px 11px; border-radius: var(--radius-sm);
}
.badge-dark {
  display: inline-block;
  background: var(--navy); color: var(--white);
  font-weight: 600; font-size: 12.5px;
  padding: 4px 11px; border-radius: var(--radius-sm);
}
.badge-rating {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 12.5px;
  padding: 4px 11px; border-radius: var(--radius-sm);
}
.badge-rating .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-rating-high { background: var(--teal-tint); color: var(--teal-dark); }
.badge-rating-high .dot { background: var(--teal); }
.badge-rating-medium { background: var(--warning-bg); color: var(--warning-text); }
.badge-rating-medium .dot { background: var(--warning); }
.badge-rating-low { background: var(--danger-bg); color: var(--danger-text); }
.badge-rating-low .dot { background: var(--danger); }

/* ==========================================================================
   Alert / box informativi
   ========================================================================== */
.alert-custom {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius-lg); padding: 18px 20px;
  border: 1px solid var(--border-subtle);
}
.alert-custom i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-custom-title { font-family: var(--font-heading); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.alert-custom p { font-size: 14px; margin: 0; }

.alert-scam { background: var(--warning-bg); border-color: var(--warning-border); }
.alert-scam i, .alert-scam .alert-custom-title { color: var(--warning-text); }
.alert-scam p { color: var(--warning-text-2); }

.alert-info { background: var(--teal-tint); border-color: #9BDFC4; }
.alert-info i, .alert-info .alert-custom-title { color: #0F5C42; }
.alert-info p { color: #0F5C42; }

.alert-danger-custom { background: var(--danger-bg); border-color: var(--danger-border); }
.alert-danger-custom i, .alert-danger-custom .alert-custom-title { color: var(--danger-text); }
.alert-danger-custom p { color: var(--danger-text); }

/* box "Attenzione alle truffe" evidenziato (homepage, box grande) */
.scam-box {
  background: var(--warning-bg); border: 1px solid var(--warning-border);
  border-radius: var(--radius-xl); padding: 32px;
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
}
.scam-box-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--warning);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.scam-box-icon i { color: var(--white); font-size: 22px; }
.scam-box h3 { color: var(--warning-text); font-size: 19px; margin-bottom: 8px; }
.scam-box p { color: var(--warning-text-2); font-size: 15px; line-height: 1.6; max-width: 640px; margin: 0 0 16px; }
.scam-box a { color: var(--warning-text); font-weight: 600; font-size: 14px; text-decoration: underline; }

/* ==========================================================================
   Action box per link di affiliazione (CTA + disclosure in un unico box)
   ========================================================================== */
.affiliate-box {
  display: flex; align-items: center; gap: 20px;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 24px 28px;
  margin: 28px 0;
}
.affiliate-box-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: var(--radius-lg);
  background: var(--teal-tint); display: flex; align-items: center; justify-content: center;
}
.affiliate-box-icon i { font-size: 24px; color: var(--teal-dark); }
.affiliate-box-body { flex: 1; min-width: 0; }
.affiliate-box-title {
  font-family: var(--font-heading); font-weight: 700; font-size: 17px;
  color: var(--navy); margin: 0 0 4px;
}
.affiliate-box-text { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.affiliate-box-disclosure {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted-2); margin-top: 10px;
}
.affiliate-box-disclosure i { font-size: 12px; }
.affiliate-box-cta { flex-shrink: 0; white-space: nowrap; }
.affiliate-box-cta i { font-size: 13px; margin-left: 6px; }

@media (max-width: 767px) {
  .affiliate-box { flex-direction: column; align-items: flex-start; padding: 22px; }
  .affiliate-box-cta { display: block; width: 100%; text-align: center; }
}

/* ==========================================================================
   Form
   ========================================================================== */
.form-label-custom { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; }
.form-input-custom {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); font-size: 14px; background: var(--white); font-family: var(--font-body);
}
.form-input-custom:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ==========================================================================
   Breadcrumb / pill filtri / paginazione
   ========================================================================== */
.breadcrumb-custom {
  font-size: 13.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb-custom a { color: var(--text-muted); }
.breadcrumb-custom .current { color: var(--navy); font-weight: 600; }
.breadcrumb-custom i { font-size: 10px; }

.filter-pill {
  display: inline-block;
  font-weight: 600; font-size: 13px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--border-subtle); color: #4B5563;
}
.filter-pill.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.pagination-custom { display: flex; gap: 8px; align-items: center; }
.pagination-custom .page-num {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border-subtle); color: #4B5563;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.pagination-custom .page-num.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ==========================================================================
   Placeholder immagine (in attesa di foto/hero reali)
   ========================================================================== */
.img-placeholder {
  background: var(--teal-tint);
  border: 1px dashed #9BDFC4;
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--teal-dark); text-align: center; padding: 16px;
}
.img-placeholder i { font-size: 26px; }
.img-placeholder span { font-size: 12.5px; font-weight: 600; max-width: 220px; }

/* ==========================================================================
   Tabella comparativa dentro articolo — wrapper obbligatorio per bordi/overflow mobile
   ========================================================================== */
.table-wrap {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 4px; margin: 0 0 32px;
  overflow-x: auto;
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 640px; font-family: var(--font-body); }
.table-wrap thead th {
  background: var(--navy); color: var(--white);
  text-align: left; font-weight: 600; font-size: 13px;
  padding: 14px 16px;
}
.table-wrap thead tr th:first-child { border-radius: 10px 0 0 0; }
.table-wrap thead tr th:last-child { border-radius: 0 10px 0 0; }
.table-wrap tbody td {
  padding: 14px 16px; font-size: 14px; color: var(--text-body-2);
  border-bottom: 1px solid var(--border-subtle-2);
}
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody td:first-child { font-weight: 600; color: var(--navy); }

/* ==========================================================================
   Articolo — tipografia lunga
   ========================================================================== */
.article-body p { font-size: 17px; line-height: 1.75; color: var(--text-body-2); margin: 0 0 24px; }
.article-body h2 { font-size: 24px; margin: 36px 0 16px; }
.article-body h3 { font-size: 19px; margin: 28px 0 12px; }
.article-body ol, .article-body ul { font-size: 17px; line-height: 1.8; color: var(--text-body-2); padding-left: 22px; margin: 0 0 24px; }
.article-body ul li::marker, .article-body ol li::marker { color: var(--teal); font-weight: 700; }
.article-meta { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; flex-wrap: wrap; }

.btn-follow-google {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--teal-dark); border: 1px solid var(--teal-dark);
  color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 12px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
}
.btn-follow-google i { font-size: 12px; }
.btn-follow-google:hover { background: var(--navy); border-color: var(--navy); color: var(--white); opacity: 1; }

/* ==========================================================================
   Avatar iniziali (per le pagine senza foto) + box autore
   ========================================================================== */
.avatar-initials {
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700;
  flex-shrink: 0;
}
.author-box-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 22px;
  margin: 40px 0 0;
}
.author-box-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--navy); }
.author-box-name a { color: var(--navy); }
.author-box-role { font-weight: 600; font-size: 13px; color: var(--teal-dark); margin: 2px 0 8px; }
.author-box-bio { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; max-width: 620px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); padding: 56px clamp(16px,4vw,32px) 28px; }
.site-footer .container-custom {
  padding-left: 0; padding-right: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 36px;
}
.footer-col-title { font-family: var(--font-heading); font-weight: 600; font-size: 14px; color: var(--white); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #9AA5BD; font-size: 13.5px; }
.footer-brand p { color: #9AA5BD; font-size: 13.5px; line-height: 1.6; max-width: 260px; margin: 0; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0; padding: 24px clamp(16px,4vw,32px) 0 clamp(16px,4vw,32px);
  border-top: 1px solid #33456B;
}
.footer-bottom p { color: #7C88A6; font-size: 12.5px; line-height: 1.6; max-width: 760px; margin: 0; }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-muted-custom { color: var(--text-muted); }
.text-success-custom { color: var(--success); }
.text-warning-custom { color: var(--warning); }
.text-danger-custom { color: var(--danger); }
.bg-navy { background: var(--navy); }
.bg-teal { background: var(--teal); }
.bg-surface { background: var(--surface); }
.border-subtle { border-color: var(--border-subtle) !important; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-4);
}

/* Griglia categorie in home: 9 card, sempre a righe di 3 (mai 4) così
   l'ultima riga non resta sbilanciata. auto-fit su .grid-cards da solo
   ne infilava 4 per riga su desktop, lasciando un 4+4+1. */
.category-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; }
}

/* Hero homepage: due colonne (testo + immagine) su desktop,
   impilate su una colonna sotto i 768px. Prima era inline nell'HTML
   con due minmax() fissi (280px + 240px): sotto ~608px di viewport
   non poteva restringersi e faceva scrollare la pagina in orizzontale
   su mobile. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, 420px);
  gap: 48px;
  align-items: center;
}
@media (max-width: 767px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   Ricerca nel sito (sidebar articolo)
   ========================================================================== */
.sidebar-search { margin-bottom: 20px; }
.sidebar-search-label {
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
  color: var(--navy); margin-bottom: 10px;
}
.sidebar-search-form { display: flex; gap: 8px; }
.sidebar-search-input {
  flex: 1; min-width: 0;
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-body); font-size: 13.5px; color: var(--text-body);
}
.sidebar-search-input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.sidebar-search-btn {
  flex-shrink: 0; width: 40px; border-radius: var(--radius-md); border: none;
  background: var(--teal); color: var(--white); font-size: 16px; cursor: pointer;
}
.sidebar-search-btn:hover { background: var(--teal-dark); }
.sidebar-search-note { font-size: 12px; color: var(--text-muted-2); margin: 6px 0 0; }

/* ==========================================================================
   Sommario articolo (TOC)
   ========================================================================== */
.toc {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--sp-4); margin-bottom: 20px;
}
.toc-title {
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
  color: var(--navy); margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc-counter; }
.toc li { counter-increment: toc-counter; margin-bottom: 8px; }
.toc li:last-child { margin-bottom: 0; }
.toc li a {
  display: flex; gap: 8px; font-size: 13.5px; line-height: 1.4;
  color: var(--text-body-2); font-weight: 500;
}
.toc li a::before {
  content: counter(toc-counter); flex-shrink: 0;
  color: var(--teal); font-weight: 700; font-family: var(--font-heading);
}
.toc li a:hover { color: var(--teal-dark); }

.toc-mobile-only { display: none; }

@media (max-width: 767px) {
  .toc-mobile-only { display: block; margin: 20px 0 8px; }
  .toc-sidebar-only { display: none; }
}

/* Infografiche SVG scritte a mano (GUIDA-EDITORIALE.md §5.7): due varianti,
   desktop orizzontale e mobile verticale, mai la stessa SVG scalata in giù.
   Sotto ~768px un viewBox pensato per una riga orizzontale di 700+ unità
   diventa illeggibile: il testo scala con l'intera figura, non resta a una
   dimensione minima leggibile. Stesso meccanismo CSS-only di .toc-mobile-only,
   nessun JS. */
.infographic-mobile-only { display: none; }

@media (max-width: 767px) {
  .infographic-mobile-only { display: block; }
  .infographic-desktop-only { display: none; }
}

/* ==========================================================================
   Recensioni utenti guidate — wizard multi-step, stelle, tag, riepilogo
   ========================================================================== */

/* Card contenitore del wizard (una domanda per schermata) */
.wizard-card {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 32px;
  max-width: 620px; margin: 0 auto;
}
.wizard-question {
  font-family: var(--font-heading); font-weight: 600; font-size: 20px;
  color: var(--navy); margin: 0 0 22px;
}
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wizard-hint { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }

/* Barra "Passaggio N di M" */
.wizard-progress-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.wizard-progress { background: var(--border-subtle-2); border-radius: 999px; height: 6px; overflow: hidden; max-width: 620px; margin: 0 auto 20px; }
.wizard-progress-fill { background: var(--teal); height: 100%; border-radius: 999px; transition: width .25s ease; }

/* Scelte a chip radio/multi-select: riusa .filter-pill come base cliccabile,
   qui reso <button> selezionabile invece che link di filtro statico. */
.wizard-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.wizard-choices .filter-pill { cursor: pointer; border: 1.5px solid var(--border-subtle); background: var(--white); }
.wizard-choices .filter-pill.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.wizard-choices .filter-pill.tag-positive.active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.wizard-choices .filter-pill.tag-negative.active { background: var(--danger); border-color: var(--danger); color: var(--white); }

/* Tag positivi/negativi ovunque compaiano già scelti (fuori dal wizard: le
   recensioni pubblicate nelle pagine piattaforma), colorati sempre, non
   solo quando ".active" dentro il wizard */
.filter-pill.tag-positive { background: var(--teal-tint); color: var(--teal-dark); border-color: #9BDFC4; }
.filter-pill.tag-negative { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }

/* Stelle cliccabili (voto 1-5) */
.star-rating { display: flex; gap: 6px; }
.star-rating button {
  background: none; border: none; padding: 2px; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--border-subtle); transition: color .15s ease;
}
.star-rating button.selected, .star-rating button.hover { color: var(--warning); }

/* Riepilogo (step finale, sola lettura) */
.wizard-summary-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wizard-summary-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle-2); }
.wizard-summary-list li span:first-child { color: var(--text-muted); }
.wizard-summary-list li span:last-child { font-weight: 600; color: var(--navy); text-align: right; }

/* Honeypot: fuori schermo, MAI display:none (i bot lo rilevano più facilmente) */
.wizard-honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Recensioni utenti — badge voto aggregato, riepilogo statistiche, card
   ========================================================================== */
.badge-recommend {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 12.5px;
  padding: 4px 11px; border-radius: var(--radius-sm);
  background: var(--teal-tint); color: var(--teal-dark);
}
.badge-recommend i { font-size: 12px; }

.review-summary {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 24px 28px; margin: 24px 0;
}
.review-summary-score { text-align: center; flex-shrink: 0; }
.review-summary-score .value { font-family: var(--font-heading); font-weight: 700; font-size: 34px; color: var(--navy); line-height: 1; }
.review-summary-score .stars { color: var(--warning); font-size: 15px; margin: 6px 0 2px; }
.review-summary-score .count { font-size: 12.5px; color: var(--text-muted); }
.review-summary-stats { display: flex; gap: 20px; flex-wrap: wrap; flex: 1; min-width: 200px; }
.review-summary-stat { min-width: 130px; }
.review-summary-stat .label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 3px; }
.review-summary-stat .bar { background: var(--border-subtle-2); border-radius: 999px; height: 6px; overflow: hidden; }
.review-summary-stat .bar-fill { background: var(--teal); height: 100%; border-radius: 999px; }

.review-card-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 28px; }
.review-card {
  background: var(--white); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.review-card-stars { color: var(--warning); font-size: 14px; }
.review-card-date { font-size: 12.5px; color: var(--text-muted-2); }
.review-card-facts { font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.review-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.review-card-tags .filter-pill { padding: 4px 11px; font-size: 12px; cursor: default; }

.cta-write-review {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--teal-tint); border: 1px solid #9BDFC4;
  border-radius: var(--radius-xl); padding: 20px 24px; margin: 24px 0;
}
.cta-write-review p { margin: 0; font-size: 14.5px; color: #0F5C42; flex: 1; min-width: 200px; }

/* Placeholder di caricamento per l'hub /recensioni: stessa forma e stessa
   altezza delle card definitive, per non far saltare il layout quando
   arrivano i dati reali (vedi reviews-hub.js). */
.card-category-skeleton { pointer-events: none; }
.skeleton-line {
  background: var(--border-subtle);
  border-radius: 6px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; }
}
