/* ============================================================
   IOWT GLOBAL CSS – LIGHT THEME (UPDATED)
   - Bottoni squadrati
   - Hero video full width + overlay sopra + thumbnail fallback (YouTube)
   - Logo 2026 in navbar + footer
   ============================================================ */

/* ROOT VARIABLES */
:root{
  --color-primary:#007b91;
  --color-primary-soft:#e9f3ff;
  --text-dark:#111;
  --text-muted:#555;
  --bg-light:#fff;
  --bg-soft:#f5f7fa;
  --border-soft:#e0e0e0;

  --radius-card:14px;
  --shadow-soft:0 4px 16px rgba(0,0,0,.06);

  --max-width:1200px;
}

/* RESET & BASE */
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg-light);
  color:var(--text-dark);
  line-height:1.6;
}
a{color:var(--color-primary);text-decoration:none}
a:hover{text-decoration:underline}
.page{background:var(--bg-light)}
.container{width:100%;max-width:var(--max-width);margin:0 auto;padding:0 1.5rem}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-header{
  position:sticky;top:0;z-index:100;
  background:#fff;border-bottom:1px solid var(--border-soft);
}
.nav-container{
  display:flex;align-items:center;justify-content:space-between;
  padding:.6rem 0;
}
.nav-left{display:flex;align-items:center;gap:.75rem}
.nav-logo{display:inline-flex;align-items:center;gap:.6rem}
.nav-logo-img{height:10vw;width:auto;display:block;margin-top:0;margin-bottom:-50px}
.nav-logo-mark{
  width:34px;height:34px;border-radius:999px;
  background:var(--color-primary);color:#fff;font-size:.9rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.nav-logo-text{
  font-size:.8rem;letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);
}

/* Desktop menu */
.main-nav{display:flex;align-items:center;gap:1.5rem}
.nav-menu{list-style:none;display:flex;align-items:center;gap:1.2rem}
.nav-link{
  font-size:.85rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
  padding:.5rem .8rem;
  position:relative;
  transition:all 0.2s ease;
  background:transparent;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:0.4rem;
}
.nav-link:hover{
  color:var(--text-dark);
  background:var(--bg-light);
  border-radius:6px;
}
.nav-link-active{
  color:var(--color-primary);
  background:var(--color-primary-soft);
  border-radius:6px;
}

.dropdown-arrow{
  transition:transform 0.2s ease;
  opacity:0.7;
}

.has-dropdown.open .dropdown-arrow{
  transform:rotate(180deg);
}

/* Dropdown menu */
.nav-dropdown{position:relative}
.nav-dropdown-toggle{
  font-family:inherit;
  font-weight:inherit;
}

/* CTA nav */
.nav-cta{
  font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;
  padding:.55rem 1.1rem;border-radius:0; /* squadrato */
  background:var(--color-primary);color:#fff;box-shadow:var(--shadow-soft)
}
.nav-cta:hover{text-decoration:none;filter:brightness(1.07)}

/* Logo 2026 a destra */
.nav-right{display:flex;align-items:center;gap:.75rem;margin-left:1rem}
.nav-logo-2026{height:100px;width:auto;display:block;margin-top:0;margin-bottom:-50px}

/* Burger */
.nav-toggle{
  display:none;flex-direction:column;justify-content:center;gap:4px;
  width:32px;height:32px;border-radius:0;border:1px solid var(--border-soft);
  background:transparent;cursor:pointer
}
.nav-toggle span{height:2px;width:16px;background:var(--text-dark);display:block;margin:0 auto}

