/* ===================================================================
   Michele Poletti — Consulente Finanziario Autonomo
   stile.css — foglio condiviso per tutte le pagine
   Palette: blu #1a3a5c · bianco #ffffff · arancione #e8773a · grigio #f5f5f5
=================================================================== */

/* ===== VARIABILI ===== */
:root {
  --blu:      #1a3a5c;
  --bianco:   #ffffff;
  --arancione:#e8773a;
  --grigio:   #f5f5f5;
  --grigio-2: #e8e8e8;
  --testo:    #1a1a1a;
  --testo-2:  #444444;
  --bordo:    #d8d8d8;
  --max:      900px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--testo);
  background: var(--bianco);
  line-height: 1.75;
}
img { max-width: 100%; display: block; }
a { color: var(--arancione); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  background: var(--blu);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}
.logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bianco);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { color: var(--arancione); text-decoration: none; }

/* Nav desktop */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  padding: 0;
  margin: 0;
}
nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s;
  white-space: nowrap;
}
nav a:hover { color: var(--arancione); text-decoration: none; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bianco);
  border-radius: 2px;
  transition: all 0.28s;
}

/* Mobile: hamburger visibile, menu a tendina */
@media (max-width: 640px) {
  .hamburger { display: flex; }
  nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--blu);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  nav.aperto { max-height: 320px; padding: 0.5rem 0 1rem; }
  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 1.5rem;
  }
  nav ul li a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
  }
  nav ul li:last-child a { border-bottom: none; }
}

/* ===== CONTENITORE ===== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
main { min-height: 55vh; }

/* ===== HERO PRINCIPALE (homepage) ===== */
.hero {
  background: var(--blu);
  color: var(--bianco);
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 5.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}
.hero .sottotitolo {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 660px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

/* ===== HERO COMPATTO (pagine interne) ===== */
.hero-compatto {
  background: var(--blu);
  color: var(--bianco);
  padding: 3rem 1.5rem 2.5rem;
}
.hero-compatto h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  max-width: 760px;
}
.hero-compatto .intro-hero {
  font-size: 1rem;
  opacity: 0.84;
  max-width: 660px;
  line-height: 1.65;
}
.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: underline; }
.breadcrumb a:hover { color: var(--arancione); }

/* ===== SEZIONI ===== */
.sezione { padding: 3.5rem 1.5rem; }
.sezione-grigia { padding: 3.5rem 1.5rem; background: var(--grigio); }
.sezione-blu {
  background: var(--blu);
  color: var(--bianco);
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.sezione-blu h2 { color: var(--bianco); }
.sezione-blu p { opacity: 0.88; max-width: 620px; margin: 0 auto 0.75rem; }

/* ===== TIPOGRAFIA ===== */
h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--blu);
  margin-bottom: 1.1rem;
  line-height: 1.3;
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blu);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
strong { font-weight: 600; }

/* ===== BOTTONI ===== */
.btn {
  display: inline-block;
  background: var(--arancione);
  color: var(--bianco) !important;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(232,119,58,0.35);
}
.btn:hover {
  background: #d06228;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232,119,58,0.45);
}
.btn:active { transform: translateY(0); }
.btn-grande { font-size: 1.1rem; padding: 1rem 2.75rem; }

.link-freccia {
  color: var(--arancione);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}
.link-freccia:hover { text-decoration: underline; }

/* ===== DOMANDE (sezione tre domande) ===== */
.domanda-blocco {
  margin-bottom: 2.25rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--arancione);
}
.domanda-blocco:last-child { margin-bottom: 0; }
.domanda-blocco h3 { color: var(--blu); margin-bottom: 0.5rem; }
.domanda-blocco p { color: var(--testo-2); font-size: 0.97rem; }

/* ===== TABELLA CONFRONTO ===== */
.tabella-wrap { overflow-x: auto; margin: 1.75rem 0; border-radius: 8px; border: 1px solid var(--bordo); }
.tabella-confronto {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}
.tabella-confronto thead th {
  background: var(--blu);
  color: var(--bianco);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}
.tabella-confronto thead th:first-child { min-width: 160px; }
.tabella-confronto tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--grigio-2);
  vertical-align: top;
  color: var(--testo-2);
}
.tabella-confronto tbody td:first-child { font-weight: 600; color: var(--testo); }
.tabella-confronto tbody tr:nth-child(even) td { background: var(--grigio); }
.tabella-confronto tbody tr:last-child td { border-bottom: none; }

