/* ==========================================================================
   Rayana Festival — stili del tema
   Valori ripresi dal kit Elementor del sito attuale (colori, font, clamp).
   Breakpoint: tablet ≤ 1024px, mobile ≤ 767px (come Elementor).
   ========================================================================== */

:root {
  --orange: #E3764B;
  --cream: #F0EEE9;
  --green: #62805D;
  --peach: #FFC38F;
  --dark: #344231;
  --lime: #D8FC60;
  --white: #FFFFFF;

  --f-sge: "special-gothic-expanded-one", "Arial Black", sans-serif;
  --f-prox: "proxima-soft", "Nunito", "Helvetica Neue", Arial, sans-serif;
  --f-averia: "Averia Libre", Georgia, serif;

  /* Scale tipografiche globali del kit Elementor */
  --fs-text: clamp(1rem, 0.75rem + 0.8vw, 1.2rem);       /* testo */
  --fs-card: clamp(1.4rem, 1.275rem + 0.4vw, 1.5rem);    /* titoli card */
  --fs-small: clamp(1rem, 0.875rem + 0.4vw, 1.1rem);     /* sottotitoli */
  --fs-btn: clamp(1rem, 0.75rem + 0.8vw, 1.2rem);        /* pulsanti, menu */
  --fs-kicker: clamp(1.2rem, 0.95rem + 0.8vw, 1.4rem);   /* occhielli */
  --fs-sub: clamp(1.4rem, 0.9rem + 1.6vw, 1.8rem);
  --fs-primary: clamp(2.2rem, 1.45rem + 2.4vw, 2.8rem);  /* Averia titoli: come i titoli dei giorni */
  --fs-secondary: clamp(1.6rem, 0.6rem + 3.2vw, 2.4rem);
  --fs-accent: clamp(1.4rem, 0.65rem + 2.4vw, 2rem);
  --fs-section: clamp(2rem, 1rem + 3.2vw, 2.8rem);

  --radius: 20px;
  --header-h: 70px;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); scrollbar-gutter: stable; }
/* Altezza occupata in alto da header (+ barra admin): base per gli elementi sticky. */
body { --sticky-top: calc(var(--header-h, 84px) + var(--adminbar, 0px)); }
body.admin-bar { --adminbar: 32px; }
@media (max-width: 782px) { body.admin-bar { --adminbar: 46px; } }
@media (max-width: 600px) { body.admin-bar { --adminbar: 0px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--dark);
  font-family: var(--f-prox);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 0.9rem; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.2; }
ul { margin: 0; padding: 0; }
figure { margin: 0; }
button { font: inherit; }

.r-icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--dark); color: var(--lime); padding: 10px 16px; border-radius: 30px;
  font-family: var(--f-sge); text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

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

/* ---------- Elementi comuni ---------- */

.r-kicker {
  font-family: var(--f-prox);
  font-size: var(--fs-kicker);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0;
}
.r-kicker--orange { color: var(--orange); }
.r-kicker--cream { color: var(--cream); }

.r-title {
  font-family: var(--f-averia);
  font-size: var(--fs-section);
  font-weight: 600;
  line-height: 1.4;
  color: var(--orange);
}
.r-title--orange { color: var(--orange); }
.r-title--cream { color: var(--cream); }

/* Pulsante a pillola con freccia (come i button Elementor) */
.r-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6em 1.5em;
  border-radius: 50px;
  font-family: var(--f-sge);
  font-size: var(--fs-btn);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}
button.r-btn { border: 0; cursor: pointer; }
.r-btn__icon { width: 1em; height: 1em; transition: fill 0.3s; }
.r-btn--cream { background: var(--cream); color: var(--dark); }
.r-btn--cream:hover,
.r-btn--cream:focus-visible { background: var(--dark); color: var(--lime); }
.r-btn--orange { background: var(--orange); color: var(--cream); }
.r-btn--orange:hover,
.r-btn--orange:focus-visible { background: var(--dark); color: var(--cream); }

/* Card foto + didascalia colorata */
.r-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--orange);
  align-self: start;
}
.r-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.r-card figcaption {
  padding: 0.25em 0.75em 0.4em;
  font-family: var(--f-sge);
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.r-card--orange { background: var(--orange); }
.r-card--orange figcaption { color: var(--cream); }
.r-card--dark { background: var(--dark); }
.r-card--dark figcaption { color: var(--lime); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px 14px;
}

.site-header__logo { display: block; max-width: 170px; }
.site-header__logo img { width: auto; height: 60px; max-width: 100%; object-fit: contain; }

.site-nav { display: flex; align-items: center; padding-right: 24px; }
.site-nav__list { display: flex; align-items: center; list-style: none; }
.site-nav__list li + li { margin-left: 4px; }
.site-nav__list a {
  position: relative;
  display: block;
  padding: 12px 12px;
  font-family: var(--f-sge);
  font-size: clamp(0.82rem, 0.45rem + 0.6vw, 1rem);
  white-space: nowrap;
  line-height: 1.2;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
}
/* Sottolineatura che cresce da sinistra (custom CSS del sito attuale) */
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}
.site-nav__list a:hover,
.site-nav__list a:focus-visible,
.site-nav__list .current-menu-item > a.is-active { color: var(--green); }
.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after,
.site-nav__list a.is-active::after { width: 100%; }

.site-nav__cta {
  margin-left: 12px;
  padding: 0.55em 1.4em;
  border-radius: 30px;
  background: var(--dark);
  color: var(--lime);
  font-family: var(--f-sge);
  font-size: clamp(0.82rem, 0.45rem + 0.6vw, 1rem);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}
button.site-nav__cta { border: 0; cursor: pointer; line-height: 1.2; }
.site-nav__cta:hover { background: var(--lime); color: var(--dark); }

