/*
 * IPSO — Wireframe CSS
 * Scala di grigi. Nessun colore del brand.
 * Font: DM Sans (sans) + Georgia fallback (serif, in attesa di Minion Variable Concept)
 */

/* ===== TOKENS ===== */
:root {
  --wf-ink:        #1f1f1f;
  --wf-dark:       #3f3f3f;
  --wf-medium:     #6f6f6f;
  --wf-muted:      #9a9a9a;
  --wf-border:     #c9c9c9;
  --wf-surface:    #e7e7e7;
  --wf-bg:         #f4f4f4;
  --wf-white:      #ffffff;

  /* Typography — Minion non disponibile, fallback Georgia */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fw-light:   300;
  --fw-reg:     400;
  --fw-semi:    600;
  --fw-bold:    700;

  /* Spacing (8px grid) */
  --sp-1:  8px;  --sp-2:  16px; --sp-3:  24px; --sp-4:  32px;
  --sp-5:  40px; --sp-6:  48px; --sp-8:  64px; --sp-10: 80px;
  --sp-12: 96px; --sp-16: 128px;

  --container:     1240px;
  --container-pad: clamp(16px, 4vw, 40px);
  --header-h:      72px;
  --radius:        4px;
  --radius-lg:     8px;
  --transition:    200ms ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--wf-ink);
  background: var(--wf-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--wf-ink); color: var(--wf-white);
  padding: 8px 16px; z-index: 10000;
  font-size: 14px; text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