/* ===== CARD SERVIZI ===== */
.card-griglia {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.75rem 0;
}
@media (min-width: 600px) { .card-griglia-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .card-griglia-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-left: 4px solid var(--arancione);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.card-blu-sinistra {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-left: 4px solid var(--blu);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.card h3, .card-blu-sinistra h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p, .card-blu-sinistra p { font-size: 0.93rem; color: var(--testo-2); }

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-verde  { background: #e4f5e9; color: #1e7e34; }
.badge-arancione { background: #fdf0e8; color: #c05520; }
.badge-grigio { background: #e8e8e8; color: #666; }

/* ===== CARD ARTICOLI ===== */
.card-articolo {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-articolo:hover { box-shadow: 0 5px 18px rgba(0,0,0,0.10); transform: translateY(-2px); }
.card-articolo.in-arrivo { opacity: 0.55; pointer-events: none; }
.card-articolo h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card-articolo h3 a { color: var(--blu); text-decoration: none; }
.card-articolo h3 a:hover { color: var(--arancione); }
.card-articolo p { font-size: 0.93rem; color: var(--testo-2); margin-bottom: 0; }

/* ===== RECENSIONI ===== */
.recensioni-box {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  text-align: center;
  max-width: 420px;
  margin: 1.5rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stelle { font-size: 1.75rem; color: #f0b429; letter-spacing: 2px; margin-bottom: 0.4rem; }
.recensioni-box .punteggio { font-size: 1.5rem; font-weight: 800; color: var(--blu); }
.recensioni-box p { font-size: 0.9rem; color: var(--testo-2); margin-top: 0.4rem; }
.recensioni-box a { color: var(--arancione); }

/* ===== FORM ===== */
.form-griglia {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .form-griglia { grid-template-columns: 1fr 1fr; }
  .form-griglia .full { grid-column: 1 / -1; }
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--testo-2);
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--bordo);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bianco);
  color: var(--testo);
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: auto;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--arancione);
  box-shadow: 0 0 0 3px rgba(232,119,58,0.14);
}
.form-group textarea { min-height: 130px; resize: vertical; }

/* ===== FAQ ===== */
.faq-lista { margin: 1.5rem 0; }
.faq-item {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.faq-item h3 { color: var(--blu); margin-bottom: 0.5rem; font-size: 1rem; }
.faq-item p { font-size: 0.93rem; color: var(--testo-2); margin: 0; }

/* ===== PASSI NUMERATI ===== */
.passi-lista { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: passi; }
.passi-lista li {
  counter-increment: passi;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.passi-lista li::before {
  content: counter(passi);
  background: var(--arancione);
  color: var(--bianco);
  font-weight: 700;
  font-size: 0.88rem;
  min-width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
  box-shadow: 0 2px 6px rgba(232,119,58,0.35);
}
.passi-lista li span { font-size: 0.97rem; color: var(--testo-2); line-height: 1.6; }
.passi-lista li strong { display: block; font-weight: 600; color: var(--testo); margin-bottom: 0.15rem; }

/* ===== EVIDENZA NUMERO ===== */
.numero-evidenza {
  background: var(--blu);
  color: var(--bianco);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  margin: 1.75rem 0;
  text-align: center;
}
.numero-evidenza .num-grande {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--arancione);
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.numero-evidenza p { margin: 0; opacity: 0.88; font-size: 0.95rem; }

/* ===== INFO STUDIO ===== */
.info-studio {
  background: var(--grigio);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.75rem 0;
  border-left: 4px solid var(--blu);
}
.info-studio p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.info-studio p:last-child { margin-bottom: 0; }

/* ===== CTA SECTION ===== */
.cta-sezione {
  background: var(--blu);
  color: var(--bianco);
  padding: 4rem 1.5rem;
  text-align: center;
}
.cta-sezione h2 { color: var(--bianco); margin-bottom: 1rem; }
.cta-sezione p { opacity: 0.88; max-width: 600px; margin: 0 auto 2rem; }
.link-secondario-cta {
  display: block;
  margin-top: 1.25rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}
.link-secondario-cta:hover { color: var(--arancione); text-decoration: underline; }

/* ===== NON FACCIO (lista bordata) ===== */
.lista-cosa-non {
  background: var(--grigio);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1.5rem 3rem;
  margin: 1.25rem 0;
}
.lista-cosa-non li { color: var(--testo-2); font-size: 0.95rem; }

/* ===== LINK BACK ARTICOLO ===== */
.link-back { font-size: 0.88rem; color: var(--testo-2); }
.link-back a { color: var(--arancione); }

/* ===== FOOTER ===== */
footer {
  background: var(--blu);
  color: rgba(255,255,255,0.65);
  padding: 2rem 1.5rem;
  font-size: 0.83rem;
  text-align: center;
  line-height: 1.7;
}
footer .container { max-width: var(--max); margin: 0 auto; }
footer p { margin-bottom: 0.35rem; }
footer p:last-child { margin-bottom: 0; }
footer a { color: rgba(255,255,255,0.65); text-decoration: underline; }
footer a:hover { color: var(--arancione); }

/* ===== SEPARATORE ===== */
.divisore { border: none; border-top: 1px solid var(--grigio-2); margin: 2.5rem 0; }

/* ===== TESTO CENTRATO ===== */
.centrato { text-align: center; }

/* ===== DARK MODE (minimale) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bianco: #1c1c1e;
    --grigio: #2a2a2c;
    --grigio-2: #3a3a3c;
    --testo: #f0f0f0;
    --testo-2: #b0b0b8;
    --bordo: #3a3a3c;
  }
  .tabella-confronto tbody tr:nth-child(even) td { background: #232325; }
  .card, .card-blu-sinistra, .card-articolo, .faq-item, .recensioni-box { background: #252527; }
  .form-group input, .form-group select, .form-group textarea {
    background: #252527;
    color: var(--testo);
  }
}
