/* ==========================================================================
   1. RESET E VARIABILI DI STILE
   ========================================================================== */
:root {
  --bg-color: #121110;
  --card-bg: #1a1816;
  --btn-bg: #f3f0e8;
  --border-color: #2e2a25;
  --accent-gold: #d4af37;
  --accent-gold-hover: #f1c40f;
  --text-primary: #f3f0e8;
  --text-secondary: #a8a095;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  padding-bottom: 50px;
}

/* ==========================================================================
   2. HERO VIDEO, LOGO & BANDIERE LINGUA
   ========================================================================== */
.video-container {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sfumatura scura sul fondo del video */
.video-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-color));
  pointer-events: none;
}

/* Contenitore Logo + Bandiere (In alto a sinistra sopra il video) */
.logo-wrapper {
  position: absolute;
  top: 15px;
  left: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-logo {
  max-width: 130px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
}

/* Selettore Lingue */
.language-flags {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.flag-link img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  opacity: 0.75;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.flag-link:hover img,
.flag-link.active img {
  opacity: 1;
  transform: scale(1.15);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ==========================================================================
   3. BOTTONI PRINCIPALI DI NAVIGAZIONE
   ========================================================================== */
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: -40px; /* Sormonta leggermente il video */
  position: relative;
  z-index: 20;
  padding: 0 15px;
}

.btn {
  background: var(--btn-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  max-width: 160px;
  text-decoration: none !important;
  color: inherit;
}

.btn img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.didascalia_bottone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.scritta_bottone {
  text-decoration: none !important;
  color: var(--accent-gold, #d4af37);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  transition: color 0.3s ease;
}

.btn:hover .scritta_bottone {
  color: var(--accent-gold-hover, #f1c40f);
}

/* ==========================================================================
   4. BOX PRESENTAZIONE
   ========================================================================== */
.box-presentazione {
  max-width: 850px;
  margin: 50px auto 40px auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.box-presentazione .subtitle {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.titolo-principale {
  font-family: var(--font-heading);
  font-size: 38px;
  color: var(--text-primary);
  margin-top: 5px;
  font-weight: 700;
}

.sottotitolo-maiuscolo {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-top: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 25px 0;
}

.gold-divider::before,
.gold-divider::after {
  content: "";
  height: 1px;
  width: 70px;
  background: var(--accent-gold);
  opacity: 0.5;
}

.gold-divider span {
  color: var(--accent-gold);
  padding: 0 15px;
  font-size: 12px;
}

.testo-corpo {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: justify;
  text-align-last: center;
}

.testo-corpo strong {
  color: var(--text-primary);
}

/* ==========================================================================
   5. CAROSELLO IMMAGINI
   ========================================================================== */
.carousel-wrapper {
  max-width: 900px;
  margin: 40px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 20px;
}

.carousel-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.slide {
  flex: 0 0 30%;
  opacity: 0.4;
  transition: all 0.4s ease;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.slide.active {
  flex: 0 0 42%;
  opacity: 1;
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
  transform: scale(1.05);
}

.carousel-arrow {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  font-size: 20px;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-arrow:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  color: #121110;
}

/* ==========================================================================
   6. LINK GALLERIA
   ========================================================================== */
.galleria-link-container {
  text-align: center;
  margin-top: 25px;
}

.btn-galleria {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  background: transparent;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-galleria:hover {
  background: var(--accent-gold);
  color: #121110;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   7. UNIFIED RESPONSIVE MOBILE (@media)
   ========================================================================== */
@media (max-width: 600px) {
  .logo-wrapper {
    top: 10px;
    left: 8px;
  }

  .site-logo {
    max-width: 90px;
  }

  .flag-link img {
    width: 22px;
    height: 15px;
  }

  .titolo-principale {
    font-size: 28px;
  }

  .button-container {
    gap: 10px;
  }

  .btn {
    max-width: 100px;
    padding: 8px;
  }

  .slide {
    flex: 0 0 25%;
  }

  .slide.active {
    flex: 0 0 50%;
  }
}

/* ==========================================================================
   8. FOOTER / PIÈ DI PAGINA
   ========================================================================== */
.site-footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--accent-gold); /* Sottile linea dorata superiore */
  padding: 40px 20px 20px 20px;
  margin-top: 60px;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}

.footer-title {
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.footer-col p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent-gold);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-bottom {
  max-width: 1000px;
  margin: 20px auto 0 auto;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Adattamento Footer per Mobile */
@media (max-width: 600px) {
  .footer-container {
    text-align: center;
    gap: 20px;
  }
}