/* Kokkole's House — Family Coach
   Palette: rosa cipria + rosa vivo + nude caldo + marrone scuro
   Tipografia: Playfair Display (display) + Poppins (heading) + Open Sans (body) */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Open+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,700&display=swap");

:root {
  --primary: #dabbb3;
  --primary-hover: #c9a49b;
  --primary-dark: #9a6a60;   /* stesso rosa, leggibile su bianco e crema (contrasto 4.5:1): titoletti */
  --primary-soft: rgba(218, 187, 179, .22);
  --primary-softer: rgba(218, 187, 179, .09);

  --accent: #e2bbc0;
  --accent-soft: rgba(226, 187, 192, .22);

  --ink: #55473f;
  --ink-2: #7a6459;
  --ink-3: #a89088;

  --cream: #fef8f6;
  --cream-2: #f7ece9;
  --cream-3: #eedbd8;

  --sage: #dabbb3;
  --sage-soft: rgba(218, 187, 179, .20);

  --line: rgba(85, 71, 63, .12);
  --line-soft: rgba(85, 71, 63, .06);

  --shadow-sm: 0 2px 8px rgba(85, 71, 63, .06);
  --shadow: 0 8px 24px rgba(85, 71, 63, .08);
  --shadow-lg: 0 16px 48px rgba(85, 71, 63, .12);

  --font-display: "Playfair Display", Georgia, serif;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --radius: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --transition: .3s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--cream);
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }

/* ── Layout ──────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
.section { padding: 6rem 0; }
.section-tight { padding: 4rem 0; }
.section-cream { background: var(--cream); }
.section-white { background: #fff; }
.section-dark { background: var(--ink); color: #fff; }

/* ── Type ────────────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--primary-dark);
  font-size: 1.05rem;
  letter-spacing: .01em;
  margin-bottom: .75rem;
}
/* cuoricino davanti al sopratitolo, al posto del trattino */
.kicker::before {
  content: "\f004";
  font-family: "Font Awesome 6 Free"; font-weight: 900; font-style: normal;
  font-size: .7em; line-height: 1;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2.2rem; }
h2.script {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}
h2.script em { font-style: italic; color: var(--primary); font-weight: 500; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); }

.section-head { text-align: left; margin-bottom: 3.5rem; }
.section-head .lead { color: var(--ink-3); margin-top: 1rem; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  padding: .85rem 1.6rem; border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  letter-spacing: .01em;
}
.btn-primary { background: var(--primary); color: var(--ink); }
.btn-primary:hover { background: var(--primary-hover); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--cream-2); color: var(--ink); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: #6A8E86; color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

.text-link {
  background: none; border: none; padding: 0;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  color: var(--primary); display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: .02em; cursor: pointer;
}
.text-link i { transition: transform .2s ease; }
.text-link:hover { color: var(--ink); }
.text-link:hover i { transform: translateX(4px); }

.opt { color: var(--ink-3); font-weight: 400; }

/* ── Top contact bar ─────────────────────────────── */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  padding: 8px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar a { color: rgba(255,255,255,.75); margin-left: 14px; }
.topbar a:hover { color: var(--primary); }
.topbar-left span { margin-right: 22px; }
.topbar-left i { color: var(--primary); margin-right: 6px; }
.topbar-right i { color: var(--primary); margin-right: 6px; }
.topbar-right a i { color: inherit; margin-right: 0; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 50;
  transition: all var(--transition);
}
.nav.scrolled { background: rgba(250,246,240,.96); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 0; }
.nav-inner > .brand { flex: 1 1 0; min-width: max-content; }
.nav-menu-wrap { flex: 0 1 auto; display: flex; justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 80px; width: auto; display: block; }
.brand-logo--footer { height: 120px; width: auto; display: block; }
.brand-logo--admin-sidebar { height: 100px; width: auto; display: block; }
.brand-logo--admin-topbar { height: 44px; width: auto; display: block; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.4rem;
}
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); line-height: 1; }
.brand-text small { display: block; font-family: var(--font-head); font-weight: 400; font-size: .68rem; letter-spacing: .25em; color: var(--ink-3); text-transform: uppercase; margin-top: 4px; }

.menu { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.menu a {
  font-family: var(--font-head); font-weight: 500;
  color: var(--ink); font-size: .92rem;
  padding: 6px 0; position: relative;
  letter-spacing: .01em;
  white-space: nowrap;
}
@media (max-width: 1120px) { .menu { gap: 18px; } .menu a { font-size: .86rem; } }
.menu a:hover, .menu a.active { color: var(--primary); }
.menu a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 22px; height: 2px; background: var(--primary); border-radius: 2px;
}

.nav-cta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 1 1 0; }
.nav-toggle { display: none; background: transparent; border: 0; font-size: 1.4rem; color: var(--ink); padding: 4px 8px; }

.menu-cta { display: none; }