.site-header__toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 6px;
  border: 0;
  border-radius: 4px;
  background: var(--cream);
  color: var(--dark);
  cursor: pointer;
}
.site-header__burger { position: relative; display: block; width: 30px; height: 22px; margin: 0 auto; }
.site-header__burger span {
  position: absolute; left: 0; width: 100%; height: 3px; border-radius: 2px;
  background: currentColor; transition: transform 0.3s, opacity 0.3s, top 0.3s;
}
.site-header__burger span:nth-child(1) { top: 0; }
.site-header__burger span:nth-child(2) { top: 9.5px; }
.site-header__burger span:nth-child(3) { top: 19px; }
.nav-open .site-header__burger span:nth-child(1) { top: 9.5px; transform: rotate(45deg); }
.nav-open .site-header__burger span:nth-child(2) { opacity: 0; }
.nav-open .site-header__burger span:nth-child(3) { top: 9.5px; transform: rotate(-45deg); }

@media (max-width: 1024px) {
  .site-header__inner { padding: 1.5% 2%; }
  .site-header__logo { max-width: 200px; }
  .site-header__toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--cream);
    box-shadow: 0 12px 24px rgba(52, 66, 49, 0.12);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav__list { flex-direction: column; align-items: stretch; }
  .site-nav__list li + li { margin-left: 0; }
  .site-nav__list a { padding: 18px 20px; font-size: var(--fs-btn); text-align: center; }
  .site-nav__list a::after { display: none; }
  .site-nav__list a:hover,
  .site-nav__list a:focus-visible { background: var(--orange); color: var(--cream); }
  .site-nav__cta { margin: 16px auto 20px; font-size: var(--fs-btn); }
}
@media (max-width: 767px) {
  .site-header__inner { padding: 3% 4%; }
  .site-header__logo { max-width: 140px; }
  .site-header__logo img { height: 50px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 90vh;
  background: var(--cream) var(--pattern) center / cover no-repeat;
}
.hero__box {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  width: 96%;
  min-height: 78vh;
  padding: 8% 5%;
  border-radius: 0 0 var(--radius) var(--radius);
  background: center / cover no-repeat;
  overflow: hidden;
}
.hero__box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.31) 0%, #000 100%);
  opacity: 0.5;
}
.hero__banner-wrap { width: 100%; padding: 10px; }
.hero__banner {
  margin: 0;
  padding: 20px 15px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--dark);
  font-family: var(--f-sge);
  font-size: clamp(1.2rem, 0.825rem + 1.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-2deg);
}
.hero__left { flex: 0 0 auto; width: 46.081%; padding: 10px; }
.hero__title {
  width: 76.297%;
  max-width: 76.297%;
  font-family: var(--f-sge);
  font-size: clamp(3rem, 1.125rem + 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--cream);
}
.hero__right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  width: 47.896%;
  padding: 10px;
}
.hero__text {
  width: 91.768%;
  font-family: var(--f-sge);
  font-size: var(--fs-sub);
  line-height: 1.2;
  text-align: center;
  color: var(--cream);
}
.hero__date,
.hero__place {
  margin: 0;
  padding: 5px 15px;
  border-radius: 8px;
  font-family: var(--f-sge);
  font-size: clamp(1.2rem, 0.825rem + 1.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
}
.hero__date { background: var(--orange); color: var(--cream); text-transform: uppercase; }
.hero__place { background: var(--lime); color: var(--dark); transform: rotate(-2deg); }
.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 10px;
}

@media (max-width: 1024px) {
  .hero { min-height: 94vh; }
  .hero__box { flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 40px; width: 94%; min-height: 85vh; }
  .hero__left, .hero__right { width: 100%; align-items: center; }
  .hero__title { margin: 0 auto; text-align: center; }
  .hero__text { width: 100%; }
}
@media (max-width: 767px) {
  .hero__box { width: 94%; min-height: 90vh; padding: 12% 0 14%; }
  .hero__banner { padding: 8px 8px 5px; }
  .hero__title { width: 80%; max-width: 80%; }
  .hero__place { padding: 8px 8px 5px; text-align: center; }
}

/* ==========================================================================
   Video
   ========================================================================== */

.video-section {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  padding: 8% 5%;
  background-position: 0 83px;
  background-repeat: no-repeat;
  background-size: cover;
}
.video-section__box {
  position: relative;
  width: 100%;
  min-height: 60vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: center / cover no-repeat;
  container-type: size;
  isolation: isolate;
}
.video-section__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.video-section__media--yt { overflow: hidden; }
.video-section__media--yt iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  /* Centrato, poi ingrandito per nascondere titolo e logo del player YouTube.
     Lo zoom va dentro transform, dopo translate: con la proprietà "scale"
     separata anche lo spostamento veniva ingrandito e il video finiva decentrato. */
  --yt-zoom: 1.35;
  transform: translate(-50%, -50%) scale(var(--yt-zoom));
  border: 0;
  opacity: 0;
  transition: opacity 0.6s;
}
.video-section__media--yt.is-playing iframe { opacity: 1; }

/* Pulsante pausa/play */
.video-section__toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(52, 66, 49, 0.75);
  color: var(--cream);
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background-color 0.3s, color 0.3s;
}
.video-section__toggle[hidden] { display: none; }
.video-section__toggle:hover { background: var(--lime); color: var(--dark); }
.video-section__toggle:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.video-section__icon { width: 22px; height: 22px; fill: currentColor; }
.video-section__icon--play,
.video-section__toggle.is-paused .video-section__icon--pause { display: none; }
.video-section__toggle.is-paused .video-section__icon--play { display: block; }

/* Tablet e telefono: il riquadro prende le proporzioni del video (16:9),
   così si vede tutta l'inquadratura invece di una fetta centrale. */
@media (max-width: 1024px) {
  .video-section { min-height: 0; padding: 14% 5%; background-position: 0 621px; background-size: contain; }
  .video-section__box { min-height: 0; aspect-ratio: 16 / 9; }
  /* basta un ingrandimento minore per nascondere titolo e logo di YouTube */
  .video-section__media--yt iframe { --yt-zoom: 1.2; }
}
@media (max-width: 767px) {
  .video-section { padding: 14% 5%; background-position: 0 646px; background-size: 408px auto; }
  .video-section__box { border-radius: 16px; }
  .video-section__toggle { right: 12px; bottom: 12px; width: 40px; height: 40px; }
  .video-section__icon { width: 18px; height: 18px; }
}

