/* ======================================== */
/* GLOBX  TESTIMONIALS SECTION              */
/* Glitch-free crossfade + polished design   */
/* ======================================== */

.gx-testimonials-section {
  background: var(--primary-light);
  position: relative;
  overflow: hidden;
}
/* Soft decorative blur blob in the background  pure CSS, no glitches */
.gx-testimonials-section::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(26, 127, 174, 0.18) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(20px);
  z-index: 0;
}
.gx-testimonials-section .container {
  position: relative;
  z-index: 1;
}

/* ────────────────────────────────────────────
   Left column  testimonial copy (CSS-grid stack)
   ──────────────────────────────────────────── */

/* Use display:grid + grid-area to STACK panes on top of each other. This is
   the glitch-free alternative to absolute positioning  the parent's height
   is determined by whichever pane is tallest, so no layout collapse during
   crossfade and no manual `min-height` to maintain. */
.gx-testimonials-navigation {
  display: grid;
  grid-template-areas: "stack";
  padding-right: 2rem;
  position: relative;
}
.gx-testimonials-navigation > .gx-testimonial-pane {
  grid-area: stack;
}

/* Pane transition  crossfade with a subtle vertical lift for smoothness */
.gx-testimonial-pane {
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .45s cubic-bezier(.4, 0, .2, 1),
    transform .45s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear .45s;
}
.gx-testimonial-pane-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity .45s cubic-bezier(.4, 0, .2, 1),
    transform .45s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear 0s;
}

/* Decorative quote mark behind the text */
.gx-testimonial-pane {
  position: relative;
  padding-top: 0.5rem;
}
.gx-testimonial-pane::before {
  content: "\201C"; /* left double quote */
  position: absolute;
  top: -2.5rem;
  left: -0.5rem;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 7rem;
  line-height: 1;
  color: var(--primary, #1a7fae);
  opacity: 0.12;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.gx-testimonial-quote {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-dark, #1f2937);
  font-weight: 400;
  margin-bottom: 1.75rem;
  position: relative;
}

.gx-testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 127, 174, 0.18);
}
.gx-testimonial-author-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark, #1f2937);
  line-height: 1.3;
  margin: 0;
}
.gx-testimonial-author-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dark-2, #6b7280);
  line-height: 1.4;
}
.gx-testimonial-author-title a {
  color: var(--primary, #1a7fae);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color .2s ease, border-color .2s ease;
}
.gx-testimonial-author-title a:hover {
  color: var(--primary-hover, #155f82);
}

/* ────────────────────────────────────────────
   Right column  portrait image
   ──────────────────────────────────────────── */
.gx-testimonials-content {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gx-testimonial-image-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  /* CSS-grid stack so every .gx-testimonial-image-pane occupies the SAME cell
     and therefore the SAME exact dimensions  zero layout shift on swap. */
  display: grid;
  grid-template-areas: "stack";
}
/* Subtle background card behind the image  adds depth */
.gx-testimonial-image-container::before {
  content: "";
  grid-area: stack;
  inset: 8% -6% -6% 8%;
  position: relative;
  background: linear-gradient(135deg, var(--primary, #1a7fae), var(--primary-dark-2, #00567c));
  border-radius: 1rem;
  opacity: 0.18;
  z-index: 0;
  align-self: stretch;
  justify-self: stretch;
}

/* Image pane = wrapper around <img>. All panes share the same grid cell so
   every pane is sized identically (4:5, max 380px). The active one is opaque
   + slightly larger for a smooth in/out feel; inactives fade to invisible. */
.gx-testimonial-image-pane {
  grid-area: stack;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.96);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .55s cubic-bezier(.4, 0, .2, 1),
    transform .55s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear .55s;
  will-change: opacity, transform;
}
.gx-testimonial-image-pane-active {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity .55s cubic-bezier(.4, 0, .2, 1),
    transform .55s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear 0s;
}

.gx-testimonial-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  border: 4px solid #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ────────────────────────────────────────────
   Pagination dots
   ──────────────────────────────────────────── */
.gx-testimonial-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.gx-testimonial-pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(26, 127, 174, 0.25);
  cursor: pointer;
  transition: width .35s cubic-bezier(.4,0,.2,1), background-color .25s ease;
  border: none;
  padding: 0;
}
.gx-testimonial-pagination-dot:hover {
  background: rgba(26, 127, 174, 0.5);
}
.gx-testimonial-pagination-dot.active {
  width: 32px;
  background: var(--primary, #1a7fae);
}

/* ────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .gx-testimonials-navigation {
    padding-right: 0;
    margin-bottom: 2rem;
  }
  .gx-testimonials-content {
    justify-content: center;
  }
  .gx-testimonial-image-container {
    max-width: 320px;
  }
  .gx-testimonial-quote { font-size: 1rem; }
  .gx-testimonial-author-name { font-size: 1.1rem; }
  .gx-testimonial-author-title { font-size: 0.9rem; }
  .gx-testimonial-pane::before { font-size: 5.5rem; top: -1.75rem; }
}
@media (max-width: 767.98px) {
  .gx-testimonial-image-container {
    max-width: 280px;
    aspect-ratio: 1 / 1;
  }
  .gx-testimonial-quote { font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.25rem; }
  .gx-testimonial-author-name { font-size: 1.05rem; }
  .gx-testimonial-author-title { font-size: 0.88rem; }
  .gx-testimonial-pagination { margin-top: 1.75rem; }
  .gx-testimonial-pane::before { font-size: 4.5rem; top: -1.25rem; left: -0.25rem; }
}
@media (max-width: 575.98px) {
  .gx-testimonial-image-container {
    max-width: 240px;
  }
  .gx-testimonial-quote { font-size: 0.9rem; line-height: 1.6; }
  .gx-testimonial-author-name { font-size: 1rem; }
  .gx-testimonial-author-title { font-size: 0.85rem; }
}

/* Honour reduced-motion preference  no slide-in / scale-in transforms */
@media (prefers-reduced-motion: reduce) {
  .gx-testimonial-pane,
  .gx-testimonial-pane-active,
  .gx-testimonial-image-pane,
  .gx-testimonial-image-pane-active {
    transition: opacity .2s linear, visibility 0s;
    transform: none !important;
  }
  .gx-testimonial-pagination-dot {
    transition: none;
  }
}
