/**
 * template-testimonials.css
 * Scoped styles for the "Нам довіряють" page template.
 * Loaded only when page-template-testimonials body class is present.
 *
 * BEM namespaces: .testimonials-page, .testimonials-slider
 * Breakpoints: desktop ≥1024px | tablet 768–1023px | mobile <768px
 */

/* ─── Custom properties ─────────────────────────────────────────────────────── */
:root {
  --tp-black:       #0a0c11;
  --tp-dark:        #141519;
  --tp-card-bg:     #1a1c21;
  --tp-card-header: #2b2e34;
  --tp-gold:        #f3e2b7;
  --tp-blue:        #2292b1;
  --tp-white:       #f9f9f9;
  --tp-muted:       #abadb3;
  --tp-border:      rgba(255,255,255,0.25);
  --tp-glow:        rgba(34,146,177,0.18);
  --tp-overlay:     linear-gradient(90deg, rgba(0,0,0,.88) 5%, rgba(26,26,26,.66) 35%, rgba(102,102,102,0) 70%);
  --tp-card-overlay: linear-gradient(180deg, rgba(10,12,17,.85) 0%, rgba(32,34,38,.6) 50%, rgba(102,102,102,0) 100%);
  --tp-font:        'Montserrat', sans-serif;
  --tp-radius:      7px;
  --tp-container:   1640px;
  --tp-side-pad:    clamp(1rem, 5vw, 100px);
}

/* ─── Reset / base ───────────────────────────────────────────────────────────── */

.wp-site-blocks{
  max-width: initial!important;
}
header,
footer{
  max-width: 1400px;
  margin: 0 auto;
}
header .wp-block-group .wp-block-group .is-layout-flex{
  flex-wrap: nowrap;
}
.page-id-5312 .wp-site-blocks,
body:not(.home).page-id-5312 .wp-site-blocks main{
  padding-right: 0;
  padding-left: 0;
  padding-top: 0;
}
.page-id-5312 .wp-block-inner-page-title{
display: none;
}
.wp-block-post-content, 
.page-id-5312 .wp-block-group{
  margin-top: 0;
}
header,
footer.wp-block-template-part{
  padding-inline: 2em;
}

.wp-block-post-content:has(.testimonials-slider){
  margin-top: -120px;
}

.testimonials-page *,
.testimonials-page *::before,
.testimonials-page *::after,
.testimonials-slider *,
.testimonials-slider *::before,
.testimonials-slider *::after {
  box-sizing: border-box;
}

.testimonials-page {
  background: var(--tp-black);
  color: var(--tp-white);
  font-family: var(--tp-font);
  overflow-x: hidden;
}

/* ─── Transparent header (overlay hero) ─────────────────────────────────────── */
/*
 * The header must be positioned above the hero without affecting normal flow.
 * z-index stack: hero-bg(0) < hero-overlay(1) < hero-content(2) < header(100)
 */
.page-template-testimonials header,
.page-template-testimonials .wp-block-template-part[class*="header"],
.page-template-testimonials .site-header,
.page-template-testimonials #masthead {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: transparent !important;
  box-shadow: none !important;
}

/* Ensure the page body itself doesn't inherit a top margin from non-transparent state */
.page-template-testimonials .testimonials-page {
  padding-top: 0;
  margin-top: 0;
}

/* ─── Section title ──────────────────────────────────────────────────────────── */
.testimonials-page__section-title {
  font-size: clamp(1.4rem, 2.5vw, 2.1875rem); /* 35px Figma target */
  font-weight: 700;
  text-align: center;
  color: var(--tp-white);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

.testimonials-slider .testimonials-page__section-title{
  margin-top: 1em;
}

.testimonials-slider > .testimonials-page__section-title{
  position: relative;
  z-index: 1;
  margin-top: 5vw;
  margin-bottom: 0;
}


@media (min-width: 768px) {
  
  .testimonials-page__why-grid .testimonials-page__section-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-page__hero {
  position: relative;
  min-height: clamp(420px, 56vw, 730px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.testimonials-page__hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  opacity: .6;
  will-change: transform;
}

.testimonials-page__hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--tp-overlay);
}

.testimonials-page__hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 10vw, 140px) var(--tp-side-pad) clamp(3rem, 6vw, 6rem);
  max-width: var(--tp-container);
  width: 100%;
  margin: 0 auto;
}

