:root {
  --bg: #0a0507;
  --accent: #8b1e2d;
  --accent-light: #b43a4a;
  --text: #f5f5f5;
  --muted: #c9bcbc;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: #b32d2e;
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 5, 7, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 30, 45, 0.35);
  z-index: 100;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 700px) {
  .nav {
    justify-content: center !important;
    padding: 0.75rem 0.5rem !important;
  }

  .logo {
    text-align: center;
    width: 100%;
  }
}


.logo {
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}

.nav-links a {
  color: var(--text);
  position: relative;
  padding-bottom: 0.2rem;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent-light);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 240px 1.5rem 80px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-meta {
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.30em;
  color: white;
  margin-bottom: 1.5rem;
  font-weight: bold;
}

.hero-meta2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: white;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 2.5rem auto 0;
}

/* VIDEO DI SFONDO */
.hero-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}

/* SEZIONI */
section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.5rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: white;
}

.two-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
}

.text-muted {
  color: var(--muted);
}

.highlight-box {
  border-radius: 1rem;
  border: 1px solid rgba(139, 30, 45, 0.35);
  padding: 1.5rem;
  background: black;
}

.program-list {
  list-style: none;
  margin-top: 1rem;
}

.program-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 1.5rem;
}

.program-time {
  width: 90px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.map-embed {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 260px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 1.5rem;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .two-cols {
    grid-template-columns: 1fr;
  }
}


/* CANTINE */
.cantine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonne fisse */
  gap: 25px;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .cantine-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonne su tablet */
  }
}

@media (max-width: 600px) {
  .cantine-grid {
    grid-template-columns: 1fr; /* 1 colonna su smartphone */
  }
}


.cantina-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  color: white;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

.cantina-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.cantina-name {
  font-size: 1rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Hover */
.cantina-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Fade-in allo scroll */
.cantina-card.visible {
  opacity: 1;
  transform: translateY(0);
}
/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
/* EDIZIONE 2025 */
.video-wrapper {
  margin-top: 2rem;
  border-radius: 16px;
  overflow: hidden;
  border: none; /* rimuove il bordo che crea contrasto */
  background: transparent; /* uniforma lo sfondo */
  box-shadow: none; /* opzionale */
}


.video-wrapper video {
  width: 70%;   /* riduci la dimensione */
  margin: 0 auto;
  display: block;
}
.countdown-box {
  margin-top: 1.5rem;
  text-align: center;
}

.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c9c9c9;
  margin-bottom: 0.3rem;
}

.countdown-timer {
  font-size: 1.6rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  display: inline-block;
  backdrop-filter: blur(6px);
}
/* ============================================
   FIX GLOBALI PER MOBILE
   ============================================ */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  min-width: 0;
}

/* ============================================
   HERO
   ============================================ */

@media (max-width: 700px) {
  .hero {
    padding: 120px 1rem 50px;
  }

  .hero-meta {
    font-size: 1.1rem;
    letter-spacing: 0.18em;
  }

  .hero-meta2 {
    font-size: 0.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-top: 1.5rem;
  }
}

/* ============================================
   SEZIONI GENERALI
   ============================================ */

@media (max-width: 700px) {
  section {
    padding: 3rem 1rem;
  }

  .section-heading {
    font-size: 1.3rem;
  }
}

/* ============================================
   LAYOUT A DUE COLONNE
   ============================================ */

.two-cols > * {
  min-width: 0;
}

