/* ════════════════════════════════════════════════════════════════
   FORMAZIONE DIGITALE — shared.css  v1
   Aggiornare ?v=N nel <link> di ogni pagina ad ogni modifica.
   NON modificare questo file per stili specifici di pagina.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 2. VARIABILI ────────────────────────────────────────────────── */
:root {
  /* Palette principale */
  --blue-dark:    #1F4E79;
  --blue-mid:     #2E75B6;
  --blue-light:   #D6E8F7;
  --blue-pale:    #EBF3FC;
  --green-dark:   #1E6B3C;
  --green-light:  #E8F5EE;
  --amber-dark:   #7D4E00;
  --amber-light:  #FFF3CD;
  --red-dark:     #8B1A1A;
  --red-light:    #FDECEA;
  --purple-dark:  #4A148C;
  --purple-light: #F3E5F5;
  --gray-dark:    #2C2C2C;
  --gray-mid:     #666;
  --gray-light:   #F5F5F5;
  --white:        #FFFFFF;

  /* Tipografia */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Layout */
  --header-h:  56px;
  --nav-w:     260px;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(31,78,121,.10);
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ── 3. BASE ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--gray-dark);
  background: #F8FBFF;
  line-height: 1.7;
}

/* ── 4. HEADER ───────────────────────────────────────────────────── */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--blue-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
}
.header-left  { display: flex; align-items: center; gap: .75rem; }
.header-right { display: flex; align-items: center; gap: .5rem; }

/* Back-link */
.header-back {
  font-size: .78rem; color: rgba(255,255,255,.65);
  text-decoration: none;
  display: flex; align-items: center; gap: .3rem;
  transition: color .2s;
}
.header-back:hover { color: #fff; }

/* Separatore verticale */
.header-sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); }

/* Logo / nome portale */
.header-logo {
  font-family: var(--font-display);
  font-size: 1.05rem; color: #fff; letter-spacing: .01em;
}

/* Sottotitolo (visibile da 600px) */
.header-sub {
  font-size: .72rem; color: var(--blue-light);
  font-weight: 300; display: none;
}
@media(min-width:600px) { .header-sub { display: block; } }

/* Hamburger — usato nelle pagine con sidebar */
#hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer; padding: 6px;
  border-radius: 6px; transition: background var(--transition);
  background: none; border: none;
}
#hamburger:hover { background: rgba(255,255,255,.12); }
#hamburger span  { display: block; height: 2px; background: #fff; border-radius: 2px; transition: all var(--transition); }
#hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media(min-width:900px) { #hamburger { display: none; } }

/* ── HEADER NAV LINKS ── */
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-nav-link {
  font-size: .85rem; font-weight: 700;
  color: #fff;
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: opacity .2s;
}
.header-nav-link:hover { opacity: 1; }

/* ── HEADER PILL BUTTONS (Chi sono / Contatti / Accedi) ── */
.header-pill-btn {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .8rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.header-pill-btn:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

/* ── ABOUT BUTTONS MODAL ── */
.about-trigger {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4);
  font-family: inherit;
  padding: 0;
}
.about-trigger:hover { color: white; }

.about-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  pointer-events: all;
}


/* ── 5. SIDEBAR ──────────────────────────────────────────────────── */
#sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 90;
  width: var(--nav-w); background: var(--white);
  border-right: 1px solid var(--blue-light);
  overflow-y: auto; padding: 1.25rem 0 2rem;
  transform: translateX(-100%);
  transition: transform var(--transition);
  box-shadow: 2px 0 20px rgba(31,78,121,.08);
}
#sidebar.open { transform: translateX(0); }
@media(min-width:900px) { #sidebar { transform: translateX(0); } }

#overlay {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
}
#overlay.open { display: block; }
@media(min-width:900px) { #overlay { display: none !important; } }

.nav-section-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-mid);
  padding: .75rem 1.25rem .35rem; opacity: .7;
}
.nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.25rem; font-size: .84rem; color: var(--gray-mid);
  text-decoration: none; cursor: pointer;
  transition: all var(--transition); border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item:hover  { color: var(--blue-dark); background: var(--blue-pale); border-left-color: var(--blue-light); }