/* menu mobile: tendina marrone come footer e topbar, voci grandi per il dito */
@media (max-width: 920px) {
  .menu { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .menu.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); padding: 6px 0 20px; gap: 0;
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-lg); z-index: 100;
  }
  .menu.open li { border-bottom: 1px solid rgba(255,255,255,.08); }
  .menu.open a {
    display: block; padding: 15px 28px;
    color: rgba(255,255,255,.88); font-size: 1rem;
  }
  .menu.open a:hover, .menu.open a.active { color: var(--primary); }
  .menu.open a.active::after { display: none; }
  .menu.open .menu-cta { display: block; border-bottom: 0; padding: 18px 28px 0; }
  .menu.open .menu-cta .btn { display: inline-flex; padding: .7rem 1.4rem; color: var(--ink); }
}

/* ── Hero banner (statico) ───────────────────────── */
.hero-banner {
  position: relative;
  height: clamp(380px, 55vh, 520px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--primary);
}
.hero-banner-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  text-align: center; padding: 0 1.5rem;
}
.hero-banner-title { margin: 0; line-height: 0; }
.hero-banner-logo { width: clamp(380px, 72vw, 720px); height: auto; }
/* su tablet e telefono il banner è più basso e il logo non supera lo schermo */
@media (max-width: 767px) {
  .hero-banner { height: 280px; }
  .hero-banner-inner { gap: 1rem; }
  .hero-banner-logo { width: min(86vw, 520px); }
}
@media (max-width: 575px) {
  .hero-banner { height: 220px; }
}
.hero-banner-sub {
  font-family: var(--font-head); font-size: clamp(.75rem, 1.4vw, .95rem);
  color: var(--ink-2); letter-spacing: .06em; margin-top: -1rem;
}

/* ── Hero (slider) ───────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  height: clamp(560px, 78vh, 760px);
  background: var(--cream-2);
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; transition: opacity 1s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05); transition: transform 8s ease-out;
}
.hero-slide.active .hero-slide-bg { transform: scale(1); }
.hero-slide-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(58,46,38,.55) 0%, rgba(58,46,38,.25) 50%, rgba(58,46,38,.1) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  color: #fff; max-width: 640px;
  transform: translateY(20px); opacity: 0;
  transition: all 1s ease .3s;
}
.hero-slide.active .hero-content { transform: translateY(0); opacity: 1; }
.hero-content .kicker { color: rgba(255,255,255,.92); }
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 500;
  color: #fff;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 1.2rem;
}
.hero-content h1 em { font-style: italic; color: var(--cream-2); font-weight: 500; }
.hero-content .lead { color: rgba(255,255,255,.88); font-size: 1.15rem; max-width: 540px; margin-bottom: 2rem; }

.hero-controls {
  position: absolute; bottom: 32px; left: 0; right: 0;
  z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-dots { display: flex; gap: 10px; }
.hero-dot {
  width: 38px; height: 3px; background: rgba(255,255,255,.35); border: 0; padding: 0;
  cursor: pointer; transition: all .3s ease;
  border-radius: 2px;
}
.hero-dot.active { background: #fff; }
.hero-arrows { display: flex; gap: 10px; }
.hero-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  color: #fff; backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: all .3s ease;
}
.hero-arrow:hover { background: var(--primary); border-color: var(--primary); }

/* ── Mission ─────────────────────────────────────── */
/* Testo a sinistra; a destra la foto dello studio in verticale (4:5)
   accanto a tre punti brevi con il titolo colorato */
.mission-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  align-items: center;
}
.mission-intro p { font-size: 1.02rem; line-height: 1.85; color: var(--ink-2); }
.mission-intro p strong { color: var(--ink); font-weight: 600; }
.mission-intro .btn { margin-top: .8rem; }
.mission-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.mission-photo {
  display: block; width: 100%;
  aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.mission-point + .mission-point { margin-top: 1.5rem; }
.mission-point h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.15rem; line-height: 1.3;
  margin-bottom: .4rem;
}
.mission-point:nth-child(1) h3 { color: var(--primary-hover); }
.mission-point:nth-child(2) h3 { color: var(--ink-2); }
.mission-point:nth-child(3) h3 { color: var(--ink); }
.mission-point p { color: var(--ink-3); font-size: .9rem; line-height: 1.7; margin: 0; }

@media (max-width: 920px) {
  .mission-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 575px) {
  .mission-side { grid-template-columns: 1fr; }
  .mission-photo { aspect-ratio: 4 / 3; }
}

/* ── Banda con frase ─────────────────────────────── */
.band {
  padding: clamp(2.2rem, 4vw, 3.4rem) 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-3) 100%);
}
.band-text {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.35;
  color: var(--ink); text-align: center; margin: 0;
}
.band-text em { color: var(--primary-hover); }

