/* =========================================
   VR81 — Velate Rugby 1981
   Design System & Desktop Layout
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette */
  --navy: #0a1628;
  --navy-light: #12203a;
  --navy-mid: #1a2d4d;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-glow: #60a5fa;
  --azure: #0ea5e9;
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --green: #22c55e;

  /* Tema (default scuro, l'utente puo passare al chiaro) */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-btn: rgba(255, 255, 255, 0.3);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --skeleton-shimmer: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 75%);
  --header-bg: rgba(10, 22, 40, 0.85);
  --header-bg-scrolled: rgba(10, 22, 40, 0.97);
  --overlay-bg: rgba(10, 22, 40, 0.97);
  --bar-bg: rgba(10, 22, 40, 0.95);
  --hero-overlay: linear-gradient(180deg, transparent 0%, rgba(10, 22, 40, 0.4) 100%);
  --footer-bg: #12203a;
  --footer-muted: #9ca3af;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-pad: 100px;
  --container-max: 1200px;

  /* Header */
  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--gray-100);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 12px 24px;
  white-space: nowrap;
}

.btn-cta {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-cta:hover {
  background: var(--blue-glow);
  border-color: var(--blue-glow);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-btn);
}
.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--hover-bg);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}
.site-header.scrolled {
  background: var(--header-bg-scrolled);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.logo-omino {
  height: 34px;
  width: auto;
  display: block;
}
.logo-omino-light {
  display: none;
}
html[data-theme="light"] .logo-omino-dark {
  display: none;
}
html[data-theme="light"] .logo-omino-light {
  display: block;
}
.logo-vr {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--blue-glow);
}
.logo-81 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--azure);
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gray-300);
  margin-left: 4px;
  letter-spacing: 0.02em;
}

/* Nav */
.main-nav { display: flex; flex: 1; min-width: 0; }
.nav-list {
  display: flex;
  gap: 18px;
}
.nav-list a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-300);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-glow);
  transition: width 0.3s ease;
}
.nav-list a:hover {
  color: var(--text-primary);
}
.nav-list a:hover::after {
  width: 100%;
}

.header-cta {
  padding: 10px 14px;
  font-size: 0.8rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  z-index: 999;
  padding: 100px 32px 40px;
}
.mobile-nav-overlay.active { display: block; }
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-nav-list a {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
}
.mobile-nav-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.mobile-nav-content .btn-cta {
  margin-top: 40px;
  text-align: center;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('../assets/images/hero-foto.jpg') center 50% / cover no-repeat,
    var(--navy);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--azure);
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 100px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Hero title: gradiente azzurro + effetto "respiro" alternato --- */
.hero-title span {
  display: inline-block; /* necessario per applicare transform */
  text-shadow: none; /* il testo a gradiente non usa text-shadow (artefatti) */
  /* gradiente in palette: azzurro -> azzurro chiaro -> bianco */
  background: linear-gradient(120deg, var(--azure) 0%, #60a5fa 55%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  will-change: transform, filter;
  animation: heroBreath 2.6s ease-in-out infinite;
}
/* sfalsamento: nth-of-type conta solo gli <span> (i <br> non contano) */
.hero-title span:nth-of-type(1) { animation-delay: 0s; }
.hero-title span:nth-of-type(2) { animation-delay: 0.45s; }
.hero-title span:nth-of-type(3) { animation-delay: 0.9s; }

@keyframes heroBreath {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 0 rgba(14, 165, 233, 0));
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 0 18px rgba(14, 165, 233, 0.45));
  }
}

/* accessibilità: disattiva il respiro per chi richiede meno movimento */
@media (prefers-reduced-motion: reduce) {
  .hero-title span { animation: none; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-300);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* tema chiaro: sottotitolo bianco e un po' piu spesso (si legge meglio sulla foto, anche da telefono),
   senza ombre, glow o animazioni */
[data-theme="light"] .hero-subtitle {
  text-shadow: none;
}
[data-theme="light"] .hero-subtitle span {
  display: inline-block;
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  font-weight: 600;
  text-shadow: none;
  filter: none;
  animation: none;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 1;
}
.scroll-indicator {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gray-400), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* --- MATCH CENTER --- */
.match-center {
  position: relative;
  z-index: 10;
  padding: 80px 24px 40px;
}

.match-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 24px;
  border-radius: 100px;
  border: 2px solid var(--border-strong);
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--azure);
  color: var(--azure);
}