/* ===== LAYOUT ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--container-pad); }
.section       { padding: var(--sp-10) 0; }
.section--lg   { padding: var(--sp-12) 0; }
.section--sm   { padding: var(--sp-6) 0; }
.section--dark { background: var(--wf-dark); color: var(--wf-white); }
.section--surf { background: var(--wf-surface); }
.section--bg   { background: var(--wf-bg); }

.grid     { display: grid; gap: var(--sp-3); }
.grid-2   { grid-template-columns: repeat(2, 1fr); }
.grid-3   { grid-template-columns: repeat(3, 1fr); }
.grid-4   { grid-template-columns: repeat(4, 1fr); }
.grid-auto{ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.col-2    { grid-template-columns: 2fr 1fr; }
.col-split{ grid-template-columns: 1fr 1fr; align-items: center; }

@media (max-width: 1023px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .col-2, .col-split { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .grid-4, .grid-3, .grid-2, .grid-auto { grid-template-columns: 1fr; }
}

/* ===== HEADER ===== */
#site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--wf-white);
  border-bottom: 1px solid var(--wf-border);
  display: flex; align-items: center;
}
.header__inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-3);
  width: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 var(--container-pad);
}
.header__logo {
  font-family: var(--font-serif); font-size: 20px; font-weight: var(--fw-bold);
  color: var(--wf-ink); text-decoration: none; letter-spacing: -0.3px; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.header__logo-mark {
  width: 30px; height: 30px; background: var(--wf-dark);
  border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.header__logo-mark img { width: 20px; height: 20px; object-fit: contain; filter: invert(1); }
.header__nav { display: flex; align-items: center; gap: 2px; }
.header__nav a {
  font-size: 14px; font-weight: var(--fw-semi); color: var(--wf-dark);
  text-decoration: none; padding: 6px 10px; border-radius: var(--radius);
  transition: background var(--transition); white-space: nowrap;
}
.header__nav a:hover   { background: var(--wf-surface); }
.header__nav a.active  { background: var(--wf-surface); font-weight: var(--fw-bold); }
.header__nav a:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.btn-search {
  background: none; border: 1px solid var(--wf-border);
  border-radius: var(--radius); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; color: var(--wf-dark);
  font-size: 16px; cursor: pointer;
}
.btn-search:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 2px; }
.btn-cta-header {
  background: var(--wf-dark); color: var(--wf-white); border: 2px solid var(--wf-dark);
  border-radius: var(--radius); padding: 8px 16px; font-size: 14px; font-weight: var(--fw-semi);
  text-decoration: none; white-space: nowrap; min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.btn-cta-header:hover  { background: var(--wf-ink); border-color: var(--wf-ink); }
.btn-cta-header:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 3px; }
.btn-hamburger {
  display: none; background: none; border: 1px solid var(--wf-border);
  border-radius: var(--radius); width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.btn-hamburger span { width: 22px; height: 2px; background: var(--wf-dark); display: block; border-radius: 1px; }
.btn-hamburger:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 2px; }
@media (max-width: 1023px) {
  .header__nav { display: none; }
  .btn-hamburger { display: flex; }
}

/* Search overlay */
.search-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(31,31,31,0.88); z-index: 200;
  align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-overlay__box {
  background: var(--wf-white); border-radius: var(--radius-lg);
  padding: var(--sp-4); width: 100%; max-width: 600px; margin: 0 var(--sp-2);
}
.search-overlay__label { font-size: 14px; color: var(--wf-medium); margin-bottom: var(--sp-1); }
.search-overlay__form { display: flex; gap: var(--sp-1); }
.search-overlay__form input {
  flex: 1; border: 1px solid var(--wf-border); border-radius: var(--radius);
  padding: 12px 16px; font-size: 16px;
}
.search-overlay__form input:focus { outline: 2px solid var(--wf-dark); }
.search-overlay__btn {
  background: var(--wf-dark); color: var(--wf-white); border: none;
  border-radius: var(--radius); padding: 0 16px; font-size: 14px; font-weight: var(--fw-semi); cursor: pointer;
}
.search-overlay__close {
  display: block; margin-top: var(--sp-2); background: none; border: none;
  color: var(--wf-medium); font-size: 13px; cursor: pointer; text-align: right; width: 100%;
}

/* Mobile menu */
#mobile-menu {
  display: none; position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--wf-white); z-index: 99;
  overflow-y: auto; padding: var(--sp-3);
}
#mobile-menu.open { display: block; }
.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__nav a {
  display: block; padding: 14px var(--sp-1);
  font-size: 18px; font-weight: var(--fw-semi); color: var(--wf-dark);
  text-decoration: none; border-bottom: 1px solid var(--wf-surface);
}
.mobile-menu__nav a:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: 2px; }
.mobile-menu__cta {
  display: block; margin-top: var(--sp-4);
  background: var(--wf-dark); color: var(--wf-white);
  text-align: center; padding: 16px; font-size: 16px; font-weight: var(--fw-semi);
  text-decoration: none; border-radius: var(--radius);
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--wf-dark); color: var(--wf-white);
  padding: var(--sp-6) 0 var(--sp-3);
}
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-4); margin-bottom: var(--sp-5);
}
.footer__brand h2 { font-family: var(--font-serif); font-size: 18px; margin-bottom: 6px; }
.footer__brand p  { font-size: 12px; color: var(--wf-muted); line-height: 1.5; margin-bottom: var(--sp-2); }
.footer__social { display: flex; gap: 6px; margin-top: var(--sp-2); }
.footer__social a {
  width: 28px; height: 28px; background: rgba(255,255,255,0.1);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-semi); text-decoration: none; color: var(--wf-surface);
}
.footer__social a:hover { background: rgba(255,255,255,0.2); }
.footer__social a:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.footer__col h3 {
  font-size: 10px; font-weight: var(--fw-semi); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--wf-muted); margin-bottom: 10px;
}
.footer__col ul { columns: 2; column-gap: 10px; }
.footer__col li { margin-bottom: 5px; break-inside: avoid; }
.footer__col li a { font-size: 12px; color: var(--wf-surface); text-decoration: none; }
.footer__col li a:hover { color: var(--wf-white); }
.footer__col li a:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.footer__col--1col ul { columns: 1; }
.footer__contacts { font-size: 12px; color: var(--wf-surface); line-height: 1.7; }
.footer__contacts a { color: var(--wf-surface); text-decoration: none; }
.footer__contacts a:hover { color: var(--wf-white); }
.footer__contacts .footer__contacts-sep { display: block; height: 1px; background: rgba(255,255,255,0.10); margin: var(--sp-1) 0; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--sp-3);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--sp-2); font-size: 11px; color: var(--wf-muted);
}
.footer__legal { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.footer__legal a { color: var(--wf-muted); text-decoration: none; }
.footer__legal a:hover { color: var(--wf-white); }
@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col ul { columns: 1; }
}
@media (max-width: 767px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== TYPOGRAPHY ===== */
.h1 { font-family: var(--font-serif); font-size: clamp(32px, 5vw, 56px); font-weight: var(--fw-bold); line-height: 1.15; color: var(--wf-ink); }
.h2 { font-family: var(--font-serif); font-size: clamp(24px, 3.5vw, 40px); font-weight: var(--fw-bold); line-height: 1.2; color: var(--wf-ink); }
.h3 { font-family: var(--font-sans); font-size: clamp(18px, 2.5vw, 24px); font-weight: var(--fw-semi); line-height: 1.3; color: var(--wf-dark); }
.h4 { font-family: var(--font-sans); font-size: 18px; font-weight: var(--fw-semi); line-height: 1.4; }
.lead { font-size: clamp(16px, 2vw, 20px); line-height: 1.7; color: var(--wf-dark); }
.label-sm { font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.12em; color: var(--wf-medium); }

/* ===== PLACEHOLDER ===== */
.ph {
  background: var(--wf-surface); border: 1px dashed var(--wf-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-3); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.ph::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 8px,
    rgba(0,0,0,0.03) 8px, rgba(0,0,0,0.03) 9px
  );
}
.ph__label {
  font-size: 11px; font-weight: var(--fw-semi);
  color: var(--wf-medium); letter-spacing: 0.06em; line-height: 1.5;
  position: relative; z-index: 1;
}
.ph--16x9  { aspect-ratio: 16/9; }
.ph--4x3   { aspect-ratio: 4/3; }
.ph--1x1   { aspect-ratio: 1/1; }
.ph--3x4   { aspect-ratio: 3/4; }
.ph--9x16  { aspect-ratio: 9/16; }
.ph--hero  { min-height: 340px; }
.ph--map   { min-height: 280px; }
.ph--cover { min-height: 200px; }
.ph--avatar { width: 72px; height: 72px; border-radius: 50%; padding: 0; }
.ph--avatar-lg { width: 120px; height: 120px; border-radius: 50%; padding: 0; }
.ph--avatar-sm { width: 56px; height: 56px; border-radius: 50%; padding: 0; flex-shrink: 0; }
.ph--logo  { height: 56px; min-width: 100px; padding: 0; }
.ph--icon  { width: 48px; height: 48px; border-radius: var(--radius); padding: 0; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--wf-medium); padding: var(--sp-2) 0;
}
.breadcrumb a { color: var(--wf-medium); text-decoration: none; }
.breadcrumb a:hover { color: var(--wf-dark); text-decoration: underline; }
.section--dark .breadcrumb a { color: rgba(255,255,255,0.55); }
.section--dark .breadcrumb a:hover { color: #fff; text-decoration: underline; }
.section--dark .breadcrumb span { color: rgba(255,255,255,0.35); }
.section--dark .breadcrumb__sep { color: rgba(255,255,255,0.25); }
.breadcrumb a:focus-visible { outline: 2px solid var(--wf-dark); }
.breadcrumb span { color: var(--wf-muted); }
.breadcrumb__sep { color: var(--wf-border); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-semi);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: var(--transition); min-height: 44px; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 3px; }
.btn--primary  { background: var(--wf-dark); color: var(--wf-white); border-color: var(--wf-dark); }
.btn--primary:hover { background: var(--wf-ink); border-color: var(--wf-ink); }
.btn--secondary{ background: transparent; color: var(--wf-dark); border-color: var(--wf-dark); }
.btn--secondary:hover { background: var(--wf-surface); }
.btn--ghost    { background: transparent; color: var(--wf-dark); border-color: var(--wf-border); }
.btn--ghost:hover { background: var(--wf-surface); border-color: var(--wf-dark); }
.btn--white    { background: var(--wf-white); color: var(--wf-dark); border-color: var(--wf-white); }
.btn--white:hover { background: var(--wf-surface); }
.btn--sm       { padding: 8px 16px; font-size: 14px; min-height: 36px; }
.btn--wide     { width: 100%; justify-content: center; }

/* ===== CARDS ===== */
.card {
  background: var(--wf-white); border: 1px solid var(--wf-border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--wf-dark); }
.card__body   { padding: var(--sp-3); flex: 1; }
.card__footer { padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--wf-surface); }
.card__tag    { font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.1em; color: var(--wf-medium); display: block; margin-bottom: 6px; }
.card__title  { font-family: var(--font-serif); font-size: 18px; font-weight: var(--fw-bold); line-height: 1.3; margin-bottom: 6px; }
.card__meta   { font-size: 13px; color: var(--wf-medium); }
.card__desc   { font-size: 14px; color: var(--wf-dark); margin-top: 8px; line-height: 1.6; }

