.carousel {
  position: relative;
  max-width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.carousel-container {
  display: flex;
  transition: transform 0.7s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  height: 420px;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Texto sobre la imagen */
.carousel-caption {
  position: absolute;
  bottom: 60px;
  left: 50px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 15px 25px;
  border-radius: 10px;
  max-width: 400px;
  animation: fadeIn 1s ease;
}

.carousel-caption h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.carousel-caption p {
  font-size: 1rem;
  margin-bottom: 12px;
}

.btn-banner {
  display: inline-block;
  background-color: #ffcc00;
  color: #000;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-banner:hover {
  background-color: #ffc107;
}

/* Botones de navegación */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 5;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.7);
}

.prev { left: 15px; }
.next { right: 15px; }

/* Indicadores (puntos) */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 6;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255,255,255,0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background-color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsivo */
@media (max-width: 768px) {
  .carousel {
    height: 250px;
  }

  .carousel-item {
    height: 250px;
  }

  .carousel-caption {
    bottom: 25px;
    left: 20px;
    padding: 10px 15px;
  }

  .carousel-caption h2 {
    font-size: 1.2rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }

  .btn-banner {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}
