.hero {
    /* Color de fondo principal: Azul Oscuro (#003366) */
    background-color: #003366; 
    
    /* Cuadrícula simple en Azul Petróleo (#0A7B8D) */
    background-image: 
        /* Líneas verticales */
        linear-gradient(to right, #073e75 1px, transparent 1px),
        /* Líneas horizontales */
        linear-gradient(to bottom, #073e75 1px, transparent 1px);
        
    /* Tamaño de cada celda de la cuadrícula (ajusta para más o menos densidad) */
    background-size: 40px 40px; 
    background-attachment: fixed; /* Hace que la cuadrícula se mantenga fija al hacer scroll */
    
    /* Asegúrate de que el texto y los elementos se muestren por encima */
    position: relative;
    z-index: 0; /* Asegura que este fondo esté en la capa más baja */

    /* Propiedades ya existentes del hero para el contenido */
    text-align: center;
    padding: 60px 20px;
    min-height: 400px; /* Asegura que el hero tenga altura para ver el fondo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* Negro con 70% opacidad para mayor contraste */
    z-index: 1; /* Coloca la capa detrás del contenido */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Replicamos la cuadrícula aquí para animar su opacidad */
    background-image: 
        linear-gradient(to right, rgba(10,123,141,0.6) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(10,123,141,0.6) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed; /* Mantiene la cuadrícula fija si el hero tiene scroll */
    
    opacity: 0.0; /* Empieza invisible */
    animation: pulseGrid 4s infinite ease-in-out; /* Animación de pulso */
    
    z-index: 1; /* Encima del fondo base, pero debajo del contenido */
    pointer-events: none; /* Asegura que no bloquee interacciones */
}

/* Animación del pulso */
@keyframes pulseGrid {
    0% { opacity: 0.0; } /* Invisible */
    50% { opacity: 0.4; } /* Brillo máximo (ajusta este valor) */
    100% { opacity: 0.0; } /* De vuelta a invisible */
}

.hero-bg-cover {
    position: relative;
    z-index: 2; /* Asegura que el contenido esté por encima del overlay */
}

@keyframes float {
    0%, 100% { transform: translateY(-2%); }
    50% { transform: translateY(2%); }
  }
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }

  .hero-image-custom {
    width: 80px; /* Cambia este valor */
    height: auto;
    max-width: 100%;
  }

  /* Botones modernos con gradientes */
    .btn-modern-primary {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      color: white;
      padding: 16px 32px;
      border-radius: 12px;
      font-size: 18px;
      font-weight: 600;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
      border: none;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    
    .btn-modern-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
      background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    }
    
    .btn-modern-primary::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s;
    }
    
    .btn-modern-primary:hover::before {
      left: 100%;
    }
    
    .btn-modern-secondary {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      color: white;
      padding: 16px 32px;
      border-radius: 12px;
      font-size: 18px;
      font-weight: 600;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.2);
      cursor: pointer;
      position: relative;
    }
    
    .btn-modern-secondary:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.4);
    }
    
    .btn-modern-secondary::after {
      transition: transform 0.3s ease;
    }
    
    .btn-modern-secondary:hover::after {
      transform: translateX(4px);
    }

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow-section {
  position: relative;
  width: 100%;
}

.hero-slideshow-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slideshow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 20, 70, 0.70) 0%,
    rgba(0, 30, 80, 0.55) 100%
  );
  z-index: 1;
}

/* Cuando hay slideshow, forzar fondo transparente en .hero */
.hero-slideshow-section .hero {
  background-color: transparent !important;
  background-image: none !important;
}

/* sombras de texto para mejorar legibilidad */
.hero h1,
.hero p {
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Dots de navegación */
.hero-slideshow-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.hero-dot.active {
  background: white;
  transform: scale(1.25);
}