/* ---------- Contenedor principal ---------- */
.swiper-container {
  overflow: hidden !important;   
  margin-bottom: 60px;
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
  position: relative;          
  -webkit-overflow-scrolling: touch;
}

/* Evitar scroll horizontal del documento como último recurso */
html, body {

}

/* ---------- Wrapper y slides: controlar ancho y flexbox ---------- */
.swiper-wrapper {
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  will-change: transform;       
}

.swiper-slide {
  flex-shrink: 0;    
  box-sizing: border-box;
  min-width: 0;        
  max-width: 100%;
  -webkit-transform: translateZ(0); 
}


@media (min-width: 1024px) {
  .swiper-container[data-slides-per-view="3"] .swiper-slide {
    width: calc((100% - 40px) / 3) !important;
  }
}
@media (max-width: 1023px) {
  .swiper-container[data-slides-per-view="1"] .swiper-slide {
    width: 100% !important;
  }
}

/* ---------- (Destacados) ---------- */
#swiper-destacados-destacados {
  background: transparent !important;
  margin: 40px 0;
  border-radius: 8px;
  overflow: hidden;
}

#swiper-destacados-destacados .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: transparent;
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

#swiper-destacados-destacados .texto {
  flex: 1;
  padding: 20px;
  max-width: 60%;
  box-sizing: border-box;
  min-width: 0;
}

#swiper-destacados-destacados .texto h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #333;
}

#swiper-destacados-destacados .texto p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #555;
}

#swiper-destacados-destacados .imagen {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 40%;
  padding: 20px;
  box-sizing: border-box;
}

#swiper-destacados-destacados .imagen img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  display: block;
}

/* ---------- Clientes / logos ---------- */
.swiper-slide-views-image {
  height: 150px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: transparent !important;
  padding: 10px;
  box-sizing: border-box;
}

.swiper-slide-views-image img {
  width: auto !important;
  max-width: 90% !important;
  height: auto !important;
  max-height: 90px !important;
  object-fit: contain !important;
  filter: grayscale(0.2);
  transition: all 0.3s ease;
  display: block;
}

.swiper-slide-views-image:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

/* ---------- Paginación ---------- */
#swiper-destacados-destacados .swiper-pagination,
.pagination-swiper-destacados-destacados {
  position: absolute !important;
  bottom: 120px !important; 
  left: 0 !important;
  right: 0 !important;
  z-index: 20 !important;
  margin-top: 0 !important;
  transform: translateY(0) !important;
  text-align: center !important;
  width: 100% !important; 
}

#swiper-destacados-destacados .swiper-pagination-bullets,
.pagination-swiper-destacados-destacados.swiper-pagination-bullets {
  display: flex !important;
  justify-content: center !important; 
  width: 100% !important;
}

#swiper-destacados-destacados .swiper-pagination-bullets-dynamic,
.pagination-swiper-destacados-destacados.swiper-pagination-bullets-dynamic {
  left: 50% !important; 
  transform: translateX(-50%) !important;
  width: auto !important; 
}

#swiper-destacados-destacados .swiper-slide {
  padding-bottom: 0 !important;
}

#swiper-destacados-destacados {
  margin-bottom: 10px !important;
  height: auto !important; 
#swiper-destacados-destacados .swiper-wrapper {
  padding-bottom: 0 !important; 
}
}


#swiper-destacados-destacados .swiper-pagination,
.pagination-swiper-destacados-destacados {
  position: absolute !important;
  bottom: 120px !important; 
  left: 0 !important;
  right: 0 !important;
  z-index: 20 !important;
  margin-top: 0 !important;
  transform: translateY(0) !important;
  text-align: center !important;
  width: 100% !important; 
}

@media (max-width: 991px) {
  #swiper-destacados-destacados .swiper-pagination,
  .pagination-swiper-destacados-destacidos {
    bottom: 20px !important;
  }
}

/* ---------- Botones y paginación ---------- */
.swiper-button-next,
.swiper-button-prev {
  background-color: rgba(255, 255, 255, 0.8);
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  color: #333 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(255, 255, 255, 0.95);
}

.swiper-pagination-bullet {
  width: 10px !important;
  height: 10px !important;
  background: #ccc !important;
  opacity: 0.7 !important;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  background: #555 !important;
}

/* ---------- Animación ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.swiper-slide-active {
  animation: fadeIn 0.5s ease-in-out forwards;
}

/* ---------- Reglas extra para prevenir gaps por image dragging / margin collapse ---------- */
.swiper-slide img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.swiper-container *, .swiper-wrapper *, .swiper-slide * {
  box-sizing: border-box;
}
