/* ============================================================
   style.css — Tennis Club Mirano ASD
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;1,700&family=Barlow:wght@300;400;500;600&display=swap');

:root {
  --navy:       #0c1f35;
  --navy-mid:   #163555;
  --navy-light: #1e4a73;
  --lime:       #c8f230;
  --lime-dark:  #a6cc1a;
  --clay:       #b8714a;
  --cream:      #f7f5f0;
  --gray:       #e4e4de;
  --text-mid:   #4a6080;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--navy);
  background: #fff;
  overflow-x: hidden;
  max-width: 100vw;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.font-display { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; line-height: 1; }
h1, h2, h3, h4 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; line-height: 1.05; }

.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 0.6rem;
}
.label-dark { color: var(--clay); }

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1;
  margin-bottom: 1.25rem;
}
.section-title-white { color: #fff; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }
.section-cream { background: var(--cream); }
.section-navy { background: var(--navy); color: #fff; }
.page-top { padding-top: 72px; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 72px;
  background: transparent;
  display: flex; align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.35s var(--ease);
}
.navbar.scrolled {
  background: var(--navy);
  box-shadow: 0 4px 32px rgba(0,0,0,0.35);
}
/* Lime accent line when scrolled on subpages */
.navbar.navbar-hero.scrolled::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime) 0%, transparent 60%);
}
.navbar-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.navbar-logo {
  display: flex; align-items: center; gap: 0.8rem;
  flex-shrink: 0; text-decoration: none;
}
.navbar-logo img {
  height: 44px; width: auto;
  filter: none;
  transition: height 0.4s var(--ease), filter 0.4s var(--ease);
}
.navbar.navbar-hero .navbar-logo img { height: 72px; }
.navbar.navbar-hero.scrolled .navbar-logo img { height: 44px; }
.navbar.scrolled .navbar-logo img,
.navbar.navbar-solid .navbar-logo img { filter: brightness(0) invert(1); }
.navbar-logo-text { display: none; }
.navbar-nav { display: flex; align-items: center; gap: 0.1rem; list-style: none; }
.navbar-nav a {
  display: block; padding: 0.45rem 0.9rem;
  font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.navbar-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Subpage navbar: dark links when transparent (over photo with no overlay) */
.navbar.navbar-light:not(.scrolled) .navbar-nav a {
  color: rgba(12,31,53,0.85);
}
.navbar.navbar-light:not(.scrolled) .navbar-nav a:hover {
  color: var(--navy);
  background: rgba(12,31,53,0.07);
}
.navbar.navbar-light:not(.scrolled) .navbar-nav a.active {
  color: var(--navy);
  font-weight: 600;
}
.navbar.navbar-light:not(.scrolled) .nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  border: none !important;
}
.navbar.navbar-light:not(.scrolled) .nav-cta:hover {
  background: var(--navy-light) !important;
}
.navbar.navbar-light:not(.scrolled) .hamburger span {
  background: var(--navy);
}

/* Active indicator when scrolled on subpages */
.navbar.navbar-hero.scrolled .navbar-nav a.active {
  color: #fff;
  background: transparent;
}
.navbar.navbar-hero.scrolled .navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0.9rem; right: 0.9rem;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
}

/* Active on transparent/scrolled navbar */
.navbar-nav a.active { color: var(--lime); }

/* Prenota — filled lime on home transparent, outline lime on scrolled subpages */
.nav-cta {
  background: var(--lime) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  border-radius: 4px;
}
.nav-cta:hover { background: var(--lime-dark) !important; color: var(--navy) !important; }

