/**
 * "Wat leerlingen zeggen" — de afsluiter van de landingspagina.
 *
 * Net als de hero, de scroll-film en "Meest bekeken" staat deze sectie in het
 * vaste donkere decor en volgt hij niet het licht/donker-thema. Daartussen zit
 * "Zo werkt D-Academy" als lichte sectie; die afwisseling donker → licht →
 * donker is bedoeld, en geeft de pagina ritme.
 *
 * De kaarten hebben twee dingen die ze levend maken:
 *   1. ze komen één voor één omhoog wanneer de sectie in beeld komt;
 *   2. onder de muis licht de rand op, precies waar de cursor is
 *      (--gx/--gy worden door testimonials.js gezet).
 */

.testimonials-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5.5rem 0 6rem;
  background: linear-gradient(180deg, #14051a 0%, #240a2c 50%, #14051a 100%);
  color: #fff;
}

/* Zachte lichtvlek achter de middelste kaart. */
.testimonials-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 12%;
  left: 50%;
  width: min(820px, 90vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(252, 5, 204, 0.14), transparent 68%);
  filter: blur(70px);
  pointer-events: none;
}

.testimonial-section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 3rem;
  background: linear-gradient(105deg, #ffffff 0%, #ffd9f6 45%, #c9a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------------------
   De kaarten
--------------------------------------------------------------------------- */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 1.9rem 1.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
  /* Komen één voor één omhoog. --reveal-delay staat per kaart in de HTML. */
  animation: testi-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--reveal-delay, 0) * 130ms);
}

@keyframes testi-in {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.22);
}

/* De meebewegende glans: een lichtvlek die de cursor volgt. Hij ligt als een
   aparte laag over de kaart en is standaard onzichtbaar; pas bij hover wordt
   hij zichtbaar op de plek die testimonials.js in --gx/--gy doorgeeft. */
.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(252, 5, 204, 0.16),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.testimonial-card:hover::before {
  opacity: 1;
}

/* Het aanhalingsteken linksboven. */
.testimonial-content {
  position: relative;
  padding-top: 2.2rem;
}
.testimonial-content::before {
  content: "\201C";
  position: absolute;
  top: -1.4rem;
  left: -0.3rem;
  font-size: 5rem;
  line-height: 1;
  font-family: Georgia, 'Times New Roman', serif;
  color: rgba(252, 5, 204, 0.32);
  pointer-events: none;
}

.testimonial-quote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.82);
}

/* ---- De persoon eronder --------------------------------------------------- */

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.author-img-placeholder {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  /* Dunne oplichtende ring rond de avatar. */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.author-img-placeholder .avatar {
  width: 46px !important;
  height: 46px !important;
  font-size: 17px !important;
}

.author-info {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.author-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.author-title {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------------------------------------------------------------------------
   Smaller schermen + verminderde beweging
--------------------------------------------------------------------------- */

@media (max-width: 620px) {
  .testimonials-section {
    padding: 3.5rem 0 4rem;
  }
  .testimonial-card {
    padding: 1.6rem 1.4rem 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    animation: none;
  }
  .testimonial-card:hover {
    transform: none;
  }
  .testimonial-card::before {
    display: none;
  }
}