/* ── Cosa facciamo ──────────────────────────────── */
.cf-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* 3 per riga; l'ultima riga incompleta resta centrata */
.cf-card {
  flex: 0 1 calc((100% - 48px) / 3);
  min-width: 300px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.cf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.cf-icon {
  width: 64px; height: 64px;
  background: var(--primary-soft); color: var(--primary);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
}
/* fascia media in cima alla card: foto al vivo, logo contenuto */
.cf-media {
  height: 190px;
  overflow: hidden;
  background: var(--cream-2);
  border-bottom: 1px solid var(--line-soft);
}
.cf-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.cf-card:hover .cf-media img { transform: scale(1.05); }
.cf-media--logo {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1.8rem;
}
.cf-media--logo img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.cf-card:hover .cf-media--logo img { transform: scale(1.04); }

.cf-body { flex: 1; min-width: 0; padding: 1.6rem 1.7rem 1.8rem; }
.cf-card h3 {
  font-size: 1.25rem; font-family: var(--font-display); font-weight: 700;
  margin-bottom: .6rem; line-height: 1.3;
}
.cf-card h3 small { font-size: .85rem; font-weight: 400; color: var(--ink-3); display: block; margin-top: .25rem; }
.cf-card p { color: var(--ink-3); font-size: .92rem; line-height: 1.68; margin-bottom: 0; }
.cf-card p + p { margin-top: .6rem; }
.cf-card p strong { color: var(--ink); font-weight: 600; }

@media (max-width: 1000px) {
  .cf-card { flex: 0 1 calc((100% - 24px) / 2); }
}
@media (max-width: 680px) {
  .cf-grid { gap: 18px; }
  .cf-card { flex: 1 1 100%; min-width: 0; }
  .cf-media { height: 200px; }
  .cf-body { padding: 1.4rem 1.5rem 1.6rem; }
}

/* ── About ───────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; gap: 3rem; } }

.about-photo {
  aspect-ratio: 1 / 1;
  background: var(--cream-2);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-photo::before { content: none; }
.about-photo-label {
  font-family: var(--font-display); font-style: italic;
  color: var(--ink-3); font-size: 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 1;
}
.about-photo-label i { font-size: 2rem; color: var(--primary); opacity: .5; }
.about-photo-tag {
  position: absolute; bottom: 32px; left: 32px;
  background: var(--primary); color: #fff;
  font-family: var(--font-display); font-style: italic; font-size: 1.1rem;
  padding: 14px 22px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-content h2 { margin-bottom: 1.5rem; }
.about-quote {
  border-left: 3px solid var(--primary);
  padding: .25rem 0 .25rem 1.5rem;
  font-family: var(--font-display); font-style: italic;
  color: var(--ink); font-size: 1.15rem; line-height: 1.6;
  margin: 1.8rem 0;
}
.about-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-meta-item { display: flex; align-items: center; gap: 12px; }
.about-meta-item i { color: var(--primary); font-size: 1.1rem; }
.about-meta-item span { font-family: var(--font-head); font-weight: 500; color: var(--ink); font-size: .9rem; }

/* ── Gallery studio ─────────────────────────────── */
.studio-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.studio-shot {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--cream-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}
.studio-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.studio-shot::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(85, 71, 63, .16);
  opacity: 0;
  transition: opacity var(--transition);
}
.studio-shot:hover img { transform: scale(1.06); }
.studio-shot:hover::after { opacity: 1; }
.studio-shot:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

@media (max-width: 900px) { .studio-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .studio-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ── Laboratori ────────────────────────────────── */
.lab-grid { display: flex; flex-direction: column; gap: 24px; }

.lab-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: row;
  transition: all var(--transition);
  border: 1px solid var(--line-soft);
  min-height: 200px;
}
.lab-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lab-card-img {
  width: 280px;
  flex-shrink: 0;
  position: relative;
  background: var(--cream-2) center / cover no-repeat;
}
.lab-card-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(58,46,38,.15));
}
.lab-card-tag {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,.92);
  color: var(--ink); font-family: var(--font-head); font-weight: 600;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--radius-pill);
  z-index: 2;
}
.lab-card-body { padding: 2rem 2.2rem; flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; }
/* logo del percorso (es. EmoSpace) in alto a destra; il titolo lascia spazio per non finirci sotto */
.lab-card-logo { position: absolute; top: 1.4rem; right: 1.8rem; height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.lab-card--has-logo .lab-card-body h3 { padding-right: 170px; }
.lab-card-body h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: .6rem; }
.lab-card-body p { color: var(--ink-3); font-size: .93rem; flex: 1; max-width: 600px; }
.lab-card-body p b { color: var(--primary-dark); font-weight: 600; }
.lab-card-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: .85rem; color: var(--ink-3);
  margin: 1rem 0 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
.lab-card-meta i { color: var(--primary); margin-right: 6px; }
@media (max-width: 820px) {
  .lab-card { flex-direction: column; }
  .lab-card-img { width: 100%; aspect-ratio: 16 / 9; }
  .lab-card-logo { top: 1.2rem; right: 1.2rem; height: 36px; max-width: 120px; }
  .lab-card--has-logo .lab-card-body h3 { padding-right: 130px; }
}

/* ── Academy section (full-width parallax) ───────── */
.academy-section {
  position: relative;
  padding: 7rem 0;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}
