:root {
  --hero-primary: var(--color-naranja);
  --hero-text-light: #ffffff;
}

/* === HERO DINÁMICO === */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  color: var(--hero-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #000;
}

/* Fondo animado */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--hero-primary), #000066, var(--hero-primary));
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  opacity: 0.2;
  z-index: 0;
}

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

/* Slider de fondo */
.slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeCycle 24s infinite;
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
}

.slide1 {
  background-image: url('https://i0.wp.com/cdn-es.checklistfacil.com/checklistfacil-automatizacion-de-procesos.webp?w=500&resize=500,333&ssl=1');
  animation-delay: 0s;
}
.slide2 {
  background-image: url('https://microsegur.com/wp-content/uploads/2024/05/MICROSEGUR-Imagenes-Post-1280x720px-1.jpg');
  animation-delay: 6s;
}
.slide3 {
  background-image: url('https://administraciondesistemas.com/wp-content/uploads/2024/01/lenguajes-programacion-unsplash.jpg');
  animation-delay: 12s;
}
.slide4 {
  background-image: url('https://zascita.com/wp-content/uploads/2024/03/4-desafios-de-la-videovigilancia-y-por-que-las-camaras-CCTV-mejoran-la-seguridad-privada.png');
  animation-delay: 18s;
}

@keyframes fadeCycle {
  0% { opacity: 0 }
  4% { opacity: 1 }
  25% { opacity: 1 }
  29% { opacity: 0 }
  100% { opacity: 0 }
}

/* Contenido del hero */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: slideUp 1s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  animation: fadeSlide 1s ease-out forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--hero-primary);
  color: #000;
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  animation: fadeSlide 1s ease-out forwards;
  animation-delay: 1.3s;
  opacity: 0;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-45deg);
  transition: left 0.5s ease;
}

.cta-button:hover {
  transform: scale(1.05);
}

.cta-button:hover::after {
  left: 100%;
}

/* Frases clave */
.hero-highlights {
  position: relative;
  height: 40px;
  margin-top: 1rem;
  overflow: hidden;
}

.highlight {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  opacity: 0;
  animation: fadeSequence 16s infinite;
}

.highlight:nth-child(1) { animation-delay: 0s; }
.highlight:nth-child(2) { animation-delay: 4s; }
.highlight:nth-child(3) { animation-delay: 8s; }
.highlight:nth-child(4) { animation-delay: 12s; }

@keyframes fadeSequence {
  0%   { opacity: 0 }
  10%  { opacity: 1 }
  30%  { opacity: 1 }
  40%  { opacity: 0 }
  100% { opacity: 0 }
}

/* Scroll Indicator */
.scroll-indicator {
  position: relative;
  z-index: 2;
  font-size: 2rem;
  color: var(--hero-primary);
  margin-top: 1.5rem;
}

.scroll-indicator span {
  display: inline-block;
  animation: bounceGlow 2s infinite;
  text-shadow: 0 0 10px var(--hero-primary);
}

@keyframes bounceGlow {
  0%, 100% { transform: translateY(0); opacity: 1 }
  50% { transform: translateY(10px); opacity: 0.6 }
}

/* Animaciones generales */
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0 }
  to { transform: translateY(0); opacity: 1 }
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.6rem 1.5rem;
  }

  .highlight {
    font-size: 1rem;
  }

  .scroll-indicator {
    font-size: 1.5rem;
  }
}