.filter-btn.active {
  background: var(--azure);
  border-color: var(--azure);
  color: var(--white);
}

.match-layout {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.match-matches {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-card {
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.match-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  justify-content: center;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 70px;
}

.team-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-mid);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue-glow);
}

/* Logo squadra reale (classifica + card partite) */
.team-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.classifica-squadra {
  display: flex;
  align-items: center;
  gap: 10px;
}
.classifica-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.classifica-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.classifica-logo-initials {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.6rem;
  color: var(--blue-glow);
}

/* Link documenti minimal (moduli iscrizioni) */
.doc-link {
  margin-left: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--azure);
  text-decoration: none;
}
.doc-link:hover {
  text-decoration: underline;
}

.team-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-200);
}

.match-score {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2rem;
  color: var(--text-primary);
}
.score-sep {
  font-size: 1.5rem;
  color: var(--gray-400);
}

.match-vs {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--azure);
}

.match-result {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 100px;
}
.match-result-win {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.match-date {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.match-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.match-divider {
  width: 1px;
  background: var(--border-subtle);
  align-self: stretch;
}

.match-classifica {
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.classifica-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.classifica-table {
  width: 100%;
  border-collapse: collapse;
}

.classifica-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.classifica-table th:nth-child(n+3) {
  text-align: center;
}

.classifica-table td {
  font-size: 0.85rem;
  color: var(--gray-200);
  padding: 10px 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.classifica-table td:nth-child(n+3) {
  text-align: center;
}

.classifica-table td:first-child {
  font-weight: 700;
  color: var(--gray-400);
  width: 30px;
}

.classifica-table tr:last-child td {
  border-bottom: none;
}

.classifica-empty {
  text-align: center;
  color: var(--gray-400);
  font-style: italic;
  padding: 20px 0;
}

.skeleton-classifica {
  height: 16px;
  background: var(--skeleton-shimmer);
  border-radius: 4px;
}

a.sponsor-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 80px;
  border-radius: 12px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0.8;
  flex-shrink: 0;
}

a.sponsor-logo:hover {
  opacity: 1;
  border-color: var(--azure);
  transform: scale(1.05);
}

a.sponsor-logo img {
  max-height: 50px;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter 0.3s ease;
}

a.sponsor-logo:hover img {
  filter: grayscale(0%);
}

/* --- SECTION HEADERS --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue-glow);
  margin-bottom: 12px;
}
.section-tag-center { text-align: center; display: block; margin-bottom: 32px; }
.section-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.section-desc {
  color: var(--gray-400);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- SQUADRE --- */
.squadre {
  padding: var(--section-pad) 0;
}

.squadre-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.squadra-card {
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.squadra-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(59, 130, 246, 0.2);
}

.squadra-img {
  height: 200px;
  overflow: hidden;
}

.squadra-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.08);
}
.squadra-img-kids {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
}
.squadra-img-agonismo {
  background: linear-gradient(135deg, #1a2d4d, #2563eb);
}
.squadra-img-old {
  background: linear-gradient(135deg, #1e3a5f, #60a5fa);
}

.squadra-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.squadra-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.squadra-range {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--azure);
}

.squadra-desc {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
}

.squadra-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.squadra-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-300);
}
.squadra-detail svg { color: var(--blue-glow); flex-shrink: 0; }

/* --- NEWS --- */
.news-section {
  padding: var(--section-pad) 0;
  background: var(--navy-light);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--navy);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.news-img { height: 180px; overflow: hidden; }
.news-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a2d4d, #2563eb);
}
.news-img-placeholder-2 {
  background: linear-gradient(135deg, #1e3a5f, #1e40af);
}
.news-img-placeholder-3 {
  background: linear-gradient(135deg, #0f172a, #1e40af);
}

.news-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.news-excerpt {
  color: var(--gray-400);
  font-size: 0.85rem;
  line-height: 1.5;
}

.news-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--blue-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  transition: color 0.2s;
}
.news-link:hover { color: var(--text-primary); }

/* --- SPONSOR --- */
.sponsor-section {
  padding: 60px 0 40px;
  overflow: hidden;
}

.sponsor-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.sponsor-track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sponsor-logo {
  flex-shrink: 0;
  width: 160px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- CTA SECTION --- */
.cta-section {
  padding: var(--section-pad) 0;
}

.cta-box {
  background: linear-gradient(135deg, #2563eb, #1a2d4d);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
}

.cta-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}

.cta-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 60px 0 0;
}

.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.footer-logo .logo-text { font-size: 0.8rem; }

.footer-about {
  color: var(--footer-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--footer-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue-glow); }

.footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--footer-muted);
  font-size: 0.9rem;
}
.footer-contacts svg { color: var(--blue-glow); flex-shrink: 0; margin-top: 3px; }