/* ==========================================================================
   Scritta scorrevole (parallasse orizzontale)
   ========================================================================== */

.marquee {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 2% 0;
  overflow: hidden;
}
.marquee__line {
  margin: 0;
  white-space: nowrap;
  font-family: var(--f-sge);
  font-weight: 600;
  line-height: 1.2;
  transform: translateX(calc(var(--base, 0px) + var(--shift, 0px)));
  will-change: transform;
}
.marquee__line--orange {
  align-self: flex-start;
  --base: 378px;
  color: var(--orange);
  font-size: clamp(1.6rem, -2.025rem + 11.6vw, 4.5rem);
}
.marquee__line--dark {
  --base: 171px;
  color: var(--dark);
  font-size: clamp(2rem, -1.125rem + 10vw, 4.5rem);
}
@media (max-width: 1024px) { .marquee { display: none; } }

/* ==========================================================================
   Programma: aree + giorni + PDF (sfondo sfumato unico)
   ========================================================================== */

.programma-wrap {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 10% 8% 8%;
  background: linear-gradient(180deg, var(--cream) 0%, var(--peach) 100%);
}

.programma__head { display: flex; flex-direction: column; gap: 20px; }
.programma__kicker {
  margin: 0;
  font-family: var(--f-prox);
  font-size: var(--fs-kicker);
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
}
.programma__kicker strong { font-weight: 700; }
.programma__title-row { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 10px; }
.programma__title {
  font-family: var(--f-averia);
  font-size: clamp(2.2rem, 1.45rem + 2.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  text-align: center;
}
.programma__sun { width: 50px; height: 50px; color: var(--orange); }

.areas { display: flex; flex-direction: column; gap: 70px; margin-top: 80px; }
.areas__row,
.day {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 46%));
  justify-content: center;
  column-gap: 60px;
  align-items: start;
}
.areas__items { display: flex; flex-direction: column; gap: 60px; padding-top: 1%; }

.area { display: flex; gap: 40px; }
.area__icon,
.day__icon { flex: 0 0 auto; width: 40px; padding-top: 1%; color: var(--orange); font-size: 36px; display: flex; justify-content: center; }
.area__icon .r-icon,
.day__icon .r-icon { width: auto; height: 1em; }
.area__body { flex: 1; min-width: 0; }
.area__title {
  font-family: var(--f-sge);
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.2;
}
.area__subtitle {
  margin: 1px 0 0;
  font-family: var(--f-prox);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  color: var(--orange);
}
.area__text,
.day__text {
  font-family: var(--f-prox);
  font-size: var(--fs-text);
  line-height: 1.4;
}
.areas__note {
  margin: 0;
  padding-top: 3%;
  font-family: var(--f-sge);
  font-size: var(--fs-btn);
  line-height: 1.2;
  text-align: center;
  color: var(--orange);
}

/* Tre giorni */
.days { display: flex; flex-direction: column; gap: 80px; }
.days__title {
  font-family: var(--f-averia);
  font-size: var(--fs-secondary);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: -40px;
  padding-left: calc(4% + 0px);
}
.day__content { display: flex; gap: 20px; padding-left: 6%; }
.day__body { padding: 10px; }
.day__label {
  margin: 0;
  font-family: var(--f-sge);
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.2;
}
.day__title {
  font-family: var(--f-averia);
  font-size: clamp(2.2rem, 1.45rem + 2.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--orange);
}
.day__card figcaption { padding-bottom: 8px; }

/* PDF */
.program-cta { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.program-cta__title {
  font-family: var(--f-sge);
  font-size: var(--fs-sub);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}
.program-cta__text { font-size: var(--fs-text); line-height: 1.4; }
.program-cta__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

@media (max-width: 1024px) {
  .programma-wrap { padding: 15% 8%; }
  .programma__title { max-width: 59%; }
  .areas__row, .day { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  /* Tablet: foto e testi sulla stessa larghezza, allineati ai bordi delle foto. */
  .areas__row .r-card, .day__card { width: 100%; }
  .area__icon, .day__icon { justify-content: flex-start; }
  .day__content { padding-left: 0; }
  .days__title { margin-bottom: 0; padding-left: 0; }
}
@media (max-width: 767px) {
  .programma-wrap { padding: 10% 8%; gap: 60px; }
  .programma__title-row { flex-direction: column; }
  .programma__title { max-width: 100%; }
  .programma__sun { width: 30px; height: 30px; }
  .areas { margin-top: 40px; gap: 60px; }
  .areas__items { gap: 40px; }
  .area { gap: 20px; }
  .area__icon, .day__icon { width: 30px; font-size: 30px; }
  .days { gap: 60px; }
}

/* ==========================================================================
   Tutti i modi
   ========================================================================== */

.modes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 90vh;
  padding: clamp(60px, 7vw, 110px) 4% 5%;
}
.modes__head { text-align: center; }
.modes__head .r-kicker { padding: 0 15%; }
.modes__grid { display: flex; flex-direction: column; gap: 40px; margin-top: clamp(40px, 5vw, 80px); }
.modes__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 0; padding: 0 3%; }
.mode { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mode__icon { width: 20%; margin-bottom: 20px; }
.mode__icon img { width: 100%; height: auto; }
.mode__title {
  font-family: var(--f-sge);
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.2;
  padding-bottom: 1%;
}
.mode__text {
  margin: 20px 0 0;
  padding: 0 8%;
  font-size: var(--fs-text);
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .modes { min-height: 100vh; padding: 14% 6%; }
  .modes__head .r-kicker { padding: 0; }
  .modes__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .mode__icon { width: 16%; }
}
@media (max-width: 767px) {
  .modes__row { grid-template-columns: minmax(0, 1fr); padding: 10% 3% 0; gap: 40px; }
  .modes__grid { gap: 0; }
  .mode__icon { width: 20%; }
  .mode__text { margin-top: 12px; }
}

/* ==========================================================================
   Galleria a scorrimento
   ========================================================================== */

.gallery { display: flex; flex-direction: column; gap: 20px; padding: 20px 0; overflow: hidden; }
.gallery__row { overflow: hidden; }
.gallery__track {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  width: max-content;
  animation: rayana-marquee var(--duration, 60s) linear infinite;
}
.gallery__row:hover .gallery__track { animation-play-state: paused; }
.gallery__item { flex: 0 0 auto; width: calc((100vw - 80px) / 5); }
.gallery__item img { width: 100%; height: 300px; object-fit: cover; border-radius: 10px; }
@keyframes rayana-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 10px)); }
}
@media (max-width: 1024px) { .gallery__item { width: calc((100vw - 40px) / 3); } .gallery__item img { height: 260px; } }
@media (max-width: 767px) { .gallery__item { width: calc((100vw - 20px) / 1.6); } .gallery__item img { height: 220px; } }
@media (prefers-reduced-motion: reduce) { .gallery__track { animation-duration: 240s; } }