/* ===== CORSO CARD ===== */
.corso-card__toprow { display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.corso-card__title { font-family: var(--font-serif); font-size: 19px; font-weight: var(--fw-bold); line-height: 1.25; margin-bottom: 5px; }
.corso-card__title a { color: var(--wf-ink); text-decoration: none; }
.corso-card__title a:hover { text-decoration: underline; }
.corso-card__subtitle { font-size: 12px; color: var(--wf-medium); line-height: 1.4; margin-bottom: var(--sp-2); font-style: italic; }
.corso-card__facts { list-style: none; display: flex; flex-direction: column; gap: 5px; padding: var(--sp-2) 0; border-top: 1px solid var(--wf-surface); border-bottom: 1px solid var(--wf-surface); margin-bottom: var(--sp-2); }
.corso-card__facts li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--wf-dark); }
.corso-card__facts li svg { flex-shrink: 0; color: var(--wf-muted); }
.corso-card__desc { font-size: 13px; color: var(--wf-dark); line-height: 1.65; margin-bottom: var(--sp-2); }
.corso-card__teachers { font-size: 12px; color: var(--wf-medium); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; padding-top: var(--sp-1); border-top: 1px solid var(--wf-surface); }
.corso-card__teachers svg { flex-shrink: 0; margin-top: 1px; color: var(--wf-muted); }

/* Inline icon alignment helper */
.card__meta--icons { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.card__meta--icons svg { flex-shrink: 0; color: var(--wf-muted); }

/* Info strip */
.info-strip {
  background: var(--wf-bg); border: 1px solid var(--wf-border);
  border-radius: var(--radius); display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.info-strip__item {
  padding: var(--sp-3); border-right: 1px solid var(--wf-border);
}
.info-strip__item:last-child { border-right: none; }
.info-strip__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--wf-medium); margin-bottom: 4px; }
.info-strip__value { font-size: 15px; font-weight: var(--fw-semi); color: var(--wf-dark); }
@media (max-width: 767px) {
  .info-strip { grid-template-columns: 1fr 1fr; }
  .info-strip__item { border-right: none; border-bottom: 1px solid var(--wf-border); }
}

/* ===== ACCORDION ===== */
.accordion { border: 1px solid var(--wf-border); border-radius: var(--radius); overflow: hidden; }
.acc-item { border-bottom: 1px solid var(--wf-border); }
.acc-item:last-child { border-bottom: none; }
.acc-trigger {
  width: 100%; background: var(--wf-white); border: none; border-radius: 0;
  padding: var(--sp-3); text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-semi); cursor: pointer; color: var(--wf-dark);
}
.acc-trigger:hover { background: var(--wf-bg); }
.acc-trigger:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }
.acc-trigger[aria-expanded="true"] { background: var(--wf-bg); }
.acc-icon { color: var(--wf-medium); transition: transform var(--transition); flex-shrink: 0; }
.acc-trigger[aria-expanded="true"] .acc-icon { transform: rotate(180deg); }
.acc-panel { padding: var(--sp-3); background: var(--wf-bg); display: none; }
.acc-panel.open { display: block; }
.acc-num { font-size: 12px; font-weight: var(--fw-bold); color: var(--wf-muted); margin-right: var(--sp-1); }

/* ===== TABS ===== */
.tabs__list {
  display: flex; gap: 4px; border-bottom: 2px solid var(--wf-border);
  margin-bottom: var(--sp-4); overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  padding: 10px var(--sp-2); font-size: 15px; font-weight: var(--fw-semi);
  color: var(--wf-medium); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; white-space: nowrap; transition: color var(--transition);
}
.tabs__tab:hover { color: var(--wf-dark); }
.tabs__tab[aria-selected="true"] { color: var(--wf-ink); border-bottom-color: var(--wf-ink); }
.tabs__tab:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }
.tabs__panel { display: none; }
.tabs__panel.active { display: block; }

/* ===== FORM ===== */
.form { display: flex; flex-direction: column; gap: var(--sp-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: var(--fw-semi); color: var(--wf-dark); }
.form-label .req { color: var(--wf-medium); font-weight: var(--fw-reg); }
.form-input {
  border: 1px solid var(--wf-border); border-radius: var(--radius);
  padding: 10px 14px; font-size: 15px; color: var(--wf-ink); background: var(--wf-white); width: 100%;
}
.form-input:focus { outline: 2px solid var(--wf-dark); border-color: transparent; }
.form-input.error { border-color: var(--wf-dark); }
.form-error { font-size: 13px; color: var(--wf-dark); display: flex; gap: 6px; align-items: flex-start; }
.form-error::before { content: '⚠'; flex-shrink: 0; }
.form-hint { font-size: 13px; color: var(--wf-medium); }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--wf-dark); }
.form-check label { font-size: 14px; color: var(--wf-dark); }
@media (max-width: 767px) { .form-row { grid-template-columns: 1fr; } }

/* ===== HERO ===== */
.hero { padding: var(--sp-12) 0; }
.hero--sm { padding: var(--sp-8) 0; }
.hero__eyebrow { font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.15em; color: var(--wf-medium); margin-bottom: var(--sp-2); }
.hero__title  { margin-bottom: var(--sp-3); }
.hero__desc   { margin-bottom: var(--sp-4); }
.hero__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.hero__actions--center { justify-content: center; }
.hero--dark { background: var(--wf-dark); color: var(--wf-white); }
.hero--dark .h1, .hero--dark .h2 { color: var(--wf-white); }
.hero--dark .lead { color: var(--wf-surface); }
.hero--dark .hero__eyebrow { color: var(--wf-muted); }
.hero--centered { text-align: center; }
.hero--centered .hero__actions { justify-content: center; }
@media (max-width: 767px) { .hero { padding: var(--sp-8) 0; } }

/* Hero fullscreen (homepage) */
.hero--fullscreen {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 560px;
  padding: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--wf-white);
}
.hero__video-bg {
  position: absolute !important;
  inset: 0 !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}
.hero--fullscreen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.40) 40%,
    rgba(0,0,0,0.10) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.hero--fullscreen .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: var(--sp-10);
}
.hero__fullscreen-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero--fullscreen .hero__eyebrow { color: rgba(255,255,255,0.70); }
.hero--fullscreen .h1 { color: var(--wf-white); }
.hero--fullscreen .lead { color: rgba(255,255,255,0.82); }
.hero--fullscreen .btn--secondary {
  color: var(--wf-white);
  border-color: rgba(255,255,255,0.60);
}
.hero--fullscreen .btn--secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--wf-white);
}
@media (max-width: 767px) {
  .hero--fullscreen { height: calc(100svh - var(--header-h)); min-height: 480px; }
  .hero--fullscreen .container { padding-bottom: var(--sp-6); }
}

/* Section header */
.sec-head { margin-bottom: var(--sp-5); }
.sec-head--between { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: var(--sp-2); }

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 8px; border-radius: 20px;
}
.badge--open   { background: var(--wf-dark); color: var(--wf-white); }
.badge--closed { background: var(--wf-surface); color: var(--wf-medium); }
.badge--demo   { background: var(--wf-surface); color: var(--wf-medium); font-size: 10px; }
.badge--noindex{ background: var(--wf-bg); border: 1px solid var(--wf-border); color: var(--wf-medium); font-size: 10px; letter-spacing: 0.06em; }

