/* ============================================
   TESTIMONIALS - VANGUARDISTA & PREMIUM (UX OPTIMIZED)
   ============================================ */

.testimonials {
  position: relative;
  padding: 100px 0;
  /* UX Choice: 'Momentos Felices' evokes the positive outcome */
  background: url("img/amistad-perro-y-gato.jpg");
  background-position: center;
  background-size: cover;
  width: 100%;
  overflow: hidden;
}

/* Background decorative element - Kept minimal */
.testimonials::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(20, 184, 166, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Section Header - Responsive Typography */
.testimonials .section-header {
  text-align: center;
  margin-bottom: 70px;
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.testimonials .section-header h2 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem); /* Fluid typography */
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.testimonials-title-gradient {
  color: #14b8a6; /* Premium Mint */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.testimonials .section-header p {
  font-family: "Lato", sans-serif;
  font-size: 1.15rem;
  color: #f3f4f6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 500;
}

/* Container del Swiper */
.testimonials .container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* Swiper Container */
.testimonials-swiper {
  position: relative;
  width: 100%;
  max-width: 1380px;
  padding: 30px 20px;
  margin: 0 auto;
  z-index: 2;
  overflow: hidden !important; /* Critical: Stops cards from touching screen edges */
}

/* Swiper Wrapper */
.testimonials-swiper .swiper-wrapper {
  padding: 0;
  margin: 0;
  align-items: stretch;
  will-change: transform;
}

/* Swiper Slide */
.testimonials-swiper .swiper-slide {
  height: auto !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  background: transparent !important;
  padding: 0 !important;
  box-sizing: border-box;
  opacity: 1 !important; /* Force override to fix ghosting issues */
}

/* Testimonial Card - Glass & Shadow */
.testimonial-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05); /* Soft, expensive shadow */
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease,
    border-color 0.45s ease,
    filter 0.45s ease,
    opacity 0.45s ease;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(243, 244, 246, 0.8);
  position: relative;
  width: 100%;
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  right: 20px;
  font-family: "Montserrat", sans-serif;
  font-size: 100px;
  color: #14b8a6;
  opacity: 0.1;
  pointer-events: none;
  font-weight: 900;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.18);
  border-color: rgba(20, 184, 166, 0.3);
}

/* Slide states */
.testimonials-swiper .swiper-slide .testimonial-card {
  opacity: 1;
  transform: none;
  filter: none;
}

.testimonials-swiper .swiper-slide-active .testimonial-card {
  opacity: 1;
  transform: none;
  filter: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  border-color: rgba(243, 244, 246, 0.8);
}

/* Rating */
.testimonial-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.testimonial-rating .star {
  font-size: 1.1rem;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

/* Text */
.testimonial-text {
  font-family: "Lato", sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
  margin-bottom: 18px;
  flex-grow: 1;
  font-style: italic;
  font-weight: 400;
}

/* Author */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #f3f4f6;
  padding-top: 20px;
}

.author-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #f0fdfa; /* Mint 50 */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
  flex-shrink: 0;
  color: #14b8a6;
}

.author-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: #111827;
  margin: 0;
  font-size: 0.92rem;
}