.testimonials-page__hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--tp-white);
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.testimonials-page__hero-subtitle {
  font-size: clamp(.9rem, 1.6vw, 1.15rem);
  font-weight: 400;
  color: var(--tp-gold);
  max-width: 700px;
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TRUST CATEGORIES
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-page__trust {
  background: var(--tp-black);
  padding-top: clamp(3rem, 6vw, 4rem);
}

.testimonials-page__trust-inner {
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 var(--tp-side-pad);
}

.testimonials-page__trust-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
}

/* Card */
.testimonials-page__trust-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.testimonials-page__trust-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transition: transform .5s ease;
}

.testimonials-page__trust-card:hover .testimonials-page__trust-card-bg {
  transform: scale(1.12);
}

.testimonials-page__trust-card-overlay {
  position: absolute;
  inset: 0;
  background: var(--tp-card-overlay);
}

.testimonials-page__trust-card-header {
  position: relative;
  z-index: 2;
  background: var(--tp-card-header);
  padding: .5rem 1.2rem;
  min-height: 55px;
  display: flex;
  align-items: center;
}

.testimonials-page__trust-card-title {
  font-size: clamp(.85rem, 1.4vw, 1.05rem);
  font-weight: 500;
  color: var(--tp-gold);
  text-align: center;
  text-transform: none;
  letter-spacing: .01em;
  /* line-height: 1.3; */
  margin: 0;
  width: 100%;
}

.testimonials-page__trust-card-body {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 0.8rem 0rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Logo list */
.testimonials-page__trust-logos {
  list-style: none;
  margin: 0;
  padding: 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
  align-items: center;
}

.testimonials-page__trust-card--logos-end .testimonials-page__trust-logos {
  justify-content: flex-end;
  width: 100%;
  box-sizing: border-box;
}

/* Charity card: logos stacked top → bottom, centered (matches design). */
.testimonials-page__trust-card--logos-stack .testimonials-page__trust-card-body {
  justify-content: center;
}

.testimonials-page__trust-card--logos-stack .testimonials-page__trust-logos {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 2.5vw, 1.25rem);
  width: 100%;
}

.testimonials-page__trust-card--logos-stack .testimonials-page__trust-logo-img {
  width: auto;
  max-width: min(240px, 80%);
  height: auto;
  max-height: 110px;
  object-fit: contain;
}

.testimonials-page__trust-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}

.testimonials-page__trust-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  object-position: center;
}

.testimonials-page__trust-logo-label {
  font-size: .9rem;
  font-weight: 400;
  color: var(--tp-white);
  text-align: center;
}

/* Sub-category block */
.testimonials-page__trust-subcat {
  border-top: 1px solid var(--tp-card-header);
  padding-top: 1rem;
}

.testimonials-page__trust-subcat-title {
  font-size: clamp(.75rem, 1.2vw, .9rem);
  font-weight: 500;
  color: var(--tp-gold);
  text-align: center;
  margin: 0 0 .75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TESTIMONIALS SLIDER
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-slider {
  position: relative;
  background: var(--tp-black);
  padding: clamp(3rem, 6vw, 4rem) 0 0;
  /* overflow: hidden; */
}

/* Glow background effect */
.testimonials-slider__glow {
  /* display: none; */
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% 60%, var(--tp-glow) 0%, transparent 70%);
  z-index: 0;
}

.testimonials-slider__inner {
  position: relative;
  z-index: 1;
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 var(--tp-side-pad);
}

/* Stage: arrows + track */
.testimonials-slider__stage {
  display: flex;
  align-items: center;
  gap: 0;
  /* overflow: visible; */
}

/* Arrows */
.testimonials-slider__nav {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: .5rem;
  cursor: pointer;
  opacity: .8;
  transition: opacity .2s, transform .2s;
  align-self: center;
}