/* ==========================================================================
   Perché partecipare
   ========================================================================== */

.why {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 75vh;
  padding: 1% 10%;
  overflow: hidden;
  background: var(--dark);
}
.why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--decor) center / cover no-repeat;
  opacity: 0.5;
}
.why__content { display: flex; flex-direction: column; justify-content: center; gap: 60px; width: 50%; padding: 10px; }
.why__intro { display: flex; flex-direction: column; gap: 20px; }
.why__title {
  width: 80%;
  font-family: var(--f-averia);
  font-size: var(--fs-primary);
  font-weight: 600;
  line-height: 1;
  color: var(--cream);
}
.why__title span { color: var(--peach); }
.why__text { width: 80%; font-size: var(--fs-text); line-height: 1.4; color: var(--cream); }
.why__highlight {
  margin: 0;
  font-family: var(--f-sge);
  font-size: var(--fs-btn);
  line-height: 1.2;
  color: var(--lime);
}
.why__media { display: flex; flex-direction: column; justify-content: center; width: 50%; padding: 10px 5% 10px 10px; }
.why__image { position: relative; z-index: 1; transform: translateY(122px); }
.why__image img { width: 100%; }

@media (max-width: 1024px) {
  .why { flex-direction: column; padding: 2% 10% 15%; }
  .why::before { background-position: top right; background-size: 1000px auto; opacity: 1; }
  .why__content, .why__media { width: 100%; }
  .why__media { order: -1; padding: 40px 0 0; }
  .why__image { transform: none; }
}
@media (max-width: 767px) {
  .why { padding: 7% 10% 20%; }
  .why::before { opacity: 0.6; }
  .why__title, .why__text { width: 100%; }
  .why__content { gap: 40px; padding: 30px 0 0; }
}

/* ==========================================================================
   Insegnanti
   ========================================================================== */

.teachers { padding: 8% 6% 8%; }
.teachers__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 20px; margin-bottom: 2%; }
.teachers__intro, .teachers__text { width: 48%; }
.teachers .r-kicker { text-transform: uppercase; }
.teachers .r-title { line-height: 1; margin-top: 20px; }
.teachers__text { font-size: var(--fs-text); line-height: 1.4; }

.r-carousel { position: relative; padding-bottom: 38px; margin-top: 40px; }
.r-carousel__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.r-carousel__viewport::-webkit-scrollbar { display: none; }
.r-carousel__track { display: flex; gap: 10px; list-style: none; }
.teacher {
  position: relative;
  isolation: isolate;
  flex: 0 0 calc((100% - 20px) / 3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 50vh;
  padding: 6%;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--green) center / cover no-repeat;
}
.teacher::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, #000 50%);
  opacity: 0.6;
}
.teacher__name {
  font-family: var(--f-averia);
  font-size: var(--fs-accent);
  font-weight: 700;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 20px;
}
.teacher__bio { margin: 0; font-size: 16px; line-height: 1.2; color: var(--cream); }

.r-carousel__arrow {
  position: absolute;
  top: calc(50% - 19px);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dark);
  font-size: 25px;
  cursor: pointer;
  transition: color 0.3s;
}
.r-carousel__arrow:hover { color: var(--orange); }
.r-carousel__arrow--prev { left: -41px; }
.r-carousel__arrow--next { right: -41px; }
.r-carousel__dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 12px; }
.r-carousel__dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: var(--dark); opacity: 0.25; cursor: pointer; transition: opacity 0.3s;
}
.r-carousel__dots button[aria-current="true"] { opacity: 1; }

@media (max-width: 1024px) {
  .teachers { padding: 15% 8% 5%; }
  .teachers__intro, .teachers__text { width: 100%; }
  .teacher { flex-basis: 100%; }
  .r-carousel__arrow--prev { left: -36px; }
  .r-carousel__arrow--next { right: -36px; }
}
@media (max-width: 767px) {
  .teachers { padding: 20% 8% 12%; }
  .r-carousel { padding-bottom: 24px; }
  .r-carousel__arrow { display: none; }
}

/* ==========================================================================
   Info utili — schede impilate
   ========================================================================== */

