/* ==== THEME Free Harmony Dance Time ==== */
:root {
  /* Brand palette */
  --fh-navy-700: #00457F;
  --fh-primary-500: #2F8EE0;
  --fh-primary-600: #2778BE;
  --fh-neutral-0: #EDF5FA;
  --fh-accent-500: #FFA723;
  --fh-accent-600: #EC6206;
  --fh-accent-700: #BC4E04;

  --fh-text: var(--fh-navy-700);
  --fh-text-muted: rgba(0,0,0,.65);
  --fh-surface: var(--fh-neutral-0);
  --fh-surface-contrast: #ffffff;

  --fh-radius: 14px;
  --fh-shadow: 0 10px 30px rgba(0,0,0,.06);

  /* Bootstrap mapping */
  --bs-body-bg: var(--fh-surface);
  --bs-body-color: var(--fh-text);

  --bs-primary: var(--fh-primary-600);
  --bs-primary-rgb: 39,120,190;

  --bs-warning: var(--fh-accent-700);
  --bs-warning-rgb: 188,78,4;

  --bs-link-color: var(--fh-primary-500);
  --bs-link-hover-color: var(--fh-primary-600);

  --bs-border-radius: var(--fh-radius);
}

/* ===== General style ===== */
html { scroll-behavior: smooth; }
a { text-decoration-thickness: .08em; text-underline-offset: .18em; }
.card { border: 0; box-shadow: var(--fh-shadow); border-radius: var(--fh-radius); }
.card-title { color: var(--fh-navy-700); }
.bg-surface { background: var(--fh-surface); }
.bg-navy { background: var(--fh-navy-700); color: #fff; }
.footer-texture {
  position: relative;
  background-color: var(--fh-navy-700);
  /* Subtle vignette + off-canvas glow directly on background (no overlays) */
  background-image:
    linear-gradient(140deg,
      color-mix(in oklab, var(--fh-navy-700), black 10%) 0%,
      color-mix(in oklab, var(--fh-navy-700), black 0%) 40%,
      color-mix(in oklab, var(--fh-navy-700), black 16%) 100%),
    radial-gradient(60% 50% at 85% 120%, color-mix(in oklab, var(--fh-accent-500), transparent 92%), transparent 70%);
  background-repeat: no-repeat;
  background-size: cover, cover;
}
.bg-hero {
  background: linear-gradient(135deg,
    hsl(208 74% 53% / .15) 0%,
    hsl(36 100% 57% / .15) 100%);
}
.badge-accent { background: var(--fh-accent-500); color: #111; }
/* Hero visual and quote overlay */
.hero-visual {
  position: relative;
  isolation: isolate;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -6% -10%;
  background:
    radial-gradient(120% 80% at 75% 30%, hsla(208, 74%, 53%, .18), transparent 60%),
    radial-gradient(100% 70% at 25% 90%, hsla(36, 100%, 57%, .16), transparent 72%);
  filter: blur(6px);
  z-index: 0;
}
.hero-visual img {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--fh-radius) * 1.4);
  box-shadow: 0 20px 60px rgba(0, 32, 84, .28);
}
.hero-quote-card{
  position: absolute; right: 1rem; top: 1rem;
  max-width: 360px; border-radius: calc(var(--fh-radius) * 1.1);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.hero-quote-card .card-body { padding: 0.9rem 1.15rem; }
.hero-quote-card .blockquote { font-size: 0.95rem; }
.hero-quote-card .quote-close { display: inline-block; transform: rotate(180deg); }

/* ===== Buttons ===== */
.btn-accent{
  --_bg: var(--fh-accent-600);
  --_bg-hover: var(--fh-accent-700);
  --_text: #fff;
  --_border: transparent;
  color: var(--_text);
  background-color: var(--_bg);
  border-color: var(--_border);
}
.btn-accent:hover,
.btn-accent:focus{
  color: var(--_text);
  background-color: var(--_bg-hover);
  border-color: var(--_bg-hover);
}
.btn-accent:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--fh-accent-600), white 30%);
  outline-offset: 2px;
}