@media (max-width: 800px) {
  .two-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ============================================
   PROGRAMMA
   ============================================ */

@media (max-width: 600px) {
  .program-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .program-time {
    width: auto;
    font-size: 0.7rem;
  }
}

/* ============================================
   VIDEO
   ============================================ */

.video-wrapper video {
  width: 100%;
  max-width: 100%;
}

/* ============================================
   COUNTDOWN
   ============================================ */

@media (max-width: 600px) {
  .countdown-timer {
    font-size: 1.3rem;
    padding: 0.5rem 0.8rem;
  }
}

/* ============================================
   TIPOGRAFIA GENERALE
   ============================================ */

@media (max-width: 600px) {
  body {
    font-size: 0.95rem;
  }
}

/* ============================================
   CANTINE
   ============================================ */

.cantine-grid {
  width: 100%;
}

@media (max-width: 600px) {
  .cantine-grid {
    gap: 18px;
  }
}

/* ============================================
   MAPPA RESPONSIVE
   ============================================ */

#dove iframe {
  width: 100% !important;
  height: 300px;
  max-width: 100%;
  border: 0;
  display: block;
  margin-top: 30px;
}

@media (max-width: 600px) {
  #dove iframe {
    height: 220px;
  }
}

/* ============================================
   CONTATTI – FIX SOVRAPPOSIZIONE TITOLI
   ============================================ */

#contatti .section-inner > div:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#contatti .section-inner > div:first-child .section-title {
  width: 100%;
  text-align: center;
}

/* Contenitore icone + sponsor */
#contatti .section-inner > div:nth-child(2) {
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding-right: 0 !important;
}

#contatti img {
  max-width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: break-word;
}
/* HEADER MOBILE FIX */
@media (max-width: 700px) {
  header .nav {
    justify-content: center; /* centra il logo */
  }

  .logo {
    font-size: 1rem;
    text-align: center;
  }
}
<div style="display: flex; justify-content: flex-end; width: 100%; padding-right: 40px;">
  <a href="https://ottica-amato.it/" target="_blank">
    <img src="contatti/logo_sponsor.png" alt="Main Sponsor" style="width: 120px;">
  </a>
</div>
@media (max-width: 700px) {
  #contatti .section-inner > div:nth-child(2) {
    justify-content: center !important;
    padding-right: 0 !important;
  }

  #contatti img {
    display: block;
    margin: 0 auto;
  }
}

/* FIX HEADER SU SMARTPHONE */
@media (max-width: 900px) {

  /* Centra il logo e impedisce la sovrapposizione */
  .nav {
    justify-content: center !important;
    padding: 0.5rem !important;
  }

  /* Nasconde il menu desktop */
  .nav-links {
    display: none !important;
  }

  /* Rende il logo centrato e non schiacciato */
  .logo {
    width: 100% !important;
    text-align: center !important;
    font-size: 1rem !important;
  }
}

/* FIX MAIN SPONSOR SU SMARTPHONE */
@media (max-width: 900px) {

  /* Centra il blocco che contiene il logo sponsor */
  #contatti .section-inner > div:nth-child(2) {
    justify-content: center !important;
    padding-right: 0 !important;
  }

  /* Centra proprio l'immagine del logo sponsor */
  #contatti img {
    display: block !important;
    margin: 0 auto !important;
  }
}
/* FIX DEFINITIVO MAIN SPONSOR SU MOBILE */
@media (max-width: 900px) {

  /* Questo è il contenitore che contiene SOLO il logo sponsor */
  #contatti .section-inner > div:nth-child(2) > div:nth-child(2) {
    justify-content: center !important;
    padding-right: 0 !important;
    width: 100% !important;
  }

  /* Centra l'immagine del logo sponsor */
  #contatti .section-inner > div:nth-child(2) > div:nth-child(2) img {
    display: block !important;
    margin: 0 auto !important;
  }
}
.cantine-slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-top: 30px;
}

.cantina-display {
  text-align: center;
}

.cantina-display {
  text-align: center;
  width: 220px;      /* larghezza fissa del riquadro */
  height: 220px;     /* altezza fissa del riquadro */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cantina-display img {
  max-width: 100%;
  max-height: 150px;  /* limite per evitare che il logo esca dal riquadro */
  object-fit: contain; /* mantiene le proporzioni del logo */
}


.cantina-display p {
  margin-top: 10px;
  font-size: 16px;
  color: #333;
}

.slider-btn {
  background: none;
  border: none;
  font-size: 40px;
  cursor: pointer;
  color: #333;
  padding: 10px;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}