/* Mobile nav */
@media (max-width:900px){
  .nav-toggle{display:flex;margin-right:5%}
  .nav-logo-img{height:100px;margin-bottom:-30px}
  .main-nav{
    position:fixed;
    right:0;
    top:60px;
    width:100%;
    max-width:100%;
    padding:1rem 0;
    background:#fff;
    border-top:1px solid var(--border-soft);
    box-shadow:0 16px 40px rgba(0,0,0,.12);
    flex-direction:column;
    align-items:stretch;
    gap:0;
    opacity:0;
    pointer-events:none;
    transform:translateY(-8px);
    transition:.18s ease;
    max-height:calc(100vh - 60px);
    overflow-y:auto;
  }
  .main-nav.nav-open{opacity:1;pointer-events:auto;transform:translateY(0)}
  .nav-menu{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    width:100%;
  }
  .nav-menu li{
    width:100%;
    border-bottom:1px solid var(--border-soft);
  }
  .nav-menu li:last-child{
    border-bottom:none;
  }
  .nav-link{
    display:block;
    width:100%;
    padding:1rem 1.5rem;
    font-size:.85rem;
    text-align:left;
  }
  .nav-cta{
    width:100%;
    text-align:center;
    justify-content:center;
    margin:1rem 1.5rem;
    width:calc(100% - 3rem);
    padding:1rem;
  }
  .nav-logo-2026{height:34px}
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.8rem 1.4rem;border-radius:0; /* squadrati */
  font-size:.9rem;font-weight:600;border:1px solid transparent;cursor:pointer;
  text-decoration:none;transition:.15s ease
}
.btn-primary{background:var(--color-primary);color:#fff;box-shadow:var(--shadow-soft)}
.btn-primary:hover{filter:brightness(1.07);text-decoration:none}
.btn-outline{background:transparent;color:var(--color-primary);border-color:var(--color-primary)}
.btn-outline:hover{background:var(--color-primary-soft);text-decoration:none}

.badge{
  display:inline-flex;align-items:center;padding:.25rem .7rem;border-radius:999px;
  font-size:.75rem;background:var(--color-primary-soft);color:var(--color-primary)
}
.pill{
  display:inline-flex;align-items:center;padding:.2rem .6rem;border-radius:999px;
  background:var(--bg-soft);border:1px solid var(--border-soft);
  font-size:.75rem;color:var(--text-muted)
}

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative;
  width:100%;
  padding:4rem 0 3rem;
  overflow:hidden;
  min-height:70vh;
}
.hero-inner{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  z-index:3;
  max-width:900px;
}
@media (max-width:900px){ .hero-inner{max-width:100%} }
@media (max-width:720px){
  .hero{min-height:50vh;padding:2.5rem 0 1.5rem}
  .hero-inner{padding:2.4rem 1rem}
  .hero-video{display:block!important;width:160vw;height:90vw}
  .hero-video-fallback{display:block!important}
}

