/* =========================================================
   CodingCreativo — style.css (v4, riorganizzato)
   ========================================================= */

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F5F9FF;
  --ink: #0B1E3D;
  --ink-soft: #52627A;
  --line: #E2E9F5;
  --blue: #2F6FED;
  --blue-dark: #1E4FBE;
  --blue-ice: #EAF2FF;
  --amber: #C7702B;
  --code-bg: #0B1E3D;
  --code-ink: #D7E4FA;

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --measure: 68ch;
  --radius: 10px;
  --radius-sm: 6px;
}

/* =========================================================
   2. RESET E BASE
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   3. BOTTONI
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff; border: none;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 1px 2px rgba(11,30,61,.08);
}
.btn:hover { background: var(--blue-dark); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(47,111,237,.3); }
.btn:active { transform: translateY(0); }
.btn-outline {
  background: #fff;
  color: var(--blue-dark);
  border: 1.5px solid var(--blue-ice);
  box-shadow: 0 1px 2px rgba(11,30,61,.04);
}
.btn-outline:hover {
  background: var(--blue-ice);
  border-color: var(--blue);
  color: var(--blue-dark);
  box-shadow: none;
}
.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-sm); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--ink); }
.btn-danger { background: #C13B30; border-radius: var(--radius-sm); }
.btn-danger:hover { background: #9E2E25; }
.btn-block { display: flex; justify-content: center; width: 100%; border-radius: var(--radius-sm); }

/* Bottone PayPal */
.btn-paypal {
  background: #FFC439;
  color: #003087;
  font-weight: 700;
  border: 1px solid #F2BA36;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-paypal:hover { background: #F2BA36; color: #003087; }
.btn-paypal::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23003087' d='M7.2 21.3H4.3c-.2 0-.3-.1-.3-.3L6.3 3.2c0-.2.2-.3.3-.3h6.7c2.2 0 3.8.5 4.7 1.5.8.9 1.1 2.1.9 3.6-.1.6-.3 1.2-.5 1.7-.3.5-.6.9-1.1 1.3-.4.3-.9.6-1.5.8-.6.2-1.3.3-2 .3h-1.6c-.2 0-.3.1-.3.3l-.6 3.8c0 .2-.2.4-.4.4z'/><path fill='%23009cde' d='M18.5 9c-.1.6-.3 1.2-.5 1.7-.3.5-.6.9-1.1 1.3-.4.3-.9.6-1.5.8-.6.2-1.3.3-2 .3h-1.6c-.2 0-.3.1-.3.3l-.6 3.8c0 .2-.2.4-.4.4h-2.3l-.1-.3.7-4.5h1.6c.7 0 1.4-.1 2-.3.6-.2 1.1-.5 1.5-.8.5-.4.8-.8 1.1-1.3.2-.5.4-1.1.5-1.7.2-1.5-.1-2.7-.9-3.6-.3-.3-.6-.6-1-.8.7.9 1 2 .8 3.5z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

/* =========================================================
   4. PILLOLE / BADGE
   ========================================================= */
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.eyebrow-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.tag-free { display: inline-block; background: #E4F7EE; color: #1C8A54; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.tag-count { display: inline-block; background: var(--blue-ice); color: var(--blue-dark); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

/* =========================================================
   5. HEADER + MENU
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 1px 3px rgba(11,30,61,.06), 0 4px 16px rgba(11,30,61,.04);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

/* Logo header */
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img {
  height: 42px;
  width: auto;
  display: block;
  transition: opacity .15s;
}
.brand:hover img { opacity: .85; }

/* Menu principale */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  flex-wrap: nowrap;
  min-width: 0;
}

.site-nav > a,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.site-nav > a:hover,
.nav-dropdown-toggle:hover {
  background: var(--blue-ice);
  color: var(--blue-dark);
  text-decoration: none;
}

.nav-caret {
  font-size: 10px;
  line-height: 1;
  opacity: .55;
  transition: transform .18s ease, opacity .18s ease;
  margin-left: 1px;
}
.nav-dropdown.is-open .nav-caret,
.nav-dropdown:hover .nav-caret,
.nav-dropdown-modern.is-open .nav-caret,
.nav-dropdown-modern:hover .nav-caret {
  opacity: 1;
  transform: translateY(1px);
}

/* Dropdown standard */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11,30,61,.12), 0 2px 8px rgba(11,30,61,.06);
  padding: 6px;
  z-index: 60;
  animation: dropdownFade .15s ease;
}
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -8px;
  height: 8px;
}
.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: background .12s, color .12s;
}
.nav-dropdown-menu a:hover {
  background: var(--blue-ice);
  color: var(--blue-dark);
  text-decoration: none;
}
.nav-item-icon {
  font-size: 15px;
  line-height: 1.4;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item-label {
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* =========================================================
   6. MENU MODERNO (Corsi / Impara / Esercizi)
   Voci discrete con icona colorata e sottolineatura animata.
   ========================================================= */
.site-nav .nav-dropdown-modern {
  position: relative;
  display: inline-block;
  margin-left: 4px;
}
.site-nav .nav-modern-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  transition: color .15s ease;
  white-space: nowrap;
}
.site-nav .nav-modern-toggle:hover { color: var(--blue-dark); }

.site-nav .nav-modern-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.site-nav .nav-modern-label {
  font-family: var(--font-body);
  font-weight: 600;
}
.site-nav .nav-modern-toggle .nav-caret {
  font-size: 9px;
  opacity: .55;
  transition: transform .18s ease, opacity .18s ease;
}

/* Sottolineatura animata */
.site-nav .nav-modern-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
}
.site-nav .nav-modern-toggle:hover::after,
.site-nav .nav-dropdown-modern.is-open .nav-modern-toggle::after {
  transform: scaleX(1);
}
.site-nav .nav-modern-blue::after   { background: #2F6FED; }
.site-nav .nav-modern-violet::after { background: #8B5CF6; }
.site-nav .nav-modern-green::after  { background: #22A96C; }

/* Dropdown moderno */
.site-nav .nav-dropdown-menu-modern {
  min-width: 250px;
  max-width: 320px;
  padding: 8px;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  max-height: 72vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(11,30,61,.14), 0 2px 8px rgba(11,30,61,.06);
}
.site-nav .nav-dropdown-menu-modern a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.site-nav .nav-dropdown-menu-modern a:hover {
  background: var(--blue-ice);
  color: var(--blue-dark);
  text-decoration: none;
}
.site-nav .nav-dropdown-group-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  padding: 10px 12px 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.site-nav .nav-dropdown-group-title:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}

/* Ebook & Corsi — pill ambra */
.site-nav .nav-highlight-ebook {
  background: #FFF3DE;
  color: #92620A;
  border: 1px solid #F4DDA6;
  margin-left: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(227,160,8,.08);
}
.site-nav .nav-highlight-ebook:hover {
  background: #FCE9C2;
  border-color: #E3A008;
  color: #92620A;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(227,160,8,.22);
}

/* Link Accedi / Area personale nel menu */
.site-nav .nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--blue-dark);
  background: var(--blue-ice);
  border: 1px solid rgba(47,111,237,.2);
  margin-left: 6px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.site-nav .nav-auth:hover {
  background: #DCEAFF;
  border-color: var(--blue);
  text-decoration: none;
  color: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47,111,237,.15);
}

/* =========================================================
   7. RICERCA
   ========================================================= */