:root {
  --fh-font-head: "Poppins", system-ui, sans-serif;
  --fh-font-body: "Inter", system-ui, sans-serif;
}
h1,h2,h3,h4 { font-family: var(--fh-font-head); letter-spacing: .2px; }
body { font-family: var(--fh-font-body); line-height: 1.55; }

/* ===== Topbar + Header fixed (fade/slide) ===== */
.topbar {
  background: var(--fh-neutral-0);
  color: var(--fh-text);
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: .95rem;
  overflow: hidden;
  transition:
    max-height .25s ease,
    opacity .25s ease,
    transform .25s ease;
}
/* quando la topbar è nascosta, collassa lo spazio */
.topbar.is-hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

/* HEADER WRAP: ora è FIXED e contiene topbar + navbar */
.header-wrap{
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 1020;
  background: transparent; /* topbar e navbar hanno i loro bg */
  will-change: transform, opacity;
  transition: transform .25s ease, opacity .25s ease;
}
/* hide/show dell’intero header */
.header-wrap.header-hidden{
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* compensa il contenuto sotto l’header */
body.has-fixed-header { padding-top: var(--header-height, 120px); }

/* Navbar inside header: padding/shadow come prima */
.navbar-main {
  background: var(--fh-surface);
  transition: padding .25s ease, background-color .25s ease, box-shadow .25s ease;
  padding-block: .9rem;
}
.navbar-main.navbar-shrink { padding-block: .45rem; box-shadow: var(--fh-shadow); }

@media (prefers-reduced-motion: reduce){
  .header-wrap, .navbar-main { transition: none; }
}

/* Sticky CTA mobile */
.sticky-cta {
  position: fixed; inset: auto 1rem 1rem 1rem;
  z-index: 1040;
}

/* ==== Map embed ==== */
.map-wrap {
  border-radius: var(--fh-radius);
  overflow: hidden;
  box-shadow: var(--fh-shadow);
  outline: 1px solid rgba(0,0,0,.06);
}
.map-embed {
  border: 0;
  width: 100%;
  height: 100%;
}

/* =========================
   FOOTER (social, legali, credits)
   ========================= */

/* Link legali: wrapping corretto su mobile */
.footer-legal { max-width: 100%; }
.footer-legal a,
.footer-legal button { line-height: 1.4; white-space: normal; }

/* Forza bianco anche per il btn-link "Preferenze cookie" */
.footer-legal .btn-link { color:#fff !important; }
.footer-legal .btn-link:hover,
.footer-legal .btn-link:focus-visible { color:#fff !important; text-decoration: underline; }

/* Social: icone grandi, bianche, con hover e focus ring */
.footer-social .social-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:88px; height:88px;           /* mobile: XL touch target */
  border-radius:50%;
  color:#fff !important;
  background:transparent;
  transition:transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.footer-social .social-icon svg{
  width:40px; height:40px; display:block; flex:0 0 auto;
}
.footer-social{ padding-block: 10px 14px; }

.footer-social .social-icon:hover,
.footer-social .social-icon:focus-visible{
  background: rgba(255,255,255,.10);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px rgba(255,255,255,.35),   /* focus ring esterno ben visibile */
    0 0 0 2px rgba(255,255,255,.18) inset;
  outline: none;
}

/* Riduci animazioni se richiesto dall’utente */
@media (prefers-reduced-motion: reduce){
  .footer-social .social-icon { transition: none; }
}

/* Tablet/desktop: leggermente più compatte ma sempre grandi */
@media (min-width: 768px){
  .footer-social .social-icon{ width:72px; height:72px; }
  .footer-social .social-icon svg{ width:32px; height:32px; }
  .footer-social{ padding-block: 6px 10px; }
}

/* Spazio extra tra social (riga 1) e link legali (riga 2) su mobile */
@media (max-width: 767.98px){
  .footer-legal { margin-top: .25rem; }
}

/* Credits: discreti e leggibili */
.footer-credits { opacity: .92; }
.footer-credits a:hover,
.footer-credits a:focus-visible { text-decoration: underline; }
@media (max-width: 767.98px){
  .footer-credits { text-align: center; }
}

/* ==== Cookie Consent (FH) ==== */
#fh-consent { position: fixed; inset: 0; z-index: 1100; display: none; }
#fh-consent.is-open { display: block; }
#fh-consent .fhc-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
#fh-consent .fhc-panel {
  position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  width: min(100% - 2rem, 860px);
  background: var(--fh-surface-contrast); color: var(--fh-text);
  border-radius: var(--fh-radius); box-shadow: var(--fh-shadow);
}
#fh-consent .fhc-header { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,.06); }
#fh-consent .fhc-body { padding: 1rem 1.25rem; }
#fh-consent .fhc-actions { display: flex; gap: .5rem; padding: .75rem 1.25rem 1rem; flex-wrap: wrap; }
#fh-consent .fhc-group { margin-bottom: .75rem; }
#fh-consent .fhc-switch { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
#fh-consent .fhc-link { background: none; border: 0; color: var(--bs-link-color); text-decoration: underline; padding: 0; }
@media (min-width: 768px) {
  #fh-consent .fhc-panel { bottom: 2rem; }
}

/* ===== Homepage modules (60/30/10) ===== */
.eyebrow { display:inline-block; font-weight:600; letter-spacing:.4px; text-transform:uppercase; font-size:.85rem; }
.text-accent { color: var(--fh-accent-600); }
.feature-icon { width:56px; height:56px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; font-size:1.35rem; color:#111; }
.bg-10 { background: color-mix(in oklab, var(--fh-accent-500) 22%, white); }
.bg-30 { background: color-mix(in oklab, var(--fh-primary-500) 22%, white); color: #0a1a2b; }
.accent-bar { height:8px; width:120px; border-radius:999px; background: var(--fh-accent-600); box-shadow: 0 6px 20px hsl(24 96% 44% / .25); }

/* ===== Home quote (legacy section if used) ===== */
.home-quote { background: color-mix(in oklab, var(--fh-primary-500) 10%, white); }
.home-quote .bi-quote { font-size: 1.25em; vertical-align: -0.25em; }

/* ===== Sponsors ===== */
.sponsors-section .sponsor-card { transition: transform .15s ease, box-shadow .15s ease; }
.sponsors-section .sponsor-card:hover { transform: translateY(-2px); box-shadow: var(--fh-shadow); }
.sponsors-section .ratio { border-radius: var(--fh-radius); overflow: hidden; background: #fff; outline: 1px solid rgba(0,0,0,.06); }
.sponsors-section .sponsor-logo { object-fit: contain; width: 100%; height: 100%; padding: 6%; background: #fff; }

/* Mobile carousel behavior: show one sponsor at a time */
@media (max-width: 767.98px){
  .sponsors-carousel .sponsor-item { display: none; }
  .sponsors-carousel .sponsor-item.is-active { display: block; }
}
.illustration-lg { border-radius: var(--fh-radius); box-shadow: var(--fh-shadow); outline: 1px solid rgba(0,0,0,.06); }
.check-list li { display:flex; gap:.6rem; align-items:flex-start; margin-bottom:.5rem; }
.check-list i { color: var(--fh-accent-600); margin-top:.2rem; }
.step-badge { --s:38px; width:var(--s); height:var(--s); border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background: var(--fh-primary-600); color:#fff; font-weight:700; box-shadow: var(--fh-shadow); }

/* ===== Section break / Notice band ===== */
.notice-band{
  position: relative;
  margin-block: clamp(2rem, 1.25rem + 2vw, 4rem);
  padding-block: clamp(1.5rem, 1rem + 2vw, 3rem);
  background: color-mix(in oklab, var(--fh-accent-500) 14%, white);
  border: 1px solid color-mix(in oklab, var(--fh-accent-600) 22%, white);
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-shadow);
  overflow: hidden;
}
/* leggero highlight superiore per dare profondità */
.notice-band::before{
  content:"";
  position:absolute; inset:-1px -1px auto -1px; height:120px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255,255,255,.6), transparent 70%);
  pointer-events:none;
}
.notice-band h2{ color: var(--fh-navy-700); }
.notice-band p{ color: var(--fh-text-muted); }

/* Variante con gradiente molto leggero */
@supports (background: linear-gradient(135deg, red, blue)){
  .notice-band.notice-gradient{
    background: linear-gradient(
      135deg,
      color-mix(in oklab, var(--fh-accent-500) 18%, white) 0%,
      color-mix(in oklab, var(--fh-accent-500) 8%,  white) 100%
    );
  }
}

/* Variante compatta per sidebar o riquadri interni */
.notice-compact{
  margin-block: 1rem;
  padding-block: 1rem;
  box-shadow: none;
}
.notice-compact::before{ display:none; }

/* ===== Generic Notice utilities (for reuse) ===== */
.notice{
  --notice-color: var(--fh-accent-500);
  margin-block: 1rem;
  padding: 1rem 1.125rem;
  background: color-mix(in oklab, var(--notice-color) 14%, white);
  border: 1px solid color-mix(in oklab, var(--notice-color) 22%, white);
  border-radius: var(--fh-radius);
}
.notice--compact{ padding: .75rem 1rem; }
.notice--accent{ --notice-color: var(--fh-accent-500); }
.notice--primary{ --notice-color: var(--fh-primary-500); }
.notice--danger{ --notice-color: hsl(4 86% 58%); }
.notice__icon{
  font-size: 1.25rem;
  line-height: 1;
  color: color-mix(in oklab, var(--notice-color) 80%, black);
  margin-top: .15rem;
}

/* ===== Gallery ===== */
.gallery-section h2{ color: var(--fh-navy-700); }
.fh-gallery{ display:grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fh-gallery__item{
  position: relative; overflow: hidden;
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-shadow);
  background: #f6f8fb;
  aspect-ratio: 4 / 3;
  display:block;
}
.fh-gallery__img{ width:100%; height:100%; object-fit:cover; display:block; transition: transform .35s ease, opacity .35s ease; }
.fh-gallery__item:focus-visible{ outline: 3px solid color-mix(in oklab, var(--fh-primary-500) 80%, white); outline-offset: 2px; }
.fh-gallery__item::after{ content:""; position:absolute; inset:0; pointer-events:none; background: radial-gradient(120% 70% at 50% 0%, transparent, rgba(0,0,0,.06)); transition: opacity .35s ease; opacity: .6; }
.fh-gallery__item:hover .fh-gallery__img, .fh-gallery__item:focus-visible .fh-gallery__img{ transform: scale(1.03); }
.fh-gallery__item:hover::after, .fh-gallery__item:focus-visible::after{ opacity: .85; }

@media (min-width: 768px){ .fh-gallery{ gap: 14px; } }

/* Variante Masonry: colonne, item a altezza naturale */
.fh-gallery--masonry{ column-gap: 12px; }
.fh-gallery--masonry{ column-count: 1; }
@media (min-width: 576px){ .fh-gallery--masonry{ column-count: 2; } }
@media (min-width: 768px){ .fh-gallery--masonry{ column-count: 3; column-gap: 14px; } }
@media (min-width: 1200px){ .fh-gallery--masonry{ column-count: 4; } }
.fh-gallery--masonry .fh-gallery__item{ display:block; width:100%; break-inside: avoid; margin: 0 0 12px; aspect-ratio: auto; }
.fh-gallery--masonry .fh-gallery__img{ height:auto; }

/* Sticky filters for better UX */
.fh-gallery-filters{ position: sticky; top: calc(var(--header-height, 72px) + 8px); z-index: 1; background: var(--fh-surface); padding-block: .25rem; }

/* ===== Sticky column for course layout (desktop only) ===== */
.sticky-lg { position: static; }
@media (min-width: 992px){
  .sticky-lg {
    position: sticky;
    top: calc(var(--header-height, 72px) + 16px);
    align-self: flex-start; /* ensure top alignment inside row */
  }
}

/* Discourage save: disable selection/drag of images */
.fh-gallery__img, .fh-lb-image{ -webkit-user-drag: none; user-select: none; }

/* ===== Lightbox ===== */
body.lb-open { overflow:hidden; }
.fh-lightbox{
  position: fixed; inset: 0; z-index: 1080; display: none;
  background: rgba(0,0,0,.88);
  align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.fh-lightbox.is-open{ display:flex; }
.fh-lb-figure{ margin:0; max-width: min(92vw, 1200px); max-height: 86vh; display:flex; flex-direction:column; align-items:center; gap:.5rem; }
.fh-lb-image{ max-width:100%; max-height:80vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.fh-lb-counter{ color:#fff; opacity:.9; font-weight:600; }
.fh-lb-caption{ color:#fff; opacity:.9; font-size: .95rem; text-align:center; }
.fh-lb-close{
  position:absolute; top: 10px; right: 14px; border:0; background: transparent; color:#fff; font-size: 2rem; line-height:1; cursor:pointer;
}
.fh-lb-close--bottom{
  position: absolute; inset: auto 50% 12px auto; transform: translateX(50%);
  background: rgba(255,255,255,.9); color:#111; font-size: .95rem; padding: .35rem .75rem; border-radius: 999px;
}
.fh-lb-nav{
  position:absolute; top:50%; transform: translateY(-50%);
  width:44px; height:44px; border-radius:999px; border:0; color:#111; background:#fff; box-shadow: var(--fh-shadow); cursor:pointer;
}
.fh-lb-prev{ left: 12px; }
.fh-lb-next{ right: 12px; }

/* ===== Footer quicklinks (columns) ===== */
.footer-quicklinks { column-gap: 1rem; text-align: center; }
@media (min-width: 768px){ .footer-quicklinks { columns: 3; } }
@media (min-width: 1200px){ .footer-quicklinks { columns: 3; } }
.footer-quicklinks { font-size: 1.0625rem; line-height: 1.6; }
@media (min-width: 768px){ .footer-quicklinks { font-size: 1rem; line-height: 1.5; } }
.footer-quicklinks li { break-inside: avoid; margin-bottom: .6rem; }
@media (min-width: 768px){ .footer-quicklinks li { margin-bottom: .4rem; } }
.footer-quicklinks a { color: var(--fh-accent-500); text-decoration: none; display: inline-block; padding: .2rem 0; }
.footer-quicklinks a:hover { color: var(--fh-accent-600); text-decoration: underline; }

/* Back to top button */
.back-to-top { white-space: nowrap; }

/* Footer hover accents */
.footer-social .social-icon:hover { color: var(--fh-accent-500); }

/* Footer headings accent */
.footer-heading{ color:#fff; padding-bottom: .25rem; margin-bottom: .9rem; }
.footer-heading::after{
  content: ""; display: block; width: 44px; height: 3px; border-radius: 3px;
  background: var(--fh-accent-500); margin-top: .25rem;
}
.footer-heading.text-center::after{ margin-left: auto; margin-right: auto; }

/* Footer newsletter block */
.footer-news {
  background: color-mix(in oklab, #ffffff 8%, transparent);
  border: 1px solid color-mix(in oklab, #ffffff 20%, transparent);
  border-radius: var(--fh-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--fh-shadow);
}
.footer-news .form-label { color: #fff; opacity: .9; }
.footer-news .form-check-label { color: #fff; opacity: .9; }