.navbar.navbar-hero.scrolled .nav-cta {
  background: transparent !important;
  color: var(--lime) !important;
  border: 1.5px solid var(--lime) !important;
}
.navbar.navbar-hero.scrolled .nav-cta:hover {
  background: var(--lime) !important;
  color: var(--navy) !important;
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none; position: absolute; top: 72px; left: 0; right: 0;
  background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08);
  flex-direction: column; padding: 1rem 1.5rem 1.5rem; gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 0.7rem 0.75rem;
  color: rgba(255,255,255,0.82); font-size: 1rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 4px; transition: background 0.2s;
}
.mobile-menu a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.mobile-cta {
  background: var(--lime) !important; color: var(--navy) !important;
  font-weight: 700 !important; text-align: center; margin-top: 0.5rem;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-family: 'Barlow', sans-serif; font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease);
  text-decoration: none;
}
.btn-lime { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.btn-lime:hover { background: var(--lime-dark); border-color: var(--lime-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,242,48,0.3); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; transform: translateY(-1px); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-white { background: #fff; color: var(--navy); border-color: #fff; }
.btn-white:hover { background: var(--cream); border-color: var(--cream); }

/* ── PAGE HERO BANNER ────────────────────────────────────── */
.page-hero {
  position: relative; height: 480px;
  background: var(--navy); display: flex; align-items: flex-end; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; opacity: 1;
}
.page-hero-grad {
  display: none;
}
.page-hero-content {
  position: relative; z-index: 1;
  padding: 0 2rem 2.5rem; max-width: 1240px; width: 100%; margin: 0 auto;
}
.page-hero-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  color: #fff; text-transform: uppercase; line-height: 1; letter-spacing: -0.01em;
}
.page-hero-title .accent { color: var(--lime); }

/* ── HERO (Home) ─────────────────────────────────────────── */
.hero {
  position: relative; height: 100vh; min-height: 620px;
  display: flex; align-items: center; overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(12,31,53,0.55) 0%, rgba(12,31,53,0.2) 40%, transparent 100%);
}
.hero-pattern { display: none; }
.hero-content {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 0 auto; padding: 0 2rem; width: 100%;
}
.hero-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 1rem; display: block;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: clamp(4rem, 10vw, 10rem);
  color: #fff; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.02em;
  margin-bottom: 0.2em;
}
.hero-title .lime { color: var(--lime); display: block; }
.hero-sub {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.35rem); font-style: italic;
  color: rgba(255,255,255,0.7); letter-spacing: 0.04em; margin-bottom: 2.5rem;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-dots {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 2;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); border: none; cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.active { background: var(--lime); transform: scale(1.3); }

/* ── STATS STRIP ─────────────────────────────────────────── */
.stats-strip { background: var(--navy-mid); padding: 1.25rem 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.stat-item { text-align: center; padding: 1rem 1.5rem; }
.stat-item-bordered { border-right: 1px solid rgba(255,255,255,0.1); }
.stat-num {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1; color: var(--lime);
}
.stat-label {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); margin-top: 0.4rem;
}

/* ── PREVIEW CARDS ───────────────────────────────────────── */
.preview-card {
  position: relative; overflow: hidden; border-radius: 6px;
  display: block; background: var(--navy); text-decoration: none;
}
.preview-card-img {
  width: 100%; height: 300px; object-fit: cover;
  transition: transform 0.65s var(--ease);
}
.preview-card:hover .preview-card-img { transform: scale(1.07); }
.preview-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,31,53,0.92) 45%, transparent 85%);
  transition: background 0.3s;
}
.preview-card:hover .preview-card-overlay { background: linear-gradient(to top, rgba(12,31,53,0.96) 55%, rgba(12,31,53,0.15) 100%); }
.preview-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.75rem; }
.preview-card-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 1.8rem; color: #fff; text-transform: uppercase; margin-bottom: 0.4rem;
}
.preview-card-text { font-size: 0.875rem; color: rgba(255,255,255,0.72); margin-bottom: 1rem; line-height: 1.5; }
.preview-card-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--lime); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: gap 0.25s;
}
.preview-card:hover .preview-card-link { gap: 0.75rem; }

/* ── PRENOTA BANNER ──────────────────────────────────────── */
.banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.banner-text { min-width: 0; }
.banner-ctas { display: flex; gap: 1rem; flex-wrap: wrap; flex-shrink: 0; }
.prenota-banner {
  background: var(--navy-mid); padding: 4.5rem 0;
  position: relative; overflow: hidden;
}
.prenota-banner::before {
  content: ''; position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 380px; height: 380px; border-radius: 50%;
  background: rgba(200,242,48,0.06);
}
.prenota-banner::after {
  content: ''; position: absolute; left: 40%; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(200,242,48,0.04);
}