.info { padding: 6% 6% 8%; background: var(--orange); }
.info__head { display: flex; flex-direction: column; align-items: center; padding-bottom: 1%; text-align: center; }
/* Menu della sezione: resta in alto mentre le schede scorrono. */
.info__nav {
  position: sticky;
  top: var(--sticky-top);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 40px;
  padding: 18px 0;
  background: var(--orange);
}
/* Voci a pulsante: si capisce che sono cliccabili */
.info__nav a {
  flex: none;
  padding: 10px 26px;
  border: 2px solid var(--cream);
  border-radius: 50px;
  font-family: var(--f-sge);
  font-size: var(--fs-btn);
  line-height: 1.2;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
@media (hover: hover) {
  .info__nav a:hover { background: var(--cream); color: var(--orange); }
}
.info__nav a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.info__nav a.is-active,
.info__nav a.is-active:hover { background: var(--lime); border-color: var(--lime); color: var(--dark); }

.info__stack { display: flex; flex-direction: column; align-items: center; }
.info-card {
  position: sticky;
  --top0: calc(var(--sticky-top) + var(--info-nav-h, 64px) + 16px);
  --step: 50px;
  top: calc(var(--top0) + var(--i) * var(--step));
  z-index: calc(var(--i) + 1);
  display: flex;
  align-items: center;
  gap: 60px;
  width: 90%;
  min-height: 50vh;
  padding: 60px 80px;
  border-radius: 25px;
  scroll-margin-top: calc(var(--top0) + var(--i) * var(--step));
}
/* Spazio finale sul contenitore (non sull'ultima scheda): così, a fine
   pila, le schede salgono insieme e quella sotto non spunta fuori. */
.info__stack { padding-bottom: 40px; }
/* Margini compensati: le schede arrivano a fine pila tutte insieme e
   salgono come un blocco unico, mantenendo le linguette da 50px. */
.info-card { margin-bottom: calc((var(--n, 1) - 1 - var(--i)) * var(--step)); }
.info-card + .info-card { margin-top: calc(40px - (var(--n, 1) - var(--i)) * var(--step)); }
.info-card__body { flex: 3 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 50vh; }
.info-card__media { flex: 2 1 0; align-self: stretch; min-height: 50vh; border-radius: 25px; background: center / cover no-repeat; }
.info-card__title {
  margin-bottom: 20px;
  font-family: var(--f-sge);
  font-size: var(--fs-secondary);
  font-weight: 600;
  line-height: 1.4;
}
.info-card__text { font-size: var(--fs-text); line-height: 1.4; }
.info-card__text ul { padding-left: 1.2em; }
.info-card__text strong { font-weight: 700; }
.info-card__text a { text-decoration: underline; }
.info-card__note { margin-top: 20px; font-size: var(--fs-small); line-height: 1.2; color: var(--orange); }
.info-card__note p { margin-bottom: 0.9rem; }
.info-card__prices { list-style: none; margin-top: 20px; }
.info-card__prices li + li { margin-top: 20px; }
.info-card__price-row { display: flex; align-items: center; gap: 10px; }
.info-card__price-name,
.info-card__price-value {
  font-family: var(--f-prox);
  font-size: var(--fs-kicker);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--peach);
}
.info-card__price-value { flex: none; white-space: nowrap; }
.info-card__price-sep { flex: 1; border-bottom: 2px dotted currentColor; opacity: 0.6; color: var(--peach); margin: 0 4px; }
.info-card__price-desc { margin: 6px 0 0; font-size: var(--fs-small); line-height: 1.2; color: var(--lime); }
.info-card__footnote { margin: 20px 0 0; font-size: var(--fs-text); color: var(--cream); }
.info-card__btn { margin-top: 20px; }

/* Stile "Perché partecipare" */
.info-card__kicker { margin-bottom: 14px; color: inherit; }
.info-card__title span { display: inline; color: var(--peach); }
.info-card__highlight { margin: 28px 0 0; font-family: var(--f-sge); font-size: var(--fs-btn); line-height: 1.2; color: var(--lime); }
.info-card--why { isolation: isolate; overflow: hidden; }
.info-card--why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--decor) right -40px center / auto 110% no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
.info-card--why .info-card__kicker { color: var(--cream); }
.info-card--why .info-card__title {
  margin-bottom: 24px;
  font-family: var(--f-averia);
  font-size: var(--fs-primary);
  font-weight: 600;
  line-height: 1.4;
  color: var(--cream);
}
.info-card--why .info-card__text { color: var(--cream); }
.info-card--cream .info-card__title span,
.info-card--lime .info-card__title span { color: var(--orange); }
.info-card--cream .info-card__highlight,
.info-card--lime .info-card__highlight { color: var(--green); }

/* Schemi colore */
.info-card--cream { background: var(--cream); color: var(--dark); }
.info-card--cream .info-card__text a:hover { color: var(--green); }
/* Sul fondo crema il pulsante crema non si vedrebbe: diventa verde scuro. */
.info-card--cream .r-btn--cream { background: var(--dark); color: var(--lime); }
.info-card--cream .r-btn--cream:hover,
.info-card--cream .r-btn--cream:focus-visible { background: var(--lime); color: var(--dark); }
.info-card--green { background: var(--green); color: var(--white); }
.info-card--green .info-card__title { color: var(--cream); }
.info-card--green .info-card__text a { color: var(--peach); }
.info-card--lime { background: var(--lime); color: var(--dark); }
.info-card--dark { background: var(--dark); color: var(--white); }
.info-card--dark .info-card__title { color: var(--cream); }
.info-card--dark .info-card__text a { color: var(--lime); }
.info-card--orange { background: var(--orange); color: var(--white); box-shadow: 0 0 0 2px var(--cream) inset; }
.info-card--orange .info-card__title { color: var(--cream); }
.info-card--orange .info-card__note { color: var(--lime); }

