/* Homepage testimonials: forest-and-meadow treatment layered over the legacy
   .testimonial-section rules in style.css. The centred slide becomes a deep
   forest card; its neighbours sit on soft paper with leafy accents. */

.testimonial-section {
  --tm-forest: #064e3b;
  --tm-moss: #065f46;
  --tm-leaf: #10b981;
  --tm-sage: #5f7f71;
  --tm-paper: #fbfdf9;
  --tm-line: #d9ece2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(209, 250, 229, 0.55), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f6fbf7 45%, #ecf8f1 100%);
  padding: 9rem 0 8rem 0 !important;
  margin-bottom: 6rem;
}

/* Leafy sprigs replace the old drifting glow orbs. */
.testimonial-section::before,
.testimonial-section::after {
  border-radius: 0;
  filter: none;
  opacity: 0.22;
  background: url("../images/leaf-sprig.svg") no-repeat center / contain;
  transform-origin: bottom center;
}

.testimonial-section::before {
  top: auto;
  bottom: -2rem;
  left: -3rem;
  width: 26rem;
  height: 34rem;
  transform: rotate(18deg);
  animation: tmSwayLeft 9s ease-in-out infinite alternate;
}

/* Hangs from the top-right corner; pivots on its own centre so the sway
   keeps it inside the box instead of swinging below its anchor. */
.testimonial-section::after {
  top: -3rem;
  bottom: auto;
  right: 1rem;
  width: 18rem;
  height: 24rem;
  opacity: 0.28;
  transform-origin: 50% 50%;
  transform: rotate(200deg);
  animation: tmSwayRight 7s ease-in-out infinite;
}

@keyframes tmSwayLeft {
  from { transform: rotate(14deg); }
  to { transform: rotate(22deg); }
}

@keyframes tmSwayRight {
  0%, 100% { transform: translateY(0) rotate(194deg); }
  50% { transform: translateY(1.2rem) rotate(206deg); }
}

/* A faint ground line of grass where the cards sit. */
.testimonial-section .container-fluid::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(90%, 110rem);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--tm-line), transparent);
}

.testimonial-section .course-badge {
  background: #fff;
  border: 1px solid var(--tm-line);
  box-shadow: 0 6px 18px -12px rgba(6, 78, 59, 0.45);
}

.testimonial-section .course-badge i {
  color: var(--tm-leaf);
}

/* ---------- Cards ---------- */

.testimonial-section .t-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--tm-paper);
  border: 1px solid var(--tm-line);
  border-radius: 2.4rem;
  padding: 3.4rem 3.2rem 3rem !important;
  box-shadow: 0 18px 40px -30px rgba(6, 78, 59, 0.45) !important;
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.5s ease,
    border-color 0.5s ease;
}

/* Leaf watermark tucked into the corner of every card. */
.testimonial-section .t-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -3.5rem;
  bottom: -4.5rem;
  width: 13rem;
  height: 17rem;
  background: url("../images/leaf-sprig.svg") no-repeat center / contain;
  opacity: 0.08;
  transform: rotate(-24deg);
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-section .t-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 28px 50px -30px rgba(6, 78, 59, 0.5) !important;
}

.testimonial-section .t-card:hover::after {
  transform: rotate(-16deg) scale(1.05);
}

.testimonial-section .t-card-header {
  margin-bottom: 2.2rem;
}

.testimonial-section .t-card-header .fa-quote-left {
  display: grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 1.4rem 1.4rem 1.4rem 0.4rem;
  font-size: 1.8rem;
  color: #fff;
  background: linear-gradient(140deg, var(--tm-leaf), #059669 60%, var(--tm-moss));
  box-shadow: 0 10px 20px -10px rgba(5, 150, 105, 0.7);
}

.testimonial-section .t-card-stars {
  gap: 0.25rem;
  padding: 0.6rem 1rem;
  border-radius: 99rem;
  background: rgba(251, 191, 36, 0.1);
}

.testimonial-section .t-card-stars i {
  font-size: 1.2rem;
}

.testimonial-section .t-card-text {
  font-size: 1.5rem;
  line-height: 1.85;
  color: #3f5a4f;
  margin-bottom: 2.8rem;
}

.testimonial-section .t-card-client {
  gap: 1.4rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--tm-line);
}