/* ===== PROGRESS ===== */
.progress { background: var(--wf-surface); border-radius: 20px; height: 6px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--wf-dark); border-radius: 20px; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 0; width: 2px; background: var(--wf-border); }
.tl-item { position: relative; padding-bottom: var(--sp-4); }
.tl-dot {
  position: absolute; left: -24px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--wf-dark); border: 2px solid var(--wf-white);
  box-shadow: 0 0 0 2px var(--wf-border);
}
.tl-date  { font-size: 11px; font-weight: var(--fw-semi); color: var(--wf-medium); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.tl-title { font-weight: var(--fw-semi); margin-bottom: 4px; }
.tl-desc  { font-size: 14px; color: var(--wf-medium); }

/* ===== SUBNAV ===== */
.subnav {
  position: sticky; top: var(--header-h); z-index: 50;
  background: var(--wf-white); border-bottom: 1px solid var(--wf-border);
}
.subnav__inner { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav__link {
  padding: 14px var(--sp-3); font-size: 14px; font-weight: var(--fw-semi);
  color: var(--wf-medium); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; flex-shrink: 0;
}
.subnav__link:hover, .subnav__link.active { color: var(--wf-ink); border-bottom-color: var(--wf-ink); }
.subnav__link:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }

/* ===== STUDENT AREA ===== */
.student-layout {
  display: grid; grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--header-h));
}
.student-sidebar {
  background: var(--wf-bg); border-right: 1px solid var(--wf-border);
  padding: var(--sp-3); position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.student-content { padding: var(--sp-5) var(--sp-4); overflow-x: hidden; }
@media (max-width: 1023px) {
  .student-layout { grid-template-columns: 1fr; }
  .student-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--wf-border); }
}

/* Lesson layout (legacy) */
.lesson-layout {
  display: grid; grid-template-columns: 1fr 280px;
  min-height: calc(100vh - var(--header-h));
}
.lesson-main { padding: var(--sp-4); overflow-x: hidden; }
.lesson-sidebar { background: var(--wf-bg); border-left: 1px solid var(--wf-border); overflow-y: auto; }
@media (max-width: 1023px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { border-left: none; border-top: 1px solid var(--wf-border); }
}

/* ===== LEARNDASH-STYLE AREA CORSISTI ===== */

/* When area corsisti is active: no site header, full viewport */
body.area-corsisti { --header-h: 0px; }

/* Student header bar — sticky at top, replaces site-header */
.student-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--wf-dark); color: var(--wf-white);
  padding: 0 var(--sp-4); height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  font-size: 14px;
}
.student-header__greet { font-weight: var(--fw-semi); }
.student-header__actions { display: flex; align-items: center; gap: var(--sp-1); }
.student-header__btn {
  background: rgba(255,255,255,0.1); border: none; color: white;
  padding: 6px 12px; border-radius: var(--radius); font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.student-header__btn:hover { background: rgba(255,255,255,0.2); }

/* Profile / Dashboard (My Courses) */
.ld-dashboard-banner { width: 100%; }
.ld-profile-layout { display: grid; grid-template-columns: 1fr 280px; gap: 0; min-height: calc(100vh - 52px); }
.ld-profile-main { padding: var(--sp-4) var(--sp-5); max-width: none; width: 100%; }
.ld-profile-sidebar { border-left: 1px solid var(--wf-border); padding: var(--sp-4) var(--sp-4); position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.ld-profile-user { text-align: center; margin-bottom: var(--sp-5); padding-top: var(--sp-4); }
.ld-profile-avatar { width: 110px; height: 110px; border-radius: 50%; background: var(--wf-surface); border: 3px solid var(--wf-border); margin: 0 auto var(--sp-3); display: flex; align-items: center; justify-content: center; font-size: 42px; font-family: var(--font-serif); font-weight: var(--fw-bold); color: var(--wf-dark); }
.ld-profile-name { font-size: 20px; font-weight: var(--fw-bold); margin-bottom: 4px; }
.ld-profile-edit { font-size: 13px; color: var(--wf-medium); text-decoration: none; }
.ld-profile-edit:hover { text-decoration: underline; }
.ld-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--wf-border); border-radius: var(--radius); margin-bottom: var(--sp-5); overflow: hidden; }
.ld-profile-stat { text-align: center; padding: var(--sp-4) var(--sp-2); border-right: 1px solid var(--wf-border); }
.ld-profile-stat:last-child { border-right: none; }
.ld-profile-stat__num { font-size: 28px; font-weight: var(--fw-bold); color: var(--wf-dark); line-height: 1.2; }
.ld-profile-stat__label { font-size: 13px; color: var(--wf-medium); margin-top: 4px; }
.ld-your-courses-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.ld-expand-all-btn { background: var(--wf-dark); color: white; border: none; border-radius: 20px; padding: 8px 16px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.ld-expand-all-btn:hover { opacity: 0.85; }
.ld-course-acc-row { border: 1px solid var(--wf-border); border-radius: var(--radius); margin-bottom: var(--sp-2); overflow: hidden; }
.ld-course-acc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.ld-course-acc-head:hover { background: var(--wf-surface); }
.ld-course-acc-circle { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--wf-border); flex-shrink: 0; }
.ld-course-acc-circle--progress { border-color: var(--wf-dark); border-right-color: transparent; border-bottom-color: transparent; }
.ld-course-acc-title { flex: 1; font-size: 14px; }
.ld-course-acc-badge { font-size: 11px; font-weight: var(--fw-semi); color: var(--wf-dark); background: var(--wf-surface); border: 1px solid var(--wf-border); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.ld-course-acc-chevron { background: var(--wf-dark); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; }
.ld-course-acc-body { padding: 0 16px 14px 48px; }
.ld-course-acc-progress-label { font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.06em; color: var(--wf-medium); margin-bottom: 4px; display: flex; gap: 16px; }
.ld-course-acc-progress-label span { color: var(--wf-dark); }
.ld-course-acc-link { display: inline-block; font-size: 13px; color: var(--wf-dark); margin-top: var(--sp-2); }
.ld-catalog-title { font-size: 16px; font-weight: var(--fw-bold); margin-bottom: 6px; }
.ld-catalog-bar { height: 3px; background: var(--wf-dark); width: 48px; margin-bottom: var(--sp-3); }
.ld-catalog-item { display: block; font-size: 13px; color: var(--wf-dark); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--wf-bg); line-height: 1.3; }
.ld-catalog-item:hover { text-decoration: underline; }
@media (max-width: 900px) { .ld-profile-layout { grid-template-columns: 1fr; } .ld-profile-sidebar { border-left: none; border-top: 1px solid var(--wf-border); } }
@media (max-width: 600px) { .ld-profile-stats { grid-template-columns: repeat(2, 1fr); } }

