/* ============================================================
   Bollette Risparmio — Shared CSS
   Palette ufficiale dal logo SVG
   ============================================================ */
:root {
  --primary: #1e3a8a;
  --accent:  #2196f3;
  --accent-pale:  #e3f2fd;
  --accent-light: #bbdefb;
  --ink:   #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg:    #f8faff;
  --white: #fff;
  --green:   #16a34a;
  --green-l: #dcfce7;
  --green-d: #15803d;
  --blue:    #2196f3;
  --blue-l:  #e3f2fd;
  --orange:  #f59e0b;
  --yellow:  #f59e0b;
  --r:    12px;
  --r-sm:  8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow:    0 4px 16px rgba(30,58,138,.10);
  --t: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.75;
}

/* ── PROGRESS BAR ── */
#progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  z-index: 200;
  transition: width .1s;
}

/* ── NAV ── */
header > nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
header > nav .wrap { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; }
.nav-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.nav-logo svg { width: 36px; height: 36px; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text .brand { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--primary); }
.nav-logo-text .sub   { font-size: .65rem; font-weight: 600; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.nav-links { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav-links a { font-size: .88rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: .45rem .8rem; border-radius: 8px; transition: all var(--t); }
.nav-links a:hover { color: var(--accent); background: var(--accent-pale); }
.nav-cta { background: var(--accent); color: #fff !important; border-radius: 8px; padding: .45rem 1rem !important; font-weight: 600 !important; text-decoration: none; }
.nav-cta:hover { background: #1976d2 !important; }
.nav-phone {
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: .88rem;
  color: var(--primary) !important; text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .8rem; border: 1.5px solid #e8f0fe; border-radius: 8px;
  background: none; cursor: pointer;
}
.nav-phone:hover { border-color: var(--primary); background: #eff6ff; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; color: var(--primary); }
.mobile-menu {
  display: none; flex-direction: column; gap: .3rem;
  padding: .75rem 1.5rem 1rem;
  border-top: 1px solid var(--border);
  max-width: 1160px; margin: 0 auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: .92rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: .6rem .5rem; border-radius: 8px; }
.mobile-menu a:hover { color: var(--accent); background: var(--accent-pale); }

/* ── FAB ── */
.fab-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9000;
  display: flex; flex-direction: column; align-items: flex-end; gap: .6rem;
  pointer-events: none;
}
.fab-container .fab-main { pointer-events: auto; }
.fab-main {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(30,58,138,.4);
  transition: all .25s; flex-shrink: 0; color: #fff;
}
.fab-main:hover { background: var(--accent); transform: scale(1.08); }
.fab-main svg { width: 24px; height: 24px; position: absolute; transition: opacity .2s, transform .2s; }
.fab-icon-open  { opacity: 1; transform: scale(1); }
.fab-icon-close { opacity: 0; transform: scale(.5); }
.fab-container.open .fab-icon-open  { opacity: 0; transform: scale(.5); }
.fab-container.open .fab-icon-close { opacity: 1; transform: scale(1); }
.fab-options {
  display: flex; flex-direction: column; align-items: flex-end; gap: .45rem;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .2s, transform .2s;
}
.fab-container.open .fab-options { opacity: 1; pointer-events: all; transform: translateY(0); }
.fab-option {
  display: flex; align-items: center; gap: .6rem;
  background: #fff; color: var(--primary); text-decoration: none;
  border: none; cursor: pointer; border-radius: 100px;
  padding: .55rem .95rem .55rem .75rem; font-size: .85rem; font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,.15); transition: all .2s; white-space: nowrap;
}
.fab-option:hover { background: var(--accent-pale); color: var(--accent); transform: translateX(-3px); }
.fab-option svg { width: 16px; height: 16px; flex-shrink: 0; }
.fab-option-cta { background: var(--accent); color: #fff; }
.fab-option-cta:hover { background: #1976d2; color: #fff; }

/* ── BREADCRUMB ── */
.breadcrumb-bar { background: var(--bg); border-bottom: 1px solid var(--border); padding: .65rem 1.5rem; }
.breadcrumb {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--muted); flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color var(--t); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* ── GUIDE HERO ── */
.guide-hero {
  background: linear-gradient(160deg, #f0f6ff 0%, #e8f4f8 60%, #f0fff8 100%);
  padding: 3.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
}
.guide-hero-inner { max-width: 860px; margin: 0 auto; }
.guide-category {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-pale); color: var(--primary);
  font-size: .72rem; font-weight: 700; padding: 4px 12px;
  border-radius: 100px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 1rem;
}
.guide-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800;
  color: var(--primary); letter-spacing: -1px; line-height: 1.1; margin-bottom: .9rem;
}
.guide-desc { font-size: 1rem; color: var(--muted); max-width: 600px; line-height: 1.7; margin-bottom: 1.5rem; }
.guide-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.guide-meta span { display: flex; align-items: center; gap: .3rem; }

/* ── GUIDE LAYOUT ── */
.guide-layout {
  max-width: 1060px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem;
  display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: start;
}
@media (max-width: 860px) { .guide-layout { grid-template-columns: 1fr; } }

/* ── ARTICLE ── */
.article h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.45rem; font-weight: 800; color: var(--primary);
  letter-spacing: -.5px; margin: 2.5rem 0 .9rem; padding-top: .5rem;
  border-top: 2px solid var(--bg);
}
.article h2:first-child { margin-top: 0; border-top: none; }
.article h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 1.75rem 0 .6rem;
}
.article p  { margin-bottom: 1.1rem; color: #2d3a4a; line-height: 1.78; }
.article ul,
.article ol  { margin: 0 0 1.1rem 1.4rem; color: #2d3a4a; }
.article li  { margin-bottom: .45rem; line-height: 1.7; }
.article strong { color: var(--ink); }
.article a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ── CALLOUT BOXES ── */
.box { border-radius: var(--r); padding: 1.25rem 1.4rem; margin: 1.75rem 0; font-size: .93rem; line-height: 1.7; }
.box-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: .6rem; display: flex; align-items: center; gap: .4rem;
}
.box-info { background: var(--accent-pale); border-left: 4px solid var(--accent); }
.box-info .box-title { color: var(--primary); }
.box-warn { background: #fffbeb; border-left: 4px solid var(--yellow); }
.box-warn .box-title { color: #92400e; }
.box-ok   { background: var(--green-l); border-left: 4px solid var(--green); }
.box-ok   .box-title { color: var(--green-d); }
.box-tip  { background: #fdf4ff; border-left: 4px solid #a855f7; }
.box-tip  .box-title { color: #6b21a8; }

/* ── TABLE ── */
.data-table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .9rem; overflow: hidden;
  border-radius: var(--r-sm); border: 1px solid var(--border);
}
.data-table th {
  background: var(--primary); color: white;
  padding: 10px 14px; text-align: left;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: .8rem; letter-spacing: .4px; text-transform: uppercase;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:last-child td { border: none; }
.data-table tr:nth-child(even) td { background: var(--bg); }
.data-table-wrap { overflow-x: auto; margin: 1.5rem 0; }

/* ── FASCIA CARDS ── */
.fascia-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.5rem 0; }
@media (max-width: 600px) { .fascia-grid { grid-template-columns: 1fr; } }
.fascia-card { border-radius: var(--r); padding: 1.1rem; text-align: center; border: 2px solid transparent; }
.fascia-f1 { background: #fff7ed; border-color: #fed7aa; }
.fascia-f2 { background: #fefce8; border-color: #fde68a; }
.fascia-f3 { background: #f0fdf4; border-color: #bbf7d0; }
.fascia-label { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.6rem; font-weight: 800; margin-bottom: .35rem; }
.fascia-f1 .fascia-label { color: #c2410c; }
.fascia-f2 .fascia-label { color: #a16207; }
.fascia-f3 .fascia-label { color: #15803d; }
.fascia-name  { font-weight: 700; font-size: .85rem; color: var(--ink); margin-bottom: .3rem; }
.fascia-hours { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ── STEP LIST ── */
.step-list { list-style: none; margin: 1.5rem 0; }
.step-list li { display: flex; gap: 1rem; margin-bottom: 1.3rem; align-items: flex-start; }
.step-num {
  min-width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .9rem;
  flex-shrink: 0; margin-top: 2px;
}
.step-content strong { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .95rem; margin-bottom: .2rem; }
.step-content { font-size: .9rem; color: #2d3a4a; line-height: 1.7; }

/* ── INLINE CTA ── */
.inline-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border-radius: var(--r); padding: 1.75rem; text-align: center; margin: 2.25rem 0; color: white;
}
.inline-cta h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.1rem; margin-bottom: .5rem; }
.inline-cta p  { font-size: .88rem; opacity: .75; margin-bottom: 1.1rem; line-height: 1.6; }
.inline-cta a  {
  display: inline-flex; align-items: center; gap: .4rem;
  background: white; color: var(--primary); text-decoration: none;
  border-radius: var(--r-sm); padding: .75rem 1.6rem;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .9rem;
  transition: all var(--t);
}
.inline-cta a:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: white; border: 1px solid var(--border); border-radius: var(--r);
  padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: .9rem;
}
.toc-list { list-style: none; }
.toc-list li { border-bottom: 1px solid var(--bg); padding: .45rem 0; }
.toc-list li:last-child { border: none; }
.toc-list a { color: var(--muted); text-decoration: none; font-size: .84rem; transition: color var(--t); display: block; }
.toc-list a:hover { color: var(--blue); }
.sidebar-cta {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  border-radius: var(--r); padding: 1.25rem; text-align: center; color: white;
}
.sidebar-cta h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: .95rem; margin-bottom: .4rem; }
.sidebar-cta p  { font-size: .8rem; opacity: .65; margin-bottom: .9rem; line-height: 1.55; }
.sidebar-cta a  {
  display: block; background: white; color: var(--primary); text-decoration: none;
  border-radius: var(--r-sm); padding: .7rem;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .84rem; transition: all var(--t);
}
.sidebar-cta a:hover { transform: translateY(-1px); }

/* ── CORRELATE ── */
.correlate-section { max-width: 860px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.correlate-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--primary); margin-bottom: 1.1rem; }
.correlate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.guide-card:hover { box-shadow: 0 8px 24px rgba(13,27,42,.12); transform: translateY(-2px); }
.correlate-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r);
  padding: 1.1rem 1.25rem; text-decoration: none; display: block; transition: all var(--t);
}
.correlate-card:hover { background: white; box-shadow: var(--shadow); transform: translateY(-2px); }
.correlate-card-cat   { font-size: .68rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); margin-bottom: .35rem; }
.correlate-card-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: .3rem; }
.correlate-card-desc  { font-size: .78rem; color: var(--muted); line-height: 1.55; }

/* ── LAYOUT UTILITIES ── */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* ── FOOTER ── */
footer { background: var(--primary); padding: 3rem 0 2rem; color: rgba(255,255,255,.55); }
footer .wrap { padding-bottom: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo-area { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.footer-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.footer-logo-text .brand { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1rem; color: #fff; }
.footer-logo-text .sub   { font-size: .62rem; font-weight: 600; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.footer-desc { font-size: .83rem; color: rgba(255,255,255,.5); line-height: 1.65; margin-bottom: 1rem; max-width: 300px; }
.footer-contacts { display: flex; flex-direction: column; gap: .4rem; }
.footer-contacts a,
.footer-contacts span { font-size: .82rem; color: rgba(255,255,255,.55); text-decoration: none; display: flex; align-items: center; gap: .4rem; transition: color var(--t); }
.footer-contacts a:hover { color: #fff; }
.footer-contacts svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-col h4 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.35); margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a { font-size: .84rem; color: rgba(255,255,255,.65); text-decoration: none; transition: color var(--t); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem; font-size: .77rem; color: rgba(255,255,255,.5);
}
.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; padding-right: 5rem; }
.footer-legal a { color: #fff; text-decoration: none; transition: color var(--t); opacity: .65; }
.footer-legal a:hover { opacity: 1; }
@media (max-width: 560px) { .footer-bottom { flex-direction: column; align-items: center; text-align: center; } .footer-legal { justify-content: center; padding-right: 0; } }

/* ── RESPONSIVE NAV ── */
@media (max-width: 860px) {
  .hamburger  { display: flex; }
  .nav-links  { display: none; }
}