.testimonial-section .t-card-avatar {
  width: 5.2rem !important;
  height: 5.2rem !important;
  padding: 3px;
  border: 0;
  background: linear-gradient(140deg, var(--tm-leaf), #a7f3d0, var(--tm-moss));
}

.testimonial-section .t-card-client-name {
  font-size: 1.65rem;
  color: #12352a;
}

.testimonial-section .t-card-client-role {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--tm-sage);
}

.testimonial-section .t-card-client-role::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--tm-leaf);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ---------- Featured (centred) card: deep forest ---------- */

.testimonialSwiper .swiper-slide-active .t-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(110, 231, 183, 0.3), transparent 55%),
    linear-gradient(160deg, #14a077 0%, #0f8a66 60%, #0c7a5a 100%);
  border-color: rgba(167, 243, 208, 0.35);
  box-shadow: 0 34px 60px -30px rgba(15, 138, 102, 0.6) !important;
}

.testimonialSwiper .swiper-slide-active .t-card::after {
  opacity: 0.16;
  filter: brightness(1.8);
}

.testimonialSwiper .swiper-slide-active .t-card-header .fa-quote-left {
  color: var(--tm-forest);
  background: linear-gradient(140deg, #ecfdf5, #a7f3d0);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5);
}

.testimonialSwiper .swiper-slide-active .t-card-stars {
  background: rgba(251, 191, 36, 0.14);
}

.testimonialSwiper .swiper-slide-active .t-card-text {
  color: #f0fdf7;
}

.testimonialSwiper .swiper-slide-active .t-card-client {
  border-top-color: rgba(167, 243, 208, 0.22);
}

.testimonialSwiper .swiper-slide-active .t-card-client-name {
  color: #fff;
}

.testimonialSwiper .swiper-slide-active .t-card-client-role {
  color: #d1fae5;
}

.testimonialSwiper .swiper-slide-active .t-card-client-role::before {
  background: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.2);
}

/* ---------- Navigation & pagination ---------- */

.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-prev,
.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-next {
  width: 4.8rem !important;
  height: 4.8rem !important;
  background: #fff !important;
  border: 1px solid var(--tm-line) !important;
  box-shadow: 0 8px 20px -14px rgba(6, 78, 59, 0.5);
}

.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-next {
  background: linear-gradient(140deg, #059669, var(--tm-moss)) !important;
  border-color: transparent !important;
  box-shadow: 0 10px 22px -10px rgba(5, 150, 105, 0.8);
}

.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-next::after {
  color: #fff !important;
}

.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-prev:hover,
.testimonial-section .testimonial-navigation-wrapper .testimonial-swiper-button-next:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.testimonial-section .testimonial-navigation-wrapper .swiper-button-disabled {
  opacity: 0.45;
}

.testimonialSwiper .swiper-pagination {
  bottom: 0.4rem;
}

.testimonialSwiper .swiper-pagination-bullet {
  width: 0.8rem;
  height: 0.8rem;
  background: #a7d7c0;
  opacity: 1;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.testimonialSwiper .swiper-pagination-bullet-active {
  width: 2.6rem;
  border-radius: 99rem;
  background: #059669;
}

/* The legacy markup ships an orphan <circle> with no <svg>; keep it inert. */
.testimonialSwiper .autoplay-progress {
  display: none;
}

@media (max-width: 767px) {
  .testimonial-section {
    padding: 6rem 0 5rem 0 !important;
  }

  .testimonial-section::before {
    width: 16rem;
    height: 21rem;
    left: -5rem;
  }

  .testimonial-section::after {
    top: -2rem;
    width: 12rem;
    height: 16rem;
    right: -2rem;
  }

  .testimonial-section .t-card {
    padding: 2.8rem 2.4rem 2.4rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-section::before,
  .testimonial-section::after {
    animation: none;
  }

  .testimonial-section .t-card,
  .testimonial-section .t-card::after {
    transition: none;
  }
}