.academy-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(85,71,63,.88) 0%, rgba(55,35,30,.80) 100%);
  z-index: 1;
}
.academy-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.academy-pdf {
  flex-shrink: 0;
  display: block;
  transition: transform .25s ease;
  cursor: zoom-in;
}
.academy-pdf:hover { transform: scale(1.04) rotate(1deg); }
.academy-pdf img {
  width: clamp(260px, 28vw, 380px); height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  display: block;
}
@media (max-width: 820px) {
  .academy-section { background-attachment: scroll; padding: 5rem 0; }
  .academy-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  /* su mobile il volantino va sotto i pulsanti, centrato */
  .academy-pdf { justify-self: center; }
  .academy-pdf img { width: min(280px, 72vw); }
}

/* ── Eventi ──────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .events-grid { grid-template-columns: 1fr; } }

.event-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  transition: all var(--transition);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card-img {
  aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  position: relative;
}
.event-date {
  position: absolute; top: 16px; left: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  min-width: 64px;
}
.event-date-day { font-family: var(--font-display); font-weight: 700; color: var(--primary); font-size: 1.6rem; line-height: 1; }
.event-date-month { font-family: var(--font-head); font-size: .7rem; font-weight: 600; color: var(--ink); letter-spacing: .15em; text-transform: uppercase; margin-top: 2px; }
.event-card-body { padding: 1.6rem 1.6rem 1.8rem; flex: 1; display: flex; flex-direction: column; }
.event-card-body .ev-meta { font-size: .82rem; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-bottom: .4rem; font-family: var(--font-head); font-weight: 500; }
.event-card-body h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: .6rem; }
.event-card-body p { color: var(--ink-3); font-size: .92rem; flex: 1; }
.event-card-foot {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.event-card-foot .price { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.event-card-foot .price small { font-weight: 400; color: var(--ink-3); }

/* ── Blog ────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card { display: flex; flex-direction: column; color: inherit; }
.blog-card-img {
  aspect-ratio: 16 / 11;
  background-size: cover; background-position: center;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
  transition: transform var(--transition);
}
.blog-card:hover .blog-card-img { transform: scale(1.02); }
.blog-card .ev-meta { font-size: .78rem; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; font-family: var(--font-head); font-weight: 600; }
.blog-card .ev-meta span { color: var(--primary); }
.blog-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; line-height: 1.3; margin-bottom: .6rem; }
.blog-card:hover h3 { color: var(--primary); }
.blog-card p { color: var(--ink-3); font-size: .92rem; }

/* ── Footer ──────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 5rem 0 1.8rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer .brand-mark { background: var(--primary); }
.footer .brand-text { color: #fff; }
.footer .brand-text small { color: rgba(255,255,255,.5); }
.footer-about { font-size: .9rem; line-height: 1.7; margin: 1.4rem 0; }
.footer .footer-heading { font-family: var(--font-head); color: #fff; font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 1.2rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 12px; font-size: .92rem; }
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: var(--primary); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.footer-contact i { color: var(--primary); width: 18px; margin-top: 4px; flex-shrink: 0; }

.footer-fiscal-name { color: rgba(255,255,255,.9); display: block; margin-bottom: 6px; font-family: var(--font-head); font-weight: 600; letter-spacing: .04em; }

.socials { display: flex; gap: 10px; margin-top: 1.4rem; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  transition: all var(--transition);
}
.socials a:hover { background: var(--primary); color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.5); }
/* ── Modal ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(58,46,38,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal-backdrop[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: slideUp .3s ease;
  box-shadow: var(--shadow-lg);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream); border: 0; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition);
  z-index: 2;
}
.modal-close:hover { background: var(--ink); color: #fff; }
.modal-head { padding: 2.4rem 2.4rem 1rem; }
.modal-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; margin-bottom: .4rem; }
.modal-head p { color: var(--ink-3); font-size: .95rem; margin: 0; }
.modal-body { padding: 1rem 2.4rem 2.4rem; }
.modal-login { max-width: 420px; }
.modal-evento-detail { max-width: 660px; padding: 0; overflow: hidden; }
.modal-evento-detail .modal-head { padding: 1.6rem 2.4rem .8rem; }
.modal-evento-detail .modal-body { padding: .6rem 2.4rem 2.4rem; }
.modal-evento-cover {
  height: 200px;
  background-size: cover; background-position: center;
  background-color: var(--cream-2);
  position: relative;
}
.modal-promo { max-width: 440px; width: 100%; padding: 0; overflow: hidden; }
.modal-promo-row { display: block; }
.modal-promo-content {
  padding: 4rem 1.8rem 2rem;
  display: flex; flex-direction: column;
  position: relative; background: #fff;
}
.modal-promo-content .modal-close { position: absolute; top: 14px; right: 14px; }
.modal-promo-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-promo-kicker {
  display: inline-block;
  background: var(--primary); color: #fff;
  font-family: var(--font-head); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
}
.event-date--inline {
  position: static;
  box-shadow: none;
  background: var(--cream-2);
  padding: 6px 12px;
}
.modal-promo-content h3 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
  color: var(--ink); margin-bottom: .6rem; line-height: 1.25;
}
.modal-promo-excerpt { color: var(--ink-2); font-size: .92rem; margin-bottom: 1rem; flex: 1; }
.modal-promo-info {
  list-style: none; margin: 0 0 1.4rem; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.modal-promo-info li { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--ink-2); }
.modal-promo-info i { color: var(--primary); width: 14px; flex-shrink: 0; }
.modal-promo-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; align-items: flex-end; }
@media (max-width: 600px) {
  .modal-promo-content { padding: 4rem 1.4rem 1.6rem; }
  .modal-promo-content h3 { font-size: 1.2rem; }
  .modal-promo-excerpt { margin-bottom: .8rem; }
  .modal-promo-info { margin-bottom: 1.1rem; }
}
.modal-evento-info {
  list-style: none; margin: 0 0 1.4rem; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.modal-evento-info li { display: flex; align-items: flex-start; gap: 12px; font-size: .92rem; color: var(--ink-2); }
.modal-evento-info i { color: var(--primary); width: 16px; margin-top: 3px; flex-shrink: 0; }
.modal-foot { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; flex-wrap: wrap; }
.modal-login-brand {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1rem;
}
.modal-login .modal-head { padding-bottom: 0; }
.modal-login .modal-body { padding-top: 1.4rem; }

/* ── Form ────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-family: var(--font-head); font-weight: 500;
  font-size: .85rem; color: var(--ink); margin-bottom: 6px;
  letter-spacing: .02em;
}
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .95rem; font-size: .95rem;
  font-family: var(--font-body); color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  transition: all var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; min-height: 100px; }
.field .req { color: var(--primary); }
.field.has-error input { border-color: #c0392b; }
.field-error { display: block; margin-top: 4px; font-size: .8rem; color: #c0392b; }
.form-error { margin: 0 0 10px; font-size: .85rem; color: #c0392b; }
.form-error[hidden] { display: none; }

.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 8px; flex-wrap: wrap;
}
.check {
  font-size: .8rem; color: var(--ink-3);
  display: flex; gap: 8px; align-items: flex-start;
  flex: 1; min-width: 220px;
}
.check input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.check a { color: var(--primary); }

.success-state { text-align: center; padding: 1rem 0; }
.success-state[hidden] { display: none; }
.success-state-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--sage-soft); color: var(--sage);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.success-state h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-bottom: .5rem; }

/* ── Page header ─────────────────────────────────── */
.page-header {
  background: var(--cream-2);
  padding: 5rem 0 4rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; right: -100px; top: -50px;
  width: 280px; height: 280px; border-radius: 50%;
  background: var(--primary); opacity: .08;
}
.page-header::after {
  content: ""; position: absolute; left: -80px; bottom: -100px;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--sage); opacity: .12;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.015em;
}
.page-header h1 em { font-style: italic; color: var(--primary); }
.page-header .lead { color: var(--ink-3); margin-top: 1rem; }
.breadcrumbs {
  font-family: var(--font-head); font-size: .85rem; color: var(--ink-3);
  margin-bottom: 1.2rem; letter-spacing: .02em;
}
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 8px; color: var(--ink-3); opacity: .5; }