.footer-map { border-radius: 8px; overflow: hidden; }

.footer-bottom {
  max-width: var(--container-max);
  margin: 40px auto 0;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--footer-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}
.social-link {
  color: var(--footer-muted);
  transition: color 0.2s, transform 0.2s;
}
.social-link:hover {
  color: var(--blue-glow);
  transform: translateY(-2px);
}

/* --- MOBILE CTA (sticky bottom) --- */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--bar-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
  z-index: 998;
  gap: 8px;
}
.mobile-cta .btn { flex: 1; }

/* --- Scroll animations (initial state) --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   PAGINE INTERNNE
   ========================================= */

/* --- Page Header (used on all inner pages) --- */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero .section-title { margin-bottom: 8px; }
.page-hero .section-desc { margin: 0 auto; }

/* --- Content Sections --- */
.content-section {
  padding: var(--section-pad) 0;
}
.content-section + .content-section {
  border-top: 1px solid var(--border-subtle);
}

.content-block {
  max-width: 800px;
  margin: 0 auto;
}
.content-block h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 32px;
}
.content-block h3:first-child { margin-top: 0; }
.content-block p {
  color: var(--gray-300);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.content-block ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 12px;
}
.content-block li {
  color: var(--gray-300);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 4px;
}
.content-block strong { color: var(--text-primary); }
.content-block a {
  color: var(--blue-glow);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content-block a:hover { color: var(--text-primary); }

/* --- Content Image --- */
.content-image {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.content-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.1);
}
.content-image figcaption {
  padding: 12px 16px;
  color: var(--gray-400);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  background: var(--navy-light);
}

/* --- Info Box (highlighted blocks) --- */
.info-box {
  background: var(--navy-light);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.info-box h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--azure);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.info-box p, .info-box li {
  color: var(--gray-300);
  font-size: 0.9rem;
}

/* --- Tables (prezzi) --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--navy-light);
  border-radius: 12px;
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--azure);
  background: rgba(59, 130, 246, 0.08);
}
.data-table td {
  color: var(--gray-300);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-300);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--navy-mid);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-600);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- File Upload --- */
.file-upload {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-upload:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.05);
}
.file-upload input[type="file"] {
  display: none;
}
.file-upload-icon {
  color: var(--gray-400);
  margin-bottom: 8px;
}
.file-upload-text {
  color: var(--gray-400);
  font-size: 0.9rem;
}
.file-upload-text strong { color: var(--blue-glow); }
.file-upload-hint {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 4px;
}

/* --- Auth Pages (Login / Register) --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px;
}
.auth-card .logo {
  justify-content: center;
  margin-bottom: 32px;
}
.auth-card h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}
.auth-card .auth-subtitle {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.auth-card .btn { margin-top: 8px; }
.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--gray-400);
}
.auth-links a {
  color: var(--blue-glow);
  text-decoration: underline;
}

/* --- Dashboard / Staff --- */
.dashboard-header {
  padding: 100px 0 40px;
  background: var(--navy-light);
  border-bottom: 1px solid var(--border-subtle);
}
.dashboard-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dashboard-header h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-primary);
}
.dashboard-header .btn { font-size: 0.75rem; padding: 8px 16px; }

.dash-content {
  padding: 40px 0;
}