/* Single course page */
.ld-single-course-layout { display: grid; grid-template-columns: 1fr 280px; gap: 0; min-height: calc(100vh - 52px); }
.ld-single-course-main { overflow: hidden; }
.ld-single-course-sidebar { border-left: 1px solid var(--wf-border); padding: var(--sp-4) var(--sp-3); position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.ld-course-hero { width: 100%; aspect-ratio: 3/1; overflow: hidden; }
.ld-course-tabs-nav { display: flex; border-bottom: 3px solid var(--wf-border); background: var(--wf-white); }
.ld-course-tab { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-size: 14px; font-weight: var(--fw-semi); color: var(--wf-medium); cursor: pointer; border-bottom: 3px solid transparent; text-decoration: none; margin-bottom: -3px; }
.ld-course-tab.active { color: var(--wf-dark); border-bottom-color: var(--wf-dark); }
.ld-course-tab:hover { color: var(--wf-dark); }
.ld-course-tab-progress { padding: 8px var(--sp-4); background: var(--wf-surface); }
.ld-course-tab-content { padding: var(--sp-4); }
.ld-content-acc-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.ld-content-acc-item { border: 1px solid var(--wf-border); border-radius: var(--radius); margin-bottom: var(--sp-2); overflow: hidden; }
.ld-content-acc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ld-content-acc-circle { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--wf-border); flex-shrink: 0; }
.ld-content-acc-info { flex: 1; }
.ld-content-acc-name { font-size: 14px; font-weight: var(--fw-semi); }
.ld-content-acc-sub { font-size: 12px; color: var(--wf-medium); margin-top: 2px; }
.ld-content-acc-expand-btn { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wf-dark); background: none; border: none; cursor: pointer; white-space: nowrap; }
.ld-content-acc-expand-icon { background: var(--wf-dark); color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.ld-content-acc-body { border-top: 1px solid var(--wf-border); padding: var(--sp-2) 0; background: var(--wf-bg); }
.ld-content-acc-lesson { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; color: var(--wf-dark); text-decoration: none; }
.ld-content-acc-lesson:hover { background: var(--wf-surface); }
.ld-sidebar-section-title { font-size: 16px; font-weight: var(--fw-bold); margin-bottom: 6px; }
.ld-sidebar-teal-bar { height: 3px; background: var(--wf-dark); width: 48px; margin-bottom: var(--sp-3); }
.ld-sidebar-expand-btn { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wf-dark); background: none; border: none; cursor: pointer; margin-bottom: var(--sp-3); width: 100%; }
.ld-sidebar-expand-icon { background: var(--wf-dark); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.ld-sidebar-lesson-item { padding: 10px 0; border-bottom: 1px solid var(--wf-bg); }
.ld-sidebar-lesson-row { display: flex; align-items: flex-start; gap: 10px; }
.ld-sidebar-circle { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--wf-border); flex-shrink: 0; margin-top: 2px; }
.ld-sidebar-lesson-name { font-size: 13px; color: var(--wf-dark); line-height: 1.3; }
.ld-sidebar-topic-count { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--wf-dark); margin-top: 4px; padding-left: 26px; }
.ld-sidebar-topic-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--wf-dark); flex-shrink: 0; }
@media (max-width: 900px) { .ld-single-course-layout { grid-template-columns: 1fr; } .ld-single-course-sidebar { position: static; height: auto; border-left: none; border-top: 1px solid var(--wf-border); } }

/* Lesson top bar */
.ld-lesson-bar {
  background: var(--wf-white); border-bottom: 1px solid var(--wf-border);
  padding: 0 var(--sp-4); display: flex; align-items: center; gap: var(--sp-2);
  height: 48px; position: sticky; top: 0; z-index: 80; font-size: 13px; flex-wrap: nowrap;
}
.ld-lesson-bar__pct { font-size: 11px; font-weight: var(--fw-semi); color: var(--wf-dark); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.ld-lesson-bar__steps { font-size: 12px; color: var(--wf-medium); white-space: nowrap; }
.ld-lesson-bar__prog { flex: 1; min-width: 60px; }
.ld-lesson-bar__navbtn { font-size: 13px; color: var(--wf-dark); background: none; border: 1px solid var(--wf-border); border-radius: var(--radius); padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.ld-lesson-bar__navbtn:hover { background: var(--wf-surface); }
.ld-lesson-bar__navbtn:disabled { opacity: 0.35; cursor: default; }
.ld-lesson-bar__mark { background: var(--wf-dark); color: white; border: none; border-radius: var(--radius); padding: 7px 14px; font-size: 13px; font-weight: var(--fw-semi); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ld-lesson-bar__mark:hover { opacity: 0.85; }
.ld-lesson-bar__user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wf-medium); white-space: nowrap; }
.ld-lesson-bar__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--wf-surface); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: var(--fw-semi); color: var(--wf-dark); flex-shrink: 0; }