.hero-tagline{font-size:.8rem;text-transform:uppercase;letter-spacing:.14em;color:#f0f0f0;display:flex;align-items:center;gap:.5rem;justify-content:center}
.hero-tagline .dot{width:6px;height:6px;border-radius:50%;background:#b7f0ff}
.hero-title{
  font-size:clamp(2.2rem,3.3vw,3rem);
  font-weight:800;text-transform:uppercase;margin-bottom:.8rem;
  color:#fff;
}
.hero-title .accent{color:#b7f0ff}
.hero-subtitle{font-size:1rem;color:#eaeaea;max-width:36rem;margin:0 auto 1.7rem}
.hero-meta{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1.5rem;justify-content:center}
.hero-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.4rem 1rem;background:rgba(255,255,255,.12);backdrop-filter:blur(8px);border-radius:999px;font-size:.85rem;color:#eaeaea}
.hero-chip .water-icon{width:20px;height:20px;color:#b7f0ff}
.hero-actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-bottom:1.1rem;justify-content:center}
.hero-note{font-size:.87rem;color:#eaeaea;max-width:30rem}

/* HERO VIDEO + THUMBNAIL FALLBACK */
.hero-video-wrapper{
  position:absolute;inset:0;
  z-index:0;
  overflow:hidden;
  background:#000;
}

/* Thumbnail YouTube (sempre presente sotto al video) */
.hero-video-fallback{
  display:block;
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;
  z-index:0;
  opacity:.9;
}

/* iframe YouTube */
.hero-video{
  display:block;
  position:absolute;top:50%;left:50%;
  width:100vw;height:56.25vw; /* 16:9 */
  min-width:100%;min-height:100%;
  transform:translate(-50%,-50%);
  pointer-events:none;border:0;
  z-index:1;
}

/* Overlay sopra al video (leggibilità) */
.hero::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(
    180deg,
    rgba(0,0,0,.35) 0%,
    rgba(0,0,0,.55) 50%,
    rgba(0,0,0,.70) 100%
  );
  z-index:2;
}

/* Mobile: video attivo; lo ingrandiamo un filo */
@media (max-width:768px){
  .site-header{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
  }
  
  body{
    padding-top:60px;
  }
  
  .nav-logo-mark{
    width:56px;
    height:56px;
    font-size:1.4rem;
  }
  
  .water-icon-badge{
    width:28px !important;
    height:28px !important;
  }
  
  .pill svg{
    width:24px !important;
    height:24px !important;
  }
  
  .hero-video{width:160vw;height:90vw;display:block!important}
  .hero-video-fallback{display:block!important}
}

/* Hero card */
.hero-card{
  background:#fff;border-radius:var(--radius-card);
  border:1px solid var(--border-soft);
  box-shadow:var(--shadow-soft);
  padding:1.3rem 1.4rem;
}
.hero-card-title{
  font-size:.8rem;text-transform:uppercase;letter-spacing:.14em;color:var(--text-muted);
  margin-bottom:.5rem
}
.hero-card-main{
  display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:.9rem
}
.hero-card-main h2{font-size:1.1rem;margin:0}
.hero-card-meta{text-align:right;font-size:.85rem;color:var(--text-muted)}
.hero-card-meta strong{display:block;color:var(--text-dark)}
.hero-card-info{font-size:.9rem;color:var(--text-muted);margin-bottom:.9rem}
.hero-card-footer{display:flex;justify-content:space-between;align-items:center;gap:.6rem}

/* ============================================================
   HOME – GRID TAPPE
   ============================================================ */
main{padding:2.4rem 0 3.5rem}

.calendar-header{
  display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:.8rem
}
.calendar-actions{font-size:.85rem}

/* ============================================================
   TIMELINE LAYOUT (Tappe)
   ============================================================ */
.timeline-container{
  max-width:1200px;
  margin:3rem auto;
  position:relative;
}

.timeline-container:before{
  content:'';
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:4px;
  background:var(--color-primary);
  transform:translateX(-50%);
  z-index:1;
}

.timeline-month-header{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:3rem 0 2rem;
  position:relative;
  z-index:2;
}

.timeline-month-label{
  font-size:1.1rem;
  font-weight:700;
  letter-spacing:0.08em;
  color:var(--color-primary);
  padding:0.5rem 1.5rem;
  background:#fff;
  border-radius:999px;
  border:2px solid var(--color-primary);
}

.timeline-item{
  position:relative;
  margin-bottom:2rem;
  width:50%;
}

.timeline-left{
  padding-right:60px;
  left:0;
}

.timeline-right{
  padding-left:60px;
  left:50%;
}

.timeline-left .timeline-marker{
  right:-11px;
}

.timeline-right .timeline-marker{
  left:-11px;
}

.timeline-marker{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  background:var(--color-primary);
  border:4px solid #fff;
  border-radius:50%;
  box-shadow:0 0 0 2px var(--color-primary);
  z-index:3;
}

.timeline-card-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.timeline-content{
  background:#fff;
  border-radius:12px;
  border:1px solid var(--border-soft);
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  overflow:hidden;
  transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover{
  transform:translateY(-4px);
  box-shadow:0 8px 28px rgba(0,0,0,0.12);
}

.timeline-image{
  position:relative;
  width:100%;
  height:320px;
  overflow:hidden;
}

.timeline-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.timeline-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.85) 100%);
  z-index:1;
}

.timeline-info-overlay{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:1.5rem;
  color:#fff;
  z-index:2;
}

.timeline-status{
  position:absolute;
  top:1rem;
  right:1rem;
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.4rem 1rem;
  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(8px);
  border-radius:999px;
  font-size:0.8rem;
  font-weight:600;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
  text-decoration:none;
  transition:all 0.2s ease;
  z-index:3;
}

.timeline-status:hover{
  transform:scale(1.05);
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

.timeline-status .status-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  animation:pulse 2s ease-in-out infinite;
}

.timeline-status-open .status-dot{
  background-color:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,0.6);
}

.timeline-status-open .status-label{
  color:#16a34a;
}

.timeline-status-soon .status-dot{
  background-color:#f59e0b;
  box-shadow:0 0 6px rgba(245,158,11,0.6);
}

.timeline-status-soon .status-label{
  color:#d97706;
}

.timeline-status-past .status-dot{
  background-color:#6b7280;
  box-shadow:0 0 6px rgba(107,114,128,0.6);
}

.timeline-status-past .status-label{
  color:#4b5563;
}

.timeline-water-badge{
  position:absolute;
  bottom:1rem;
  right:1rem;
  display:inline-flex;
  align-items:center;
  gap:0.4rem;
  padding:0.4rem 0.9rem;
  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(8px);
  border-radius:999px;
  font-size:0.82rem;
  font-weight:600;
  color:#0891b2;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
  z-index:3;
}

.timeline-water-badge .water-icon{
  color:#0891b2;
}

.timeline-date{
  font-size:0.82rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:rgba(255,255,255,0.9);
  margin-bottom:0.5rem;
}

.timeline-title{
  font-size:1.6rem;
  font-weight:700;
  color:#fff;
  margin:0 0 0.6rem 0;
  line-height:1.2;
}

.timeline-location{
  display:flex;
  align-items:center;
  gap:0.4rem;
  font-size:0.95rem;
  color:rgba(255,255,255,0.9);
}

.timeline-location svg{
  flex-shrink:0;
  color:rgba(255,255,255,0.95);
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.7rem 1.3rem;
  border-radius:8px;
  font-size:0.9rem;
  font-weight:600;
  text-decoration:none;
  transition:all 0.2s ease;
  border:none;
  cursor:pointer;
}

.btn-primary{
  background:var(--color-primary);
  color:#fff;
}

.btn-primary:hover{
  background:var(--color-primary-dark);
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,122,204,0.3);
}