/* --- Athlete List --- */
.athlete-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.athlete-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.athlete-row:hover {
  border-color: rgba(59, 130, 246, 0.2);
}
.athlete-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
}
.athlete-name:hover { color: var(--blue-glow); }
.athlete-meta {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* --- Gallery Grid --- */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.gallery-filter-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: var(--gray-400);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}
.gallery-filter-btn:hover,
.gallery-filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-album {
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.gallery-album:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.gallery-album-cover {
  height: 200px;
  overflow: hidden;
}
.gallery-album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1a2d4d, #2563eb);
}
.gallery-album-info {
  padding: 16px;
}
.gallery-album-info h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.gallery-album-info span {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 2rem;
  padding: 16px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* --- Galleria: badge ZIP e pulsanti download in lightbox --- */
.gallery-album-cover {
  position: relative;
}

.gallery-zip-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.lightbox-photo {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.lightbox-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-dl:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.lightbox-dl-zip {
  background: var(--blue);
  border-color: var(--blue);
}

.lightbox-dl-zip:hover {
  background: #3b82f6;
}

/* --- Password Gate (Staff) --- */
.password-gate {
  max-width: 400px;
  margin: 0 auto;
}
.password-gate .form-group { margin-bottom: 16px; }
.password-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}

/* --- Document List (Area Atleta) --- */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-glow);
}
.doc-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.doc-date {
  font-size: 0.75rem;
  color: var(--gray-400);
}
.doc-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}
.doc-status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.doc-status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.doc-status-missing {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* --- Organigramma (Staff page) --- */
.org-section {
  margin-bottom: 48px;
}
.org-role {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--azure);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(14, 165, 233, 0.2);
}
.org-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.org-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 1 320px;
  padding: 16px 20px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.org-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
}
.org-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  border: 2px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--blue-glow);
  flex-shrink: 0;
}