@media (max-width: 1024px) {
  /* Tablet: quattro pulsanti uguali su una riga, il testo lungo va a capo */
  .info__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; padding: 14px 0; }
  .info__nav a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 12px; font-size: clamp(0.8rem, 0.45rem + 0.7vw, 1rem); line-height: 1.15; text-align: center; white-space: normal; }
  /* Tablet: ogni scheda occupa tutto lo schermo visibile (sotto header e
     menu della sezione), così mentre si impilano non se ne perde nessun pezzo. */
  .info-card {
    --top0: calc(var(--sticky-top) + var(--info-nav-h, 56px) + 8px);
    --step: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    width: 100%;
    height: calc(100svh - var(--top0) - 12px - (var(--n, 1) - 1) * var(--step));
    min-height: 0;
    padding: 48px 40px 40px;
  }
  .info-card__body { flex: none; min-height: 0; }
  .info-card__media { flex: 1 1 auto; min-height: 0; }
}
.info__stack--flow { padding-bottom: 0; }
.info__stack--flow .info-card { position: relative; top: auto; height: auto; margin: 0; }
.info__stack--flow .info-card + .info-card { margin-top: 24px; }
@media (max-width: 1024px) {
  .info__stack--flow .info-card__media { flex: none; min-height: 40vh; }
}
@media (max-width: 767px) {
  .info { padding: 15% 4%; }
  /* Telefono: tutte le voci visibili, in una griglia di pulsanti compatti. */
  .info__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 0;
    overflow: visible;
  }
  .info__nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 10px;
    border: 2px solid var(--cream);
    border-radius: 30px;
    font-size: 0.78rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }
  .info-card { scroll-margin-top: calc(var(--sticky-top) + var(--info-nav-h, 48px) + 12px); }
  .info-card { position: relative; top: auto; width: 100%; height: auto; padding: 40px 20px 20px; }
  .info__stack { padding-bottom: 0; }
  .info-card { margin-bottom: 0; }
  .info-card + .info-card { margin-top: 20px; }
  .info-card__media { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .info-card__title { line-height: 1.2; }
}

/* ==========================================================================
   Chiusura
   ========================================================================== */

.final-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 0 0;
  background-repeat: repeat;
}
.final-cta__box {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 90%;
  min-height: 60vh;
  padding: 10px;
  border-radius: var(--radius);
  overflow: hidden;
  background: center / cover no-repeat;
}
.final-cta__box::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: 0.4; }
.final-cta__content { display: flex; flex-direction: column; }
.final-cta__title {
  margin: 0;
  font-family: var(--f-averia);
  font-size: var(--fs-primary);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--cream);
}
.final-cta__title-row { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 10px; }
.final-cta__sun { width: 50px; height: 50px; color: var(--orange); }
.final-cta__text { margin: 10px 0 20px; padding: 0 10px; font-size: var(--fs-text); line-height: 1.4; color: var(--cream); }
.final-cta__claim {
  margin: 0;
  font-family: var(--f-averia);
  font-size: var(--fs-primary);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--orange);
}
.final-cta__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 2% 10px 10px; }

@media (max-width: 767px) {
  .final-cta { padding: 0 4%; }
  .final-cta__box { width: 100%; padding: 40px 10px; }
  .final-cta__sun { width: 20px; height: 20px; }
  .final-cta__title-row { gap: 8px; }
}

/* ==========================================================================
   Partner — loghi piccoli, stessa altezza, allineati
   ========================================================================== */

.partners { background: var(--green); padding: 48px 6% 52px; }
.partners__inner { display: flex; flex-direction: column; gap: 36px; max-width: 1140px; margin: 0 auto; }
.partners__title {
  margin: 0 0 24px;
  font-family: var(--f-averia);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--cream);
}
.partners__list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
  margin: 0 auto;
  list-style: none;
}
/* Tutti i loghi su una riga: si restringono insieme, stessa altezza. */
.partners__item { flex: 0 1 130px; min-width: 0; display: flex; align-items: center; justify-content: center; height: 56px; }
.partners__item a { display: flex; height: 100%; align-items: center; }
.partners__item img {
  width: auto;
  height: 48px;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.3s;
}
.partners__item:hover img { opacity: 1; }
.partners__group--title .partners__item { flex-basis: 260px; height: 90px; }
.partners__group--title .partners__item img { height: 90px; }

@media (max-width: 767px) {
  .partners { padding: 40px 8%; }
  .partners__list { flex-wrap: wrap; gap: 24px 28px; }
  .partners__item { flex: 0 0 calc(25% - 21px); height: 44px; }
  .partners__item img { height: 40px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--orange); color: var(--cream); }
.site-footer__inner { padding: 56px 6% 32px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 40px 56px;
  align-items: start;
}
.site-footer__title {
  margin: 0 0 16px;
  font-family: var(--f-sge);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--cream);
}
.site-footer__title a { color: var(--dark); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__text,
.site-footer__contacts,
.site-footer__links { font-family: var(--f-prox); font-size: 1rem; line-height: 1.6; }
.site-footer__contacts,
.site-footer__links { list-style: none; }
.site-footer__contacts li + li,
.site-footer__links li + li { margin-top: 6px; }
.site-footer__contacts span { display: inline-block; min-width: 64px; font-weight: 700; }
.site-footer a { transition: color 0.3s; }
.site-footer__contacts a,
.site-footer__links a { color: var(--cream); text-decoration: none; }
.site-footer__contacts a:hover,
.site-footer__links a:hover { color: var(--dark); }

.r-social { display: flex; gap: 8px; list-style: none; margin-top: 20px; }
.r-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--cream);
  font-size: 18px;
  transition: background-color 0.3s, color 0.3s;
}
.r-social a:hover { background: var(--lime); color: var(--dark); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(240, 238, 233, 0.35);
}
.site-footer__legal { margin: 0; font-size: 0.8rem; line-height: 1.5; }
.site-footer__copy { margin: 0; font-family: var(--f-sge); font-size: 0.85rem; color: var(--dark); }
.site-footer__copy a { color: var(--dark); text-decoration: none; }
.site-footer__copy a:hover { text-decoration: underline; }
.site-footer__disclaimer { margin: 20px 0 0; font-size: 0.72rem; line-height: 1.5; opacity: 0.85; }