.testimonials-slider__nav:hover:not(:disabled) {
  opacity: 1;
  transform: scale(1.08);
}

.testimonials-slider__nav:disabled {
  opacity: .25;
  cursor: default;
}

.testimonials-slider__nav picture {
  display: block;
  line-height: 0;
}

.testimonials-slider__nav img {
  display: block;
  width: 52px;
  height: auto;
}

/* Track — single grid cell; inactive slides are out-of-flow so height = active slide only (adaptiveHeight). */
.testimonials-slider__track {
  flex: 1;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  transition: height 0.35s ease;
}

/* ── Slide — stacked in one cell, opacity crossfade ─────────────────────────── */
.testimonials-slider__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 2.5rem;
  align-items: start;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.45s ease;
}

/* Inactive slides do not contribute to track height (Slick-style adaptiveHeight). */
.testimonials-slider__slide:not(.is-active) {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  box-sizing: border-box;
}

.testimonials-slider__slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Desktop: JS sets --tsl-right-h from .tsl__right natural height (align-items: start so right is not stretched). */
@media (min-width: 1024px) {
  .testimonials-slider__slide.is-active {
    align-items: start;
  }

  .testimonials-slider__slide.is-active .tsl__left {
    box-sizing: border-box;
    align-self: start;
    width: 100%;
    min-height: 0;
    height: var(--tsl-right-h, auto);
    max-height: var(--tsl-right-h, none);
    overflow: visible;
    gap: 1.25rem;
  }

  .testimonials-slider__slide.is-active .tsl__map-wrap {
    flex-shrink: 0;
  }

  .testimonials-slider__slide.is-active .tsl__quote-wrap {
    /* flex: 1 1 0; */
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .testimonials-slider__slide.is-active .tsl__screenshot {
    flex: 0 1 auto;
    min-height: 0;
    max-width: 100%;
    width: auto;
    max-height: 420px;
    margin-inline: auto;
    object-fit: contain;
    object-position: top center;
    padding-top: 10px;
    max-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials-slider__slide {
    transition: opacity 0.01s linear;
  }
}

/* ── Left column ─────────────────────────────────────────────────────────────── */
.tsl__left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Quote wrap: screenshot + golden quote marks absolutely positioned at corners */
.tsl__quote-wrap {
  position: relative;
  padding: 1.25rem;
}

.tsl__q-open {
  position: absolute;
  top: 1px;
  left: 3px;
  width: clamp(40px, 4.5vw, 64px);
  height: auto;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, .6));
}

.tsl__q-close {
  position: absolute;
  bottom: -8px;
  right: 1px;
  width: clamp(30px, 3.5vw, 48px);
  height: auto;
  z-index: 1;
  pointer-events: none;
  transform: rotate(180deg);
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, .6));
}

.tsl__screenshot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
  object-position: top left;
  border-radius: .5rem;
}

/* Legacy: pre-styled mobile PNGs removed from markup; keep rule if reintroduced. */
.tsl__mobile-card {
  display: none;
}

/* Map */
.tsl__map-wrap {
  display: flex;
  position: absolute;
  justify-content: center;
  bottom: -23%;
  z-index: -1;
}

.tsl__map-img {
  max-width: 360px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 24px rgba(34,146,177,.35));
  position: static;
  bottom: 0;
  z-index: -1;
}

/* ── Right column ────────────────────────────────────────────────────────────── */
.tsl__right {
  display: flex;
  flex-direction: column;
  padding-top: 40px;
}

/* Desktop / tablet: wrapper is transparent so .tsl__id-card + .tsl__meta behave as direct children of .tsl__right. */
@media (min-width: 768px) {
  .tsl__mobile-meta-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

/* Identity card: name on left, avatar on right */
.tsl__id-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255,255,255,.25);
}

.tsl__id-text {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: .25rem;
}

.tsl__name {
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.375rem);
  color: var(--tp-white);
  margin: 0;
  line-height: 1.3;
}