.nav-search-toggle {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s, color .15s;
  margin-left: 6px;
}
.nav-search-toggle:hover {
  border-color: var(--blue);
  background: var(--blue-ice);
  color: var(--blue-dark);
  transform: translateY(-1px);
}
.nav-search-toggle[aria-expanded="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* Pannello ricerca overlay */
.nav-search-panel {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(11,30,61,.45);
  backdrop-filter: blur(3px);
  padding: 90px 20px 24px;
  transition: opacity .2s ease;
}
.nav-search-panel[hidden] { display: none; }
.nav-search-panel-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-search-panel-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 12px 40px rgba(11,30,61,.25);
}
.nav-search-panel-form .nav-search-icon { opacity: .5; font-size: 15px; }
.nav-search-panel-form input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 4px;
  color: var(--ink);
  background: transparent;
}
.nav-search-panel-form button {
  border: none;
  background: var(--blue);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s;
}
.nav-search-panel-form button:hover { background: var(--blue-dark); transform: translateX(1px); }
.nav-search-close {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-search-close:hover { background: rgba(255,255,255,.35); }

/* =========================================================
   8. HAMBURGER TOGGLE
   ========================================================= */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.nav-toggle:hover { background: var(--blue-ice); }
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   9. HERO (homepage)
   ========================================================= */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #EAF2FF 0%, #F7FAFF 55%, #FFFFFF 100%);
  padding: 56px 0 72px;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(47,111,237,.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-section::after {
  content: "";
  position: absolute;
  bottom: -100px; left: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(47,111,237,.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-grid > * { min-width: 0; }

.hero h1 {
  font-size: 44px;
  line-height: 1.1;
  color: var(--ink);
  margin: 20px 0 18px;
  max-width: 18ch;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  color: var(--blue);
  position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--blue-ice);
  z-index: -1;
  border-radius: 4px;
}
.hero > p,
.hero-grid > div > p {
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: 17px;
  margin-bottom: 26px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { font-size: 14px; color: var(--ink-soft); max-width: 46ch; }
.hero-note strong { color: var(--ink); }

.hero-code {
  background: var(--code-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(11,30,61,.28);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  transform: rotate(-0.4deg);
  transition: transform .3s ease;
}
.hero-code:hover { transform: rotate(0deg); }
.hero-code-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.hero-code-bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.hero-code-bar span:nth-child(1) { background: #FF5F57; }
.hero-code-bar span:nth-child(2) { background: #FEBC2E; }
.hero-code-bar span:nth-child(3) { background: #28C840; }
.hero-code-bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-code pre { margin: 0; padding: 20px 22px; overflow-x: auto; }
.hero-code code {
  color: var(--code-ink);
  background: none;
  padding: 0;
  font-family: var(--font-mono);
}

/* Tech strip */
.tech-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 22px 0;
}
.tech-strip .container {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  justify-content: center;
}
.tech-strip-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.tech-strip-items { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; }
.tech-strip-items span {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  opacity: .8;
  transition: opacity .15s;
}
.tech-strip-items span:hover { opacity: 1; }

/* Hero stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 46ch;
}
.hero-stat {
  flex: 1;
  min-width: 90px;
  padding: 0 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child { border-right: none; padding-right: 0; }
.hero-stat b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stat span {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

/* Hero mini (pagine interne) */
.hero-mini { padding: 56px 0 40px; text-align: center; }
.hero-mini .eyebrow-pill { margin-bottom: 14px; }
.hero-mini h1 { font-size: 40px; max-width: none; margin: 8px 0 14px; }
.hero-mini p { max-width: 58ch; margin: 0 auto; color: var(--ink-soft); font-size: 17px; }

/* =========================================================
   10. SEZIONI
   ========================================================= */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 40px; }
.section-head .eyebrow-pill { margin-bottom: 16px; }
.section-head h2 { font-size: 30px; color: var(--ink); }
.section-head p { color: var(--ink-soft); font-size: 16px; }

/* Griglia feature card */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.feature-card:hover { box-shadow: 0 14px 30px rgba(11,30,61,.09); transform: translateY(-2px); }
.feature-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.icon-badge { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.icon-badge.c-blue { background: var(--blue-ice); }
.icon-badge.c-amber { background: #FFF3DE; }
.icon-badge.c-green { background: #E4F7EE; }
.icon-badge.c-purple { background: #F1EBFF; }
.icon-badge.c-pink { background: #FFEAF1; }
.icon-badge.c-teal { background: #E1F5F6; }
.feature-card h3 { font-size: 17px; margin: 0 0 6px; }
.feature-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; flex-grow: 1; }
.feature-card .tag-count { align-self: flex-start; margin-bottom: 16px; }

/* =========================================================
   11. LAYOUT A DUE COLONNE
   ========================================================= */
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 56px; padding: 48px 0 80px; align-items: start; }
.layout > * { min-width: 0; }

/* =========================================================
   12. CARD ARTICOLO / POST TILE
   ========================================================= */
.post-card { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-card > * { min-width: 0; }
.post-card:first-child { padding-top: 0; }
.post-line-no { width: 40px; height: 40px; border-radius: 8px; background: var(--blue-ice); color: var(--blue-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.post-card h2 { font-size: 23px; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--blue); text-decoration: none; }
.post-excerpt { color: var(--ink-soft); margin: 8px 0 12px; max-width: var(--measure); }
.post-meta { font-size: 13px; color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chip { font-family: var(--font-mono); font-size: 12px; color: var(--blue-dark); background: var(--blue-ice); padding: 3px 9px; border-radius: 999px; }
.chip:hover { text-decoration: none; background: #DCEAFF; }

/* Griglia post */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-grid > * { min-width: 0; }

.post-tile {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 1px 3px rgba(11,30,61,.05);
  transition: box-shadow .15s ease, transform .15s ease;
  min-width: 0;
}
.post-tile:hover { box-shadow: 0 14px 30px rgba(11,30,61,.1); transform: translateY(-2px); }
.post-tile.c-blue   { border-top-color: var(--blue); }
.post-tile.c-amber  { border-top-color: #E3A008; }
.post-tile.c-green  { border-top-color: #22A96C; }
.post-tile.c-purple { border-top-color: #8B5CF6; }
.post-tile.c-pink   { border-top-color: #EC4899; }
.post-tile.c-teal   { border-top-color: #14B8B8; }

.post-tile-head { margin-bottom: 12px; }
.post-tile-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.post-tile.c-blue   .post-tile-badge { background: var(--blue-ice); color: var(--blue-dark); }
.post-tile.c-amber  .post-tile-badge { background: #FFF3DE; color: #92620A; }
.post-tile.c-green  .post-tile-badge { background: #E4F7EE; color: #157347; }
.post-tile.c-purple .post-tile-badge { background: #F1EBFF; color: #6A32C9; }
.post-tile.c-pink   .post-tile-badge { background: #FFEAF1; color: #C2255C; }
.post-tile.c-teal   .post-tile-badge { background: #E1F5F6; color: #0F7A82; }

.post-tile-title { font-size: 18px; line-height: 1.3; margin: 0 0 8px; overflow-wrap: break-word; }
.post-tile-title a { color: var(--ink); }
.post-tile-title a:hover { color: var(--blue); text-decoration: none; }
.post-tile-excerpt { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 16px; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-tile-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--blue-dark); margin-bottom: 16px; }
.post-tile-btn:hover { background: var(--bg-soft); text-decoration: none; }
.post-tile-footer { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 12px; }

/* =========================================================
   13. BANNER LIBRO / CORSO
   ========================================================= */
.book-promo-tile { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; background: var(--bg-soft); border: 1px solid var(--blue-ice); border-radius: var(--radius); padding: 18px 22px; }
.book-promo-tile img { width: 56px; height: 84px; object-fit: cover; border-radius: 4px; box-shadow: 0 3px 10px rgba(11,30,61,.18); flex-shrink: 0; }
.book-promo-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--blue-dark); margin-bottom: 4px; }
.book-promo-title { font-size: 16px; margin: 0 0 3px; color: var(--ink); }
.book-promo-tagline { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.book-promo-cta { flex-shrink: 0; white-space: nowrap; background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: var(--radius-sm); }
.book-promo-cta:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }

/* =========================================================
   14. ANNUNCI / LINK INLINE
   ========================================================= */
.ad-slot { background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; overflow: hidden; }
.ad-slot-label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 8px; }
.ad-slot-grid { grid-column: 1 / -1; }
.ad-slot-sidebar { margin-bottom: 28px; }
.post-content .ad-slot-article { margin: 28px auto; max-width: var(--measure, 100%); }
.book-inline-link { background: var(--bg-soft); border-left: 3px solid var(--blue); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 15px; }
.book-inline-link a { color: var(--blue); font-weight: 600; }
.book-inline-link a:hover { color: var(--blue-dark); }

/* Banner corso */
.course-promo-tile { grid-column: 1 / -1; display: flex; justify-content: center; }
.course-promo-tile a { display: block; max-width: 420px; width: 100%; }
.course-promo-tile img { display: block; width: 100%; border-radius: var(--radius); box-shadow: 0 10px 24px rgba(11,30,61,.15); transition: transform .15s ease, box-shadow .15s ease; }
.course-promo-tile a:hover img { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(11,30,61,.2); }

/* =========================================================
   15. SIDEBAR
   ========================================================= */
.widget { margin-bottom: 40px; }
.widget h3 { font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.widget li a { color: var(--ink); }
.widget li a:hover { color: var(--blue); }
.widget li .count { color: var(--ink-soft); font-family: var(--font-mono); font-size: 12px; }

.book-list { display: flex; flex-direction: column; gap: 20px; }
.book-list li { display: block; padding: 0; border-bottom: none; }
.book-list li a {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-align: center;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.book-list li a:hover { border-color: var(--blue); background: var(--bg-soft); box-shadow: 0 8px 20px rgba(11,30,61,.08); transform: translateY(-2px); text-decoration: none; }
.book-list li img { width: 80px; height: 120px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(11,30,61,.2); flex-shrink: 0; }
.book-list .book-title { font-size: 13.5px; line-height: 1.4; color: var(--ink); font-weight: 500; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; padding-top: 8px; border-top: 1px dashed var(--line); width: 100%; }

/* =========================================================
   16. ARTICOLO SINGOLO
   ========================================================= */
.post-header { max-width: var(--measure); margin: 0 auto 32px; }
.post-header h1 { font-size: 36px; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
.post-content {
  max-width: var(--measure);
  margin: 0 auto;
  overflow-x: hidden;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.post-content iframe,
.post-content embed,
.post-content object,
.post-content video { max-width: 100%; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post-content p { margin: 0 0 1.3em; }
.post-content h2 { font-size: 25px; margin-top: 1.6em; overflow-wrap: break-word; }
.post-content h3 { font-size: 20px; margin-top: 1.4em; overflow-wrap: break-word; }
.post-content pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  max-width: 100%;
  min-width: 0;
  white-space: pre;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--blue-ice);
  color: var(--blue-dark);
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: break-word;
}
.post-content pre code { background: none; color: inherit; padding: 0; white-space: pre; }

.code-block { position: relative; margin: 1.3em 0; max-width: 100%; min-width: 0; }
.code-block pre { margin: 0; max-width: 100%; }
.code-copy-btn {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); color: var(--code-ink);
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm);
  padding: 6px 11px; font-family: var(--font-body); font-weight: 500; font-size: 12.5px;
  cursor: pointer; line-height: 1; backdrop-filter: blur(2px);
  transition: background .15s, border-color .15s;
}
.code-copy-btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.32); }
.code-copy-btn.is-copied { background: var(--blue); border-color: var(--blue); color: #fff; }

.post-content img { border-radius: var(--radius); margin: 1.5em 0; max-width: 100%; height: auto; }
.post-content img[style*="float: left"],
.post-content img[style*="float:left"] { margin: .3em 1.4em 1em 0; }
.post-content img[style*="float: right"],
.post-content img[style*="float:right"] { margin: .3em 0 1em 1.4em; }
.post-content::after { content: ""; display: table; clear: both; }
.post-content blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 3px solid var(--blue); color: var(--ink-soft); }

/* =========================================================
   17. PAGINAZIONE
   ========================================================= */
.pagination { display: flex; gap: 6px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination span { font-family: var(--font-mono); font-size: 13px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination a:hover { border-color: var(--blue); background: var(--blue-ice); text-decoration: none; }
.pagination .pagination-arrow { font-family: var(--font-body); font-weight: 500; }
.pagination .pagination-ellipsis { border: none; color: var(--ink-soft); padding: 7px 4px; }

/* =========================================================
   18. BREADCRUMB
   ========================================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 8px 0 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-soft); font-weight: 500; }
.breadcrumb a:hover { color: var(--blue); text-decoration: none; }
.breadcrumb span { opacity: .5; }
.breadcrumb-current { color: var(--ink); font-weight: 500; }

/* =========================================================
   19. PAGINE TUTORIAL
   ========================================================= */
.tutorial-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #EAF2FF 0%, #F7FAFF 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 40px;
  margin: 20px 0 32px;
}
.tutorial-hero::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(47,111,237,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.tutorial-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--blue-dark); margin-bottom: 16px;
}
.tutorial-hero h1 {
  font-size: 42px; line-height: 1.1; margin: 0 0 14px;
  letter-spacing: -0.02em; color: var(--ink);
  position: relative; z-index: 1;
}
.tutorial-meta {
  display: flex; flex-wrap: wrap; gap: 22px;
  font-size: 14px; color: var(--ink-soft);
  padding-top: 16px; border-top: 1px dashed var(--line);
  position: relative; z-index: 1;
}
.tutorial-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tutorial-meta strong { color: var(--ink); font-weight: 600; }
.tutorial-intro-content { max-width: var(--measure); margin: 0 0 32px; }

.tutorial-index { max-width: 820px; margin: 0; }
.tutorial-index-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 24px; padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  gap: 12px; flex-wrap: wrap;
}
.tutorial-index-head h2 { font-size: 26px; margin: 0; color: var(--ink); }
.tutorial-index-count {
  font-size: 13px; color: var(--blue-dark);
  background: var(--blue-ice); padding: 5px 14px;
  border-radius: 999px; font-weight: 600;
}

.tutorial-section {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 26px; margin-bottom: 18px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.tutorial-section:hover { border-color: #C9D6EE; box-shadow: 0 8px 24px rgba(11,30,61,.05); }
.tutorial-section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.tutorial-section-num {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 10px; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.tutorial-section-title {
  font-size: 20px; margin: 0; color: var(--ink);
  flex: 1; line-height: 1.25; overflow-wrap: break-word;
  font-family: var(--font-display);
}
.tutorial-section-count {
  font-size: 12px; color: var(--blue-dark);
  background: var(--blue-ice); padding: 4px 11px;
  border-radius: 999px; font-weight: 600;
  flex-shrink: 0; white-space: nowrap;
}
.tutorial-subsection-title {
  font-size: 16.5px; color: var(--blue-dark);
  margin: 22px 0 10px;
  font-family: var(--font-display); font-weight: 600;
}
.tutorial-lesson-list { list-style: none; counter-reset: lesson-counter; margin: 0; padding: 0; }
.tutorial-lesson-list > li {
  counter-increment: lesson-counter;
  position: relative;
  padding: 10px 0 10px 42px;
  border-bottom: 1px dashed var(--line);
  font-size: 15px; line-height: 1.5;
}
.tutorial-lesson-list > li:last-child { border-bottom: none; }
.tutorial-lesson-list > li::before {
  content: counter(lesson-counter);
  position: absolute; left: 0; top: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-soft);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tutorial-lesson-list > li:hover::before { background: var(--blue); color: #fff; }
.tutorial-lesson-list a { color: var(--ink); font-weight: 500; transition: color .15s; overflow-wrap: break-word; }
.tutorial-lesson-list a:hover { color: var(--blue); text-decoration: none; }
.tutorial-lesson-missing { color: var(--ink-soft); font-style: italic; }
.tutorial-lesson-list .tutorial-lesson-list { counter-reset: none; margin: 6px 0 4px 4px; }
.tutorial-lesson-list .tutorial-lesson-list > li { padding: 6px 0 6px 26px; border-bottom: none; font-size: 14px; }
.tutorial-lesson-list .tutorial-lesson-list > li::before {
  content: "↳"; background: none; color: var(--ink-soft);
  width: auto; height: auto; font-weight: 400; top: 6px; opacity: .55;
}

/* Navigazione lezioni */
.lesson-nav { max-width: var(--measure); margin: 44px auto 0; border-top: 1px solid var(--line); padding-top: 20px; }
.lesson-nav-context { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.lesson-nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lesson-nav-link { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.lesson-nav-link:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(11,30,61,.08); text-decoration: none; }
.lesson-nav-next { text-align: right; align-items: flex-end; }
.lesson-nav-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--blue-dark); }
.lesson-nav-title { font-size: 14.5px; color: var(--ink); }
.lesson-nav-disabled { border: none; }
/* =========================================================
   20. LINK UTILI (post content)
   ========================================================= */
.post-content .links-box {
  margin: 2em 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(11,30,61,.04);
}
.post-content .links-box > h2,
.post-content .links-box > h3,
.post-content .links-box > h4 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--blue-dark);
  background: linear-gradient(135deg, #EAF2FF 0%, #F7FAFF 100%);
  padding: 14px 22px; margin: 0;
  border-bottom: 1px solid var(--line);
}
.post-content .links-box > h2::before,
.post-content .links-box > h3::before,
.post-content .links-box > h4::before { content: "🔗"; font-size: 16px; flex-shrink: 0; }
.post-content .links-box > p {
  margin: 0; padding: 11px 22px;
  font-size: 15px; color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px dashed var(--line);
  background: #fff;
  transition: background .15s, padding-left .15s;
  display: flex; align-items: center; gap: 8px;
}
.post-content .links-box > p:last-child { border-bottom: none; }
.post-content .links-box > p:hover { background: var(--blue-ice); padding-left: 28px; }
.post-content .links-box > p > a { color: var(--blue-dark); font-weight: 500; text-decoration: none; }
.post-content .links-box > p > a:hover { color: var(--blue); text-decoration: none; }
.post-content .links-box > p > a::before { content: "→"; color: var(--blue); font-weight: 700; margin-right: 6px; }
.post-content .links-box > p.has-background,
.post-content .links-box > p.has-very-light-gray-background-color { background: var(--bg-soft); font-weight: 700; }
.post-content .links-box > p.has-background > a,
.post-content .links-box > p.has-very-light-gray-background-color > a { color: var(--blue-dark); font-weight: 700; }
.post-content .links-box > p.has-background > a::before,
.post-content .links-box > p.has-very-light-gray-background-color > a::before { content: "📖"; font-size: 15px; margin-right: 6px; }
.post-content .links-box > p.has-background:hover,
.post-content .links-box > p.has-very-light-gray-background-color:hover { padding-left: 22px; }
.post-content .links-box > p:last-of-type { border-radius: 0 0 14px 14px; }

/* =========================================================
   21. PAGINE LEGALI
   ========================================================= */
.legal-page { max-width: 820px; margin: 48px auto 80px; }
.legal-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.legal-header h1 { font-size: 40px; margin: 12px 0 8px; }
.legal-meta { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.legal-content { max-width: none; }
.legal-content h2 { font-size: 22px; margin: 2em 0 .6em; color: var(--ink); }
.legal-content h3 { font-size: 17px; margin: 1.6em 0 .5em; color: var(--blue-dark); }
.legal-content ul { margin: 0 0 1.3em; padding-left: 1.4em; }
.legal-content li { margin-bottom: .4em; }

/* =========================================================
   22. EBOOK & CORSI (pagina ebook.php)
   ========================================================= */
.ebook-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 920px; margin: 0 auto; }
.ebook-card {
  display: flex; gap: 18px; padding: 18px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius); color: var(--ink);
  text-decoration: none; align-items: flex-start;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ebook-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11,30,61,.1); text-decoration: none; color: var(--ink); }
.ebook-card.c-blue   { border-left-color: var(--blue); }
.ebook-card.c-amber  { border-left-color: #E3A008; }
.ebook-card.c-green  { border-left-color: #22A96C; }
.ebook-card.c-purple { border-left-color: #8B5CF6; }
.ebook-card.c-pink   { border-left-color: #EC4899; }
.ebook-cover { flex-shrink: 0; width: 90px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 16px rgba(11,30,61,.22); background: var(--bg-soft); }
.ebook-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ebook-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.ebook-tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--blue-ice); color: var(--blue-dark); }
.ebook-card.c-amber  .ebook-tag { background: #FFF3DE; color: #92620A; }
.ebook-card.c-green  .ebook-tag { background: #E4F7EE; color: #157347; }
.ebook-card.c-purple .ebook-tag { background: #F1EBFF; color: #6A32C9; }
.ebook-card.c-pink   .ebook-tag { background: #FFEAF1; color: #C2255C; }
.ebook-title { font-family: var(--font-display); font-size: 16px; line-height: 1.3; margin: 2px 0 0; color: var(--ink); }
.ebook-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 4px 0 8px; }
.ebook-cta { font-size: 13px; font-weight: 600; color: var(--blue-dark); display: inline-flex; align-items: center; gap: 4px; margin-top: auto; }
.ebook-card:hover .ebook-cta { color: var(--blue); }

/* =========================================================
   23. NEWSLETTER BANNER
   ========================================================= */
.newsletter-banner { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); padding: 44px 0; }
.newsletter-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.newsletter-banner-text { max-width: 480px; }
.newsletter-banner-text h2 { color: #fff; font-family: var(--font-display); font-size: 24px; margin: 0 0 8px; }
.newsletter-banner-text p { color: var(--blue-ice); margin: 0; font-size: 15px; }
.newsletter-banner-form { flex: 1; min-width: 280px; max-width: 420px; }
.newsletter-banner-row { display: flex; gap: 10px; }
.newsletter-banner-row input[type="email"] { flex: 1; padding: 12px 14px; border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 15px; }
.newsletter-banner-row button { background: #fff; color: var(--blue-dark); font-weight: 700; font-size: 15px; border: none; padding: 12px 22px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.newsletter-banner-row button:hover { background: var(--blue-ice); }
.newsletter-banner-consent { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; font-size: 12.5px; color: var(--blue-ice); }
.newsletter-banner-consent input { margin-top: 3px; }
.newsletter-banner-consent a { color: #fff; text-decoration: underline; }
.newsletter-honeypot { position: absolute; left: -9999px; }

/* =========================================================
   24. FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; margin-top: 40px; color: var(--ink-soft); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-info { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.footer-info strong { color: var(--ink); font-family: var(--font-display); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); font-size: 13.5px; }
.footer-links a:hover { color: var(--blue); }

/* =========================================================
   25. COOKIE BANNER
   ========================================================= */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 9000;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(11,30,61,.08);
  padding: 18px 24px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner.is-hidden { transform: translateY(100%); opacity: 0; }
.cookie-banner-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cookie-banner-text { flex: 1; min-width: 260px; font-size: 14px; color: var(--ink); line-height: 1.55; }
.cookie-banner-text strong { display: block; font-family: var(--font-display); font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.cookie-banner-text p { margin: 0; color: var(--ink-soft); }
.cookie-banner-text a { color: var(--blue-dark); font-weight: 500; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.cookie-btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; padding: 10px 22px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: background .15s, border-color .15s, transform .12s; }
.cookie-btn:hover { background: var(--bg-soft); border-color: #C9D6EE; transform: translateY(-1px); }
.cookie-btn-accept { background: var(--blue); color: #fff; border-color: var(--blue); }
.cookie-btn-accept:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

/* =========================================================
   26. STATO VUOTO
   ========================================================= */
.empty-state { padding: 40px 0; color: var(--ink-soft); }

/* =========================================================
   27. SEZIONE IMPARA — Quiz (hub + player)
   ========================================================= */
.quiz-hub-stats { display: flex; gap: 22px; justify-content: center; margin-top: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.quiz-hub-stats strong { font-family: var(--font-display); color: var(--blue); font-size: 20px; font-weight: 700; margin-right: 4px; }

.quiz-hub-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.quiz-hub-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-hub-filter { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: #fff; transition: background .15s, border-color .15s, color .15s; text-decoration: none; }
.quiz-hub-filter:hover { border-color: var(--blue); background: var(--blue-ice); color: var(--blue-dark); text-decoration: none; }
.quiz-hub-filter.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.quiz-hub-filter.is-active:hover { background: var(--blue-dark); color: #fff; }

.quiz-hub-search { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 4px 0 14px; height: 40px; min-width: 240px; transition: border-color .15s, box-shadow .15s; }
.quiz-hub-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.quiz-hub-search input { flex: 1; border: none; background: transparent; font-family: var(--font-body); font-size: 14px; color: var(--ink); outline: none; padding: 0; min-width: 0; }
.quiz-hub-search button { border: none; background: var(--blue-ice); color: var(--blue-dark); width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.quiz-hub-search button:hover { background: var(--blue); color: #fff; }

.quiz-hub-resultinfo { font-size: 14px; color: var(--ink-soft); margin: 0 0 24px; }
.quiz-hub-resultinfo a { color: var(--blue-dark); }

.quiz-cat { margin-bottom: 44px; scroll-margin-top: 90px; }
.quiz-cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.quiz-cat-titles { flex: 1; min-width: 200px; }
.quiz-cat-titles h2 { font-size: 22px; margin: 0 0 4px; color: var(--ink); font-family: var(--font-display); }
.quiz-cat-titles p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.quiz-card-link { text-decoration: none; color: inherit; }
.quiz-card-link:hover { text-decoration: none; color: inherit; }
.quiz-card-link .quiz-card-cta { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--blue-dark); display: inline-flex; align-items: center; gap: 4px; }
.quiz-card-link:hover .quiz-card-cta { color: var(--blue); }
.quiz-coming-soon { margin-top: 40px; padding: 22px 26px; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.quiz-coming-soon h2 { font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.quiz-coming-soon p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* Player quiz */
.quiz-app { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px 36px; margin-bottom: 32px; box-shadow: 0 1px 3px rgba(11,30,61,.04); }
.quiz-loading { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.quiz-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.quiz-progress-bar { flex: 1; min-width: 120px; height: 6px; background: var(--blue-ice); border-radius: 999px; overflow: hidden; }
.quiz-progress-bar > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s ease; }
.quiz-progress-label { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.quiz-timer { font-family: var(--font-mono); font-size: 12.5px; color: var(--blue-dark); background: var(--blue-ice); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.quiz-question { font-family: var(--font-display); font-size: 22px; line-height: 1.35; color: var(--ink); margin: 0 0 22px; white-space: pre-line; letter-spacing: -0.01em; }

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; font-family: var(--font-body); font-size: 15.5px; color: var(--ink); text-align: left; transition: border-color .15s, background .15s, transform .12s, box-shadow .15s; width: 100%; }
.quiz-option:hover:not(:disabled) { border-color: var(--blue); background: var(--bg-soft); transform: translateX(2px); }
.quiz-option:disabled { cursor: default; }
.quiz-option-letter { flex-shrink: 0; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-ice); color: var(--blue-dark); border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
.quiz-option-text { flex: 1; overflow-wrap: break-word; }
.quiz-option.is-correct { border-color: #22A96C; background: #E4F7EE; }
.quiz-option.is-correct .quiz-option-letter { background: #22A96C; color: #fff; }
.quiz-option.is-wrong { border-color: #C13B30; background: #FDECEA; }
.quiz-option.is-wrong .quiz-option-letter { background: #C13B30; color: #fff; }

.quiz-explanation { display: none; margin-top: 18px; padding: 14px 18px; background: var(--bg-soft); border-left: 3px solid var(--blue); border-radius: var(--radius-sm); font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.quiz-explanation.is-visible { display: block; }
.quiz-explanation strong { color: var(--blue-dark); }
.quiz-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.quiz-actions-center { justify-content: center; }
.quiz-result { text-align: center; padding: 8px 0 4px; }
.quiz-result h2 { font-size: 26px; margin: 12px 0 4px; color: var(--ink); }
.quiz-score { font-family: var(--font-display); font-size: 56px; font-weight: 700; line-height: 1; color: var(--blue); margin: 14px 0 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quiz-score-label { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 18px; }
.quiz-badge { display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 24px; }
.quiz-badge.is-gold   { background: #FEF3C7; color: #92620A; }
.quiz-badge.is-silver { background: #E2E8F0; color: #334155; }
.quiz-badge.is-bronze { background: #FCE7D6; color: #9A4A0E; }
.quiz-badge.is-none   { background: var(--bg-soft); color: var(--ink-soft); }
.quiz-review { text-align: left; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.quiz-review h3 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-family: var(--font-body); font-weight: 700; }
.quiz-review-item { padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.quiz-review-item:last-child { border-bottom: none; }
.quiz-review-q { font-weight: 600; color: var(--ink); margin-bottom: 6px; white-space: pre-line; }
.quiz-review-a { color: var(--ink-soft); font-size: 13.5px; }
.quiz-review-a.is-correct { color: #157347; }
.quiz-review-a.is-wrong   { color: #9E2E25; }

/* =========================================================
   28. SEZIONE ESERCIZI — layout a 3 colonne (player singolo)
   ========================================================= */
.esercizio-app {
  --es-bg: #fff;
  --es-bg-soft: #F5F9FF;
  --es-line: #E2E9F5;
  --es-ink: #0B1E3D;
  --es-ink-soft: #52627A;
  --es-code-bg: #1E1F2E;
  --es-code-ink: #E2E8F0;
  margin-bottom: 40px;
}
.es-shell {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 0;
  height: calc(100vh - 180px);
  min-height: 620px;
  border: 1px solid var(--es-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.es-col { min-width: 0; display: flex; flex-direction: column; }
.es-col-theory { border-right: 1px solid var(--es-line); background: var(--es-bg-soft); }
.es-col-editor { background: var(--es-code-bg); }
.es-col-output { border-left: 1px solid var(--es-line); background: #0B1E3D; color: #D7E4FA; }

.es-theory-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--es-line); background: #fff; }
.es-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--es-ink-soft); margin-bottom: 8px; }
.es-ex-title { font-family: var(--font-display); font-size: 19px; margin: 0 0 6px; color: var(--es-ink); }
.es-ex-meta { font-size: 12.5px; color: var(--es-ink-soft); font-family: var(--font-mono); }
.es-theory-body { flex: 1; overflow-y: auto; padding: 22px; }
.es-step-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); display: block; margin-bottom: 6px; }
.es-step-title { font-family: var(--font-display); font-size: 20px; line-height: 1.25; margin: 0 0 14px; color: var(--es-ink); }
.es-step-text { font-size: 14.5px; line-height: 1.6; color: var(--es-ink); margin-bottom: 18px; }
.es-step-text code { font-family: var(--font-mono); font-size: .9em; background: #EAF2FF; color: #1E4FBE; padding: 1px 5px; border-radius: 4px; }
.es-code-example { background: var(--es-code-bg); color: var(--es-code-ink); padding: 12px 14px; border-radius: 8px; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; overflow-x: auto; margin: 8px 0; }
.es-example-box { margin: 14px 0; border: 1px solid var(--es-line); border-radius: 10px; overflow: hidden; background: #fff; }
.es-example-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--es-ink-soft); padding: 8px 12px; background: var(--es-bg-soft); border-bottom: 1px solid var(--es-line); }
.es-example-box pre { margin: 0; padding: 12px 14px; background: var(--es-code-bg); color: var(--es-code-ink); font-family: var(--font-mono); font-size: 13px; line-height: 1.55; overflow-x: auto; }
.es-task-box { margin: 18px 0 12px; padding: 16px 18px; background: #EAF2FF; border-left: 4px solid var(--blue); border-radius: 8px; }
.es-task-label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #1E4FBE; margin-bottom: 6px; }
.es-task-text { font-size: 14.5px; line-height: 1.55; color: var(--es-ink); }
.es-hint-box { margin-top: 16px; padding: 14px 16px; background: #FFF3DE; border-left: 4px solid #E3A008; border-radius: 8px; font-size: 14px; }
.es-hint-label { display: block; font-weight: 700; color: #92620A; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; }
.es-theory-foot { padding: 14px 22px; border-top: 1px solid var(--es-line); background: #fff; display: flex; justify-content: space-between; gap: 10px; }

.es-editor-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #12131E; border-bottom: 1px solid #2A2C40; color: #8B92A8; font-family: var(--font-mono); font-size: 12.5px; }
.es-file-tab { color: #E2E8F0; }
.es-lang-badge { background: #2A2C40; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; }
.es-editor-wrap { flex: 1; min-height: 320px; overflow: hidden; position: relative; }
.es-editor-wrap .CodeMirror { height: 100% !important; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; }
.es-editor-wrap textarea#esCode { width: 100%; height: 100%; min-height: 320px; background: var(--es-code-bg); color: var(--es-code-ink); font-family: var(--font-mono); font-size: 14px; padding: 16px; border: none; outline: none; resize: none; }
.es-editor-actions { display: flex; gap: 8px; padding: 12px 16px; background: #12131E; border-top: 1px solid #2A2C40; flex-wrap: wrap; }

.es-output-head { padding: 12px 16px; border-bottom: 1px solid #1B2A45; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8B92A8; }
.es-output-body { flex: 1; overflow-y: auto; padding: 16px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
.es-output-placeholder { color: #8B92A8; margin: 0; font-family: var(--font-body); font-size: 14px; }
.es-output-placeholder strong { color: #E2E8F0; }
.es-output-pre { margin: 0; white-space: pre-wrap; word-break: break-word; color: #E2E8F0; }
.es-output-error { margin-top: 12px; padding: 10px 12px; background: rgba(239,68,68,.12); border-left: 3px solid #EF4444; color: #FCA5A5; font-size: 12.5px; white-space: pre-wrap; }
.es-verdict { padding: 0 16px 16px; }

.es-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: background .15s, transform .1s, opacity .15s; }
.es-btn:disabled { opacity: .4; cursor: not-allowed; }
.es-btn-primary { background: var(--blue); color: #fff; }
.es-btn-primary:hover:not(:disabled) { background: #1E4FBE; }
.es-btn-run { background: #FFC107; color: #0B1E3D; font-weight: 700; }
.es-btn-run:hover { background: #FFB300; }
.es-btn-ghost { background: transparent; color: var(--es-ink); border: 1px solid var(--es-line); }
.es-btn-ghost:hover { background: var(--es-bg-soft); }
.es-col-editor .es-btn-ghost { color: #D7E4FA; border-color: #2A2C40; }
.es-col-editor .es-btn-ghost:hover { background: #2A2C40; }

.es-verdict-ok { margin-top: 10px; padding: 12px 14px; background: rgba(34,169,108,.15); border-left: 3px solid #22A96C; color: #A7F3D0; border-radius: 6px; font-size: 13.5px; }
.es-verdict-ko { margin-top: 10px; padding: 12px 14px; background: rgba(239,68,68,.15); border-left: 3px solid #EF4444; color: #FCA5A5; border-radius: 6px; font-size: 13.5px; }
.es-verdict-ko ul { margin: 6px 0 6px 18px; padding: 0; }
.es-verdict-ko p { margin: 6px 0 0; }

.es-finish { text-align: center; padding: 60px 30px; background: #fff; border: 1px solid var(--es-line); border-radius: 14px; }
.es-finish-badge { font-size: 64px; margin-bottom: 12px; }
.es-finish h2 { font-family: var(--font-display); font-size: 28px; color: var(--es-ink); margin: 0 0 8px; }
.es-finish p { color: var(--es-ink-soft); margin: 0 0 24px; }
.es-finish-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   29. CORSI — hub + player a 4 colonne
   ========================================================= */
.corsi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.corso-card {
  display: flex; flex-direction: column; padding: 24px;
  border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); background: #fff;
  text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.corso-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(11,30,61,.1); text-decoration: none; color: inherit; }
.corso-card.c-blue { border-top-color: var(--blue); }
.corso-card.c-amber { border-top-color: #E3A008; }
.corso-card.c-green { border-top-color: #22A96C; }
.corso-card.c-purple { border-top-color: #8B5CF6; }
.corso-card.c-pink { border-top-color: #EC4899; }
.corso-card.c-teal { border-top-color: #14B8B8; }
.corso-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.corso-card h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 4px; color: var(--ink); }
.corso-card-sub { color: var(--blue-dark); font-weight: 600; font-size: 14px; margin: 0 0 10px; }
.corso-card-desc { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0 0 16px; flex-grow: 1; }
.corso-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); padding-top: 12px; border-top: 1px dashed var(--line); }
.corso-card-cta { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--blue-dark); }
.corso-card:hover .corso-card-cta { color: var(--blue); }

/* Player corso (4 colonne) */
.corso-shell {
  display: grid;
  grid-template-columns: 260px 340px 1fr 340px;
  gap: 0;
  height: calc(100vh - 220px);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 40px;
}
.corso-index { background: #F5F9FF; border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 8px; }
.corso-index-head { padding: 8px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.corso-index-icon { font-size: 24px; display: block; margin-bottom: 4px; }
.corso-index-head h2 { font-family: var(--font-display); font-size: 15px; margin: 0; color: var(--ink); }
.corso-index-modulo { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 12px 12px 6px; }
.corso-index-item {
  display: grid;
  grid-template-columns: 20px 22px 1fr;
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.corso-index-item:hover:not(:disabled) { background: #EAF2FF; }
.corso-index-item.is-current { background: #EAF2FF; color: var(--blue-dark); font-weight: 600; }
.corso-index-item.is-done .corso-index-status { color: #22A96C; font-weight: 700; }
.corso-index-item.is-locked { opacity: .55; cursor: not-allowed; }
.corso-index-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.corso-index-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Barra superiore del player corso */
.cc-fullscreen { margin: 0; padding: 0; height: 100vh; overflow: hidden; background: #fff; font-family: var(--font-body); color: var(--ink); }
.cc-topbar { display: flex; align-items: center; gap: 20px; height: 56px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cc-topbar-brand img { height: 32px; display: block; }
.cc-topbar-title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc-topbar-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.cc-topbar-title strong { font-family: var(--font-display); font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-topbar-actions { display: flex; gap: 14px; flex-shrink: 0; }
.cc-topbar-link { font-size: 13px; color: var(--blue-dark); text-decoration: none; font-weight: 500; }
.cc-topbar-link:hover { color: var(--blue); text-decoration: underline; }
.cc-topbar-lock { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #FFF3DE; color: #92620A; padding: 3px 9px; border-radius: 999px; margin-left: 8px; }

.cc-player-wrap { height: calc(100vh - 56px); overflow: hidden; }
.corso-app { height: 100%; display: flex; flex-direction: column; }

/* Blocco corso (Pro / Registrati) */
.corso-blocco,
.corso-blocco-view { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 48px 30px; max-width: 620px; margin: 0 auto; }
.corso-blocco-view { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; border: none; border-radius: 0; max-width: none; padding: 40px; background: #F5F9FF; }
.corso-blocco-icon { font-size: 64px; line-height: 1; margin-bottom: 16px; }
.corso-blocco h1,
.corso-blocco-view h1 { font-family: var(--font-display); font-size: 28px; margin: 0 0 14px; color: var(--ink); }
.corso-blocco-text { color: var(--ink-soft); font-size: 16px; line-height: 1.6; margin: 0 0 24px; max-width: 48ch; }
.corso-blocco-note { font-size: 14px; color: var(--ink-soft); margin: 0 0 20px; }
.corso-blocco-note a { color: var(--blue-dark); }
.corso-blocco-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.corso-blocco-anteprima { border-top: 1px dashed var(--line); padding-top: 22px; margin-top: 12px; }
.corso-blocco-anteprima p { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }

/* Output HTML renderizzato e output teorico */
.es-output-preview { width: 100%; min-height: 200px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; display: block; }
.es-output-teorico { background: #F5F9FF; border-left: 3px solid #2F6FED; border-radius: 8px; padding: 18px 20px; color: #0B1E3D; font-family: var(--font-body); }
.es-output-teorico-icon { font-size: 32px; line-height: 1; margin-bottom: 8px; }
.es-output-teorico-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: #2F6FED; }
.es-output-teorico-text { font-size: 13.5px; line-height: 1.55; color: #0B1E3D; margin-bottom: 12px; }
.es-output-teorico-hint { font-size: 12.5px; color: #52627A; border-top: 1px dashed #E2E9F5; padding-top: 10px; }
.es-output-teorico-hint strong { color: #0B1E3D; }

/* =========================================================
   30. AUTENTICAZIONE
   ========================================================= */
.auth-head { margin-bottom: 32px; text-align: center; }
.auth-head .eyebrow-pill { margin-bottom: 14px; }
.auth-head h1 { font-size: 30px; margin: 6px 0 10px; color: var(--ink); }
.auth-head p { color: var(--ink-soft); font-size: 15px; max-width: 44ch; margin: 0 auto; }

.auth-form { display: flex; flex-direction: column; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; box-shadow: 0 1px 3px rgba(11,30,61,.04); }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.auth-field input { font-family: var(--font-body); font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.auth-hint { font-size: 12.5px; color: var(--ink-soft); }
.auth-hint a { color: var(--blue-dark); }
.auth-opt { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }
.auth-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.auth-check input { margin-top: 3px; }
.auth-check a { color: var(--blue-dark); }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-footer { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 22px; }
.auth-footer a { color: var(--blue-dark); font-weight: 600; }
.auth-alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.auth-alert-error { background: #FDECEA; border-left: 3px solid #C13B30; color: #9E2E25; }
.auth-box { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 40px 30px; box-shadow: 0 1px 3px rgba(11,30,61,.04); }
.auth-box-icon { font-size: 52px; margin-bottom: 8px; line-height: 1; }
.auth-box h1 { font-size: 24px; margin: 12px 0 12px; color: var(--ink); }
.auth-box-text { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.auth-box-text.auth-muted { font-size: 13.5px; opacity: .85; }

/* =========================================================
   31. AREA PERSONALE
   ========================================================= */
.area-head { margin-bottom: 36px; }
.area-head .eyebrow-pill { margin-bottom: 12px; }
.area-head h1 { font-size: 34px; margin: 4px 0 8px; color: var(--ink); }
.area-sub { color: var(--ink-soft); font-size: 15px; margin: 0; }
.area-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.area-h2 { font-size: 20px; margin: 0 0 20px; color: var(--ink); font-family: var(--font-display); }
.area-corsi { display: flex; flex-direction: column; gap: 16px; }
.area-corso { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: 20px 22px; }
.area-corso.c-blue { border-left-color: var(--blue); }
.area-corso.c-amber { border-left-color: #E3A008; }
.area-corso.c-green { border-left-color: #22A96C; }
.area-corso.c-purple { border-left-color: #8B5CF6; }
.area-corso.c-pink { border-left-color: #EC4899; }
.area-corso.c-teal { border-left-color: #14B8B8; }
.area-corso-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.area-corso-titles { flex: 1; min-width: 0; }
.area-corso-titles h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.area-corso-meta { font-size: 12.5px; color: var(--ink-soft); }
.area-tag { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.area-tag.is-ok { background: #E4F7EE; color: #157347; }
.area-tag.is-locked { background: #FFF3DE; color: #92620A; }
.area-corso-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.area-corso-bar { flex: 1; min-width: 120px; height: 6px; background: var(--blue-ice); border-radius: 999px; overflow: hidden; }
.area-corso-bar > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .4s ease; }
.area-corso-perc { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.area-corso-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.area-corso-note { font-size: 13px; color: var(--ink-soft); }
.area-side { display: flex; flex-direction: column; gap: 16px; }
.area-side-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.area-side-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 14px; }
.area-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.area-profile-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.area-profile-nome { font-weight: 600; color: var(--ink); font-size: 15px; }
.area-profile-email { font-size: 13px; color: var(--ink-soft); word-break: break-all; }
.area-profile-list { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); padding-top: 12px; }
.area-profile-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; color: var(--ink-soft); }
.area-profile-list strong { color: var(--ink); }
.area-side-links { list-style: none; margin: 0; padding: 0; }
.area-side-links li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.area-side-links li:last-child { border-bottom: none; }
.area-side-links a { color: var(--ink); font-size: 14px; display: flex; align-items: center; gap: 8px; text-decoration: none; transition: color .12s; }
.area-side-links a:hover { color: var(--blue); }
.area-side-links .area-logout { color: #C13B30; }
.area-side-links .area-logout:hover { color: #9E2E25; }

/* =========================================================
   32. MOBILE — tutte le media query raggruppate
   ========================================================= */

/* Tablet: rimuove output corso, restringe colonne */
@media (max-width: 1280px) {
  .corso-shell { grid-template-columns: 240px 320px 1fr; }
  .corso-shell .es-col-output { display: none; }
  .site-nav .nav-modern-toggle { padding: 10px 10px; font-size: 13.5px; }
  .site-nav .nav-modern-toggle .nav-modern-label { display: none; }
  .site-nav .nav-modern-toggle .nav-caret { margin-left: 2px; }
  .site-nav .nav-highlight-ebook { padding: 8px 14px; }
}

@media (max-width: 1120px) {
  .site-nav .nav-highlight-ebook .nav-hl-label { display: none; }
  .site-nav .nav-highlight-ebook { padding: 9px 12px; }
}

/* Tablet largo: menu si nasconde, appare hamburger */
@media (max-width: 1024px) {
  .nav-bar { flex-wrap: wrap; gap: 12px; }
  .brand { order: 1; }
  .brand img { height: 34px; }
  .nav-toggle { display: flex; order: 2; margin-left: auto; }

  .nav-search-toggle { order: 3; margin-left: 6px; }

  .site-nav {
    order: 4;
    display: none;
    position: fixed;
    inset: 132px 0 0 0;
    background: #fff;
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }

  .site-nav > a,
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  .site-nav .nav-dropdown-modern { width: 100%; display: block; margin-left: 0; }
  .site-nav .nav-modern-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 8px;
  }
  .site-nav .nav-modern-toggle .nav-modern-label { display: inline; }
  .site-nav .nav-modern-toggle::after { display: none; }
  .site-nav .nav-modern-toggle:hover { background: var(--blue-ice); }

  .site-nav .nav-dropdown-menu-modern,
  .site-nav .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 8px 12px;
    min-width: 0;
    max-width: 100%;
    top: auto;
    right: auto;
    left: auto;
    max-height: none;
  }
  .site-nav .nav-dropdown-menu-modern::before,
  .site-nav .nav-dropdown-menu::before { display: none; }

  .site-nav .nav-highlight-ebook {
    width: 100%;
    justify-content: center;
    margin: 8px 0 0 0;
    padding: 14px 16px;
    font-size: 15px;
  }
  .site-nav .nav-highlight-ebook .nav-hl-label { display: inline; }

  .site-nav .nav-auth {
    width: 100%;
    justify-content: center;
    margin: 8px 0 0 0;
    padding: 14px 16px;
    font-size: 15px;
  }

  /* Corso: layout impilato */
  .corso-shell { grid-template-columns: 1fr; height: auto; }
  .corso-index { max-height: 260px; overflow-y: auto; border-right: none; border-bottom: 1px solid var(--line); }

  /* Esercizio singolo: impilato */
  .es-shell { grid-template-columns: 1fr; height: auto; }
  .es-col-theory { border-right: none; border-bottom: 1px solid var(--es-line); }
  .es-col-editor { min-height: 420px; }
  .es-col-output { border-left: none; border-top: 1px solid var(--es-line); }

  /* Area personale: impilata */
  .area-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 32px; }
  .hero-section { padding: 40px 0 48px; }
  .hero-code { font-size: 12px; transform: none; }
  .hero-code pre { padding: 16px 16px; }
  .tech-strip .container { gap: 16px; flex-direction: column; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 60px; }
  .post-header h1 { font-size: 28px; }
  .post-content h2 { font-size: 22px; }
  .post-content h3 { font-size: 18px; }
  .post-content pre { padding: 14px 16px; font-size: 13px; }
}

@media (max-width: 800px) {
  .container { padding: 0 16px; }
  .es-theory-body,
  .es-output-body { max-height: 400px; }
  .ebook-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .newsletter-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter-banner-text { max-width: none; }
  .newsletter-banner-form { max-width: none; }
  .newsletter-banner-row { flex-direction: column; }
  .newsletter-banner-consent { text-align: left; }
}

@media (max-width: 700px) {
  .tutorial-hero { padding: 24px 22px; border-radius: 14px; }
  .tutorial-hero h1 { font-size: 28px; }
  .tutorial-meta { gap: 14px; font-size: 13px; }
  .tutorial-section { padding: 18px 18px; }
  .tutorial-section-head { flex-wrap: wrap; gap: 10px; }
  .tutorial-section-title { font-size: 17px; }
  .tutorial-section-num { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
  .tutorial-lesson-list > li { padding-left: 36px; font-size: 14px; }
  .tutorial-lesson-list > li::before { width: 22px; height: 22px; font-size: 11px; }
  .cookie-banner { padding: 16px 18px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; }
  .legal-header h1 { font-size: 30px; }
}

@media (max-width: 640px) {
  .quiz-hub-controls { flex-direction: column; align-items: stretch; }
  .quiz-hub-search { min-width: 0; width: 100%; }
  .quiz-hub-filters { justify-content: center; }
  .quiz-cat-head { gap: 12px; }
  .quiz-cat-titles h2 { font-size: 19px; }
  .quiz-app { padding: 22px 20px; border-radius: var(--radius); }
  .quiz-question { font-size: 19px; }
  .code-copy-btn { padding: 5px 9px; }
  .code-copy-btn span { display: none; }
  .corsi-grid { grid-template-columns: 1fr; }
  .corso-card h2 { font-size: 19px; }
  .nav-search-panel { padding-top: 70px; }
  .nav-search-panel-form input { font-size: 15px; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .hero-mini h1 { font-size: 30px; }
  .hero-stats { max-width: 100%; }
  .hero-stat { padding: 0 14px; }
  .hero-stat b { font-size: 22px; }
  .post-card { grid-template-columns: 1fr; gap: 12px; }
  .ebook-card { flex-direction: column; align-items: center; text-align: center; }
  .ebook-cover { width: 120px; }
  .ebook-body { align-items: center; }
  .course-title { font-size: 24px; }
  .course-help { text-align: center; justify-content: center; }
  .book-promo-tile { flex-wrap: wrap; }
  .book-promo-cta { width: 100%; text-align: center; }
  .lesson-nav-links { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; text-align: center; }
  .area-head h1 { font-size: 26px; }
  .corso-blocco h1,
  .corso-blocco-view h1 { font-size: 22px; }
  .cc-topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .cc-topbar-title { width: 100%; }
}