.btn-secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--border-soft);
}

.btn-secondary:hover{
  background:#f8f9fa;
  border-color:var(--color-primary);
  color:var(--color-primary);
}

.btn svg{
  width:16px;
  height:16px;
}

@media (max-width:768px){
  .timeline-container:before{
    left:20px;
  }
  
  .timeline-item{
    width:100%;
    left:0 !important;
    padding-left:60px !important;
    padding-right:0 !important;
  }
  
  .timeline-marker{
    left:10px !important;
    right:auto !important;
    top:40px;
  }
  
  .timeline-image{
    height:280px;
  }
  
  .timeline-title{
    font-size:1.4rem;
  }
}

/* ============================================================
   NEWS GRID (Home)
   ============================================================ */
.news-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:2rem;
}

.news-card{
  position:relative;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover{
  transform:translateY(-4px);
  box-shadow:0 8px 24px rgba(0,0,0,0.15);
}

.news-card-link{
  text-decoration:none;
  color:inherit;
  display:block;
}

.news-card-image{
  position:relative;
  width:100%;
  height:350px;
  background-size:cover;
  background-position:center;
}

.news-card-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.85) 100%);
}

.news-card-content{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:1.5rem;
  color:#fff;
  z-index:2;
}

.news-date{
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.1em;
  opacity:0.9;
  margin-bottom:0.5rem;
}

.news-title{
  font-size:1.3rem;
  font-weight:700;
  margin:0 0 0.5rem 0;
  line-height:1.3;
}

.news-excerpt{
  font-size:0.9rem;
  line-height:1.5;
  opacity:0.95;
  margin:0;
}

@media (max-width:900px){
  .news-grid{
    grid-template-columns:1fr;
  }
}

/* ============================================================
   STAGE GRID (index.php)
   ============================================================ */
.stages-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1.2rem;margin-top:1rem
}
@media (max-width:1100px){.stages-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.stages-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.stages-grid{grid-template-columns:minmax(0,1fr)}}

