/* Slider Container */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto 2rem auto; /* Añadido margen superior */
  overflow: hidden;
  height: 350px; /* Reducido de 400px */
  text-align: center;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Slides */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  object-fit: cover;
}

/* Asegurar que las imágenes de fondo se ajusten correctamente */
.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3); /* Oscurecer ligeramente para mejor legibilidad */
  z-index: 0;
}

.slide h2,
.slide .btn {
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.slide.active { 
  opacity: 1; 
  position: relative;
  z-index: 1;
}

/* Botones de navegación */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 1000;
  font-size: 1.5rem;
  border-radius: 4px;
  transition: background 0.3s ease;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev:hover, .next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.prev { 
  left: 20px; 
}

.next { 
  right: 20px; 
}

/* Botón de acción */
.btn {
  background: #ff4081;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.btn:hover {
  background: #e91e63;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Efecto de transición */
@keyframes fade { 
  from { opacity: 0.4; } 
  to { opacity: 1; } 
}

/* Estilos responsivos */
@media (max-width: 1200px) {
  .hero-slider {
    border-radius: 0;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 250px; /* Reducido de 300px */
    margin: 0.5rem auto 1.5rem auto; /* Ajuste de márgenes en móviles */
  }
  
  .slide h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
  
  .prev, .next {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    padding: 5px 10px;
  }
  
  .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}