/* Lesson layout: teal sidebar LEFT */
.ld-lesson-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 48px); }
.ld-teal-sidebar {
  background: var(--wf-dark); color: var(--wf-white);
  overflow-y: auto; position: sticky; top: 48px;
  height: calc(100vh - 48px);
}
.ld-teal-sidebar__header { padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.ld-teal-sidebar__title { font-size: 14px; font-weight: var(--fw-semi); line-height: 1.4; }
.ld-teal-sidebar__collapse { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 18px; padding: 0; flex-shrink: 0; line-height: 1; }
.ld-teal-lesson-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; text-decoration: none; }
.ld-teal-lesson-item:hover { background: rgba(255,255,255,0.07); }
.ld-teal-lesson-item.ld-current { background: rgba(255,255,255,0.1); }
.ld-teal-circle { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); flex-shrink: 0; margin-top: 1px; }
.ld-teal-circle--done { background: var(--wf-white); border-color: var(--wf-white); position: relative; }
.ld-teal-circle--done::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 9px; color: var(--wf-dark); font-weight: bold; }
.ld-teal-circle--current { border-color: var(--wf-white); background: transparent; }
.ld-teal-lesson-label { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.35; }
.ld-teal-lesson-label.bold { color: white; font-weight: var(--fw-semi); }
.ld-teal-topic-count { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.ld-teal-topic-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.ld-lesson-main { padding: var(--sp-5); overflow-x: hidden; }
.ld-lesson-main__inner { max-width: 760px; }
.ld-lesson-inprogress-bar { display: flex; align-items: center; justify-content: space-between; background: var(--wf-surface); border-radius: var(--radius); padding: 10px 16px; margin-bottom: var(--sp-4); font-size: 13px; gap: var(--sp-2); }
.ld-lesson-inprogress-crumb { color: var(--wf-dark); font-size: 13px; }
.ld-lesson-inprogress-crumb a { color: var(--wf-dark); }
.ld-lesson-inprogress-badge { background: var(--wf-dark); color: white; font-size: 11px; font-weight: var(--fw-semi); padding: 4px 10px; border-radius: var(--radius); white-space: nowrap; }
.ld-lesson-content-box { border-radius: var(--radius); overflow: hidden; margin-top: var(--sp-5); }
.ld-lesson-content-box__head { background: var(--wf-dark); color: white; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.ld-lesson-content-box__head-title { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-semi); font-size: 14px; }
.ld-lesson-content-box__meta { font-size: 12px; opacity: 0.75; white-space: nowrap; }
.ld-lesson-content-box__body { border: 1px solid var(--wf-border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
.ld-topic-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--wf-border); font-size: 13px; text-decoration: none; color: var(--wf-dark); }
.ld-topic-item:last-child { border-bottom: none; }
.ld-topic-item:hover { background: var(--wf-surface); }
.ld-topic-circle { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--wf-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.ld-topic-circle--done { background: var(--wf-dark); border-color: var(--wf-dark); color: white; }
.ld-lesson-bottom-nav { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-4); padding-top: var(--sp-3); gap: var(--sp-2); }
.ld-back-to-course { font-size: 13px; color: var(--wf-medium); text-decoration: none; text-align: center; }
.ld-back-to-course:hover { color: var(--wf-dark); text-decoration: underline; }
@media (max-width: 1023px) {
  .ld-lesson-layout { grid-template-columns: 1fr; }
  .ld-teal-sidebar { position: static; height: auto; }
}

/* Shared: progress row */
.ld-progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--wf-medium); margin-bottom: 6px; }
.ld-mark-complete { display: block; width: 100%; padding: 14px; background: var(--wf-dark); color: white; border: none; border-radius: var(--radius); font-size: 15px; font-weight: var(--fw-semi); cursor: pointer; text-align: center; margin-top: var(--sp-5); }
.ld-mark-complete:hover { opacity: 0.85; }

/* Module list */
.mod-sec { margin-bottom: var(--sp-2); }
.mod-sec__head { font-size: 11px; font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.08em; color: var(--wf-medium); padding: 8px var(--sp-2); }
.mod-item {
  display: flex; align-items: center; gap: 8px; padding: 8px var(--sp-2);
  font-size: 13px; color: var(--wf-dark); text-decoration: none; border-radius: var(--radius); cursor: pointer;
}
.mod-item:hover { background: var(--wf-surface); }
.mod-item.active { background: var(--wf-surface); font-weight: var(--fw-semi); }
.mod-item:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }
.mod-item--locked { color: var(--wf-medium); cursor: default; pointer-events: none; }
.mod-item__label { flex: 1; }
.mod-item__dur { font-size: 11px; color: var(--wf-muted); white-space: nowrap; }
.mod-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.mod-dot--done      { background: var(--wf-dark); }
.mod-dot--current   { border: 2px solid var(--wf-dark); background: var(--wf-white); }
.mod-dot--locked    { background: var(--wf-border); }
.mod-dot--available { border: 2px solid var(--wf-border); background: var(--wf-white); }
.mod-topics { padding-left: 24px; border-left: 2px solid var(--wf-surface); margin-left: 18px; margin-bottom: 4px; }
.mod-topic {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px;
  font-size: 12px; color: var(--wf-dark); text-decoration: none; border-radius: var(--radius);
}
.mod-topic:hover { background: var(--wf-surface); }
.mod-topic.active { font-weight: var(--fw-semi); }
.mod-topic svg { flex-shrink: 0; color: var(--wf-muted); }

/* Sidebar user info */
.sidebar-user { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--wf-border); }
.sidebar-user__avatar { width: 40px; height: 40px; background: var(--wf-surface); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-weight: var(--fw-bold); color: var(--wf-dark); }
.sidebar-user__name { font-size: 14px; font-weight: var(--fw-semi); }
.sidebar-user__role { font-size: 12px; color: var(--wf-medium); }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px var(--sp-2);
  font-size: 14px; color: var(--wf-dark); text-decoration: none; border-radius: var(--radius);
}
.sidebar-nav a:hover { background: var(--wf-surface); }
.sidebar-nav a.active { background: var(--wf-surface); font-weight: var(--fw-semi); }
.sidebar-nav a:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: -2px; }
.sidebar-nav__icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: var(--wf-medium); flex-shrink: 0; }

/* Student header: see LearnDash section above */

/* ===== LOGIN ===== */
.login-page {
  min-height: calc(100vh - 52px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6) var(--sp-2); background: var(--wf-bg);
}
.login-card {
  background: var(--wf-white); border: 1px solid var(--wf-border);
  border-radius: var(--radius-lg); padding: var(--sp-6); width: 100%; max-width: 440px;
}
.login-card__logo { text-align: center; margin-bottom: var(--sp-4); }

/* ===== TESTIMONIAL ===== */
.testimonial {
  background: var(--wf-bg); border-left: 3px solid var(--wf-dark);
  padding: var(--sp-4); border-radius: 0 var(--radius) var(--radius) 0;
}
.testimonial__quote { font-family: var(--font-serif); font-size: 18px; line-height: 1.6; margin-bottom: var(--sp-2); }
.testimonial__author { display: flex; align-items: center; gap: var(--sp-2); }
.testimonial__name { font-weight: var(--fw-semi); font-size: 14px; }
.testimonial__role { font-size: 13px; color: var(--wf-medium); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--wf-dark); color: var(--wf-white);
  padding: var(--sp-10) var(--sp-6); border-radius: var(--radius); text-align: center;
}
.cta-banner .h2 { color: var(--wf-white); margin-bottom: var(--sp-2); }
.cta-banner .lead { color: var(--wf-surface); margin-bottom: var(--sp-5); }
.cta-banner__actions { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }

