/* ==========================================================================
   DESIGN SYSTEM & STILI GLOBALI - SCI CLUB EUR
   ========================================================================== */

/* Import Google Fonts - Outfit per i titoli, Inter per il corpo del testo */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Palette Colori Alpina */
  --primary: #0a192f;        /* Deep Alpine Navy */
  --primary-light: #172a45;  /* Navy Medio */
  --secondary: #e1042f;      /* Brand Red */
  --secondary-hover: #b50325;
  --accent: #e2f1ff;         /* Pale Ice Blue */
  --text-dark: #1e293b;      /* Slate 800 */
  --text-light: #f8fafc;     /* Slate 50 */
  --text-muted: #64748b;     /* Slate 500 */
  --bg-light: #f8fafc;       /* Grigio-blu chiarissimo */
  --bg-dark: #07111e;        /* Quasi nero freddo per il footer/hero */
  --bg-card: #ffffff;
  
  /* Tipografia */
  --font-title: 'jaf-domus', 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'jaf-domus', 'Inter', system-ui, sans-serif;
  
  /* Effetti & Layout */
  --card-shadow: 0 4px 20px rgba(10, 25, 47, 0.06);
  --card-shadow-hover: 0 12px 30px rgba(10, 25, 47, 0.15);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Link */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Griglie & Contenitori */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  background-color: rgba(7, 17, 30, 0.98);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  transition: var(--transition);
}

header.scrolled .nav-container {
  height: 70px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 60px;
  width: auto;
  transition: var(--transition);
}

header.scrolled .logo-img {
  height: 45px;
}

.logo-text {
  font-family: var(--font-title);
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.logo-text span {
  color: var(--secondary);
  font-weight: 400;
  font-size: 0.9rem;
  display: block;
}

/* Navigazione */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text-light);
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--secondary);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary-light);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 0.5rem 0;
  z-index: 100;
}

.dropdown-link {
  color: var(--text-light);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-family: var(--font-title);
  font-weight: 500;
  letter-spacing: 0.5px;
  display: block;
}

.dropdown-link:hover {
  background-color: var(--secondary);
  color: var(--text-light);
}

.nav-item.has-dropdown:hover .dropdown {
  display: flex;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--text-light);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ==========================================================================
   HERO / BANNER SECTION
   ========================================================================== */
.hero-slider {
  position: relative;
  height: 65vh;
  min-height: 450px;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.slide-container {
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 25, 47, 0.4), rgba(7, 17, 30, 0.85));
  z-index: 3;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  text-align: center;
  width: 90%;
  max-width: 800px;
  color: var(--text-light);
}

