/* What Our Clients Say — modern quote panels (homepage) */

#testimonials.testimonials-modern {
  --tm-gold: #f0c43c;
  --tm-gold-soft: rgba(240, 196, 60, 0.55);
  --tm-ink: #e8f3ff;
  --tm-muted: rgba(232, 243, 255, 0.72);
  --tm-line: rgba(94, 179, 255, 0.28);
  --tm-panel: rgba(8, 22, 48, 0.55);
  position: relative;
  overflow: clip;
}

#testimonials.testimonials-modern .testimonials-modern__glow {
  position: absolute;
  inset: 8% 10% auto;
  height: 55%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 50% 40%, rgba(31, 90, 188, 0.22), transparent 70%),
    radial-gradient(ellipse 30% 40% at 18% 70%, rgba(240, 196, 60, 0.08), transparent 70%),
    radial-gradient(ellipse 30% 40% at 82% 65%, rgba(23, 198, 165, 0.07), transparent 70%);
  filter: blur(2px);
}

#testimonials.testimonials-modern .testimonials-modern__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

#testimonials.testimonials-modern .tm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 32px 28px 26px;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 48%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  isolation: isolate;
  transform: translateY(18px);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  transition-delay: var(--tm-delay, 0ms);
}

#testimonials.testimonials-modern .tm-card.is-in {
  transform: translateY(0);
  opacity: 1;
}

#testimonials.testimonials-modern .tm-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--tm-gold) 20%, var(--tm-gold) 80%, transparent);
  opacity: 0.55;
  transform: scaleY(0.65);
  transform-origin: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#testimonials.testimonials-modern .tm-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 179, 255, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Glare Hover (React Bits style) — diagonal highlight sweep */
#testimonials.testimonials-modern .tm-card__glare {
  --gh-angle: -45deg;
  --gh-duration: 650ms;
  --gh-size: 250%;
  --gh-rgba: rgba(255, 255, 255, 0.42);
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    var(--gh-angle),
    hsla(0, 0%, 0%, 0) 60%,
    var(--gh-rgba) 70%,
    hsla(0, 0%, 0%, 0),
    hsla(0, 0%, 0%, 0) 100%
  );
  background-size: var(--gh-size) var(--gh-size), 100% 100%;
  background-repeat: no-repeat;
  background-position: -100% -100%, 0 0;
  transition: background-position var(--gh-duration) ease;
}

#testimonials.testimonials-modern .tm-card:hover .tm-card__glare,
#testimonials.testimonials-modern .tm-card:focus-within .tm-card__glare {
  background-position: 100% 100%, 0 0;
}

#testimonials.testimonials-modern .tm-card:hover,
#testimonials.testimonials-modern .tm-card:focus-within {
  border-color: rgba(240, 196, 60, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(-6px);
}

#testimonials.testimonials-modern .tm-card:hover::before,
#testimonials.testimonials-modern .tm-card:focus-within::before {
  opacity: 1;
  transform: scaleY(1);
}

#testimonials.testimonials-modern .tm-card--featured {
  background:
    linear-gradient(165deg, rgba(240, 196, 60, 0.1) 0%, rgba(255, 255, 255, 0.04) 42%, rgba(31, 90, 188, 0.1) 100%);
  border-color: rgba(240, 196, 60, 0.22);
}

@media (min-width: 992px) {
  #testimonials.testimonials-modern .tm-card--featured {
    transform: translateY(34px);
  }

  #testimonials.testimonials-modern .tm-card--featured.is-in {
    transform: translateY(16px);
  }

  #testimonials.testimonials-modern .tm-card--featured.is-in:hover,
  #testimonials.testimonials-modern .tm-card--featured.is-in:focus-within {
    transform: translateY(8px);
  }
}

#testimonials.testimonials-modern .tm-card__mark {
  position: absolute;
  top: 6px;
  right: 18px;
  font-family: Nunito, Rubik, sans-serif;
  font-size: 110px;
  font-weight: 800;
  line-height: 1;
  color: rgba(240, 196, 60, 0.14);
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

#testimonials.testimonials-modern .tm-card__quote {
  position: relative;
  z-index: 3;
  margin: 0 0 28px;
  flex: 1 1 auto;
}

#testimonials.testimonials-modern .tm-card__quote p {
  margin: 0;
  font-family: Rubik, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--tm-ink);
}

#testimonials.testimonials-modern .tm-card__quote p::before,
#testimonials.testimonials-modern .tm-card__quote p::after {
  content: none;
}

#testimonials.testimonials-modern .tm-card__meta {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#testimonials.testimonials-modern .tm-card__avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-family: Nunito, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1a1006;
  background: linear-gradient(145deg, #ffe27a 0%, var(--tm-gold) 55%, #d4a52e 100%);
  box-shadow: 0 6px 16px rgba(240, 196, 60, 0.25);
}

#testimonials.testimonials-modern .tm-card__who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#testimonials.testimonials-modern .tm-card__name {
  font-family: Nunito, sans-serif;
  font-style: normal;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

#testimonials.testimonials-modern .tm-card__role {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(240, 196, 60, 0.85);
}

#testimonials.testimonials-modern .tm-card__rating {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

#testimonials.testimonials-modern .tm-card__rating i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--tm-gold);
  opacity: 0.9;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(240, 196, 60, 0.15);
}

@media (max-width: 991px) {
  #testimonials.testimonials-modern .testimonials-modern__grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #testimonials.testimonials-modern .tm-card,
  #testimonials.testimonials-modern .tm-card--featured {
    transform: none !important;
    opacity: 1 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  #testimonials.testimonials-modern .tm-card__glare {
    display: none;
  }
}