/* ===== FILTERS ===== */
.filters { display: flex; gap: var(--sp-1); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.filter-btn {
  padding: 8px 16px; border: 1px solid var(--wf-border); border-radius: 20px;
  background: var(--wf-white); font-size: 14px; cursor: pointer; color: var(--wf-dark);
  font-family: var(--font-sans); transition: var(--transition);
}
.filter-btn.active { background: var(--wf-dark); color: var(--wf-white); border-color: var(--wf-dark); }
.filter-btn:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: 2px; }

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-3); }
.search-bar input {
  flex: 1; border: 1px solid var(--wf-border); border-radius: var(--radius);
  padding: 10px 14px; font-size: 15px; font-family: var(--font-sans);
}
.search-bar input:focus { outline: 2px solid var(--wf-dark); }
.search-bar button {
  background: var(--wf-dark); color: var(--wf-white); border: none;
  border-radius: var(--radius); padding: 0 16px; font-size: 14px; font-weight: var(--fw-semi);
  cursor: pointer; white-space: nowrap;
}
.search-bar button:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 3px; }

/* ===== VIDEO PLAYER ===== */
.video-ph {
  background: var(--wf-ink); aspect-ratio: 16/9; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); position: relative;
}
.video-ph__play {
  width: 60px; height: 60px; background: rgba(255,255,255,0.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: white;
}
.video-ph__label { font-size: 14px; color: rgba(255,255,255,0.55); font-family: var(--font-sans); }
.video-ph__tag {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7);
  font-size: 10px; font-weight: var(--fw-semi); padding: 4px 8px;
  border-radius: var(--radius); text-transform: uppercase; letter-spacing: 0.08em;
  font-family: var(--font-sans);
}

/* ===== MATERIAL LIST ===== */
.material-item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); background: var(--wf-white);
  border: 1px solid var(--wf-border); border-radius: var(--radius); margin-bottom: var(--sp-1);
}
.material-item__icon {
  width: 36px; height: 36px; background: var(--wf-surface);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.material-item__info { flex: 1; min-width: 0; }
.material-item__name { font-size: 14px; font-weight: var(--fw-semi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-item__meta { font-size: 12px; color: var(--wf-medium); }

/* ===== LIVE ITEM ===== */
.live-item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3); background: var(--wf-white);
  border: 1px solid var(--wf-border); border-radius: var(--radius); margin-bottom: var(--sp-2);
}
.live-item__date {
  background: var(--wf-dark); color: var(--wf-white);
  border-radius: var(--radius); padding: var(--sp-1) var(--sp-2);
  text-align: center; min-width: 52px; flex-shrink: 0;
}
.live-item__day { font-size: 20px; font-weight: var(--fw-bold); line-height: 1; }
.live-item__month { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.live-item__info { flex: 1; }
.live-item__title { font-weight: var(--fw-semi); margin-bottom: 4px; font-size: 14px; }
.live-item__meta { font-size: 12px; color: var(--wf-medium); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: var(--sp-10) var(--sp-4);
  background: var(--wf-bg); border-radius: var(--radius); border: 1px dashed var(--wf-border);
}
.empty-state__icon { font-size: 36px; margin-bottom: var(--sp-2); }
.empty-state__title { font-weight: var(--fw-semi); margin-bottom: 8px; }
.empty-state__desc  { font-size: 14px; color: var(--wf-medium); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: var(--sp-4); }
.pag-btn {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--wf-border); border-radius: var(--radius); font-size: 14px;
  background: var(--wf-white); cursor: pointer; color: var(--wf-dark); font-family: var(--font-sans);
}
.pag-btn.active { background: var(--wf-dark); color: var(--wf-white); border-color: var(--wf-dark); }
.pag-btn:focus-visible { outline: 2px solid var(--wf-dark); outline-offset: 2px; }

/* ===== MISC ===== */
.divider { border: none; border-top: 1px solid var(--wf-border); margin: var(--sp-5) 0; }
.tc { text-align: center; }
.muted { color: var(--wf-medium); }
.flex { display: flex; }
.flex-c { display: flex; align-items: center; }
.flex-b { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.mb-1 { margin-bottom: var(--sp-1); } .mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.mt-2 { margin-top: var(--sp-2); }   .mt-4 { margin-top: var(--sp-4); }
.w-full { width: 100%; }

/* ===== PARTNER ITEM (home connessioni + pagina connessioni) ===== */
.partner-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: var(--sp-2); }
.partner-item__name { font-size: 12px; font-weight: var(--fw-semi); color: var(--wf-dark); line-height: 1.3; }
.partner-item__sub  { font-size: 11px; color: var(--wf-medium); }

/* ===== CONTRAST & VISIBILITY FIXES ===== */

/* Headings on dark section backgrounds */
.section--dark .h1, .section--dark .h2 { color: var(--wf-white); }
.section--dark .h3, .section--dark .h4 { color: var(--wf-surface); }
.section--dark .lead { color: var(--wf-surface); }
.section--dark .hero__eyebrow, .section--dark .label-sm { color: var(--wf-muted); }

/* btn--secondary on dark backgrounds: white outline instead of dark-on-dark */
.section--dark .btn--secondary,
.cta-banner .btn--secondary {
  color: var(--wf-white);
  border-color: rgba(255,255,255,0.65);
}
.section--dark .btn--secondary:hover,
.cta-banner .btn--secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--wf-white);
}

/* Subnav links: stronger default contrast */
.subnav__link { color: var(--wf-dark); }

/* ===================================================================
   TEORIA POLIVAGALE — IDENTITÀ VISIVA DISTINTA
   Sub-brand all'interno della scala di grigi: tono profondo, scientifico.
   Base cromatica invertita rispetto all'istituto principale.
   =================================================================== */

/* Subnav TP: sfondo quasi-nero, testo chiaro */
.tp-subnav {
  background: #141414;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  position: sticky; top: var(--header-h); z-index: 90;
}
.tp-subnav .subnav__inner {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  padding: 0;
}
.tp-subnav .subnav__inner::-webkit-scrollbar { display: none; }
.tp-subnav .subnav__link {
  display: block; padding: 14px 18px; font-size: 13px; font-weight: var(--fw-semi);
  text-decoration: none; color: rgba(255,255,255,0.50); white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color var(--transition), border-color var(--transition);
}
.tp-subnav .subnav__link:hover { color: rgba(255,255,255,0.85); }
.tp-subnav .subnav__link.active { color: var(--wf-white); border-bottom-color: rgba(255,255,255,0.65); }
.tp-subnav .subnav__link:focus-visible { outline: 2px solid white; outline-offset: -4px; }

/* Hero TP: profondo, con texture di righe verticali evocativa del sistema nervoso */
.tp-hero {
  background: var(--wf-ink); color: var(--wf-white);
  padding: var(--sp-16) 0 var(--sp-10);
  position: relative; overflow: hidden;
}
.tp-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent, transparent 60px,
    rgba(255,255,255,0.018) 60px, rgba(255,255,255,0.018) 61px
  );
  pointer-events: none;
}
.tp-hero .container { position: relative; }
.tp-hero .breadcrumb a { color: rgba(255,255,255,0.5); }
.tp-hero .breadcrumb [aria-current] { color: rgba(255,255,255,0.75); }
.tp-hero .breadcrumb__sep { color: rgba(255,255,255,0.3); }