/* ── TWO-COL TEXT+IMAGE ──────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.storia-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.contatti-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.two-col-img {
  position: relative; overflow: hidden; border-radius: 6px;
}
.two-col-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.two-col-img::after {
  content: ''; position: absolute; bottom: -3px; left: -3px;
  width: 56px; height: 56px; background: var(--lime); border-radius: 0 6px 0 6px;
  pointer-events: none;
}
.body-text { font-size: 1.05rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 1.5rem; }

/* ── STAFF CARDS ─────────────────────────────────────────── */
.staff-card {
  background: #fff; border-radius: 6px; padding: 1.5rem 1.75rem;
  border: 1.5px solid var(--gray);
  position: relative; overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.staff-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--lime); transform: scaleY(0); transform-origin: bottom; transition: transform 0.3s;
}
.staff-card:hover { box-shadow: 0 8px 32px rgba(12,31,53,0.1); transform: translateY(-2px); }
.staff-card:hover::before { transform: scaleY(1); }
.staff-name {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--navy);
}
.staff-role { font-size: 0.85rem; color: var(--text-mid); margin-top: 0.2rem; line-height: 1.4; }
.staff-badge {
  display: inline-block; margin-top: 0.75rem; padding: 0.2rem 0.55rem;
  background: var(--cream); color: var(--text-mid);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 3px;
}
.staff-badge-hl { background: var(--lime); color: var(--navy); }

/* ── DOCS BAND ───────────────────────────────────────────── */
.docs-band { background: var(--navy); padding: 4.5rem 0; }
.doc-btn {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1.1rem 1.4rem;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.25s; flex: 1; min-width: 200px; text-decoration: none;
}
.doc-btn:hover { background: rgba(200,242,48,0.12); border-color: var(--lime); color: var(--lime); }
.doc-btn svg { flex-shrink: 0; opacity: 0.65; }
.doc-btn:hover svg { opacity: 1; }

/* ── PARTNERS ────────────────────────────────────────────── */
.partner-item {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 2.5rem;
  filter: grayscale(100%); opacity: 0.55; transition: all 0.3s;
}
.partner-item:hover { filter: none; opacity: 1; }
.partner-item img { max-height: 100px; width: auto; object-fit: contain; }

/* ── CONTACTS ────────────────────────────────────────────── */
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--gray);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon-box {
  width: 40px; height: 40px; border-radius: 6px; background: var(--lime);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy);
}
.contact-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 0.2rem; }
.contact-value { font-size: 0.95rem; font-weight: 500; color: var(--navy); }
.contact-value a { color: var(--navy); transition: color 0.2s; }
.contact-value a:hover { color: var(--navy-light); }
.schedule-row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.9rem; }
.schedule-row:not(:last-child) { border-bottom: 1px solid var(--gray); }

/* ── FORM ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 0.35rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray); border-radius: 4px;
  font-family: 'Barlow', sans-serif; font-size: 0.95rem; color: var(--navy);
  background: #fff; outline: none; transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--navy); }
.form-textarea { min-height: 110px; resize: vertical; }

/* ── MAP ─────────────────────────────────────────────────── */
.map-wrap { border-radius: 8px; overflow: hidden; height: 420px; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ── COURSE SECTIONS (zig-zag) ───────────────────────────── */
.course-row { padding: 5.5rem 0; }
.course-row:nth-child(even) { background: var(--cream); }
.course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.course-grid.flip { direction: rtl; }
.course-grid.flip > * { direction: ltr; }
.course-img-wrap {
  position: relative; overflow: hidden; border-radius: 6px;
  aspect-ratio: 4/3;
}
.course-img-wrap img, .course-img-wrap .placeholder-box {
  width: 100%; height: 100%; object-fit: cover;
}
.course-img-wrap::after {
  content: ''; position: absolute; bottom: -2px; right: -2px;
  width: 52px; height: 52px; background: var(--lime); border-radius: 6px 0 6px 0;
}
.course-img-wrap img { transition: transform 0.55s; }
.course-img-wrap:hover img { transform: scale(1.04); }
.course-num {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 5.5rem; line-height: 1; color: var(--gray);
  margin-bottom: -0.75rem; user-select: none;
}
.course-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--navy); text-transform: uppercase; line-height: 1; margin-bottom: 1rem;
}
.course-text { font-size: 1rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 1.75rem; }

