/* =========================================================
   Olisdea APS/ASD — foglio di stile principale
   Colori presi dal logo (azzurro e beige) e dall'invito
   "Il benessere non si rimanda" (blu notte e oro sabbia)
   ========================================================= */

:root {
  --blue: #3f7db0;          /* azzurro del logo */
  --blue-dark: #2a5f8c;
  --navy: #163a59;          /* blu notte dell'invito */
  --navy-deep: #0f2c45;
  --sand: #a88a74;          /* beige della "S" del logo */
  --sand-soft: #f1e8df;
  --gold: #e6c79f;          /* oro sabbia dell'invito */
  --bg: #fbf8f4;
  --bg-alt: #f4eee7;
  --surface: #ffffff;
  --border: #e6ddd3;
  --text: #1f2d3a;
  --text-muted: #5b6874;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1140px;
  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .55em;
  color: var(--navy);
  font-variant-numeric: lining-nums;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.6rem; }
h4 { font-family: var(--font-body); }
p { margin: 0 0 1.1em; }
strong, b { font-weight: 600; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }

/* Testi provvisori da completare prima della pubblicazione */
.todo { background: #fff3c4; color: #6b4e00 !important; border-radius: 4px; padding: 0 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #efd5b3; }
.btn-ghost { border-color: var(--border); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 244, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none !important; }
.brand img { width: 52px; height: 52px; flex: none; }
.brand-name { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; letter-spacing: .14em; line-height: 1; color: var(--navy); }
.brand-tag { display: block; font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sand); margin-top: 6px; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.main-nav a { color: var(--text); font-weight: 500; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue); text-decoration: none; }
.main-nav .btn { padding: 10px 20px; font-size: .92rem; color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--navy);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; }
  .main-nav li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav li:last-child a { border: 0; margin-top: 14px; text-align: center; }
}
@media (max-width: 420px) { .brand-tag { display: none; } }

/* ---------- Sezioni ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body); font-weight: 500; font-size: .78rem;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.08rem; }
.rule { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 0 auto 26px; }

@media (max-width: 700px) { section { padding: 68px 0; } }

/* ---------- Hero (blu notte, come l'invito) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 112px;
  color: #fff;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 45%, #3a6f99 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .14);
}
.hero::before { width: 620px; height: 620px; left: -260px; top: -300px; box-shadow: 0 0 0 40px rgba(255, 255, 255, .03); }
.hero::after { width: 520px; height: 520px; right: -160px; bottom: -260px; border-color: rgba(230, 199, 159, .25); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; font-weight: 500; }
.hero h1 em { color: var(--gold); font-style: italic; display: block; }
.hero-lead { font-size: 1.18rem; color: rgba(255, 255, 255, .84); max-width: 560px; margin-bottom: 34px; }
.hero-logo { width: 116px; height: 116px; margin-bottom: 26px; border-radius: 50%; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.hero-note { margin-top: 22px; font-size: .95rem; color: rgba(255, 255, 255, .72); }
.hero-note strong { color: var(--gold); font-weight: 500; }

.glass-card {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-top: 3px solid var(--gold);
  border-radius: 24px; padding: 34px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .25);
}
.glass-card h2 { color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.1rem); margin-bottom: .4em; }
.glass-card .eyebrow { color: var(--gold); margin-bottom: 8px; }
.schedule { list-style: none; margin: 0 0 24px; padding: 0; }
.schedule li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.schedule li:last-child { border-bottom: 0; }
.schedule strong { font-weight: 500; }
.schedule span { color: rgba(255, 255, 255, .75); text-align: right; font-size: .95rem; }
.glass-card .btn { width: 100%; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-logo { width: 92px; height: 92px; }
}

/* ---------- Griglie e card ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(22, 58, 89, .08); }

.icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sand-soft); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.icon svg { width: 28px; height: 28px; }

.card-link { display: inline-block; margin-top: 16px; font-weight: 500; font-size: .95rem; color: var(--blue); }

.course-card { display: flex; flex-direction: column; }
.course-card .when { font-size: .9rem; color: var(--sand); font-weight: 500; letter-spacing: .02em; margin-bottom: 12px; }
.course-card .card-link { margin-top: auto; padding-top: 16px; }

/* ---------- Due colonne ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.big-quote {
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.3; color: var(--navy);
  border-left: 3px solid var(--gold); padding-left: 24px; margin: 0;
}

/* ---------- Liste ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.check-list li { position: relative; padding-left: 34px; margin-bottom: 14px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f7db0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; display: flex; gap: 16px; align-items: center; }
.values li .icon { width: 46px; height: 46px; margin: 0; flex: none; }
.values li .icon svg { width: 22px; height: 22px; }
.values strong { display: block; color: var(--navy); font-weight: 500; }
.values span { color: var(--text-muted); font-size: .95rem; }

/* ---------- Passi ---------- */
.steps { counter-reset: step; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; font-variant-numeric: lining-nums; margin-bottom: 18px;
}