/* ── Detail pages ────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
}
@media (max-width: 920px) { .detail-grid { grid-template-columns: 1fr; gap: 3rem; } }

.detail-hero {
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}
.detail-content h2 { font-family: var(--font-display); font-weight: 500; font-size: 2rem; margin: 2.4rem 0 1rem; }
.detail-content p { font-size: 1.05rem; line-height: 1.8; color: var(--ink-2); }
.detail-content ul { padding-left: 1.4rem; line-height: 1.8; }
.detail-content ul li { margin-bottom: .4rem; }
.detail-content blockquote {
  border-left: 3px solid var(--primary);
  padding: .5rem 0 .5rem 1.6rem;
  margin: 2rem 0;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.25rem; color: var(--ink); line-height: 1.6;
}

.sidebar-card {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  position: sticky; top: 100px;
}
.sidebar-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: 1rem; }
.sidebar-info { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.sidebar-info li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
}
.sidebar-info li:last-child { border-bottom: 0; }
/* indirizzo dell'evento: link a Google Maps, generato in automatico da quello inserito in admin */
.sidebar-map-link { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.sidebar-map-link:hover { color: var(--ink); }
.sidebar-info i { color: var(--primary); margin-top: 4px; width: 18px; flex-shrink: 0; }
.sidebar-info strong { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }

/* ── Aside blog list (single post) ──────────────── */
.aside-blog-list { display: flex; flex-direction: column; gap: 1rem; margin-top: .8rem; }
/* "Continua a leggere" sotto l'articolo: tre colonne su desktop */
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related-articles h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: .4rem; }
.related-articles .aside-blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 680px) { .related-articles .aside-blog-list { grid-template-columns: 1fr; } }
.aside-blog-item { display: flex; gap: 10px; align-items: flex-start; color: inherit; }
.aside-blog-item:hover .aside-blog-title { color: var(--primary); }
.aside-blog-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--radius-sm); background-size: cover; background-position: center; }
.aside-blog-thumb-empty { background: var(--cream-2); }
.aside-blog-meta { font-size: .75rem; color: var(--ink-3); font-family: var(--font-head); letter-spacing: .04em; margin-bottom: 3px; }
.aside-blog-title { font-family: var(--font-display); font-size: .95rem; font-weight: 500; line-height: 1.3; transition: color .2s; }

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin-bottom: 3rem;
}
.filter-chip {
  font-family: var(--font-head); font-weight: 500; font-size: .88rem;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-2);
  padding: .55rem 1.2rem; border-radius: var(--radius-pill);
  cursor: pointer; transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Event rows (list page) */