/* ── PLACEHOLDER BOX ─────────────────────────────────────── */
.placeholder-box {
  width: 100%; height: 100%; min-height: 280px;
  background: linear-gradient(135deg, #dce6f0 0%, #c8d8e8 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; color: #7090b0; border-radius: 6px;
}
.placeholder-box svg { opacity: 0.45; }
.placeholder-box p { font-size: 0.85rem; font-weight: 500; text-align: center; line-height: 1.4; opacity: 0.7; max-width: 160px; }

/* ── GALLERY ─────────────────────────────────────────────── */
.gallery-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.gallery-btn {
  padding: 0.45rem 1.2rem;
  border: 1.5px solid var(--gray); border-radius: 100px;
  background: #fff; color: var(--text-mid);
  font-family: 'Barlow', sans-serif; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.gallery-btn:hover { border-color: var(--navy); color: var(--navy); }
.gallery-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.gallery-grid { columns: 3; column-gap: 0.875rem; }
.gallery-item {
  break-inside: avoid; margin-bottom: 0.875rem;
  overflow: hidden; border-radius: 5px; position: relative; cursor: pointer;
}
.gallery-item img { width: 100%; display: block; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-zoom {
  position: absolute; inset: 0;
  background: rgba(12,31,53,0); display: flex; align-items: center; justify-content: center;
  transition: background 0.3s; color: #fff;
}
.gallery-zoom svg { opacity: 0; transform: scale(0.8); transition: all 0.25s; }
.gallery-item:hover .gallery-zoom { background: rgba(12,31,53,0.48); }
.gallery-item:hover .gallery-zoom svg { opacity: 1; transform: scale(1); }
.gallery-item.hidden { display: none; }

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,12,22,0.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 88vw; max-height: 82vh; object-fit: contain; border-radius: 4px;
  transform: scale(0.95); transition: transform 0.3s;
}
.lightbox.open img { transform: scale(1); }
.lb-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.3rem; transition: background 0.2s;
}
.lb-close:hover { background: rgba(255,255,255,0.2); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.4rem; transition: background 0.2s;
}
.lb-nav:hover { background: rgba(255,255,255,0.2); }
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer-logo { height: 46px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-tagline { font-size: 0.875rem; line-height: 1.65; max-width: 240px; }
.footer-h { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--lime); }
.footer-contact-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; margin-bottom: 0.55rem; }
.footer-contact-row a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-contact-row a:hover { color: var(--lime); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem;
}
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 6px;
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65); transition: all 0.2s;
}
.footer-social a:hover { background: var(--lime); color: var(--navy); }