.hero-logo {
  height: 120px;
  width: auto;
  margin: 0 auto 1.5rem auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-affiliations {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.aff-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

/* ==========================================================================
   CARTE & GRIGLIE DI BASE
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid rgba(10, 25, 47, 0.03);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

/* ==========================================================================
   SEZIONE ALLANATORI & ATLETI
   ========================================================================== */
.member-img-container {
  height: 320px;
  overflow: hidden;
  position: relative;
  background-color: var(--accent);
}

.member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: var(--transition);
}

.card:hover .member-img {
  transform: scale(1.05);
}

.member-info {
  padding: 1.5rem;
  text-align: center;
}

.member-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.member-role {
  font-size: 0.9rem;
  color: var(--secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-year {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Filtro Atleti */
.filter-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(10, 25, 47, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  background-color: var(--bg-light);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 150, 255, 0.15);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-filter {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(10, 25, 47, 0.08);
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter:hover {
  background-color: var(--accent);
  color: var(--primary);
}

.btn-filter.active {
  background-color: var(--secondary);
  color: var(--text-light);
  border-color: var(--secondary);
}

/* ==========================================================================
   SEZIONE SPONSOR
   ========================================================================== */
.sponsor-section {
  margin-bottom: 3rem;
}

.sponsor-title-inner {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  border-left: 4px solid var(--secondary);
  padding-left: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.sponsor-item {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  height: 120px;
  width: 220px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid rgba(10, 25, 47, 0.03);
}

.sponsor-item:hover {
  transform: scale(1.05);
  box-shadow: var(--card-shadow-hover);
}

.sponsor-item img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  transition: var(--transition);
}

/* ==========================================================================
   SEZIONE AGONISMO (TAB CONTROL)
   ========================================================================== */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tabs-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 2px solid rgba(10, 25, 47, 0.05);
  padding-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-transform: uppercase;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--secondary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1.5rem;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.program-header {
  text-align: center;
  margin-bottom: 3rem;
}

.program-header h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.program-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.package-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.package-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.package-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.package-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.package-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.package-features li {
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.package-features li::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 800;
}

.package-footer {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(10, 25, 47, 0.05);
  padding-top: 1rem;
}

/* ==========================================================================
   CLUB INFO & STORIA
   ========================================================================== */
.history-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.history-text h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.history-text p {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

.history-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.history-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  height: 200px;
}

.history-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-img-wrap:nth-child(even) {
  transform: translateY(20px);
}

/* Timeline Loghi Storici */
.logos-timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  padding: 2rem 0;
  margin-top: 4rem;
}

.timeline-item {
  flex: 1;
  min-width: 180px;
  text-align: center;
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
  transition: var(--transition);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.timeline-year {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.timeline-logo {
  height: 120px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Sede & Mappa */
.location-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: stretch;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.location-info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.location-info h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.location-address {
  margin-bottom: 1.5rem;
}

.location-address h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-address p {
  color: var(--text-dark);
}

.map-container {
  min-height: 400px;
  height: 100%;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   TIPOGRAFIA & LAYOUT REGOLAMENTI
   ========================================================================== */
.doc-container {
  background-color: var(--bg-card);
  padding: 4rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  max-width: 900px;
  margin: 0 auto;
}

.doc-content h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--primary);
  margin: 2.5rem 0 1rem 0;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(10, 25, 47, 0.08);
  padding-bottom: 0.5rem;
}

.doc-content h3:first-of-type {
  margin-top: 0;
}

.doc-content ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-content li {
  font-size: 1rem;
  color: var(--text-dark);
}

/* ==========================================================================
   ORGANIGRAMMA LAYOUT
   ========================================================================== */
.org-group {
  margin-bottom: 4rem;
}

.org-group-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 2rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.org-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.02);
  transition: var(--transition);
}

.org-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.org-role {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.org-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.org-subinfo {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem 0;
  border-top: 3px solid var(--secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-info-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  height: 50px;
  width: auto;
}

.footer-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.footer-desc {
  font-size: 0.9rem;
  color: #a0aec0;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  border-radius: 50%;
  color: var(--text-light);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

.footer-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #a0aec0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-light);
  padding-left: 0.25rem;
}

.footer-contact-item {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #a0aec0;
  display: flex;
  flex-direction: column;
}

.footer-contact-item strong {
  color: var(--text-light);
  font-family: var(--font-title);
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #718096;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   RESPONSIVESS / BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .history-intro {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .location-section {
    grid-template-columns: 1fr;
  }
  .map-container {
    height: 350px;
    min-height: auto;
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }

  /* Hamburger Menu e overlay */
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-dark);
    flex-direction: column;
    padding: 100px 2rem 2rem 2rem;
    gap: 1.5rem;
    transition: var(--transition);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 100;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-item.has-dropdown {
    display: flex;
    flex-direction: column;
  }

  .nav-item.has-dropdown .dropdown {
    position: static;
    background: none;
    box-shadow: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    border: none;
    display: flex; /* sempre visibile su mobile */
  }

  .dropdown-link {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #a0aec0;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .doc-container {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-affiliations {
    gap: 1rem;
  }
  .aff-logo {
    height: 40px;
  }
  .location-info {
    padding: 2rem 1.5rem;
  }
}

/* ==========================================================================
   SEZIONE NEWS & FEED
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.news-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: var(--accent);
}

.news-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-card:hover .news-img-wrap img {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--secondary);
  color: var(--text-light);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 150, 255, 0.2);
}

.news-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.news-link {
  margin-top: auto;
  color: var(--secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.news-link:hover {
  color: var(--secondary-hover);
  gap: 0.5rem;
}

/* ==========================================================================
   SEZIONE GALLERIE & LIGHTBOX
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  height: 250px;
  cursor: pointer;
  border: 1px solid rgba(10, 25, 47, 0.03);
  transition: var(--transition);
}

.gallery-card:hover {
  transform: scale(1.02);
  box-shadow: var(--card-shadow-hover);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 25, 47, 0.9) 10%, rgba(10, 25, 47, 0.2) 80%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-card-title {
  font-family: var(--font-title);
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.gallery-card-cat {
  font-family: var(--font-title);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: translateY(10px);
  transition: transform 0.3s ease;
  transition-delay: 0.05s;
}

.gallery-card:hover .gallery-card-title,
.gallery-card:hover .gallery-card-cat {
  transform: translateY(0);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 17, 30, 0.98);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--text-light);
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--secondary);
  transform: rotate(90deg);
}

.lightbox-content {
  max-width: 85%;
  max-height: 80%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: lightboxZoom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes lightboxZoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border: none;
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  user-select: none;
  z-index: 2010;
}

.lightbox-nav:hover {
  background-color: var(--secondary);
  color: var(--text-light);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-caption {
  position: absolute;
  bottom: 2.5rem;
  color: var(--text-light);
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  background: rgba(10, 25, 47, 0.8);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   SEZIONE UTILITÀ & DOWNLOAD
   ========================================================================== */
.download-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.download-card {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
  transition: var(--transition);
}

.download-card:hover {
  transform: translateX(5px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0, 150, 255, 0.2);
}

.download-icon {
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.download-card:hover .download-icon {
  background-color: var(--secondary);
  color: var(--text-light);
}

.download-info {
  margin-left: 1.5rem;
  flex-grow: 1;
}

.download-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.download-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-btn {
  background-color: var(--bg-light);
  color: var(--primary);
  border: 1px solid rgba(10, 25, 47, 0.1);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.download-card:hover .download-btn {
  background-color: var(--secondary);
  color: var(--text-light);
  border-color: var(--secondary);
}

.links-panel {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--primary);
  border: 1px solid transparent;
}

.link-item a:hover {
  background-color: #fff;
  border-color: rgba(0, 150, 255, 0.2);
  color: var(--secondary);
  padding-left: 1.25rem;
}

.link-arrow {
  color: var(--secondary);
  font-weight: 700;
  transition: var(--transition);
}

.link-item a:hover .link-arrow {
  transform: translateX(3px);
}

.info-alert {
  background-color: var(--accent);
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
  font-size: 0.95rem;
}

.info-alert strong {
  display: block;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: var(--secondary-hover);
}

@media (max-width: 992px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }
  .lightbox-prev {
    left: 1rem;
  }
  .lightbox-next {
    right: 1rem;
  }
  .download-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .download-info {
    margin-left: 0;
  }
}
}

/* 5 PER MILLE SECTION */
.five-per-mille-section {
  padding: 4.5rem 0;
  position: relative;
  z-index: 10;
}

.five-per-mille-card {
  background: var(--bg-card, white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(10, 25, 47, 0.03);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}

.five-per-mille-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.five-per-mille-text h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2.8rem;
  color: var(--primary);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.five-per-mille-text p {
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.6;
}

.cf-container {
  background: var(--bg-light);
  border: 2px dashed var(--secondary);
  border-radius: var(--radius-sm, 12px);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  max-width: 480px;
}

.cf-label {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.cf-value-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cf-value {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 2px;
}

.cf-copy-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cf-copy-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

.five-per-mille-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.five-per-mille-image img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  object-fit: contain;
}

.five-per-mille-image img:hover {
  transform: scale(1.02);
}

@media (max-width: 900px) {
  .five-per-mille-card {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }
  .five-per-mille-text h2 {
    font-size: 2.2rem;
    text-align: center;
  }
  .five-per-mille-text p {
    text-align: center;
  }
  .cf-container {
    margin: 0.5rem auto 0;
    width: 100%;
  }
  .cf-value-wrapper {
    justify-content: center;
  }
  .five-per-mille-image img {
    max-height: 280px;
  }
}

/* RESPONSIVE SPONSOR GRIDS */
@media (max-width: 768px) {
  .sponsor-grid {
    gap: 1.5rem;
  }
  .sponsor-item {
    height: 90px;
    width: 160px;
    padding: 1rem;
  }
  .sponsor-item img {
    max-height: 60px;
  }
}

@media (max-width: 480px) {
  .sponsor-grid {
    gap: 1rem;
  }
  .sponsor-item {
    width: calc(50% - 0.5rem);
    height: 80px;
    padding: 0.75rem;
  }
  .sponsor-item img {
    max-height: 50px;
  }
}
