/* ===== HERO SECTION ROVI 2025 - PARALLAX BACKGROUND ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 80rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* Permette al background di essere visibile sotto le sezioni */
  margin-top: 7.2rem;
  color: #FFFFFF;
}

/* Parallax background layer - scorre dietro le sezioni */
.hero::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url('../../assets/hero/background-rovi.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1; /* Sopra il body ma sotto il contenuto */
  transform: translateZ(0);
  will-change: transform;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Video background removed in favor of static image */
/*.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 1;
  object-fit: cover;
}*/

/* Overlay rimosso per mostrare l'immagine senza filtri */
/* .hero-overlay {
  display: none;
} */

.hero-container {
  position: relative;
  z-index: 2; /* Sopra il background hero */
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  text-align: center;
  margin-top: 30vh; /* Sposta il contenuto più in basso */
}

.hero-content {
  max-width: 80rem;
  margin: 0 auto;
}


.nuovo-hero-title {
  font-family: 'Comfortaa', 'Inter', Arial, sans-serif;
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  /* Override gradient from base.css */
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: rgba(255, 255, 255, 0.95);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  font-weight: var(--font-weight-normal);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Hero fallback image for when video fails */
.hero-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.hero-fallback-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-fallback-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    var(--color-primary) 0%, 
    #0d1814 25%,
    #1a2f23 50%,
    var(--color-primary) 75%,
    #0a1410 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== MOBILE HERO OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
    min-height: 70rem;
    margin-top: 6rem;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero::before {
    background-position: center center;
    background-size: cover;
  }

  .hero-container {
    width: 100%;
    padding: var(--space-md);
    margin-top: 20vh;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title,
  .nuovo-hero-title {
    font-size: clamp(3.2rem, 9vw, 4.8rem) !important;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    text-align: center;
    letter-spacing: -0.01em;
  }

  .hero-subtitle {
    font-size: clamp(1.5rem, 4.5vw, 1.8rem);
    line-height: 1.5;
    margin-bottom: var(--space-2xl);
    max-width: 95%;
    text-align: center;
    padding: 0 var(--space-sm);
  }
  
  .hero-actions {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 32rem;
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-base);
    min-height: 5.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    border-radius: var(--radius-lg);
  }
  
  .hero-video-bg {
    /* Disable video on mobile for better performance */
    display: none;
  }
  
  .hero-fallback {
    display: block;
  }
}

/* Small mobile optimizations */
@media (max-width: 480px) {
  .hero {
    min-height: 65rem;
    margin-top: 5.5rem;
    padding: 0 var(--space-sm);
  }

  .hero-container {
    padding: var(--space-sm);
    margin-top: 15vh;
  }

  .hero-title,
  .nuovo-hero-title {
    font-size: clamp(2.8rem, 8.5vw, 4rem) !important;
    margin-bottom: var(--space-md);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: clamp(1.4rem, 4.2vw, 1.7rem);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
  }

  .hero-actions .btn {
    padding: var(--space-md) var(--space-lg);
    min-height: 5.2rem;
    font-size: var(--font-size-sm);
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: 100vh;
    min-height: 50rem;
  }
  
  .hero-title {
    font-size: clamp(2.4rem, 6vw, 3.2rem);
    margin-bottom: var(--space-sm);
  }
  
  .hero-subtitle {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    margin-bottom: var(--space-lg);
  }
  
  .hero-actions {
    flex-direction: row;
    gap: var(--space-md);
    flex-wrap: wrap;
  }
  
  .hero-actions .btn {
    width: auto;
    min-width: 18rem;
    flex: 1 1 auto;
    max-width: 24rem;
  }
}