.tsl__contact {
  font-weight: 400;
  font-size: clamp(.85rem, 1.1vw, 1.05rem);
  color: rgba(255,255,255,.8);
  margin: 0;
  line-height: 1.5;
  max-width: 16ch;
}

.tsl__avatar {
  flex-shrink: 0;
  width: clamp(80px, 10vw, 151px);
  height: auto;
  object-fit: contain;
  object-position: top;
  display: block;
}

/* Meta card: shares left/right border with ID card, no top border */
.tsl__meta {
  border: 1px solid rgba(255,255,255,.25);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tsl__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.tsl__meta-row:last-child {
  border-bottom: none;
}

.tsl__meta-label {
  font-weight: 700;
  font-size: clamp(.7rem, 1.1vw, 1.1rem);
  color: var(--tp-white);
  white-space: nowrap;
  margin: 0;
}

.tsl__meta-value {
  font-weight: 400;
  font-size: clamp(0.7rem, 1.1vw, 1.05rem);
  color: rgba(255,255,255,.9);
  text-align: right;
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
}

/* Dots */
.testimonials-slider__dots {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-top: 2rem;
}

.testimonials-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--tp-gold);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.testimonials-slider__dot.is-active,
.testimonials-slider__dot:hover {
  background: var(--tp-gold);
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (768–1023px)
═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .testimonials-page__trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-slider__slide {
    grid-template-columns: 1fr;
  }

  .tsl__screenshot {
    max-height: 42vh;
  }

  .tsl__right {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

  .testimonials-slider__nav img {
    width: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (<768px)
═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --tp-side-pad: 1.25rem;
  }
  .testimonials-slider > .testimonials-page__section-title{
    font-size: 1em;
    margin-top: 2em;
  }

  /* Transparent header on mobile still works but hero needs padding */
  .testimonials-page__hero-content {
    padding-top: clamp(70px, 18vw, 110px);
  }

  .testimonials-page__trust-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .testimonials-page__trust-card {
    min-height: initial;
  }
  .testimonials-page__trust-card--logos-stack .testimonials-page__trust-logos {
    flex-direction: row;
  }

  /* Slide: flex column — order via flex + display:contents (no grid on slide body). */
  .testimonials-slider__slide {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  /* Flatten columns so order is: quote+screenshot → meta row → map. */
  .tsl__left,
  .tsl__right {
    display: contents;
  }

  /* Same desktop screenshot + golden quotes on mobile. */
  .tsl__quote-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    order: 1;
    width: 100%;
    padding: 0.75rem 0.5rem 0;
    box-sizing: border-box;
  }

  .tsl__screenshot {
    max-height: min(52vh, 420px);
    width: 100%;
    object-fit: contain;
    object-position: top center;
  }

  .tsl__q-open,
  .tsl__q-close {
    width: clamp(26px, 6vw, 52px);
    height: auto;
  }

  /* Row: plain meta (left) + avatar (right). */
  .tsl__mobile-meta-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    order: 2;
  }

  .tsl__meta {
    order: 1;
    flex: 1;
    min-width: 0;
    border: none;
    margin: 0;
  }

  .tsl__id-card {
    order: 2;
    flex-shrink: 0;
    border: none;
    padding: 0;
    max-width: 42%;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .tsl__map-wrap {
    order: 3;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.25rem;
    max-width: 200px;
    bottom: -18px;
  }

  .tsl__map-img {
    position: static;
    z-index: auto;
    max-width: min(100%, 280px);
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(34, 146, 177, .3));
  }

  /* Plain copy lines — no table/bordered cards (mobile only). */
  .tsl__meta-row {
    display: block;
    padding: 0 0 0.35rem;
    border: none;
    text-align: left;
    line-height: 1em;
  }

  .tsl__meta-row:last-child {
    padding-bottom: 0;
  }

  .tsl__meta-label {
    display: inline;
    font-weight: 600;
    white-space: normal;
  }

  .tsl__meta-label::after {
    content: ': ';
  }

  .tsl__meta-value {
    display: inline;
    text-align: left;
    white-space: normal;
  }

  .tsl__avatar {
    width: 40px;
  }

  .tsl__name {
    font-size: 0.75rem;
  }

  .tsl__contact {
    font-size: 0.68rem;
    max-width: none;
  }

  .testimonials-slider__dots {
    margin-top: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STATS BAR — НАМ ДОВІРЯЮТЬ З 2023 РОКУ
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-page__stats {
  background: var(--tp-black);
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  text-align: center;
}

.testimonials-page__stats-inner {
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 var(--tp-side-pad);
}

.testimonials-page__stats-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin: 0 0 clamp(2rem, 4vw, 4rem);
}

.testimonials-page__stats-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1rem;
}