@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__col--org { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .site-footer__inner { padding: 44px 8% 28px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Modal "iscrizioni chiuse"
   ========================================================================== */

.reg-modal {
  width: min(920px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: transparent;
  color: var(--dark);
  overflow: visible;
}
.reg-modal::backdrop {
  background: rgba(52, 66, 49, 0.72);
  backdrop-filter: blur(4px);
}
.reg-modal[open] { animation: rayana-zoomIn 0.6s both; }
.reg-modal[open]::backdrop { animation: rayana-fadeIn 0.4s both; }

.reg-modal__card {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 3fr;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 25px;
  background: var(--cream);
}
.reg-modal__media {
  position: relative;
  min-height: 100%;
  background: var(--orange) center / cover no-repeat;
}
.reg-modal__sun {
  position: absolute;
  right: -28px;
  bottom: 28px;
  width: 72px;
  height: 72px;
  color: var(--orange);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}
.reg-modal__body { padding: 56px 56px 48px 64px; }
.reg-modal__kicker {
  margin: 0 0 10px;
  font-family: var(--f-prox);
  font-size: var(--fs-kicker);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--orange);
}
.reg-modal__title {
  margin-bottom: 16px;
  font-family: var(--f-averia);
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--dark);
}
.reg-modal__text { font-size: var(--fs-text); line-height: 1.4; }
.reg-modal__text a { color: var(--orange); }
.reg-modal__date {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin: 24px 0 0;
  padding: 10px 18px 12px;
  border-radius: 8px;
  background: var(--lime);
  transform: rotate(-2deg);
}
.reg-modal__date-label {
  font-family: var(--f-prox);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark);
}
.reg-modal__date-value {
  font-family: var(--f-sge);
  font-size: clamp(1.2rem, 0.825rem + 1.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--dark);
}
.reg-modal__note { margin: 20px 0 0; font-size: var(--fs-small); color: var(--green); }
.reg-modal__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.reg-modal__dismiss {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--f-sge);
  font-size: var(--fs-btn);
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.reg-modal__dismiss:hover { color: var(--orange); }
.reg-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: var(--lime);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.reg-modal__close:hover { background: var(--lime); color: var(--dark); }
html.reg-modal-open { overflow: hidden; }

@media (max-width: 767px) {
  .reg-modal__card { grid-template-columns: 1fr; }
  .reg-modal__media { min-height: 160px; }
  .reg-modal__sun { right: auto; left: 24px; bottom: -30px; width: 60px; height: 60px; }
  .reg-modal__body { padding: 44px 24px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .reg-modal[open], .reg-modal[open]::backdrop { animation: none; }
}

/* ==========================================================================
   Scheda insegnante (pulsante "i" + finestra con CV e link)
   ========================================================================== */

.r-info {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--orange);
  font-size: 22px;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s;
}
.r-info:hover { transform: scale(1.12); color: var(--dark); }
.r-info--light { color: var(--lime); }
.r-info--light:hover { color: var(--cream); }
.teacher__role { margin: -12px 0 12px; font-size: 0.95rem; color: var(--peach); }

.t-modal {
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: transparent;
  color: var(--dark);
  overflow: visible;
}
.t-modal::backdrop { background: rgba(52, 66, 49, 0.72); backdrop-filter: blur(4px); }
.t-modal[open] { animation: rayana-fadeInUp 0.5s both; }
.t-modal__card { position: relative; max-height: calc(100dvh - 32px); overflow: auto; padding: 44px 44px 40px; border-radius: 25px; background: var(--cream); }
.t-modal__head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; padding-right: 48px; }
.t-modal__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 96px; }
.t-modal__name { font-family: var(--f-averia); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); font-weight: 600; line-height: 1.1; color: var(--dark); }
.t-modal__role { margin: 6px 0 0; font-family: var(--f-prox); font-weight: 700; color: var(--orange); }
.t-modal__cv { font-size: var(--fs-text); line-height: 1.5; }
.t-modal__cv a { color: var(--orange); }
.t-modal__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; list-style: none; }
.t-modal__links a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--dark); color: var(--cream); font-size: 18px; transition: background-color 0.3s, color 0.3s;
}
.t-modal__links a:hover { background: var(--lime); color: var(--dark); }
.t-modal__filter { margin-top: 24px; }
@media (max-width: 767px) {
  .t-modal__card { padding: 36px 22px 28px; }
  .t-modal__head { flex-direction: column; align-items: flex-start; padding-right: 40px; }
}
@media (prefers-reduced-motion: reduce) { .t-modal[open] { animation: none; } }

/* ==========================================================================
   Pagine interne
   ========================================================================== */

.page-content { padding: 80px 24px; min-height: 50vh; }
.page-content__title { font-family: var(--f-averia); font-size: var(--fs-section); color: var(--orange); margin-bottom: 24px; }
.entry-content { font-size: var(--fs-text); line-height: 1.6; }
.entry-content a { color: var(--orange); }

/* ==========================================================================
   Animazioni d'ingresso (identiche a Elementor: durata 1.25s)
   ========================================================================== */

.js [data-anim] { opacity: 0; }
.js [data-anim].is-animated {
  opacity: 1;
  animation-duration: 1.25s;
  animation-fill-mode: both;
  animation-delay: var(--anim-delay, 0ms);
}
.js [data-anim="fadeIn"].is-animated { animation-name: rayana-fadeIn; }
.js [data-anim="fadeInUp"].is-animated { animation-name: rayana-fadeInUp; }
.js [data-anim="zoomIn"].is-animated { animation-name: rayana-zoomIn; }

@keyframes rayana-fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Spostamento fisso, non "100%": su un blocco alto (es. le FAQ) il 100% lo
   spingeva sotto il footer finché l'animazione non partiva, e la pagina
   mostrava uno spazio vuoto dopo il footer. */