.nav-item.active { color: var(--blue-dark); background: var(--blue-pale); border-left-color: var(--blue-mid); font-weight: 500; }
.nav-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; background: var(--blue-dark); color: #fff;
  border-radius: 4px; font-size: .72rem; font-weight: 600; flex-shrink: 0;
}
.nav-item.active .nav-num { background: var(--blue-mid); }
.nav-divider { border: none; border-top: 1px solid var(--blue-light); margin: .75rem 1.25rem; }

/* ── 6. MAIN CONTENT (layout con sidebar) ────────────────────────── */
#main {
  margin-top: var(--header-h);
  transition: margin-left var(--transition);
  padding: 2rem 1.25rem 4rem;
  max-width: 800px;
}
@media(min-width:900px)  { #main { margin-left: var(--nav-w); padding: 2.5rem 2.5rem 4rem; } }
@media(min-width:1200px) { #main { margin-left: var(--nav-w); max-width: 860px; padding: 3rem 3rem 4rem; } }

/* ── 7. STRUTTURA SEZIONI ────────────────────────────────────────── */
.guide-section { margin-bottom: 3.5rem; }
.section-header {
  display: flex; align-items: stretch; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 1.75rem; box-shadow: var(--shadow);
}
.section-num {
  display: flex; align-items: center; justify-content: center;
  min-width: 64px; background: var(--blue-dark);
  font-family: var(--font-display); font-size: 2rem; color: #fff; padding: .75rem;
}
.section-titles {
  flex: 1; background: var(--blue-pale); padding: .85rem 1.25rem;
  border-left: 3px solid var(--blue-light);
}
.section-title    { font-family: var(--font-display); font-size: 1.3rem; color: var(--blue-dark); line-height: 1.2; }
.section-subtitle { font-size: .82rem; color: var(--blue-mid); font-style: italic; margin-top: .2rem; }
.sub-title        { font-size: 1.05rem; font-weight: 600; color: var(--blue-mid); margin: 1.5rem 0 .6rem; }

p { margin-bottom: .85rem; font-size: .95rem; line-height: 1.75; color: #3a3a3a; }
hr.section-divider { border: none; border-top: 2px solid var(--blue-light); margin: 3rem 0; }

ul.guide-list, ol.guide-list { padding-left: 1.5rem; margin-bottom: .85rem; }
ul.guide-list li, ol.guide-list li { font-size: .95rem; line-height: 1.75; color: #3a3a3a; margin-bottom: .3rem; }

/* ── 8. COVER BLOCK ──────────────────────────────────────────────── */
.cover-block {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #2A6099 100%);
  border-radius: var(--radius); padding: 2.5rem 2rem 2rem;
  box-shadow: 0 4px 24px rgba(31,78,121,.22); margin-bottom: .5rem;
}
.cover-title   { font-family: var(--font-display); font-size: clamp(1.6rem,4vw,2.4rem); color: #fff; line-height: 1.15; margin-bottom: .4rem; }
.cover-sub     { font-size: 1rem; color: var(--blue-light); font-style: italic; margin-bottom: .3rem; }
.cover-desc    { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.cover-divider { border: none; border-top: 1px solid rgba(255,255,255,.2); margin: 1rem 0; }
.cover-intro   { font-size: .9rem; color: rgba(255,255,255,.82); line-height: 1.7; }

/* ── 9. BOX CALLOUT ──────────────────────────────────────────────── */
.box {
  border-radius: var(--radius);
  padding: .9rem 1.1rem; margin: 1rem 0;
  font-size: .9rem; line-height: 1.65;
}
.box-label {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: .35rem;
}
.box-tip  { background: var(--green-light); border-left: 4px solid var(--green-dark); }
.box-tip  .box-label { color: var(--green-dark); }
.box-tip  p { color: var(--green-dark); margin: 0; }

.box-warn { background: var(--amber-light); border-left: 4px solid var(--amber-dark); }
.box-warn .box-label { color: var(--amber-dark); }
.box-warn p { color: var(--amber-dark); margin: 0; }

.box-note { background: var(--gray-light); border-left: 4px solid #bbb; }
.box-note p { color: var(--gray-mid); margin: 0; font-style: italic; }

.box-info { background: var(--blue-pale); border-left: 4px solid var(--blue-mid); }
.box-info .box-label { color: var(--blue-dark); }
.box-info p { color: var(--blue-dark); margin: 0; }

.box-red  { background: var(--red-light); border-left: 4px solid var(--red-dark); }
.box-red  .box-label { color: var(--red-dark); }
.box-red  p { color: var(--red-dark); margin: 0; }

/* ── 10. FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.6);
  text-align: center; padding: 1.75rem 1.5rem;
  font-size: .8rem; line-height: 1.7;
}
footer strong { color: rgba(255,255,255,.9); }
footer a { color: var(--blue-light); text-decoration: none; }

/* ── 11. AUTH — bottone header + modal ───────────────────────────── */
#auth-btn {
  font-family: var(--font-body);
  font-size: .8rem; font-weight: 600;
  color: var(--blue-dark); background: #fff;
  border: none; border-radius: 50px;
  padding: .35rem 1rem;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: .4rem;
  transition: background var(--transition), transform .15s ease;
  flex-shrink: 0;
}
#auth-btn:hover { background: var(--blue-light); transform: translateY(-1px); }

.auth-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-mid); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700;
}

/* Bottone segnalibro sulle card */
.btn-bookmark {
  position: absolute; top: .6rem; right: .6rem;
  background: rgba(255,255,255,.9); border: 1px solid var(--blue-light);
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem;
  transition: all var(--transition); z-index: 10;
  opacity: 0;
}
.card:hover .btn-bookmark { opacity: 1; }
.btn-bookmark.bookmarked { opacity: 1; background: var(--amber-light); border-color: var(--amber-dark); }
.btn-bookmark.bookmarked::after { content: '🔖'; }
.btn-bookmark:not(.bookmarked)::after { content: '🔖'; filter: grayscale(1); }

/* Modal auth */
.auth-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,35,60,.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.auth-overlay.is-open { opacity: 1; pointer-events: all; }

.auth-panel {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15,35,60,.35);
  width: 100%; max-width: 400px;
  padding: 2rem;
  transform: translateY(28px);
  transition: transform .32s cubic-bezier(.34,1.56,.64,1);
}
.auth-overlay.is-open .auth-panel { transform: translateY(0); }

.auth-title {
  font-family: var(--font-display);
  font-size: 1.4rem; color: var(--blue-dark);
  margin-bottom: .4rem;
}
.auth-sub {
  font-size: .84rem; color: var(--gray-mid);
  margin-bottom: 1.5rem; line-height: 1.55;
}
.auth-input {
  width: 100%; padding: .65rem .9rem;
  border: 1.5px solid var(--blue-light); border-radius: 8px;
  font-family: var(--font-body); font-size: .9rem;
  outline: none; margin-bottom: .75rem;
  transition: border-color .2s ease;
}
.auth-input:focus { border-color: var(--blue-mid); }

.auth-submit {
  width: 100%; padding: .7rem;
  background: var(--blue-dark); color: #fff;
  border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
}
.auth-submit:hover { background: var(--blue-mid); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.auth-msg { font-size: .82rem; margin-top: .75rem; line-height: 1.5; }
.auth-msg.error   { color: var(--red-dark); }
.auth-msg.success { color: var(--green-dark); }

.auth-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--gray-light); border: none; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer;
  font-size: .9rem; color: var(--gray-mid);
  display: flex; align-items: center; justify-content: center;
}
.auth-close:hover { background: var(--blue-light); color: var(--blue-dark); }

/* Modal profilo */
.profile-info { margin-bottom: 1.25rem; }
.profile-email { font-size: .9rem; color: var(--gray-dark); font-weight: 500; }
.profile-stat  { font-size: .82rem; color: var(--gray-mid); margin-top: .25rem; }

.btn-logout {
  width: 100%; padding: .65rem;
  background: var(--gray-light); color: var(--gray-dark);
  border: 1.5px solid #ddd; border-radius: 50px;
  font-family: var(--font-body); font-size: .85rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.btn-logout:hover { background: var(--red-light); border-color: var(--red-dark); color: var(--red-dark); }

/* ── 12. READING BAR ─────────────────────────────────────────────── */
#reading-bar  { position: fixed; top: var(--header-h); left: 0; right: 0; height: 3px; background: rgba(255,255,255,.1); z-index: 99; }
#reading-fill { height: 100%; background: var(--blue-mid); width: 0; transition: width .2s; }

/* ── 13. HEADER ACTIONS (download, mode toggle) ──────────────────── */
.btn-download {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; text-decoration: none; border-radius: 20px;
  padding: .35rem .9rem; font-size: .78rem; font-weight: 500;
  font-family: var(--font-body); white-space: nowrap;
  transition: background .2s;
}
.btn-download:hover { background: rgba(255,255,255,.22); }
.btn-dl-label { display: none; }
@media(min-width:600px) { .btn-dl-label { display: inline; } }
@media(max-width:480px) { .btn-download { display: none; } }

.mode-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 20px; padding: .35rem .9rem;
  font-size: .78rem; font-weight: 500; font-family: var(--font-body);
  cursor: pointer; white-space: nowrap; transition: background .2s;
}
.mode-toggle:hover { background: rgba(255,255,255,.22); }

/* ── 14. NAV PART LABEL ──────────────────────────────────────────── */
.nav-part-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-mid);
  padding: .75rem 1.25rem .35rem; opacity: .7;
}