.testimonials-page__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.testimonials-page__stat-number {
  display: block;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--tp-gold);
  line-height: 1;
  font-family: var(--tp-font);
}

.testimonials-page__stat-label {
  display: block;
  font-size: clamp(.85rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: var(--tp-white);
  max-width: 220px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WHY US — ЧОМУ ОБИРАЮТЬ НАС?
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-page__why {
  position: relative;
  background: var(--tp-black);
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  overflow: visible;
}

/* Ambient glow pseudo-elements */
.testimonials-page__why .testimonials-page__why-inner::before,
.testimonials-page__why .testimonials-page__why-inner::after {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(243 226 183 / 30%) 1%, transparent 70%);
  pointer-events: none;
}

.testimonials-page__why .testimonials-page__why-inner::before {
  left: -0px;
  top: 50%;
  transform: translateY(-50%);
}

.testimonials-page__why .testimonials-page__why-inner::after {
  right: -80px;
  top: 38%;
  transform: translateY(-50%);
}

.testimonials-page__why-inner {
  position: relative;
  z-index: 1;
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 var(--tp-side-pad);
  overflow: visible;
}

.testimonials-page__why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* Image columns */
.testimonials-page__why-img-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.testimonials-page__why-img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  z-index: 10;
  margin-top: -25px;
}

.testimonials-page__why-img--rotated {
  transform: rotate(16deg);
  transform-origin: center bottom;
}

/* Center column */
.testimonials-page__why-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: fit-content;
}

.testimonials-page__why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 420px;
  padding-left: 50px;
}

.testimonials-page__why-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(.9rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: var(--tp-white);
  line-height: 1.4;
}

/* Desktop / tablet: SVG checkmarks; PNG feature icons only on mobile (see max-width:767). */
.testimonials-page__why-check {
  flex-shrink: 0;
  width: 29px;
  height: 25px;
  display: block;
}