.event-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.8rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  transition: all var(--transition);
}
.event-row[hidden] { display: none; }
.event-row:hover { box-shadow: var(--shadow); transform: translateX(4px); border-color: var(--primary-soft); }
.event-row-img {
  aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  border-radius: var(--radius);
}
.event-row-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin-bottom: .3rem; }
.event-row-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-3); margin-bottom: .6rem; }
.event-row-meta i { color: var(--primary); margin-right: 5px; }
.event-row-body p { color: var(--ink-3); font-size: .92rem; margin: 0; }
.event-row-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; min-width: 140px; }
.event-row-price { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); font-weight: 600; }
.event-row-price-note { font-size: .78rem; color: var(--ink-3); }
.ev-cat-label { color: var(--primary); font-weight: 600; }
@media (max-width: 820px) {
  .event-row { grid-template-columns: 1fr; }
  .event-row-img { aspect-ratio: 16/9; }
  .event-row-actions { align-items: flex-start; }
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--ink-3); }

/* ── Auth (modal + standalone pages) ────────────────── */
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: .8rem;
}
.auth-submit { text-align: center; margin-top: 1.6rem; }
.auth-link {
  font-size: .88rem; color: var(--primary);
  text-decoration: none; transition: opacity var(--transition);
}
.auth-link:hover { opacity: .75; }

.auth-alert {
  background: #fde8e8; border: 1px solid #f5aeae;
  color: #922; border-radius: var(--radius);
  padding: .75rem 1rem; font-size: .9rem;
  margin-bottom: 1.2rem;
}
.auth-success {
  background: #e8f5ee; border: 1px solid #9fd4b5;
  color: #1a5c36; border-radius: var(--radius);
  padding: .75rem 1rem; font-size: .9rem;
  margin-bottom: 1.2rem;
}
.auth-success i { margin-right: .4rem; }

/* Standalone auth pages (/login, /password/…) */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1rem;
  background: var(--cream);
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem 2rem;
  width: 100%; max-width: 440px;
}
.auth-card h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.8rem; margin: 0 0 .4rem;
}
.auth-brand {
  display: inline-flex; align-items: center; gap: .7rem;
  text-decoration: none; margin-bottom: 1.8rem;
}
.auth-logo { height: 52px; width: auto; display: block; }
.auth-sub { color: var(--ink-3); font-size: .95rem; margin-bottom: 1.6rem; }
.auth-footer-text { text-align: center; font-size: .88rem; color: var(--ink-3); margin-top: 1.4rem; }
.auth-footer-text a { color: var(--primary); text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; }
@media (max-width: 480px) { .auth-card { padding: 2rem 1.4rem; } }

/* ──────────────────────────────────────────────────────
   RESPONSIVE
   lg  ≥ 992 px   desktop  — default, nessuna query
   md  768–991 px tablet landscape
   sm  480–767 px tablet portrait / phone landscape
   xs    < 480 px phone portrait
────────────────────────────────────────────────────── */

/* md ───────────────────────────────── 768–991 px ─── */
@media (max-width: 991px) {
  .section       { padding: 5rem 0; }
  .section-tight { padding: 3.5rem 0; }
  .topbar-right > span { display: none; }   /* nascondi orari */
  .detail-grid { gap: 2.5rem; }
}

/* sm ───────────────────────────────── 480–767 px ─── */
@media (max-width: 767px) {
  .section       { padding: 4rem 0; }
  .section-tight { padding: 2.8rem 0; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.85rem; }
  .topbar-left          { display: none; } /* nascondi tel/email */
  .topbar-right > span  { display: none; } /* nascondi orari */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .modal-head,
  .modal-body { padding-left: 1.8rem; padding-right: 1.8rem; }
  .page-header { padding: 4rem 0 3rem; }
  .section-head { margin-bottom: 2.5rem; }
}

/* xs ─────────────────────────────────── < 480 px ─── */
@media (max-width: 479px) {
  .container     { padding: 0 16px; }
  .section       { padding: 3rem 0; }
  .section-tight { padding: 2.2rem 0; }

  /* topbar: nascosta su telefono portrait */
  .topbar { display: none; }

  /* nav */
  .nav-inner    { padding: 12px 0; }
  .brand-logo   { height: 48px; }
  .brand-mark   { width: 38px; height: 38px; font-size: 1.15rem; }
  .brand-text   { font-size: 1.1rem; }
  .brand-text small { display: none; }
  .nav-toggle   { background: var(--primary); color: var(--ink); border-radius: 8px; padding: 6px 10px; margin-right: 8px; }

  /* tipografia */
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }

  /* modal */
  .modal-head { padding: 1.6rem 1.2rem .8rem; }
  .modal-body { padding: .8rem 1.2rem 1.6rem; }
  .modal { border-radius: var(--radius-md); }

  /* footer */
  .footer        { padding: 3.5rem 0 1.4rem; }
  .footer-bottom { font-size: .75rem; flex-direction: column; align-items: flex-start; gap: 6px; }

  /* page header */
  .page-header { padding: 3rem 0 2.2rem; }
  .section-head { margin-bottom: 2rem; }
}