/* Badge TP */
.tp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20);
  border-radius: 20px; padding: 5px 14px;
  font-size: 11px; font-weight: var(--fw-semi);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.75); margin-bottom: var(--sp-3);
}

/* Claim TP (citazione em) */
.tp-claim {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.5vw, 28px);
  font-style: italic;
  line-height: 1.45;
  color: rgba(255,255,255,0.65);
  border-left: 3px solid rgba(255,255,255,0.25);
  padding-left: var(--sp-3);
  margin: var(--sp-4) 0;
}

/* Pilastri TP (3 colonne nella hero) */
.tp-pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-2); margin-top: var(--sp-6); }
@media (max-width: 767px) { .tp-pillars { grid-template-columns: 1fr; } }
.tp-pillar {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius); padding: var(--sp-3);
}
.tp-pillar__num {
  font-size: 10px; font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.35); margin-bottom: 6px;
}
.tp-pillar__title {
  font-family: var(--font-serif); font-size: 19px;
  color: rgba(255,255,255,0.90); margin-bottom: 6px;
  line-height: 1.3;
}
.tp-pillar__desc { font-size: 13px; color: rgba(255,255,255,0.50); line-height: 1.7; }

/* Sezioni TP su sfondo scuro */
.tp-section {
  background: var(--wf-ink); color: var(--wf-white);
  padding: var(--sp-10) 0;
}
.tp-section .h2 { color: var(--wf-white); }
.tp-section .label-sm { color: rgba(255,255,255,0.40); }
.tp-section .lead { color: rgba(255,255,255,0.60); }

/* Card TP (sessioni Parla con Deb Dana) */
.tp-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-2); }
@media (max-width: 767px) { .tp-cards { grid-template-columns: 1fr; } }
.tp-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius); padding: var(--sp-4);
}
.tp-card__num {
  font-size: 10px; font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35); margin-bottom: 4px;
}
.tp-card__date {
  font-size: 12px; font-weight: var(--fw-semi);
  color: rgba(255,255,255,0.50); margin-bottom: var(--sp-1);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.tp-card__title {
  font-family: var(--font-serif); font-size: 20px;
  color: var(--wf-white); margin-bottom: 10px; line-height: 1.3;
}
.tp-card__desc { font-size: 13px; color: rgba(255,255,255,0.50); line-height: 1.6; }

/* Sezione Deb Dana */
.tp-deb {
  display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-6); align-items: center;
}
@media (max-width: 767px) { .tp-deb { grid-template-columns: 1fr; } }
.tp-deb__role {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.40); margin-bottom: 6px;
}
.tp-deb__name {
  font-family: var(--font-serif); font-size: clamp(26px,3vw,40px);
  color: var(--wf-white); margin-bottom: var(--sp-2); line-height: 1.15;
}
.tp-deb__desc { font-size: 15px; color: rgba(255,255,255,0.60); line-height: 1.75; }

/* Supervisioni TP */
.tp-supervisioni { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--sp-2); }
@media (max-width: 767px) { .tp-supervisioni { grid-template-columns: 1fr; } }
.tp-sup-item {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--wf-border); border-radius: var(--radius);
  background: var(--wf-white);
}
.tp-sup-item__num {
  font-family: var(--font-serif); font-size: 24px;
  color: var(--wf-border); line-height: 1; flex-shrink: 0; width: 28px;
}
.tp-sup-item__date { font-size: 13px; font-weight: var(--fw-semi); color: var(--wf-dark); }
.tp-sup-item__label { font-size: 12px; color: var(--wf-medium); }

/* Sezione chiara TP (su sfondo wf-bg, mantiene leggibilità alternata) */
.tp-section-light { background: var(--wf-bg); padding: var(--sp-10) 0; }
.tp-section-light .h2 { color: var(--wf-ink); }

/* Prezzi TP */
.tp-prices { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--sp-2); }
@media (max-width: 767px) { .tp-prices { grid-template-columns: 1fr; } }
.tp-price-card {
  border: 1px solid var(--wf-border); border-radius: var(--radius);
  padding: var(--sp-4); background: var(--wf-white);
}
.tp-price-card__tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--wf-medium); margin-bottom: var(--sp-1); }
.tp-price-card__price { font-family: var(--font-serif); font-size: 32px; color: var(--wf-ink); margin-bottom: 6px; }
.tp-price-card__note { font-size: 13px; color: var(--wf-medium); }

/* ECM handoff */
.ecm-handoff {
  background: var(--wf-bg); border: 1px solid var(--wf-border);
  border-radius: var(--radius); padding: var(--sp-5); text-align: center;
}
.ecm-handoff__icon { font-size: 40px; margin-bottom: var(--sp-2); }
.ecm-handoff h3 { margin-bottom: var(--sp-2); }
.ecm-handoff p { font-size: 14px; color: var(--wf-medium); margin-bottom: var(--sp-4); max-width: 480px; margin-left: auto; margin-right: auto; }
.ecm-handoff__actions { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }

/* Stat card */
.stat-card { background: var(--wf-bg); border: 1px solid var(--wf-border); border-radius: var(--radius); padding: var(--sp-4); text-align: center; }
.stat-card__value { font-family: var(--font-serif); font-size: 36px; font-weight: var(--fw-bold); color: var(--wf-dark); margin-bottom: 4px; }
.stat-card__label { font-size: 13px; color: var(--wf-medium); }

/* Org chart */
.org-card { background: var(--wf-white); border: 1px solid var(--wf-border); border-radius: var(--radius); padding: var(--sp-3); }
.org-card__title { font-weight: var(--fw-semi); margin-bottom: 4px; }
.org-card__desc { font-size: 13px; color: var(--wf-medium); }

/* Profile card */
.profile-header {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--wf-border); margin-bottom: var(--sp-4);
}
.profile-avatar {
  width: 80px; height: 80px; background: var(--wf-surface); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 28px; font-weight: var(--fw-bold);
  color: var(--wf-dark); flex-shrink: 0;
}
.profile-info__name { font-family: var(--font-serif); font-size: 24px; font-weight: var(--fw-bold); margin-bottom: 4px; }
.profile-info__role { font-size: 14px; color: var(--wf-medium); margin-bottom: var(--sp-2); }

/* Route indicator */
.route-indicator {
  background: var(--wf-surface); border-bottom: 1px solid var(--wf-border);
  padding: 5px var(--container-pad); font-size: 11px; font-family: monospace;
  color: var(--wf-medium); letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; max-width: 100%;
}
.route-indicator__domain { color: var(--wf-dark); }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