@keyframes rayana-fadeInUp {
  from { opacity: 0; transform: translate3d(0, 60px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes rayana-zoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; }
  .js [data-anim].is-animated { animation: none; }
}

/* ---------- FAQ (gruppi → domande) ---------- */
.faq { display: grid; gap: 14px; max-width: 1000px; margin-top: 28px; }
.faq__group { border: 2px solid var(--peach); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.faq__group-head,
.faq__item-head {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.faq__group-head::-webkit-details-marker,
.faq__item-head::-webkit-details-marker { display: none; }
.faq__group-head { padding: 18px 24px; background: var(--peach); font: 400 clamp(1rem, 0.9rem + 0.4vw, 1.15rem)/1.3 var(--f-sge); color: var(--dark); }
.faq__group-head:hover,
.faq__group-head:focus-visible { background: var(--orange); color: var(--cream); }
.faq__group-body { display: grid; gap: 10px; padding: 14px; }
.faq__group-body > .faq__text { padding: 8px 12px 4px; }
.faq__item { border: 2px solid var(--cream); border-radius: 14px; overflow: hidden; }
.faq__item-head { padding: 15px 20px; background: var(--cream); font-size: var(--fs-small); font-weight: 700; line-height: 1.3; color: var(--dark); }
.faq__item-head:hover,
.faq__item-head:focus-visible { background: var(--dark); color: var(--lime); }
.faq__item > .faq__text { padding: 18px 22px 22px; }

/* + / − */
.faq__sign { position: relative; flex: none; width: 14px; height: 14px; }
.faq__sign::before,
.faq__sign::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s; }
.faq__sign::after { transform: rotate(90deg); }
details[open] > summary > .faq__sign::after { transform: rotate(0); }

.faq__text { color: var(--green); font-size: var(--fs-text); line-height: 1.55; }
.faq__text > :first-child { margin-top: 0; }
.faq__text > :last-child { margin-bottom: 0; }
.faq__text h3 { margin: 26px 0 10px; font: 400 clamp(1.15rem, 1rem + 0.6vw, 1.4rem)/1.25 var(--f-sge); color: var(--green); }
.faq__text h4 { margin: 18px 0 6px; font-size: 1.05em; font-weight: 700; color: var(--green); }
.faq__text h3:first-child,
.faq__text h4:first-child { margin-top: 0; }
.faq__text p { margin: 0 0 12px; }
.faq__text ul { margin: 0 0 12px; padding-left: 1.2em; }
.faq__text li + li { margin-top: 4px; }
.faq__text a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.faq__text a:hover { color: var(--dark); }
.faq__actions { margin: 28px 0 0 !important; text-align: center; }

@media (max-width: 767px) {
  .faq__group-head { padding: 16px 18px; }
  .faq__group-body { padding: 10px; }
  .faq__item-head { padding: 14px 16px; }
  .faq__item > .faq__text { padding: 16px; }
  .faq__group-body > .faq__text { padding: 6px 8px 2px; }
}
@media print { .faq { display: none; } }

/* ==========================================================================
   FAQ in homepage (al posto della foto finale)
   ========================================================================== */

.home-faq { display: flex; justify-content: center; padding: 6% 0; background-repeat: repeat; scroll-margin-top: var(--header-h); }
.home-faq__box { width: 90%; padding: clamp(32px, 5vw, 70px) clamp(20px, 6vw, 90px); border-radius: var(--radius); background: var(--cream); }
.home-faq__head { text-align: center; }
.home-faq__head .r-title { line-height: 1.2; }
.home-faq .faq { margin: 28px auto 0; }
@media (max-width: 767px) {
  .home-faq { padding: 12% 4%; }
  .home-faq__box { width: 100%; }
}

/* ==========================================================================
   Pass — sezione prezzi dopo il programma (impostazione di "Perché partecipare")
   ========================================================================== */

.pass {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 6%;
  min-height: 75vh;
  padding: 7% 10%;
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
  scroll-margin-top: var(--sticky-top);
}
.pass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--decor) center / cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
.pass--green { background: var(--green); }
.pass--orange { background: var(--orange); }
.pass--cream { background: var(--cream); color: var(--dark); }
.pass--lime { background: var(--lime); color: var(--dark); }
.pass__content { flex: 1 1 55%; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pass .r-kicker { color: var(--cream); }
.pass__title {
  margin: 0;
  font-family: var(--f-averia);
  font-size: var(--fs-primary);
  font-weight: 600;
  line-height: 1.4;
  color: var(--cream);
}
.pass__title span { color: var(--peach); }
.pass__text { max-width: 620px; font-size: var(--fs-text); line-height: 1.4; }
.pass__highlight { margin: 0; font-family: var(--f-sge); font-size: var(--fs-btn); line-height: 1.2; color: var(--lime); }
.pass__note { max-width: 620px; font-size: var(--fs-small); line-height: 1.3; color: var(--peach); }
.pass__note p { margin: 0 0 6px; }
.pass__prices { max-width: 620px; padding-top: 24px; border-top: 1px solid rgba(240, 238, 233, 0.3); }
.pass__prices .info-card__prices { margin-top: 0; }
.pass__footnote { margin: 20px 0 0; font-size: var(--fs-text); }
.pass__btn { margin-top: 8px; }
.pass__media { flex: 1 1 40%; min-width: 0; }
.pass__image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 25px; }
/* Schemi chiari: testi scuri, prezzi arancio */
.pass--cream .r-kicker, .pass--lime .r-kicker,
.pass--cream .pass__title, .pass--lime .pass__title { color: var(--dark); }
.pass--cream .pass__title span, .pass--lime .pass__title span,
.pass--cream .info-card__price-name, .pass--cream .info-card__price-value, .pass--cream .info-card__price-sep,
.pass--lime .info-card__price-name, .pass--lime .info-card__price-value, .pass--lime .info-card__price-sep,
.pass--cream .pass__note, .pass--lime .pass__note { color: var(--orange); }
.pass--cream .info-card__price-desc, .pass--lime .info-card__price-desc,
.pass--cream .pass__highlight, .pass--lime .pass__highlight { color: var(--green); }
.pass--cream .pass__prices, .pass--lime .pass__prices { border-color: rgba(52, 66, 49, 0.25); }
.pass--orange .pass__title span, .pass--orange .pass__note { color: var(--lime); }

@media (max-width: 1024px) {
  .pass { flex-direction: column; align-items: stretch; gap: 40px; padding: 12% 8%; }
  .pass::before { background-position: top right; background-size: 1000px auto; }
  .pass__media { width: 100%; max-width: 520px; align-self: center; }
  .pass__image { aspect-ratio: 1 / 1; object-position: center 30%; }
}
@media (max-width: 767px) {
  .pass { padding: 15% 6%; }
  .pass__image { aspect-ratio: 4 / 5; }
}