/* ── Blog prev / next ─────────────────────────────────────── */
.blog-prevnext {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.blog-prevnext-item { display: flex; flex-direction: column; gap: 6px; }
.blog-prevnext-next { text-align: right; align-items: flex-end; }
.blog-prevnext-all { display: flex; justify-content: center; }
.blog-prevnext-label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-head); }
.blog-prevnext-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--ink); line-height: 1.4; transition: color .2s; }
.blog-prevnext-title:hover { color: var(--primary); }
@media (max-width: 600px) {
  .blog-prevnext { grid-template-columns: 1fr; }
  .blog-prevnext-next { text-align: left; align-items: flex-start; }
  .blog-prevnext-all { order: 3; justify-content: flex-start; }
}

/* ── Torna su ─────────────────────────────────────────────── */
/* sotto modali, cookie e lightbox (z-index 100+), sopra il contenuto */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius);
  background: var(--primary); color: var(--ink);
  font-size: .85rem; cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary-hover); }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 575px) {
  .to-top { right: 14px; bottom: 14px; width: 34px; height: 34px; }
}

/* ── Cookie consent ──────────────────────────────────────── */
.cookie-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(58,46,38,.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .25s ease;
}
.cookie-backdrop[hidden] { display: none; }
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(85,71,63,.22);
  max-width: 520px; width: 100%;
  animation: slideUp .3s ease;
}
.cookie-modal-head {
  padding: 2.2rem 2.4rem 1rem;
  text-align: center;
}
.cookie-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-hover);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.cookie-modal-head h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.55rem; margin-bottom: .4rem; color: var(--ink);
}
.cookie-modal-head > p { color: var(--ink-3); font-size: .9rem; margin: 0; }
.cookie-modal-body { padding: 1rem 2.4rem 2.2rem; }
.cookie-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.6rem; }
.cookie-item {
  background: var(--cream-2); border-radius: var(--radius-md);
  padding: 14px 16px;
}
.cookie-item-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 5px;
}
.cookie-item-name {
  font-weight: 600; font-size: .88rem; color: var(--ink);
  display: flex; align-items: center; gap: 7px;
}
.cookie-item-name i { color: var(--primary-hover); }
.cookie-item-desc { font-size: .82rem; color: var(--ink-3); margin: 0; line-height: 1.55; }
.cookie-badge {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--primary-soft); color: var(--ink-2); white-space: nowrap; flex-shrink: 0;
}
.cookie-badge--required { background: rgba(80,160,100,.12); color: #2d7a3e; }
.cookie-actions {
  display: flex; gap: 12px; justify-content: flex-end; margin-bottom: 1rem;
}
.cookie-note { font-size: .78rem; color: var(--ink-3); text-align: center; margin: 0; }
.cookie-note a { color: var(--primary-hover); }

/* ── Mappa in fondo alla home, attaccata al footer ─────────── */
.home-map { width: 100%; height: 300px; line-height: 0; }

@media (max-width: 600px) {
  .cookie-modal-head { padding: 1.8rem 1.4rem .8rem; }
  .cookie-modal-body { padding: .8rem 1.4rem 1.8rem; }
  .cookie-actions { flex-direction: column-reverse; }
  .cookie-actions .btn { width: 100%; justify-content: center; text-align: center; }
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  /* width/height in % invece di 100vw/100vh: si calcolano sul viewport reale,
     senza includere la scrollbar (vw) né le barre del browser mobile (vh) */
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  background: rgba(0,0,0,.88);
  align-items: center; justify-content: center;
  cursor: zoom-out;
  overflow: hidden;             /* il contenuto non puo' generare scrollbar */
  overscroll-behavior: contain;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  /* % dell'overlay, non vw/vh: evita che l'immagine sbordi oltre lo sfondo */
  max-width: 92%; max-height: 88%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: rgba(255,255,255,.12); border: 0;
  color: #fff; font-size: 1.6rem; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* Frecce di navigazione della gallery */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: 0;
  color: #fff; font-size: 1.4rem; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* .lightbox-nav imposta display:flex, che vince sulla regola [hidden] del browser */
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

.lightbox-counter {
  position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  margin: 0; color: rgba(255,255,255,.7);
  font-size: .85rem; letter-spacing: .08em;
  pointer-events: none;   /* il click passa all'overlay e chiude */
}

@media (max-width: 620px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.1rem; }
  .lightbox-prev { left: .35rem; }
  .lightbox-next { right: .35rem; }
  .lightbox-overlay img { max-width: 96%; }
}

.detail-hero { cursor: zoom-in; }
.detail-content img { cursor: zoom-in; }

/* ── Pulsanti card percorso ──────────────────────── */
.lab-card-actions {
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: flex-end;
  margin-top: auto; padding-top: 1rem;
}
.lab-card-actions .btn { font-size: .78rem; padding: .35rem .9rem; }
.lab-card-lead { color: var(--primary-hover) !important; font-weight: 600; }

/* ── Eventi & Blog (sezione unica in home) ───────── */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2rem; }
.section-head + .news-filters { margin-top: -1.5rem; }
.news-filter {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-head); font-size: .85rem; font-weight: 500;
  color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: .45rem 1.1rem;
  transition: all var(--transition);
}
.news-filter:hover { border-color: var(--primary); color: var(--ink); }
.news-filter.is-active { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.news-grid [hidden] { display: none; }
/* Card "panel": foto sopra, riga meta con icone, titolo cliccabile, testo */
.panel {
  display: flex; flex-direction: column;
  background: #fff;
  /* bordo e ombra visibili anche sulle sezioni bianche (es. "Ci vediamo presto" in home) */
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.panel:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(85, 71, 63, .14); }
.panel_media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-2); }
.panel_img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.panel:hover .panel_img { transform: scale(1.04); }
.panel_img--empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--ink-3); opacity: .35; }
.panel_body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
/* informazioni sempre su una riga: le voci non vanno a capo, l'ultima (es. il luogo) si accorcia con "…" */
.panel_meta {
  display: flex; flex-wrap: nowrap; gap: 1rem; min-width: 0;
  font-family: var(--font-head); font-size: .8rem; color: var(--ink-3);
  margin-bottom: .6rem;
}
.panel_meta span { display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; flex-shrink: 0; }
.panel_meta span:last-child:not(:first-child) { flex-shrink: 1; min-width: 0; }
.panel_meta .panel_meta-trunc { display: block; overflow: hidden; text-overflow: ellipsis; }
.panel_meta i { color: var(--primary-hover); }
.panel_title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0 0 .6rem; }
.panel_title a { color: var(--ink); }
.panel_title a:hover { color: var(--primary-hover); }
.panel_text { color: var(--ink-3); font-size: .92rem; line-height: 1.65; margin: 0; }
.news-empty { color: var(--ink-3); padding: 3rem 0; }
.panel_media { position: relative; }
/* etichetta "In arrivo" sugli eventi che devono ancora svolgersi, dal lato opposto alla data */
.panel-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--primary-dark); color: #fff;
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
/* testo letto solo dagli screen reader */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.panel .event-date { display: block; }
.panel .event-date-day, .panel .event-date-month { display: block; }