.author-pet {
  font-family: "Lato", sans-serif;
  color: #14b8a6; /* Mint accent */
  font-size: 0.78rem;
  margin: 2px 0 0 0;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
.testimonials {
  padding: clamp(64px, 8vw, 100px) 0;
}

.testimonials .section-header {
  margin-bottom: clamp(36px, 5vw, 70px);
  padding: 0 clamp(16px, 3vw, 24px);
}

.testimonials .section-header p {
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
}

.testimonials .container {
  padding: 0 clamp(12px, 2.5vw, 24px) !important;
}

.testimonials-swiper {
  padding: clamp(12px, 2vw, 30px) clamp(4px, 1vw, 16px)
    clamp(44px, 6vw, 64px);
}

.testimonials-swiper .swiper-slide {
  height: auto !important;
}

.testimonials-swiper .swiper-slide > * {
  width: 100%;
}

.testimonial-card {
  border-radius: clamp(18px, 3vw, 24px);
  padding: clamp(18px, 2.5vw, 28px);
  min-height: clamp(260px, 32vw, 320px);
}

.testimonial-card::before {
  font-size: clamp(72px, 10vw, 100px);
  right: clamp(14px, 2vw, 20px);
}

.testimonial-rating {
  margin-bottom: clamp(12px, 2vw, 20px);
}

.testimonial-rating .star {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.testimonial-text {
  font-size: clamp(0.9rem, 1.25vw, 0.98rem);
  line-height: 1.6;
  margin-bottom: clamp(14px, 2vw, 18px);
}

.testimonial-author {
  gap: clamp(12px, 1.8vw, 15px);
  padding-top: clamp(14px, 2vw, 20px);
}

.author-avatar {
  width: clamp(42px, 5vw, 52px);
  height: clamp(42px, 5vw, 52px);
  min-width: clamp(42px, 5vw, 52px);
}

.author-name {
  font-size: clamp(0.84rem, 1.2vw, 0.92rem);
}

.author-pet {
  font-size: clamp(0.72rem, 1vw, 0.78rem);
}

@media (min-width: 1024px) {
  .testimonials-swiper {
    max-width: 1380px;
  }

  .testimonial-card {
    min-height: 280px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .testimonials-swiper {
    max-width: 900px;
    padding-bottom: 56px;
  }

  .testimonial-card {
    min-height: 100%;
  }
}

@media (max-width: 639px) {
  .testimonials {
    padding: 56px 0;
  }

  .testimonials .section-header {
    margin-bottom: 28px;
  }

  .testimonials .section-header h2 {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
  }

  .testimonials .section-header p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .testimonials-swiper {
    padding-bottom: 52px;
  }

  .testimonial-card {
    min-height: auto;
  }

  .testimonial-card::before {
    top: 6px;
  }
}

@media (max-width: 479px) {
  .testimonials .container {
    padding: 0 10px !important;
  }

  .testimonials-swiper {
    padding-left: 2px;
    padding-right: 2px;
  }

  .testimonial-card {
    padding: 18px 16px;
  }

  .testimonial-text {
    font-size: 0.9rem;
  }

  .testimonial-author {
    align-items: flex-start;
  }
}

/* ============================================
   PAGINATION & NAVIGATION STYLES
   ============================================ */

.testimonials-pagination {
  display: flex !important;
  position: relative !important;
  bottom: 0 !important;
  margin-top: 40px !important;
  justify-content: center !important;
  width: 100% !important;
  z-index: 10;
}

@media (min-width: 1024px) {
  .testimonials-pagination {
    display: none !important;
  }
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #cbd5e1;
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
  width: 30px;
  border-radius: 6px;
  background: #14b8a6; /* Premium Mint */
}

/* Navigation Buttons override */
.testimonials-swiper .swiper-button-next,
.testimonials-swiper .swiper-button-prev {
  color: #14b8a6;
  background: rgba(255, 255, 255, 0.9);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.18);
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.testimonials-swiper .swiper-button-next::after,
.testimonials-swiper .swiper-button-prev::after {
  font-size: 20px;
  font-weight: bold;
}

.testimonials-swiper .swiper-button-next:hover,
.testimonials-swiper .swiper-button-prev:hover {
  background: #14b8a6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.22);
}

.testimonials-swiper .swiper-button-prev {
  left: 4px;
}

.testimonials-swiper .swiper-button-next {
  right: 4px;
}

/* Adjust mobile navigation positions */
@media (max-width: 639px) {
  .testimonials-swiper .swiper-button-next,
  .testimonials-swiper .swiper-button-prev {
    display: none; /* Hide arrows on mobile for cleaner look */
  }
}