.testimonials-page__why-icon {
  display: none;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════════════════════════════════════════ */
.testimonials-page__cta {
  background: var(--tp-black);
  padding: clamp(2rem, 6vw, 6rem) var(--tp-side-pad);
  text-align: center;
}

.testimonials-page__cta-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.testimonials-page__cta-heading {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 700;
  color: var(--tp-white);
  line-height: 1.4;
  margin: 0;
}

.testimonials-page__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 3rem;
  border-radius: 64px;
  background: linear-gradient(90deg, #1b3b89 0%, #25bfc6 73%);
  color: var(--tp-white);
  font-family: var(--tp-font);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
  transition: filter .2s, transform .2s;
  min-width: 200px;
}

.testimonials-page__cta-btn:hover,
.testimonials-page__cta-btn:focus-visible {
  filter: brightness(1.15);
  transform: translateY(-2px);
  color:#f9f9f9;
}

.testimonials-page__cta-btn:focus-visible {
  outline: 2px solid var(--tp-gold);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (768–1023px) additions
═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .testimonials-page__stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem .5rem;
  }
  .testimonials-page__why-grid{
    grid-template-columns: 1fr 1.4fr 1fr;
    gap:0;
  }
      .testimonials-page__why-grid .testimonials-page__section-title{
       top:-40px;
      }

  /* .testimonials-page__why-img--rotated {
    transform: rotate(10deg);
    max-height: 260px;
    width: auto;
  } */
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (<768px) additions
═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .testimonials-page__trust-subcat{
    padding-top: 0;
  }
  .testimonials-page__trust-card-body{
    padding-bottom: 10px;
    min-height: 130px;
  }
  /* Stats: three columns (Figma mobile). */
  .testimonials-page__stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 0.35rem;
    align-items: start;
  }

  .testimonials-page__stat-number {
    font-size: clamp(1.1rem, 4.2vw, 1.65rem);
  }

  .testimonials-page__stat-label {
    font-size: clamp(0.58rem, 2.2vw, 0.72rem);
    max-width: none;
    line-height: 1.25;
  }

  /* Why us — 5-row 2-col grid (mobile).
     Row 1: [empty]   | title
     Row 2: 1.3c img  | item 1
     Row 3: 1.3c img  | item 2
     Row 4: item 3    | 1.4c img
     Row 5: item 4    | 1.4c img
  */
  .testimonials-page__why .testimonials-page__why-inner::before,
  .testimonials-page__why .testimonials-page__why-inner::after {
    display: block;
    width: min(90vw, 400px);
    height: min(90vw, 360px);
    opacity: 0.8;
  }

  .testimonials-page__why .testimonials-page__why-inner::before {
    left: 29%;
    top: 20%;
    transform: translate(-50%, -30%);
  }

  .testimonials-page__why .testimonials-page__why-inner::after {
    left: 50%;
    right: auto;
    top: 60%;
    transform: translate(-30%, -20%);
  }

  /* 10 tracks → 30% | 70% (3+7 cols) for first-image rows; 70% | 30% (7+3) for second-image rows. */
  .testimonials-page__why-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr;
    gap: 0.35rem 0.5rem;
    align-items: end;
  }

  /* Dissolve .why-center so h2 + ul become direct grid children. */
  .testimonials-page__why-center {
    display: contents;
  }

  /* Dissolve .why-list so each li becomes a direct grid child. */
  .testimonials-page__why-list {
    display: contents;
  }

  /* Title: right 70% (tracks 4–10), row 1 */
  .testimonials-page__why-grid #why-heading {
    grid-column: 4 / -1;
    grid-row: 1;
    justify-self: start;
    text-align: right;
    font-size: clamp(0.85rem, 3.8vw, 1rem);
    /* margin-top: 0; */
    align-self: start;
    max-width: 100%;
    padding-left: 6px;
  }

  /* Second image (1.3c DOM --left): right 30% (tracks 8–10), rows 4–5 */
  .testimonials-page__why-img-wrap--left {
    grid-column: 6 / -1;
    grid-row: 4 / 6;
    align-items: center;
    justify-content: center;
    overflow: visible;
    max-height: none;
  }

  /* Items 1–2: right 70% (tracks 4–10), rows 2–3 */
  .testimonials-page__why-list li:nth-child(1) {
    grid-column: 4 / -1;
    grid-row: 2;
  }

  .testimonials-page__why-list li:nth-child(2) {
    grid-column: 4 / -1;
    grid-row: 3;
  }

  /* Items 3–4: left 70% (tracks 1–7), rows 4–5 */
  .testimonials-page__why-list li:nth-child(3) {
    grid-column: 1 / 8;
    grid-row: 4;
  }

  .testimonials-page__why-list li:nth-child(4) {
    grid-column: 1 / 8;
    grid-row: 5;
  }

  /* First image (1.4c): left 30% (tracks 1–3), rows 2–3 */
  .testimonials-page__why-img-wrap--right {
    grid-column: 1 / 4;
    grid-row: 1 / 4;
    align-items: center;
    justify-content: center;
    max-height: none;
    overflow: visible;
  }

  .testimonials-page__why-img--rotated {
  transform: scale(1.4) rotate(10deg);
  margin-bottom: -40px;
  margin-left: -20px;
  }

  /* Items: icon left, text right (horizontal) */
  .testimonials-page__why-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .testimonials-page__why-check {
    display: none;
  }

  .testimonials-page__why-icon {
    display: block;
    flex-shrink: 0;
    width: 35px;
    height: 27px;
    object-fit: contain;
  }

  .testimonials-page__cta-btn {
    width: 100%;
    max-width: 300px;
  }
}