/* ---------- Riquadri informativi ---------- */
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold);
  border-radius: var(--radius-lg); padding: 28px 30px;
}
.callout p:last-child { margin-bottom: 0; }
.notice {
  background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 36px 40px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px 32px; align-items: center;
}
.notice h2, .notice h3 { color: #fff; margin-bottom: .25em; }
.notice p { color: rgba(255, 255, 255, .8); margin: 0; }
.notice .icon { background: rgba(255, 255, 255, .1); color: var(--gold); margin: 0; }
@media (max-width: 800px) { .notice { grid-template-columns: 1fr; padding: 30px 26px; } }

/* ---------- Dettaglio corsi ---------- */
.course-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.course-nav a { display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--navy); font-weight: 500; font-size: .95rem; }
.course-nav a:hover { border-color: var(--blue); text-decoration: none; }

.program { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 64px 0; border-bottom: 1px solid var(--border); }
.program:last-child { border-bottom: 0; }
.program-side .icon { width: 68px; height: 68px; }
.program-side .icon svg { width: 34px; height: 34px; }
.facts-list { list-style: none; margin: 18px 0 0; padding: 0; }
.facts-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.facts-list li:last-child { border-bottom: 0; }
.facts-list span.todo { display: inline; font-size: .95rem; letter-spacing: 0; text-transform: none; color: #6b4e00; }
.facts-list span { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
@media (max-width: 800px) { .program { grid-template-columns: 1fr; gap: 20px; padding: 48px 0; } }

.qualities { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 26px 0; }
.quality { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.quality b { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--blue); color: #fff; font-weight: 500; margin-bottom: 10px; }
.quality:nth-child(even) b { background: var(--sand); }
.quality strong { display: block; color: var(--navy); font-weight: 500; }
.quality p { font-size: .9rem; color: var(--text-muted); margin: 4px 0 0; line-height: 1.5; }
@media (max-width: 1000px) { .qualities { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .qualities { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 22px 30px; }
.timeline li::before { content: attr(data-min); position: absolute; left: -22px; top: -2px; width: 42px; height: 42px; border-radius: 50%; background: var(--sand); color: #fff; font-size: .8rem; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.timeline li:nth-child(even)::before { background: var(--blue); }
.timeline strong { display: block; color: var(--navy); font-weight: 500; padding-top: 6px; }
.timeline p { color: var(--text-muted); margin: 2px 0 0; font-size: .96rem; }

/* ---------- Profili ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.avatar { width: 88px; height: 88px; border-radius: 50%; flex: none; object-fit: cover; object-position: 50% 20%; border: 3px solid var(--gold); }
.profile h3 { margin-bottom: .1em; }
.profile .role { color: var(--sand); font-weight: 500; font-size: .95rem; margin: 0; }

.board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.board li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.board strong { display: block; font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.board span { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }

/* ---------- Documenti ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-list a { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--navy); }
.doc-list a:hover { border-color: var(--blue); text-decoration: none; }
.doc-list svg { width: 26px; height: 26px; color: var(--sand); flex: none; }
.doc-list small { display: block; color: var(--text-muted); font-size: .85rem; }

/* ---------- Contatti ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { color: var(--text-muted); }
.contact-list a { color: var(--navy); font-weight: 500; }
.contact-list a:hover { color: var(--blue); }

/* ---------- CTA finale ---------- */
.cta-box {
  background: linear-gradient(150deg, var(--navy-deep), var(--navy) 60%, #3a6f99);
  color: #fff; border-radius: 28px; padding: 64px 48px; text-align: center;
}
.cta-box h2 { color: #fff; }
.cta-box h2 em { color: var(--gold); }
.cta-box p { color: rgba(255, 255, 255, .8); max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-box .btn-row { justify-content: center; margin-top: 28px; }
@media (max-width: 600px) { .cta-box { padding: 44px 22px; } }

/* ---------- Pagine interne ---------- */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.page-hero p { color: var(--text-muted); font-size: 1.12rem; max-width: 720px; }
.breadcrumb { font-size: .88rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }

.prose { font-size: 1.06rem; }
.prose h2 { font-size: 2rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .8); padding: 64px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand img { width: 56px; height: 56px; border-radius: 50%; }
.site-footer h4 { font-size: .8rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.footer-about { margin-top: 16px; max-width: 320px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  color: rgba(255, 255, 255, .6); font-size: .85rem;
}
.footer-bottom a { color: rgba(255, 255, 255, .75); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Animazione in entrata ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
