/* --- ESTILOS EXCLUSIVOS DEL BANNER HERO --- */

#heroCarousel {
  /* Altura fija para evitar saltos */
  height: 100vh;
  max-height: 850px;

  /* --- CONFIGURACIÓN DE FLECHAS (ARROWS) --- */
  /* Posición desde el borde */
  --f-arrow-prev-pos: 20px;
  --f-arrow-next-pos: 20px;

  /* Colores y forma */
  --f-arrow-bg: rgba(255, 255, 255, 0.25);
  /* Transparente blanco */
  --f-arrow-hover-bg: var(--bs-primary, #d32f2f);
  /* ROJO al Hover */
  --f-arrow-color: #fff;
  /* Icono blanco */

  /* Tamaño */
  --f-arrow-width: 50px;
  --f-arrow-height: 50px;
  --f-arrow-border-radius: 50%;
  /* Redondas */

  /* Tamaño del icono SVG dentro */
  --f-arrow-svg-width: 22px;
  --f-arrow-svg-height: 22px;

  /* Transición suave */
  --f-arrow-transition: all 0.3s ease;
}

#heroCarousel {
  --f-carousel-dots-top: auto;
  --f-carousel-dots-bottom: 30px;
  --f-carousel-dots-height: 0px;
  --f-carousel-dot-width: 12px;
  --f-carousel-dot-height: 12px;
}

/* Estructura del Slide */
#heroCarousel .hero-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Imágenes */
#heroCarousel .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Filtro de brillo para que el texto blanco resalte */
  filter: brightness(0.85);
}

/* Overlay (Capa oscura) */
#heroCarousel .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Botón personalizado (Agency) */
#heroCarousel .btn-agency {
  background-color: var(--bs-primary, #d32f2f);
  border: 2px solid var(--bs-primary, #d32f2f);
  color: white !important;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

#heroCarousel .btn-agency:hover {
  background-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* --- ANIMACIONES DE TEXTO --- */
/* Estado inicial (Oculto y desplazado) */
#heroCarousel .animate-me {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

/* Estado Activo: Fancyapps usa .is-selected */
#heroCarousel .f-carousel__slide.is-selected .animate-me {
  opacity: 1;
  transform: translateY(0);
}

/* Retrasos escalonados */
#heroCarousel .f-carousel__slide.is-selected .delay-1 {
  transition-delay: 0.1s;
}

#heroCarousel .f-carousel__slide.is-selected .delay-2 {
  transition-delay: 0.3s;
}

#heroCarousel .f-carousel__slide.is-selected .delay-3 {
  transition-delay: 0.5s;
}

/*--------------- FIN BANNER --------------*/

/* Bento Grid Styles */
.bento-card {
  position: relative;
  border-radius: 20px;
  /* Bordes redondeados modernos */
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  /* Importante: No ponemos height fijo aquí, dejamos que el layout decida */
}

/* Imagen de fondo con zoom suave */
.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Asegura que la foto no se deforme */
  transition: transform 0.5s ease;
}

/* Gradiente para leer el texto */
.bento-overlay {
  position: absolute;
  inset: 0;
  /* Shorthand para top, right, bottom, left: 0 */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

.bento-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  color: white;
}

/* Hover Effects */
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.bento-card:hover img {
  transform: scale(1.08);
}

/* Lógica de Altura (La magia) */
@media (min-width: 768px) {
  /* Solo aplicamos los 300px en Tablet/PC. 
       En móvil (menos de 768px) dejar que se apilen naturalmente */
  .bento-row-height {
    height: 400px;
  }

  .h-md-100 {
    height: 100% !important;
  }
}

/* --- Utilidades Visuales --- */
.section-padding {
  padding: 4rem 0;
}

/* --- Sección de Valores (Iconos) --- */
.value-box {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 10px;
  background: white;
  height: 100%;
  border-top: 4px solid transparent;
  /* Cambio a borde superior */
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.value-box:hover {
  border-top-color: var(--primary-color);
  /* Azul al hover */
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.value-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  /* Azul del logo */
  margin-bottom: 1rem;
}

/* Especial para el icono de mulas (Bienestar Animal) - usar el rojo o gris */
.value-box.special .value-icon {
  color: var(--secondary-color);
}

/* --- Estilo del contenedor de logos---  */

#logosCarousel {
  /* Variables oficiales de Fancyapps */
  --f-carousel-gap: 2rem;
  --f-carousel-slide-width: 50%;
  /* Móvil: 2 logos */
  --f-carousel-slide-padding: 0;
  --f-carousel-slide-bg: transparent;
  /* Transición suave */
  --f-arrow-transition: all 0.3s ease;
}

@media (min-width: 768px) {
  #logosCarousel {
    --f-carousel-slide-width: 33.33%;
  }

  /* Tablet: 3 logos */
}

@media (min-width: 992px) {
  #logosCarousel {
    --f-carousel-slide-width: 20%;
  }

  /* PC: 5 logos */
}

/* Estilos de Imagen */
#logosCarousel .partner-logo-img {
  max-height: 70px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.3s ease;
  cursor: pointer;
}

#logosCarousel .partner-logo-img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* Alineación */
#logosCarousel .f-carousel__slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- ESTILOS DEL CARRUSEL DE TESTIMONIOS --- */
#testimonialsCarousel {
  --f-carousel-slide-padding: 10px;
  --f-carousel-slide-bg: transparent;
  --f-carousel-slide-width: 100%;
  --f-carousel-gap: 0px;
  --f-progressbar-height: 0px;
  --f-carousel-dot-bg: #999;
  --f-carousel-dot-hover-bg: #333;
}

@media (min-width: 768px) {
  #testimonialsCarousel {
    --f-carousel-slide-width: 50%;
  }
}

@media (min-width: 992px) {
  #testimonialsCarousel {
    --f-carousel-slide-width: 33.333%;
  }
}

#testimonialsCarousel .f-carousel__slide {
  display: flex;
  height: auto; /* Para que todas las tarjetas tengan la misma altura */
}

#testimonialsCarousel .card {
  width: 100%;
}

/* Responsive: Altura en móviles */
@media (max-width: 768px) {
  :root {
    --hero-height: 550px;
  }

  /* Bajamos a 550px en celular */
  .display-3 {
    font-size: 2.5rem;
  }

  .top-contact-row {
    grid-template-columns: 1fr;
    /* Una columna en celular */
    text-align: center;
    /* Todo centrado en celular */
  }

  .col-title {
    justify-content: center;
    /* Centrar títulos e iconos */
  }

  .company-name {
    font-size: 1.2rem;
  }
}
.text-truncate-testimonial {
  /* Muestra hasta 10 líneas */
  display: -webkit-box;
  line-clamp: 8;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
