/* Shared palette and page layout; all rules belong to the client stories pages. */
.client-stories {
  --stories-ink: #123b59;
  --stories-lime: #c1c404;
  --stories-paper: #f7f8f4;
  --stories-border: #dfe4df;
  color: #25343d;
  font-family: "Nunito", Arial, sans-serif;
  background: #fff;
}

.stories-eyebrow {
  margin: 0 0 0.9rem;
  color: var(--stories-ink);
  font: 700 0.75rem/1.5 Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stories-content {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Section navigation makes the current page clear without competing with the header. */
.stories-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--stories-border);
}

.stories-links a {
  padding: 0.65rem 1rem;
  border-radius: 2rem;
  color: var(--stories-ink);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.stories-links a[aria-current="page"] {
  background: var(--stories-ink);
  color: #fff;
}

.stories-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.client-stories a:focus-visible {
  outline: 3px solid var(--stories-ink);
  outline-offset: 4px;
}

/* All quotes share one consistent card style and remain in reading order. */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem;
}

.testimonial {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 2rem 2.25rem;
  border: 1px solid var(--stories-border);
  border-radius: 0.5rem;
  background: var(--stories-paper);
}

.testimonial-mark {
  display: block;
  height: 3.5rem;
  color: #777900;
  font: 5rem/1 Georgia, serif;
}

.testimonial blockquote {
  flex: 1;
  margin: 0 0 1.75rem;
  font-size: 1.1875rem;
  line-height: 1.75;
}

.testimonial blockquote p {
  margin: 0;
}

.testimonial figcaption {
  padding-top: 1rem;
  border-top: 1px solid var(--stories-border);
  color: var(--stories-ink);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* The video follows all eight written testimonials, as requested. */
.stories-video {
  margin-top: 4rem;
  padding: 2.5rem;
  border-radius: 0.5rem;
  background: var(--stories-paper);
}

.stories-video-heading {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.stories-video h2,
.stories-contact h2 {
  margin: 0 0 1rem;
  color: var(--stories-ink);
  font: 700 1.8rem/1.3 Arial, sans-serif;
  letter-spacing: -0.025em;
}

.stories-video-heading > p:last-child {
  margin: 0;
  font-size: 1.0625rem;
}

.stories-video-frame {
  position: relative;
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%;
  border-radius: 0.25rem;
  background: var(--stories-ink);
}

.stories-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Numbered case studies pair a compact heading panel with a readable text column. */
.case-study-list {
  display: grid;
  gap: 2rem;
}

.case-study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  overflow: hidden;
  border: 1px solid var(--stories-border);
  border-radius: 0.5rem;
  background: #fff;
}

.case-study-heading {
  padding: 2.25rem;
  background: var(--stories-paper);
  border-top: 4px solid var(--stories-lime);
}

.case-study-number {
  display: block;
  margin-bottom: 2rem;
  color: #59717d;
  font: 400 2.75rem/1 Arial, sans-serif;
  letter-spacing: -0.05em;
}

.case-study h2 {
  margin: 0;
  color: var(--stories-ink);
  font: 700 1.5rem/1.4 Arial, sans-serif;
  letter-spacing: -0.025em;
}

.case-study blockquote {
  max-width: 72ch;
  margin: 0;
  padding: 2.5rem;
  font-size: 1.0625rem;
  line-height: 1.9;
}

.case-study blockquote p {
  margin-bottom: 1.25rem;
}

.case-study blockquote p:last-child {
  margin-bottom: 0;
}

.case-study--highlighted .case-study-heading {
  background: var(--stories-lime);
}

/* One clear next step after reading the client experiences. */
.stories-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--stories-border);
}

.stories-contact p:last-child {
  margin: 0;
}

.stories-contact-link {
  flex-shrink: 0;
  padding: 0.9rem 1.4rem;
  border-radius: 0.25rem;
  background: var(--stories-lime);
  color: var(--stories-ink);
  font-weight: 700;
}

.stories-contact-link span {
  margin-left: 1rem;
}

.stories-contact-link:hover {
  background: #d9db5c;
  color: var(--stories-ink);
}

/* Keep the reading flow natural on tablets and phones. */
@media (max-width: 991px) {
  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study-heading {
    padding: 1.75rem;
  }

  .case-study-number {
    margin-bottom: 1rem;
  }
}

@media (max-width: 767px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .stories-links {
    margin-bottom: 2rem;
  }

  .stories-links a {
    padding: 0.6rem 0.8rem;
  }

  .testimonial,
  .case-study blockquote,
  .stories-video {
    padding: 1.5rem;
  }

  .stories-contact {
    align-items: flex-start;
    flex-direction: column;
  }
}