.stage-card{
  position:relative;background:#fff;border-radius:var(--radius-card);
  border:1px solid var(--border-soft);
  padding:1rem 1.05rem 1.1rem;
  box-shadow:var(--shadow-soft);
  transition:.18s ease
}
.stage-card:hover{transform:translateY(-3px);box-shadow:0 8px 28px rgba(0,0,0,.12)}
.stage-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:.4rem}
.stage-date{font-size:.78rem;text-transform:uppercase;letter-spacing:.12em;color:var(--text-muted)}
.stage-status{display:flex;align-items:center}
.status-dot{
  display:block;width:10px;height:10px;border-radius:50%;
  animation:pulse 2s ease-in-out infinite
}
.stage-status-green .status-dot{background-color:#22c55e;box-shadow:0 0 8px rgba(34,197,94,.6)}
.stage-status-yellow .status-dot{background-color:#f59e0b;box-shadow:0 0 8px rgba(245,158,11,.6)}
.stage-status-red .status-dot{background-color:#ef4444;box-shadow:0 0 8px rgba(239,68,68,.6)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}
.stage-name{font-size:1rem;font-weight:600;margin-bottom:.15rem}
.stage-region{font-size:.82rem;color:var(--text-muted);margin-bottom:.5rem;font-style:italic}
.stage-races{font-size:.85rem;color:var(--text);font-weight:500}
.stage-meta-row{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin-bottom:.5rem}
.pill-relay{background-color:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}
.pill-water{background-color:#ecfdf5;color:#059669;border:1px solid #a7f3d0;display:inline-flex;align-items:center;gap:.3rem}
.pill-water .water-icon-badge{color:#0891b2}
.stage-footer{display:flex;justify-content:space-between;align-items:center;gap:.4rem;font-size:.8rem}
.stage-link{text-transform:uppercase;letter-spacing:.12em}
.stage-arrow{opacity:.7}
.stage-card a.card-link{position:absolute;inset:0;text-indent:-9999px}

/* ============================================================
   SPONSOR BANNER
   ============================================================ */
.sponsor-banner{
  margin-top:3rem;padding:2.5rem 0;
  background:var(--color-primary-soft);
  border-top:1px solid var(--border-soft);
  border-bottom:1px solid var(--border-soft)
}
.sponsor-inner{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,2fr);
  gap:2rem;align-items:center
}
@media (max-width:900px){.sponsor-inner{grid-template-columns:minmax(0,1fr)}}
.sponsor-pill{
  display:inline-flex;align-items:center;padding:.2rem .7rem;border:1px solid var(--border-soft);
  background:#fff;font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);
  margin-bottom:.5rem;border-radius:999px
}
.sponsor-label h3{font-size:1.3rem;margin-bottom:.4rem}
.sponsor-label p{font-size:.9rem;color:var(--text-muted);max-width:26rem}
.sponsor-logos{display:flex;flex-wrap:wrap;gap:.9rem;justify-content:flex-end}
@media (max-width:900px){.sponsor-logos{justify-content:flex-start}}
.sponsor-logo{
  min-width:120px;min-height:52px;padding:.6rem .9rem;
  border-radius:var(--radius-card);
  border:1px solid var(--border-soft);
  background:#fff;box-shadow:var(--shadow-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:.78rem;color:var(--text-muted);
  text-decoration:none;
  transition:transform .2s ease, box-shadow .2s ease;
}

.sponsor-logo:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.1);
}

.sponsor-logo img{
  max-width:200px;
  max-height:80px;
  object-fit:contain;
}

/* Layout sponsor centrato */
.sponsor-header-centered{
  text-align:center;
  margin-bottom:2rem;
}

.sponsor-header-centered h3{
  font-size:1.8rem;
  font-weight:700;
  color:var(--color-primary);
  margin:0;
}

.sponsor-logos-centered{
  display:flex;
  flex-wrap:wrap;
  gap:.9rem;
  justify-content:center;
  align-items:center;
}

/* Icone water type nei badge */
.water-icon-badge{
  width:16px;
  height:16px;
  display:inline-block;
  vertical-align:middle;
  margin-right:4px;
  color:currentColor;
}

.stage-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  padding:2.5rem 0 2rem;
  background:#fff;border-top:1px solid var(--border-soft)
}
.footer-inner{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(0,1.1fr) minmax(0,1.1fr);
  gap:2rem
}
@media (max-width:900px){.footer-inner{grid-template-columns:minmax(0,1fr)}}
.footer-col{font-size:.9rem}
.footer-logo{display:flex;align-items:center;gap:.6rem;margin-bottom:.6rem}
.footer-logo-text{font-size:.8rem;letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted)}
.footer-text{font-size:.9rem;color:var(--text-muted);max-width:26rem;margin-bottom:.8rem}
.footer-copy{font-size:.8rem;color:var(--text-muted);margin-top:1rem}