/* ── WHATSAPP FLOAT ──────────────────────────────────────── */
.wa-btn {
  position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 4px 18px rgba(37,211,102,0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  animation: wa-pulse 2.5s ease-in-out infinite;
}
.wa-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.55); animation: none; }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 18px rgba(37,211,102,0.45); }
  50% { box-shadow: 0 4px 24px rgba(37,211,102,0.65), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-grid { columns: 2; }
  .course-grid, .course-grid.flip { grid-template-columns: 1fr; direction: ltr; gap: 2.5rem; }
  .course-img-wrap { aspect-ratio: 16/9; max-height: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
  .storia-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .contatti-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* ── Navbar mobile ── */
  .navbar-nav { display: none; }
  .hamburger { display: flex; flex-shrink: 0; }
  .navbar { height: 60px; }
  .mobile-menu { top: 60px; left: 0; right: 0; width: 100%; box-sizing: border-box; }
  .navbar-inner {
    padding: 0 1rem;
    gap: 0;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Logo ridotto, non può mai sforare */
  .navbar-logo { flex-shrink: 1; min-width: 0; max-width: calc(100% - 52px); overflow: hidden; }
  .navbar-logo img { height: 38px !important; width: auto; max-width: 100%; }

  /* ── Contenuto ── */
  .section { padding: 4rem 0; }
  .page-hero { height: 240px; }
  .gallery-grid { columns: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-title { font-size: clamp(3.5rem, 14vw, 5.5rem); }
  .cards-grid { grid-template-columns: 1fr !important; }
  .staff-grid { grid-template-columns: 1fr; }
  .contatti-grid { grid-template-columns: 1fr; }

  /* Stats: impila su mobile, niente border laterali */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    border-left: none;
    text-align: center;
  }
  .stat-item { padding: 0.75rem 0.25rem; }
  .stat-item-bordered { border-right: 1px solid rgba(255,255,255,0.1); }
  .stat-num { font-size: clamp(1.6rem, 7vw, 2.4rem) !important; }
  .stat-label { font-size: 0.68rem; }

  /* Foto landscape: mostra intero senza ritagli su mobile */
  .two-col-img { aspect-ratio: unset !important; min-height: unset !important; }
  .two-col-img img { height: auto; }

  /* Direttivo grid: 1 colonna su mobile */
  .direttivo-grid { grid-template-columns: 1fr !important; }

  /* Corsi: immagine full width, no overflow */
  .course-img-wrap { width: 100%; overflow: hidden; }

  /* Partner logos: wrap corretto */
  .partner-item { min-width: 0; width: 100%; border-right: none !important; border-bottom: 1.5px solid var(--gray); }
  .partner-item:last-child { border-bottom: none; }

  /* Evita overflow globale su elementi flex/grid */
  .storia-grid > div,
  .course-grid > div,
  .partner-item,
  .banner-inner > * { min-width: 0; max-width: 100%; }

  /* Bottoni CTA prenota/banner full width su mobile */
  .prenota-banner .btn,
  .banner-ctas .btn { width: 100%; justify-content: center; box-sizing: border-box; }

  /* Footer contatti: wrap ok */
  .footer-contact-row { flex-wrap: wrap; word-break: break-word; }

  /* Griglia eventi: 1 colonna su mobile */
  .eventi-grid { grid-template-columns: 1fr !important; }

  /* Paginatore: più compatto */
  .pag-btn { min-width: 34px; height: 34px; font-size: 0.85rem; }
}
@media (max-width: 560px) {
  .gallery-grid { columns: 1; }
  .container { padding: 0 1.25rem; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .banner-inner { flex-direction: column; align-items: flex-start; }
  .banner-ctas { width: 100%; }
  .banner-ctas .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* ── Page fade-in ─────────────────────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body { animation: pageFadeIn 0.45s ease both; }

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(38px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-44px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
  from { opacity: 0; transform: translateX(44px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Hero load animations (index) ───────────────────────── */
.hero-content .hero-tag  { animation: fadeUp 0.65s ease 0.15s both; }
.hero-content .hero-title { animation: fadeUp 0.85s ease 0.35s both; }
.hero-content .hero-sub   { animation: fadeUp 0.65s ease 0.65s both; }
.hero-content .hero-ctas  { animation: fadeUp 0.65s ease 0.85s both; }

/* ── Page hero load animation ───────────────────────────── */
.page-hero-title { animation: fadeUp 0.75s ease 0.25s both; }

/* ── Navbar slide-down on load ──────────────────────────── */
@keyframes navbarSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.navbar { animation: navbarSlideDown 0.55s ease both; }

/* ── Scroll-reveal base classes ─────────────────────────── */
.anim-up    { opacity: 0; transform: translateY(38px); transition: opacity 0.7s ease, transform 0.7s ease; }
.anim-left  { opacity: 0; transform: translateX(-44px); transition: opacity 0.7s ease, transform 0.7s ease; }
.anim-right { opacity: 0; transform: translateX(44px);  transition: opacity 0.7s ease, transform 0.7s ease; }
.anim-scale { opacity: 0; transform: scale(0.88);       transition: opacity 0.65s ease, transform 0.65s ease; }

.anim-up.in-view,
.anim-left.in-view,
.anim-right.in-view,
.anim-scale.in-view {
  opacity: 1;
  transform: none;
}

/* ── Decorative underline on section titles ─────────────── */
.section-title-underline {
  position: relative;
  display: inline-block;
}
.section-title-underline::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 52px; height: 3px;
  background: var(--lime);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s ease 0.25s;
}
.section-title-underline.in-view::after { transform: scaleX(1); }

/* ── Counter number animation ───────────────────────────── */
.stat-num { transition: color 0.3s; }

/* ── Stagger delays (applied via JS) ────────────────────── */
.stagger-1  { transition-delay: 0.05s !important; }
.stagger-2  { transition-delay: 0.15s !important; }
.stagger-3  { transition-delay: 0.25s !important; }
.stagger-4  { transition-delay: 0.35s !important; }
.stagger-5  { transition-delay: 0.45s !important; }
.stagger-6  { transition-delay: 0.55s !important; }
.stagger-7  { transition-delay: 0.65s !important; }
.stagger-8  { transition-delay: 0.75s !important; }
.stagger-9  { transition-delay: 0.85s !important; }

/* ── Parallax hint (managed via JS) ────────────────────── */
.hero-slides,
.page-hero-bg { will-change: transform; }

/* ── Enhanced hover: course image shimmer ───────────────── */
.course-img-wrap::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  z-index: 1; transition: left 0.6s ease; pointer-events: none;
}
.course-img-wrap:hover::before { left: 150%; }

/* ── Preview card: lift on hover ────────────────────────── */
.preview-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.preview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(12,31,53,0.22);
}

/* ── Gallery item scale-in stagger (managed via JS) ─────── */
.gallery-item { transition: opacity 0.5s ease, transform 0.5s ease; }

/* ── Btn lime shimmer on hover ──────────────────────────── */
.btn-lime { position: relative; overflow: hidden; }
.btn-lime::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s ease;
}
.btn-lime:hover::after { left: 150%; }

/* ── Stats strip count-up trigger ──────────────────────── */
.stat-num[data-target] { display: block; }