/* ── 15. COVER EXTRAS ────────────────────────────────────────────── */
.cover-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-light); margin-bottom: .5rem; }
.cover-badges  { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.cover-badge   { font-size: .78rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.85); padding: .3rem .75rem; border-radius: 20px; }

/* ── 16. PART HEADER ─────────────────────────────────────────────── */
.part-header {
  display: flex; align-items: stretch;
  background: linear-gradient(135deg, var(--blue-dark) 0%, #2A6099 100%);
  border-radius: var(--radius); overflow: hidden;
  margin: 2.5rem 0 1.5rem; box-shadow: var(--shadow);
}
.part-num {
  display: flex; align-items: center; justify-content: center;
  min-width: 72px; background: rgba(0,0,0,.2);
  font-family: var(--font-display); font-size: 2.5rem; color: #fff; padding: 1rem;
}
.part-titles   { flex: 1; padding: 1rem 1.25rem; }
.part-title    { font-family: var(--font-display); font-size: 1.4rem; color: #fff; line-height: 1.2; }
.part-subtitle { font-size: .82rem; color: var(--blue-light); font-style: italic; margin-top: .2rem; }

/* ── 17. HIGHLIGHT GRID ──────────────────────────────────────────── */
.highlight-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .85rem; margin: 1.25rem 0;
}
@media(max-width:600px) { .highlight-grid { grid-template-columns: 1fr; } }
.highlight-card {
  background: var(--blue-pale); border: 1px solid var(--blue-light);
  border-radius: var(--radius); padding: 1rem .9rem; text-align: center;
}
.hc-emoji { font-size: 1.6rem; margin-bottom: .4rem; }
.hc-title { font-weight: 700; font-size: .88rem; color: var(--blue-dark); margin-bottom: .3rem; }
.hc-body  { font-size: .8rem; color: var(--gray-mid); line-height: 1.55; }

/* ── 18. DO/DON'T ────────────────────────────────────────────────── */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin: 1.25rem 0; }
@media(max-width:520px) { .dodont { grid-template-columns: 1fr; } }
.do-col   { background: var(--green-light); border: 1px solid #b2dfc3; border-radius: var(--radius); padding: .9rem 1rem; }
.dont-col { background: var(--amber-light); border: 1px solid #f0d080; border-radius: var(--radius); padding: .9rem 1rem; }
.dodont-title { font-size: .8rem; font-weight: 700; margin-bottom: .5rem; }
.do-col   .dodont-title { color: var(--green-dark); }
.dont-col .dodont-title { color: var(--amber-dark); }
.dodont ul { padding-left: 1.1rem; font-size: .82rem; line-height: 1.65; }
.do-col   ul { color: var(--green-dark); }
.dont-col ul { color: var(--amber-dark); }


/* ═══════════════════════════════════════════════════════════
   GUIDE LAYOUT — header, sidebar, hamburger
   Condiviso tra tutte le sottopagine standard
   v1.0 — migrato da inline a shared
═══════════════════════════════════════════════════════════ */

/* Header sottopagine */
.guide-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 56px;
  background: var(--blue-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
}
.guide-header-back {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: rgba(255,255,255,.65);
  text-decoration: none; transition: color .2s;
  flex-shrink: 0;
}
.guide-header-back svg {
  width: 16px; height: 16px; stroke: currentColor;
  stroke-width: 2; fill: none;
}
.guide-header-back:hover { color: #fff; }
.guide-header-center {
  font-size: .85rem; color: rgba(255,255,255,.85);
  font-weight: 500;
  /* Su mobile: nascosto per fare spazio */
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 40%;
}
.guide-header-right {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer; padding: 6px;
  border-radius: 6px; background: none; border: none;
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.12); }
.hamburger span {
  display: block; height: 2px; background: #fff;
  border-radius: 2px; transition: all var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media(min-width:900px) { .hamburger { display: none; } }

/* Layout griglia */
.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1200px;
  margin: 56px auto 0;
  min-height: calc(100vh - 56px);
}
@media(max-width:900px) { .guide-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.guide-sidebar {
  position: sticky; top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--blue-light);
  padding: 1.25rem 0 2rem;
}
@media(max-width:900px) {
  .guide-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0; z-index: 90;
    width: 260px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: 2px 0 20px rgba(31,78,121,.12);
  }
  .guide-sidebar.is-open { transform: translateX(0); }
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
}
.sidebar-overlay.is-open { display: block; }
@media(min-width:900px) { .sidebar-overlay { display: none !important; } }

/* Sidebar nav */
.sidebar-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-mid);
  padding: .75rem 1.25rem .35rem; opacity: .7;
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav .nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.25rem; font-size: .84rem; color: var(--gray-mid);
  text-decoration: none; cursor: pointer;
  transition: all var(--transition); border-left: 3px solid transparent;
}
.sidebar-nav .nav-item:hover  { color: var(--blue-dark); background: var(--blue-pale); border-left-color: var(--blue-light); }
.sidebar-nav .nav-item.active { color: var(--blue-dark); background: var(--blue-pale); border-left-color: var(--blue-mid); font-weight: 500; }
.sidebar-divider { border: none; border-top: 1px solid var(--blue-light); margin: .75rem 1.25rem; }
.sidebar-meta { padding: .75rem 1.25rem; font-size: .78rem; color: var(--gray-mid); line-height: 1.8; }

/* Contenuto principale */
.guide-main {
  padding: 2.5rem 3rem 4rem;
  max-width: 860px;
  width: 100%; min-width: 0;
}
@media(max-width:900px) { .guide-main { padding: 1.5rem 1.5rem 3rem; } }

/* ── RESPONSIVE MOBILE < 640px ── */
@media(max-width:640px) {
  .guide-header-center { display: none; }
  .guide-header { padding: 0 .75rem; }
}


/* ── TWO-COL — due elementi affiancati, colonna su mobile ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.25rem 0;
}
@media(max-width:640px) {
  .two-col { grid-template-columns: 1fr; }
}


/* ── FOOTER NAV LINK — navigazione tra risorse collegate ── */
.footer-nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; color: rgba(255,255,255,.7);
  text-decoration: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: .55rem .95rem;
  transition: all var(--transition);
}
.footer-nav-link:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.footer-nav-link.primary {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
  color: #fff;
}
.footer-nav-link.primary:hover { background: #3d88cc; }