/* ── Pagine di errore (404, 500) ─────────────────────── */
/* templates/bundles/TwigBundle/Exception/: il numero con una barchetta di carta al posto della cifra centrale */
.err-page {
  background:
    radial-gradient(circle at 88% 12%, var(--primary-soft) 0, transparent 35%),
    radial-gradient(circle at 10% 90%, var(--accent-soft) 0, transparent 40%),
    var(--cream);
  padding: 4.5rem 0 5.5rem;
  overflow: hidden;
}
.err-inner { text-align: center; }
.err-code {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(.6rem, 2.5vw, 1.6rem);
  margin-bottom: 1.6rem;
}
.err-digit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 13rem);
  line-height: .8;
  color: var(--primary);
  text-shadow: 6px 7px 0 var(--cream-3);
  animation: err-wobble 5s ease-in-out infinite;
}
.err-digit:last-child { animation-delay: -2.5s; }
@keyframes err-wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-6px); } }

/* la barchetta dondola sulle onde, che scorrono */
.err-boat {
  position: relative;
  width: clamp(6.5rem, 19vw, 11rem);
  height: clamp(7rem, 22vw, 13rem);
  display: flex; align-items: flex-end; justify-content: center;
}
.err-boat-svg {
  position: relative; z-index: 1;
  width: 86%; height: auto;
  margin-bottom: 14%;
  transform-origin: 50% 90%;
  animation: err-rock 3.2s ease-in-out infinite;
}
@keyframes err-rock { 0%, 100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(-10px) rotate(7deg); } }
.err-page--storm .err-boat-svg { animation-duration: 1.4s; }
.err-waves {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 26%;
  overflow: hidden;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.err-waves svg {
  position: absolute; bottom: 0; left: 0;
  width: 200%; height: 100%;
  animation: err-waves 4s linear infinite;
}
.err-waves svg + svg { animation-duration: 6s; animation-direction: reverse; height: 70%; }
@keyframes err-waves { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.err-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  margin-bottom: 1rem;
  text-wrap: balance;
}
.err-title em { font-style: italic; color: var(--primary-dark); }
.err-text { max-width: 560px; margin: 0 auto 2rem; text-wrap: pretty; }
.err-text a { color: var(--primary-dark); text-decoration: underline; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 575px) {
  .err-page { padding: 3rem 0 4rem; }
  .err-digit { text-shadow: 4px 5px 0 var(--cream-3); }
  .err-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .err-digit, .err-boat-svg, .err-waves svg { animation: none; }
}