.org-section.org-center .org-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.org-section.org-center .org-role {
  text-align: center;
}
.org-section.org-center .org-card {
  width: 300px;
  max-width: 100%;
  flex: 0 0 auto;
}
.org-avatar-photo {
  background: none;
  padding: 0;
  overflow: hidden;
}
.org-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.org-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.org-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.org-title {
  font-size: 0.8rem;
  color: var(--gray-400);
}
.org-tm-link {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

/* --- Compact Contacts Page --- */
.compact-contacts {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.compact-contacts .contact-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compact-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.compact-contact-item svg {
  color: var(--blue-glow);
  flex-shrink: 0;
  margin-top: 2px;
}
.compact-contact-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.compact-contact-item span,
.compact-contact-item a {
  color: var(--gray-400);
  font-size: 0.85rem;
}
.compact-contact-item a:hover {
  color: var(--blue-glow);
}
.compact-map {
  grid-column: 1 / -1;
}
.compact-map iframe {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 8px;
}
.compact-hours {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compact-hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-400);
  padding: 4px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.compact-hours-row:last-child {
  border-bottom: none;
}
.compact-social {
  display: flex;
  gap: 12px;
}
.compact-social a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-400);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.compact-social a:hover {
  color: var(--blue-glow);
}

/* =========================================
   Skeleton Loading (placeholder animati)
   ========================================= */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-match,
.skeleton-news,
.skeleton-sponsor,
.skeleton-album,
.skeleton-list {
  background: var(--skeleton-shimmer);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-match {
  height: 160px;
  width: 100%;
}

.skeleton-news {
  height: 280px;
  flex: 1;
  min-width: 280px;
}

.skeleton-sponsor {
  height: 50px;
  width: 120px;
  display: inline-block;
  margin: 0 20px;
  flex-shrink: 0;
}

.skeleton-album {
  height: 320px;
  border-radius: 12px;
}

.skeleton-list {
  height: 200px;
  width: 100%;
}

/* News img from Strapi */
.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* Sponsor img from Strapi */
.sponsor-logo img {
  max-height: 50px;
  max-width: 130px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.sponsor-logo img:hover {
  opacity: 1;
}

/* Gallery album img from Strapi */
.gallery-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* Match result colors */
.match-result-win { color: #22c55e; }
.match-result-loss { color: #ef4444; }
.match-result-draw { color: #f59e0b; }

/* Lightbox album detail */
.lightbox-album-detail {
  text-align: center;
  padding: 1rem;
  color: #fff;
}

.lightbox-album-detail h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.lightbox-album-detail span {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* --- News card as link --- */
a.news-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* --- News detail page --- */
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
}

.news-detail-cover {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 32px;
}

.news-detail-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--gray-300);
}

.news-detail-body br {
  margin-bottom: 8px;
}

.news-detail-img {
  width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}

.news-detail-back {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.skeleton-news-detail {
  height: 200px;
  background: linear-gradient(90deg, var(--navy) 25%, var(--navy-mid) 50%, var(--navy) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 10px;
}


/* =========================================
   TEMA CHIARO
   ========================================= */
[data-theme="light"] {
  --navy: #f4f6fa;
  --navy-light: #ffffff;
  --navy-mid: #e8edf4;
  --gray-100: #0f172a;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-600: #94a3b8;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-subtle: rgba(10, 22, 40, 0.08);
  --border-strong: rgba(10, 22, 40, 0.15);
  --border-btn: rgba(10, 22, 40, 0.35);
  --hover-bg: rgba(10, 22, 40, 0.05);
  --skeleton-shimmer: linear-gradient(90deg, rgba(10, 22, 40, 0.06) 25%, rgba(10, 22, 40, 0.1) 50%, rgba(10, 22, 40, 0.06) 75%);
  --header-bg: rgba(255, 255, 255, 0.85);
  --header-bg-scrolled: rgba(255, 255, 255, 0.97);
  --overlay-bg: #ffffff;
  --bar-bg: rgba(255, 255, 255, 0.95);
  --hero-overlay: linear-gradient(180deg, transparent 0%, rgba(10, 22, 40, 0.1) 100%);
}

[data-theme="light"] .btn-cta {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

[data-theme="light"] .hero-title { text-shadow: none; }
/* tema chiaro: gradiente più scuro per restare leggibile su fondo bianco */
[data-theme="light"] .hero-title span {
  background: linear-gradient(120deg, #0284c7 0%, #2563eb 55%, #1e3a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

[data-theme="light"] .news-card { background: var(--navy-light); }

[data-theme="light"] .news-link { color: var(--blue-dark); }

[data-theme="light"] .team-logo-placeholder { background: #1a2d4d; border-color: rgba(255, 255, 255, 0.15); }

/* --- Theme toggle (header) --- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.theme-toggle:hover {
  border-color: var(--azure);
  color: var(--azure);
  transform: translateY(-1px);
}
.theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: block; }

/* --- Language switch (bandiere) --- */
/* Menu più compatto in francese (voci molto più lunghe) */
html[lang="fr"] .nav-list { gap: 9px; }
html[lang="fr"] .nav-list a { font-size: 0.75rem; }
html[lang="fr"] .header-actions { gap: 14px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 26px;
  height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  line-height: 0;
}
.lang-btn svg {
  border-radius: 1px;
  display: block;
}
.lang-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.lang-btn.active {
  opacity: 1;
  border-color: var(--azure);
  box-shadow: 0 0 0 1px var(--azure);
}

/* --- SPONSOR PAGE --- */
.sponsor-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 20px 20px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.sponsor-card:hover {
  border-color: rgba(14, 165, 233, 0.35);
  transform: translateY(-3px);
}
.sponsor-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.sponsor-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
}
.sponsor-page-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray-400);
  padding: 40px 0;
}
.sponsor-page-grid .skeleton-sponsor {
  height: 166px;
  border-radius: 12px;
}

/* --- JOIN BOX (candidatura sponsor) --- */
.join-box {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px;
  background: linear-gradient(135deg, var(--navy-light) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 16px;
  text-align: center;
}
.join-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2rem;
  margin-bottom: 12px;
  background: linear-gradient(120deg, var(--azure), #60a5fa 55%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
[data-theme="light"] .join-title {
  background: linear-gradient(120deg, #0284c7 0%, #2563eb 55%, #1e3a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.join-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 0.98rem;
}
.join-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field-wide { grid-column: 1 / -1; }
.join-form label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.join-form input,
.join-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  color: var(--text-primary);
  background: var(--navy);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.join-form input:focus,
.join-form textarea:focus {
  outline: none;
  border-color: var(--azure);
}
.join-form textarea {
  resize: vertical;
  min-height: 120px;
}
.join-form .btn {
  justify-self: center;
  grid-column: 1 / -1;
  border: none;
  cursor: pointer;
}
.join-note {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-400);
  margin: 0;
}
.join-note a { color: var(--azure); }
.join-note a:hover { text-decoration: underline; }
.form-status {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  min-height: 1.2em;
}
.form-status.error { color: #f87171; }
.form-status.ok { color: var(--green); }

/* --- Link "scopri tutti gli sponsor" (marquee homepage) --- */
.sponsor-more-wrap {
  text-align: center;
  margin-top: 24px;
  padding: 0 24px;
}
.sponsor-more {
  color: var(--azure);
  font-size: 0.9rem;
  font-weight: 600;
}
.sponsor-more:hover { text-decoration: underline; }

/* --- Consenso privacy (registrazione, caricamento documenti) --- */
.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: inherit;
}
.consent-row input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  padding: 0;
  cursor: pointer;
}
.consent-row label { margin: 0; font-weight: 400; cursor: pointer; }
.consent-row a { text-decoration: underline; text-underline-offset: 2px; }

/* --- Pagina privacy: segnaposto da completare --- */
.ph {
  background: rgba(250, 204, 21, 0.2);
  border-radius: 4px;
  padding: 0 4px;
  white-space: nowrap;
}
.privacy-meta { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 20px; }

/* --- Avviso "pagina in costruzione" --- */
.cantiere {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px;
  border: 1px solid #f59e0b;
  border-left-width: 6px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.15);
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.cantiere strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.cantiere strong::before { content: "\1F6A7  "; }
.cantiere p { margin: 0; }
.cantiere a { text-decoration: underline; text-underline-offset: 2px; }

/* --- Header: voci di menu centrate tra logo e pulsanti e allineate in verticale --- */
.main-nav { justify-content: center; }
.nav-list { align-items: center; }
.nav-list li { display: flex; align-items: center; }
.nav-list a { line-height: 1.4; }
/* schermi stretti (appena sopra il menu a panino): voci piu vicine, per non toccare i pulsanti */
@media (max-width: 1130px) {
  .nav-list { gap: 12px; }
  html[lang="fr"] .nav-list { gap: 7px; }
}

/* --- Footer: mappa del campo sotto la descrizione del club --- */
.footer-heading-map { margin-top: 28px; }

/* --- Mappe di Google: si caricano solo dopo il clic (privacy) --- */
[data-map-src]:not(.map-attiva) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.compact-map[data-map-src]:not(.map-attiva) { min-height: 250px; }
.map-note { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); }
.map-link { font-size: 0.85rem; text-decoration: underline; text-underline-offset: 2px; color: var(--blue-glow); }
html[data-theme="light"] .map-link { color: var(--blue-dark); }
.footer-map iframe { display: block; width: 100%; height: 200px; border: 0; border-radius: 8px; }

/* --- Footer: da telefono la mappa va dopo i "Link rapidi" --- */
@media (max-width: 768px) {
  .footer-col-main { display: contents; }
  .footer-brand { order: 1; }
  .footer-grid > .footer-col:nth-child(2) { order: 2; }
  .footer-map-wrap { order: 3; }
  .footer-grid > .footer-col:nth-child(3) { order: 4; }
  .footer-grid > .footer-col:nth-child(4) { order: 5; }
  .footer-heading-map { margin-top: 0; }
}

/* --- Articolo (notizia): impaginazione elegante --- */
.news-detail-cover {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 40%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}
.news-detail-body { font-size: 1.08rem; line-height: 1.85; color: var(--gray-300); }
.news-detail-body p { margin: 0 0 1.4em; }
.news-detail-body > p:first-child { font-size: 1.25rem; line-height: 1.7; color: var(--text-primary); }
.news-detail-body strong { color: var(--text-primary); font-weight: 700; }
.news-detail-body h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 2.4em 0 0.9em;
  padding-left: 16px;
  border-left: 4px solid var(--azure);
}
.news-detail-body figure { margin: 2.4em 0; }
.news-detail-body figure img { display: block; width: 100%; height: auto; margin: 0; border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28); }
.news-detail-body figcaption { margin-top: 12px; text-align: center; font-size: 0.88rem; font-style: italic; color: var(--text-secondary); }
.news-detail-body blockquote {
  margin: 2.2em 0;
  padding: 1.3em 1.6em;
  border-left: 4px solid var(--azure);
  border-radius: 0 12px 12px 0;
  background: rgba(14, 165, 233, 0.09);
  font-size: 1.22rem;
  line-height: 1.65;
  font-style: italic;
  color: var(--text-primary);
}
.news-detail-body hr { border: 0; height: 1px; background: var(--border-strong); margin: 2.4em 0; }
.news-detail-body .motto {
  text-align: center;
  margin: 2.2em 0 0.4em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.news-detail-body .motto-forte {
  margin: 0.2em 0 1.2em;
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--azure);
}
.news-detail-body .firma { text-align: right; margin: 2em 0 0; font-style: italic; color: var(--text-secondary); }
html[data-theme="light"] .news-detail-body .motto-forte { color: var(--blue-dark); }
@media (max-width: 768px) {
  .news-detail-body { font-size: 1.02rem; line-height: 1.8; }
  .news-detail-body > p:first-child { font-size: 1.12rem; }
  .news-detail-body h2 { font-size: 1.3rem; }
  .news-detail-body blockquote { font-size: 1.08rem; padding: 1.1em 1.2em; }
  .news-detail-body .motto-forte { font-size: 1.6rem; }
}
