/* Testimonials section - tuned to match mock */
.jp-testimonials {
  --jp-t-bg: #2f343b;
  --jp-t-panel: rgba(255, 255, 255, 0.02);
  --jp-t-text: #f1ede8;
  --jp-t-muted: rgba(241, 237, 232, 0.9);
  --jp-t-dim: rgba(241, 237, 232, 0.78);
  --jp-t-gold: #b8a054;
  --jp-t-rule: rgba(255, 255, 255, 0.11);

  background: transparent;
  color: var(--jp-t-text);
}

.jp-testimonials__inner {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--jp-t-bg);
  border: 0;
  padding: clamp(1.55rem, 4vw, 2.8rem);
}

.jp-testimonials__header {
  margin-bottom: clamp(1.65rem, 2.8vw, 2.45rem);
}

.jp-testimonials__kicker {
  margin: 0 0 0.42rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--jp-t-gold);
}

.jp-testimonials__title {
  margin: 0 0 5rem !important;
  font-size: clamp(2.05rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.006em;
  color: var(--jp-t-text);
  font-weight: 500;
}

.jp-testimonials__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.55rem, 2.5vw, 2.35rem);
  align-items: start;
}

/* JS fallback for WP column layouts where viewport media queries don't reflect block width */
.jp-testimonials.is-stacked .jp-testimonials__grid {
  grid-template-columns: 1fr;
}

.jp-testimonials.is-stacked .jp-testimonials__featured {
  padding-right: 0;
}

.jp-testimonials.is-stacked .jp-testimonials__featured-quote {
  max-width: none;
}

.jp-testimonials.is-stacked .jp-testimonials__side {
  max-height: clamp(360px, 62vh, 560px) !important;
  overflow: hidden;
}

.jp-testimonials.is-stacked .jp-testimonials__side-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  -webkit-overflow-scrolling: touch;
}

/* Featured (left) */
.jp-testimonials__featured {
  min-width: 0;
  padding-right: clamp(0.45rem, 1vw, 0.95rem);
}

.jp-testimonials__featured-quote {
  position: relative;
  margin: 0;
  padding-left: 2.7rem;
  white-space: normal;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none;
}

.jp-testimonials__featured-quote::before {
    content: "“";
    position: absolute;
    left: 0;
    top: -2rem;
    font-size: 13em;
    line-height: 0.88;
    color: rgba(184, 160, 84, 0.25);
}

.jp-testimonials__featured-quote p {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--jp-t-text);
  white-space: normal;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none;
  max-width: none;
}

.jp-testimonials__featured-name {
  margin: 1.35rem 0 0.28rem !important;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--jp-t-text);
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.jp-testimonials__featured-meta {
  margin: 0;
  font-size: 1.35rem;
  color: var(--jp-t-gold);
}

/* Secondary (right) */
.jp-testimonials__side {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  max-height: var(--jp-side-max-height, none);
  overflow: hidden;
  background: var(--jp-t-panel);
  border-left: 1px solid rgba(255, 255, 255, 0.035);
  padding-left: clamp(0.35rem, 0.9vw, 0.6rem);
}

.jp-testimonials__side-scroll {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.45rem;
}

.jp-testimonials__item {
  margin: 0 0 1.75rem;
}

.jp-testimonials__item:last-child {
  margin-bottom: 0;
}

.jp-testimonials__item-quote {
  margin: 0 0 0.8rem !important;
  white-space: normal;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none;
}

.jp-testimonials__item-quote p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--jp-t-dim);
  white-space: normal;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none;
  max-width: none;
}

.jp-testimonials__item-name {
  margin: 0 0 0.18rem !important;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--jp-t-text);
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.jp-testimonials__item-meta {
  margin: 0;
  font-size: 1rem;
  color: var(--jp-t-gold);
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.jp-testimonials__footer {
  margin-top: 0.9rem;
  border-top: 1px solid var(--jp-t-rule);
  padding-top: 0.72rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.64);
}

@media (max-width: 1180px) {
  .jp-testimonials__featured-quote p {
    font-size: 1.75rem;
  }

  .jp-testimonials__item-quote p {
    font-size: 1.22rem;
  }

  .jp-testimonials__item-name {
    font-size: 1.1rem;
  }

  .jp-testimonials__item-meta {
    font-size: .9rem;
  }
}

@media (max-width: 964px) {
  .jp-testimonials__grid {
    grid-template-columns: 1fr;
  }

  .jp-testimonials__featured {
    padding-right: 0;
  }

  .jp-testimonials__featured-quote {
    max-width: none;
  }

  .jp-testimonials__side {
    max-height: clamp(360px, 62vh, 560px) !important;
    overflow: hidden;
  }

  .jp-testimonials__side-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .jp-testimonials__title {
    font-size: 2rem;
  }

  .jp-testimonials__featured-quote {
    padding-left: 1.6rem;
  }

  .jp-testimonials__featured-quote::before {
    font-size: 4rem;
    top: -0.25rem;
  }

  .jp-testimonials__featured-quote p {
    font-size: 1.45rem;
    line-height: 1.38;
  }

  .jp-testimonials__featured-name,
  .jp-testimonials__featured-meta {
    font-size: 1.05rem;
  }

  .jp-testimonials__item-quote p {
    font-size: 1.02rem;
  }

  .jp-testimonials__item-name {
    font-size: 1rem;
  }

  .jp-testimonials__item-meta {
    font-size: 0.8rem;
  }

  /* Keep long secondary testimonials scrollable on phone */
  .jp-testimonials__side {
    max-height: min(68vh, 480px) !important;
    overflow: hidden;
  }

  .jp-testimonials__side-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}