.footer-title{
  font-size:.9rem;text-transform:uppercase;letter-spacing:.12em;color:var(--text-muted);margin-bottom:.6rem
}
.footer-links{list-style:none;padding:0;margin:0}
.footer-links li{margin-bottom:.35rem}
.footer-links a{font-size:.9rem;color:var(--text-dark)}
.footer-links a:hover{color:var(--color-primary)}

.footer-links-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}

.footer-col-split{
  list-style:none;
  margin:0;
  padding:0;
}

.footer-social{margin-top:.7rem;display:flex;gap:.5rem}
.footer-social a{
  width:28px;height:28px;border-radius:0; /* squadrato */
  border:1px solid var(--border-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:.75rem;color:var(--color-primary)
}
.footer-social a:hover{background:var(--color-primary-soft)}

/* Logo 2026 nel footer */
.footer-2026{margin-top:1rem}
.footer-logo-2026{height:56px;width:auto;display:block}
@media (max-width:900px){.footer-logo-2026{height:48px}}

/* elenco tappe footer */
.footer-stages{
  list-style:none;padding:0;margin:0;
  display:grid;
  grid-template-columns:1fr;
  gap:.25rem
}
.footer-stages a{
  display:inline-block;
  padding:.15rem 0;
  color:var(--text-dark);
}
.footer-stages a:hover{color:var(--color-primary)}

/* Dropdown tappe (no bootstrap) */
.has-dropdown { position: relative; }

.nav-dropdown-toggle{
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-family:inherit;
  font-weight:inherit;
}

.nav-dropdown-menu{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background:#fff;
  border: 1px solid var(--border-soft);
  border-radius:8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  padding: .6rem;
  display: none;
  z-index: 200;
}

.has-dropdown.open .nav-dropdown-menu{ 
  display:block;
}

.nav-dropdown-item{
  display:block;
  padding:.6rem .8rem;
  color: var(--text-dark);
  font-size:.85rem;
  text-decoration:none;
  border-radius:6px;
  transition:all 0.2s ease;
}

.nav-dropdown-item:hover{
  background: var(--color-primary-soft);
  color:var(--color-primary);
  text-decoration:none;
}

/* su mobile: dropdown dentro al menu aperto */
@media (max-width: 900px){
  .has-dropdown{
    width:100%;
  }
  
  .nav-dropdown-toggle{
    display:block;
    width:100%;
    padding:1rem 1.5rem;
    font-size:.85rem;
    text-align:left;
    color:var(--text-muted);
    background:var(--bg-light);
    letter-spacing:.12em;
    text-transform:uppercase;
    font-weight:inherit;
  }
  
  .nav-dropdown-toggle:hover,
  .has-dropdown.open .nav-dropdown-toggle{
    background:#e8e8e8;
    color:var(--text-dark);
  }
  
  .nav-dropdown-menu{
    position:static;
    width:100%;
    min-width:100%;
    box-shadow:none;
    border:0;
    border-radius:0;
    padding:0;
    background:#f9f9f9;
  }
  
  .nav-dropdown-item{
    padding:0.8rem 2rem;
    font-size:.85rem;
    border-bottom:1px solid #e8e8e8;
  }
  
  .nav-dropdown-item:last-child{
    border-bottom:none;
  }
}

/* ============================================================
   TAB NAVIGATION (per pagina tappa)
   ============================================================ */
.tab-nav-wrapper{
  position:sticky;
  top:69px;
  z-index:90;
  background:#007b91;
  border-bottom:1px solid rgba(0,0,0,.1);
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.tab-nav{
  display:flex;
  gap:0;
  padding:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.tab-nav::-webkit-scrollbar{display:none}

.tab-nav-link{
  position:relative;
  flex:1 1 auto;
  text-align:center;
  padding:1.1rem 1.5rem;
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#fff;
  border-bottom:3px solid transparent;
  transition:.2s ease;
  white-space:nowrap;
  background:transparent;
}
.tab-nav-link:hover{
  color:#fff;
  background:rgba(255,255,255,.15);
  text-decoration:none;
}
.tab-nav-link.active{
  color:#fff;
  border-bottom-color:#fff;
  background:rgba(255,255,255,.1);
}

@media (max-width:900px){
  .tab-nav-wrapper{top:56px}
  .tab-nav-link{
    flex:0 0 auto;
    min-width:120px;
    padding:.9rem 1rem;
    font-size:.85rem;
  }
}

/* ============================================================
   RACE CARDS (sezione gare tappa)
   ============================================================ */
.races-list{
  display:flex;
  flex-direction:column;
  gap:3rem;
  margin-top:1.5rem;
}

.race-card{
  background:#fff;
  border-radius:var(--radius-card);
  border:1px solid var(--border-soft);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
  display:grid;
  grid-template-columns:400px 1fr;
  gap:0;
}

.race-card-image{
  position:relative;
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  background:var(--bg-soft);
  background-size:cover;
  background-position:center;
  cursor:pointer;
  transition:transform .3s ease;
  display:block;
  text-decoration:none;
}

.race-card-image:hover{
  transform:scale(1.02);
}

.race-card-image img{
  display:none;
}

.race-card-badge{
  position:absolute;
  top:1.5rem;
  left:1.5rem;
  background:rgba(0,123,145,.95);
  color:#fff;
  padding:1rem 1.5rem;
  border-radius:8px;
}

.race-distance-big{
  font-size:1.8rem;
  font-weight:700;
  display:block;
  line-height:1;
}

.race-card-content{
  padding:2rem 2.5rem;
}

.race-card-header{
  margin-bottom:1.5rem;
}

.race-card-title{
  font-size:2rem;
  font-weight:700;
  color:var(--color-primary);
  margin-bottom:.5rem;
  text-transform:uppercase;
  letter-spacing:.02em;
}

.race-card-subtitle{
  font-size:1.1rem;
  color:var(--text-muted);
  font-weight:500;
}

.race-card-description{
  font-size:1rem;
  line-height:1.7;
  color:var(--text-dark);
  margin-bottom:1.5rem;
}

.race-card-info{
  background:var(--bg-soft);
  padding:1.2rem 1.5rem;
  border-radius:8px;
  margin-bottom:1.5rem;
}

.race-info-item{
  font-size:.95rem;
  line-height:1.8;
  color:var(--text-dark);
}

.race-info-item strong{
  color:var(--color-primary);
}

.race-card-pricing{
  background:var(--color-primary-soft);
  padding:1.5rem;
  border-radius:8px;
  margin-bottom:1.5rem;
}

.race-card-pricing h4{
  font-size:1.1rem;
  font-weight:600;
  margin-bottom:.5rem;
  color:var(--color-primary);
}

.race-card-pricing .text-muted{
  font-size:.9rem;
  margin-bottom:.8rem;
}

.pricing-text{
  font-size:.9rem;
  line-height:1.6;
  color:var(--text-dark);
}

.race-card-actions{
  display:flex;
  gap:1rem;
  justify-content:flex-start;
}

.section-header{
  margin-bottom:1rem;
}

@media (max-width:768px){
  .race-card{
    grid-template-columns:1fr;
  }
  .race-card-image{
    aspect-ratio:1/1;
  }
  .race-card-content{
    padding:1.5rem;
  }
  .race-card-title{
    font-size:1.5rem;
  }
  .race-card-badge{
    top:1rem;
    left:1rem;
    padding:.8rem 1.2rem;
  }
  .race-distance-big{
    font-size:1.4rem;
  }
}
/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  animation:fadeIn .3s ease;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

.lightbox-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.9);
  cursor:pointer;
}

.lightbox-content{
  position:relative;
  z-index:1;
  max-width:90vw;
  max-height:90vh;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.lightbox-image{
  max-width:100%;
  max-height:80vh;
  object-fit:contain;
  border-radius:8px;
  box-shadow:0 8px 32px rgba(0,0,0,.5);
}

.lightbox-caption{
  margin-top:1rem;
  padding:1rem 2rem;
  background:rgba(255,255,255,.95);
  border-radius:8px;
  max-width:600px;
  text-align:center;
  color:var(--text-dark);
  font-size:.9rem;
  line-height:1.6;
}

.lightbox-close{
  position:absolute;
  top:-3rem;
  right:0;
  background:rgba(255,255,255,.9);
  border:none;
  width:40px;
  height:40px;
  border-radius:50%;
  font-size:2rem;
  line-height:1;
  cursor:pointer;
  color:var(--text-dark);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease;
}

.lightbox-close:hover{
  background:#fff;
}

/* ============================================================
   SPONSOR TAPPA (CAROSELLO)
   ============================================================ */
.stage-sponsors{
  padding:3rem 0;
  background:var(--bg-light);
}

.stage-sponsors-carousel{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:1.5rem;
  max-width:1000px;
  margin:0 auto;
}

@media (max-width:1024px){
  .stage-sponsors-carousel{
    grid-template-columns:repeat(4,1fr);
  }
}

@media (max-width:768px){
  .stage-sponsors-carousel{
    grid-template-columns:repeat(3,1fr);
  }
}

@media (max-width:480px){
  .stage-sponsors-carousel{
    grid-template-columns:repeat(2,1fr);
  }
}

.stage-sponsor-item{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ============================================================
   RISULTATI GRID (tappa.php)
   ============================================================ */
.results-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-top:0.5rem;
}

.result-button{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:1.2rem 1.5rem;
  background:#fff;
  border:2px solid var(--border-soft);
  border-radius:12px;
  text-decoration:none;
  color:var(--text-dark);
  transition:all 0.2s ease;
  cursor:pointer;
}

.result-button:hover{
  border-color:var(--color-primary);
  background:var(--bg-light);
  transform:translateX(4px);
}

.result-button-icon{
  width:40px;
  height:40px;
  min-width:40px;
  background:var(--color-primary);
  color:#fff;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.result-button-content{
  flex:1;
}

.result-button-title{
  font-size:1rem;
  font-weight:600;
  color:var(--text-dark);
  margin-bottom:0.25rem;
}

.result-button-meta{
  font-size:0.85rem;
  color:var(--text-muted);
}

.result-button-arrow{
  color:var(--color-primary);
  display:flex;
  align-items:center;
  transition:transform 0.2s ease;
}

.result-button:hover .result-button-arrow{
  transform:translateX(4px);
}

@media (max-width:640px){
  .result-button{
    padding:1rem;
    gap:0.8rem;
  }
  
  .result-button-icon{
    width:36px;
    height:36px;
    min-width:36px;
  }
  
  .result-button-title{
    font-size:0.95rem;
  }
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header{
  text-align:center;
  padding:3rem 0 2rem;
}

.page-heading{
  font-size:2.5rem;
  font-weight:700;
  color:var(--color-primary);
  margin:0.5rem 0 1rem;
}

.page-subtitle{
  font-size:1.1rem;
  color:var(--text-muted);
  max-width:600px;
  margin:0 auto;
}

.empty-state{
  text-align:center;
  padding:4rem 2rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1rem;
  margin:3rem 0 2rem;
  flex-wrap:wrap;
}

.pagination-btn{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.7rem 1.3rem;
  background:#fff;
  color:var(--text);
  border:1px solid var(--border-soft);
  border-radius:8px;
  font-size:0.9rem;
  font-weight:600;
  text-decoration:none;
  transition:all 0.2s ease;
}

.pagination-btn:hover{
  background:var(--bg-light);
  border-color:var(--color-primary);
  color:var(--color-primary);
}

.pagination-numbers{
  display:flex;
  align-items:center;
  gap:0.5rem;
}

.pagination-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  background:#fff;
  color:var(--text);
  border:1px solid var(--border-soft);
  border-radius:8px;
  font-size:0.9rem;
  font-weight:600;
  text-decoration:none;
  transition:all 0.2s ease;
}

.pagination-number:hover{
  background:var(--bg-light);
  border-color:var(--color-primary);
  color:var(--color-primary);
}

.pagination-number.active{
  background:var(--color-primary);
  color:#fff;
  border-color:var(--color-primary);
}

.pagination-dots{
  color:var(--text-muted);
  padding:0 0.3rem;
}

@media (max-width:640px){
  .page-heading{
    font-size:2rem;
  }
  
  .page-subtitle{
    font-size:1rem;
  }
  
  .pagination{
    gap:0.5rem;
  }
  
  .pagination-btn{
    padding:0.6rem 1rem;
    font-size:0.85rem;
  }
  
  .pagination-number{
    width:36px;
    height:36px;
    font-size:0.85rem;
  }
}