/* =========================================
   CASE STUDY PAGE (page-case-study.php)
========================================= */

/* ---------- Layout reset (full width, no sidebar / crumbs) ---------- */
body.cs-page #caWrap {
  padding: 0;
}
body.cs-page #contentArea {
  max-width: none;
  width: 100%;
  padding: 0;
  overflow: visible;
}
body.cs-page article#mainContent {
  width: 100%;
  float: none;
  padding: 0;
}
body.cs-page #sidebar,
body.cs-page #crumbs,
body.cs-page button.hpLessContent {
  display: none !important;
}

/* ---------- Shared ---------- */
.cs-hero,
.cs-intro,
.cs-featured,
.cs-media,
.cs-highlight,
.cs-text,
.cs-press,
.cs-video-banner,
.cs-stats,
.cs-reviews,
.cs-closing {
  --cs-navy: #0f2742;
  --cs-blue: #3a8de0;
  --cs-text: #1f1f1f;
  --cs-title: #333333;
  --cs-container: 1100px;
  --cs-gutter: 20px;

  font-family: "Lato", sans-serif;
  text-align: left;
}

.cs-container {
  width: 100%;
  max-width: calc(var(--cs-container) + var(--cs-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--cs-gutter);
  box-sizing: border-box;
}

/* !important: theme has global p { font-size: ...!important } rules */
#mainContent .cs-hero p,
#mainContent .cs-intro p {
  padding: 0;
  margin: 0 0 16px;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 400;
  color: inherit;
}
#mainContent .cs-hero p:last-child,
#mainContent .cs-intro p:last-child {
  margin-bottom: 0;
}

/* Decorative lines */
.cs-line {
  position: absolute;
  display: block;
  height: 4px;
  pointer-events: none;
}
.cs-line--navy {
  background: var(--cs-navy);
}
.cs-line--blue {
  background: var(--cs-blue);
}

/* ---------- Hero ---------- */
.cs-hero {
  position: relative;
  padding: 80px 0 135px;
  background-color: #1f5a94;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  color: #ffffff;
}

.cs-hero__content {
  max-width: 790px;
}

#mainContent .cs-hero__title {
  margin: 0 0 24px;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.22;
  color: #ffffff;
}

.cs-hero__text {
  font-size: 18px;
  line-height: 1.35;
  color: #ffffff;
}
#mainContent .cs-hero__text p {
  margin-bottom: 16px;
}
#mainContent .cs-hero__text a {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Intro (white card) ---------- */
.cs-intro {
  position: relative;
  padding-top: 60px;
  overflow-x: clip;
}
/* Card overlaps the hero only when the hero is shown */
.cs-hero + .cs-intro {
  margin-top: -62px;
  padding-top: 0;
}

.cs-intro__card {
  position: relative;
  padding: 52px 48px 82px;
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--cs-text);
}

.cs-intro__line-top {
  top: 30px;
  right: -110px;
  width: 190px;
}

.cs-intro__line-bottom {
  bottom: 30px;
  left: -105px;
  width: 265px;
}

#mainContent .cs-intro__title {
  margin: 0 0 18px;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cs-title);
}

.cs-intro__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--cs-text);
}
#mainContent .cs-intro__text p {
  margin-bottom: 14px;
}
#mainContent .cs-intro__text a {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---------- Featured In (logos) ---------- */
.cs-featured {
  padding: 55px 0 45px;
  background: #ffffff;
}

.cs-container--wide {
  --cs-container: 1320px;
}

#mainContent .cs-featured__label {
  margin: 0 0 12px;
  font-size: 20px !important;
  font-weight: 700;
  line-height: 1.2 !important;
  color: #1d2b44;
  text-align: center;
}

#mainContent .cs-featured__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Logos shrink proportionally (max 50px tall) to stay in one row */
#mainContent .cs-featured__item {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-featured__item a {
  display: block;
  transition: opacity 0.3s ease;
}
.cs-featured__item a:hover {
  opacity: 0.75;
}

.cs-featured__item img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 50px;
  object-fit: contain;
}

/* Marquee clones (added in js/case-study.js) are used on mobile only */
#mainContent .cs-featured__item--clone {
  display: none;
}

@keyframes cs-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Image + text ---------- */
.cs-media {
  padding: 60px 0;
  background: #ffffff;
}

.cs-media__inner {
  display: grid;
  grid-template-columns: 557fr 496fr;
  gap: 38px;
  align-items: start;
}

.cs-media--reverse .cs-media__image {
  order: 2;
}

.cs-media--no-image .cs-media__inner {
  grid-template-columns: 1fr;
}
.cs-media--no-image .cs-media__body {
  max-width: 820px;
}

.cs-media__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 557 / 420;
  object-fit: cover;
}

#mainContent .cs-media__title {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  color: #0d2a52;
}

.cs-media__divider {
  display: block;
  width: 112px;
  height: 2px;
  margin: 18px 0 20px;
  background: #0d2a52;
}

.cs-media__text {
  font-size: 16px;
  line-height: 1.4;
  color: var(--cs-text, #1f1f1f);
}
#mainContent .cs-media p {
  padding: 0;
  margin: 0 0 14px;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 400;
  color: inherit;
}
#mainContent .cs-media p:last-child {
  margin-bottom: 0;
}
#mainContent .cs-media__text a {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---------- Navy section (text + image bleeding right) ---------- */
.cs-highlight {
  --cs-half: calc(var(--cs-container) / 2);
  --cs-col-gap: 81px;

  display: grid;
  grid-template-columns:
    minmax(var(--cs-gutter), 1fr)
    minmax(0, var(--cs-half))
    var(--cs-col-gap)
    minmax(0, calc(var(--cs-half) - var(--cs-col-gap)))
    minmax(var(--cs-gutter), 1fr);
  align-items: center;
  padding: 82px 0 112px;
  background: #12335b;
  color: #ffffff;
}

.cs-highlight__body {
  grid-column: 2 / 3;
  max-width: 490px;
}
.cs-highlight--no-image .cs-highlight__body {
  grid-column: 2 / 5;
  max-width: 820px;
}

.cs-highlight__image {
  grid-column: 4 / 6;
}
.cs-highlight__image img {
  display: block;
  width: 100%;
  height: 506px;
  object-fit: cover;
  object-position: center bottom;
}

#mainContent .cs-highlight__title,
#mainContent .cs-text__title {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}
#mainContent .cs-highlight__title {
  color: #ffffff;
}
#mainContent .cs-text__title {
  color: #0d2a52;
}

.cs-highlight__divider,
.cs-text__divider {
  display: block;
  width: 112px;
  height: 2px;
  margin: 18px 0 24px;
}
.cs-highlight__divider {
  background: #ffffff;
}
.cs-text__divider {
  margin-bottom: 40px;
  background: #0d2a52;
}

.cs-highlight__text,
.cs-text__content {
  font-size: 16px;
  line-height: 1.45;
}
.cs-highlight__text {
  color: #ffffff;
}
.cs-text__content {
  color: var(--cs-text, #1f1f1f);
}

#mainContent .cs-highlight p,
#mainContent .cs-text p {
  padding: 0;
  margin: 0 0 18px;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 400;
  color: inherit;
}
#mainContent .cs-highlight__text p:last-child {
  margin-bottom: 0;
}
#mainContent .cs-highlight__text a {
  color: #ffffff;
  text-decoration: underline;
}
#mainContent .cs-text__content a {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---------- Text + quote ---------- */
.cs-text {
  padding: 85px 0 70px;
  background: #ffffff;
}

.cs-text__quote {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 17px;
  line-height: 1.4;
}
#mainContent .cs-text__quote p {
  margin: 0;
  font-style: italic;
  font-weight: 700;
  color: #3a8de0;
}

/* ---------- Press: Latest National Appearances ---------- */
.cs-press {
  --cs-press-gap: 24px;
  padding: 90px 0 80px;
  background: #eef3fc;
}

#mainContent .cs-press__title {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: #0d2a52;
  text-align: center;
}

.cs-press__divider {
  display: block;
  width: 112px;
  height: 2px;
  margin: 18px auto 40px;
  background: #0d2a52;
}

.cs-press__grid {
  display: grid;
  grid-template-columns: 523fr 254fr 254fr;
  gap: 0 var(--cs-press-gap);
  align-items: start;
}
.cs-press--no-video .cs-press__grid {
  grid-template-columns: 1fr 1fr;
}

.cs-press__video {
  grid-column: 1;
  grid-row: 1 / span var(--cs-press-rows, 1);
}

/* YouTube facade: the iframe is created on click (js/case-study.js) */
.cs-video {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #000000;
  cursor: pointer;
}
.cs-video__poster,
.cs-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.cs-video__poster {
  object-fit: cover;
}
.cs-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(18, 51, 91, 0.85);
  transform: translate(-50%, -50%);
  transition: background 0.3s ease;
}
.cs-video__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #ffffff;
  transform: translate(-40%, -50%);
}
div.cs-video {
  cursor: default;
}
.cs-video:hover .cs-video__play,
.cs-video:focus-visible .cs-video__play {
  background: #3a8de0;
}

.cs-press__item {
  min-width: 0;
}
.cs-press__item--next-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #c3cad6;
}

.cs-press__image {
  position: relative;
}
.cs-press__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 254 / 215;
  object-fit: cover;
}

/* White ribbon with red / blue slanted ends */
.cs-press__ribbon {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 34px;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  color: #1f1f1f;
  text-align: center;
}
.cs-press__ribbon::before,
.cs-press__ribbon::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
}
.cs-press__ribbon::before {
  left: 0;
  background: #d8262c;
  clip-path: polygon(0 0, 30% 0, 100% 100%, 0 100%);
}
.cs-press__ribbon::after {
  right: 0;
  background: #1515a8;
  clip-path: polygon(70% 0, 100% 0, 100% 100%, 0 100%);
}

.cs-press__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
}
.cs-press__item--next-row .cs-press__meta:first-child,
.cs-press__item > .cs-press__meta:first-child {
  margin-top: 0;
}

.cs-press__logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 18px;
  margin-top: 3px;
}

#mainContent .cs-press__text {
  margin: 0;
  padding: 0;
  font-size: 16px !important;
  line-height: 1.4 !important;
  font-weight: 400;
  color: #1f1f1f;
}
#mainContent .cs-press__text a {
  color: inherit;
  text-decoration: none;
}
#mainContent .cs-press__text a:hover {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---------- Video banner (opens a popup) ---------- */
.cs-video-banner {
  padding: 60px 0 55px;
  background: #ffffff;
}

.cs-container--video {
  --cs-container: 1200px;
}

.cs-video-banner__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 340px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #1f3a6b;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

/* Navy-to-periwinkle tint as in the design */
.cs-video-banner__button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 34, 64, 0.45) 0%, rgba(99, 128, 216, 0.45) 100%);
}

.cs-video-banner__play {
  position: relative;
  z-index: 1;
  width: 153px;
  height: 153px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cs-video-banner__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-style: solid;
  border-width: 17px 0 17px 30px;
  border-color: transparent transparent transparent #ffffff;
  transform: translate(-38%, -50%);
}
.cs-video-banner__button:hover .cs-video-banner__play,
.cs-video-banner__button:focus-visible .cs-video-banner__play {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  transform: scale(1.04);
}

/* Popup */
.cs-modal {
  width: min(900px, 92vw);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.cs-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
.cs-modal__frame {
  aspect-ratio: 16 / 9;
  background: #000000;
}
.cs-modal__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.cs-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 36px;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
}

/* ---------- Stats bar ---------- */
.cs-stats {
  display: grid;
  grid-template-columns: 35% repeat(var(--cs-stats-count, 3), 1fr);
  min-height: 190px;
}
.cs-stats--3 {
  grid-template-columns: 35% 15% 25% 25%;
}

.cs-stats__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  background: #2a3860;
  text-align: center;
}
.cs-stats__col:last-child {
  background: #222f56;
}
.cs-stats__col--logo {
  background: #182240;
}
.cs-stats__col--highlight,
.cs-stats__col--highlight:last-child {
  background: #6380d8;
}

.cs-stats__col--logo img {
  display: block;
  width: 137px;
  max-width: 100%;
  height: auto;
}

.cs-stats__icon {
  display: block;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  object-fit: contain;
}

#mainContent .cs-stats__text {
  margin: 0;
  padding: 0;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 700;
  color: #ffffff;
}
.cs-stats__number {
  display: block;
}

/* ---------- Testimonials (slider) ---------- */
.cs-reviews {
  padding: 90px 0 90px;
  background: #ffffff;
}

#mainContent .cs-reviews__title {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: #0d2a52;
  text-align: center;
}

.cs-reviews__divider {
  display: block;
  width: 160px;
  height: 2px;
  margin: 18px auto 44px;
  background: #0d2a52;
}

.cs-container--reviews {
  --cs-container: 1280px;
}

.cs-reviews__box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 308px;
}

/* Left card */
.cs-reviews__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 38px 40px;
  background: #faf6f5;
  box-shadow: -8px 0 12px -6px rgba(0, 0, 0, 0.12),
    0 -8px 12px -6px rgba(0, 0, 0, 0.12),
    0 8px 12px -6px rgba(0, 0, 0, 0.12);
}

.cs-reviews__lines {
  position: absolute;
  top: 22px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: 72%;
}
.cs-reviews__lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: #05497b;
}
.cs-reviews__lines span + span {
  width: 92%;
  background: #2f6cb5;
}

.cs-reviews__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#mainContent .cs-reviews__heading {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111111;
}

.cs-reviews__arrows {
  display: flex;
  gap: 18px;
}
.cs-reviews__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #1f1f1f;
  cursor: pointer;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.cs-reviews__arrow:hover,
.cs-reviews__arrow:focus-visible {
  color: #3a8de0;
}
.cs-reviews__arrow[disabled] {
  visibility: hidden;
}

#mainContent .cs-reviews__description {
  max-width: 420px;
  margin: 22px 0 0;
  padding: 0;
  font-size: 15px !important;
  line-height: 1.35 !important;
  color: #111111;
}

.cs-reviews__more {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 44px -38px 0 0;
}

#mainContent .cs-reviews__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 150px;
  height: 40px;
  padding: 0 24px;
  border: 3px solid #3a8de0;
  background: #1f4a7c;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
#mainContent .cs-reviews__button:hover,
#mainContent .cs-reviews__button:focus-visible {
  border-color: #1f4a7c;
  background: #3a8de0;
  color: #ffffff;
}

.cs-reviews__more-line {
  flex: 0 1 167px;
  height: 2px;
  margin-left: auto;
  background: #2f6cb5;
}

/* Right: slider */
.cs-reviews__viewport {
  overflow: hidden;
  background: #1f497b;
}

/* overflow: visible overrides the theme's .article ul { overflow: hidden },
   which would clip every slide except the first one */
#mainContent .cs-reviews__track {
  display: flex;
  height: 100%;
  overflow: visible;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.45s ease;
  touch-action: pan-y;
}

#mainContent .cs-reviews__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-review {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 40px 38px 36px;
  box-sizing: border-box;
  color: #ffffff;
}

.cs-review__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cs-review__stars {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 4px;
  color: #f5c84c;
}

.cs-review__quote {
  flex: 0 0 auto;
  width: 46px;
  height: auto;
  color: #ffffff;
}

.cs-review__text {
  margin: 22px 0 28px;
  padding: 0;
  border: 0;
  background: none;
}
#mainContent .cs-review__text p {
  margin: 0;
  padding: 0;
  font-size: 15px !important;
  line-height: 1.55 !important;
  font-style: normal;
  color: #ffffff;
}

.cs-review__footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
}
.cs-review__name {
  font-size: 20px;
  font-weight: 600;
}
.cs-review__date {
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  #mainContent .cs-reviews__track {
    transition: none;
  }
}

/* ---------- Closing (Looking Ahead) ---------- */
.cs-closing {
  padding: 62px 0 125px;
  background: #eef3fc;
}

.cs-closing__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  gap: 70px;
  align-items: center;
}
.cs-closing--no-image .cs-closing__inner {
  grid-template-columns: 1fr;
}

.cs-closing__body {
  max-width: 640px;
}

#mainContent .cs-closing__title {
  margin: 0;
  padding: 0;
  font-family: "Lato", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: #0d2a52;
}

.cs-closing__divider {
  display: block;
  width: 112px;
  height: 2px;
  margin: 18px 0 30px;
  background: #0d2a52;
}

.cs-closing__text {
  font-size: 16px;
  line-height: 1.45;
  color: #1f1f1f;
}
#mainContent .cs-closing__text p {
  margin: 0 0 18px;
  padding: 0;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 400;
  color: inherit;
}
#mainContent .cs-closing__text p:last-child {
  margin-bottom: 0;
}
#mainContent .cs-closing__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#mainContent .cs-closing__text a:hover {
  color: #1a73e8;
}

.cs-closing__figure {
  margin: 0;
}
.cs-closing__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 382 / 485;
  object-fit: cover;
}

.cs-closing__caption {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.3;
  color: #555555;
  text-align: center;
}
#mainContent .cs-closing__caption a {
  color: inherit;
  text-decoration: none;
}
#mainContent .cs-closing__caption a:hover {
  text-decoration: underline;
}

/* Footer form (footer.php) overlaps the closing section */
body.cs-page--closing .container.footer-form {
  margin-top: -35px !important;
}

/* Line reveal animation (class added in js/case-study.js) */
.cs-js .cs-line {
  transform: scaleX(0);
  transition: transform 0.8s ease;
}
.cs-js .cs-intro__line-top {
  transform-origin: right center;
}
.cs-js .cs-intro__line-bottom {
  transform-origin: left center;
}
.cs-js .cs-line.is-visible {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .cs-js .cs-line {
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 1640px) {
  .cs-hero,
  .cs-intro,
  .cs-media,
  .cs-highlight,
  .cs-text,
  .cs-press {
    --cs-container: 1200px;
  }
  #mainContent .cs-hero__title {
    font-size: 42px;
  }
  .cs-hero__text {
    font-size: 20px;
  }
  .cs-hero__content {
    max-width: 880px;
  }
  #mainContent .cs-intro__title {
    font-size: 40px;
  }
  .cs-intro__text {
    font-size: 18px;
  }
}

@media (max-width: 1360px) {
  .cs-intro__line-top {
    right: -40px;
    width: 150px;
  }
  .cs-intro__line-bottom {
    left: -40px;
    width: 200px;
  }
}

@media (max-width: 1024px) {
  .cs-hero {
    padding: 60px 0 120px;
  }
  #mainContent .cs-hero__title {
    font-size: 32px;
  }
  #mainContent .cs-intro__title {
    font-size: 32px;
  }
  .cs-intro__line-top {
    right: -20px;
  }
  .cs-intro__line-bottom {
    left: -20px;
  }
  #mainContent .cs-featured__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 48px;
  }
  .cs-featured__item img {
    width: auto;
    height: 40px;
  }
  .cs-media__inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  #mainContent .cs-media__title,
  #mainContent .cs-highlight__title,
  #mainContent .cs-text__title {
    font-size: 30px;
  }
  .cs-highlight {
    --cs-col-gap: 40px;
    padding: 70px 0;
  }
  .cs-highlight__image img {
    height: 320px;
  }
  .cs-text {
    padding: 65px 0 55px;
  }
  .cs-press {
    padding: 70px 0 60px;
  }
  #mainContent .cs-press__title {
    font-size: 30px;
  }
  .cs-press__grid,
  .cs-press--no-video .cs-press__grid {
    grid-template-columns: 1fr 1fr;
  }
  .cs-press__video {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-bottom: 30px;
  }  .cs-reviews {
    padding: 70px 0;
  }
  #mainContent .cs-reviews__title {
    font-size: 30px;
  }
  .cs-reviews__box {
    grid-template-columns: 1fr;
  }
  .cs-reviews__lines {
    width: 60%;
  }
  .cs-reviews__more-line {
    flex-basis: 120px;
  }  .cs-closing__inner {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
  }
  #mainContent .cs-closing__title {
    font-size: 30px;
  }
}

@media (max-width: 767px) {
  .cs-hero {
    padding: 45px 0 100px;
  }
  #mainContent .cs-hero__title {
    font-size: 28px;
  }
  #mainContent .cs-hero__title br {
    display: none;
  }
  .cs-hero__text {
    font-size: 17px;
  }
  .cs-hero + .cs-intro {
    margin-top: -50px;
  }
  .cs-intro__card {
    padding: 44px 22px 62px;
  }
  .cs-intro__line-top {
    top: 20px;
    right: 0;
    width: 110px;
  }
  .cs-intro__line-bottom {
    bottom: 22px;
    left: 0;
    width: 140px;
  }
  #mainContent .cs-intro__title {
    font-size: 26px;
  }
  .cs-intro__text {
    font-size: 16px;
  }
  .cs-featured {
    padding: 45px 0 30px;
  }
  #mainContent .cs-featured__list {
    gap: 20px 30px;
  }
  .cs-featured__item img {
    height: 30px;
  }

  /* Logos marquee */
  .cs-featured__viewport {
    margin: 0 calc(var(--cs-gutter) * -1);
    overflow: hidden;
  }
  #mainContent .cs-featured__list.is-marquee {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    width: max-content;
    animation: cs-marquee var(--cs-marquee-duration, 20s) linear infinite;
  }
  #mainContent .cs-featured__list.is-marquee:hover {
    animation-play-state: paused;
  }
  #mainContent .is-marquee .cs-featured__item {
    flex: 0 0 auto;
    padding-right: 40px;
  }
  #mainContent .is-marquee .cs-featured__item--clone {
    display: block;
  }
  .cs-media {
    padding: 40px 0;
  }
  .cs-media__inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .cs-media--reverse .cs-media__image {
    order: 0;
  }
  #mainContent .cs-media__title,
  #mainContent .cs-highlight__title,
  #mainContent .cs-text__title {
    font-size: 26px;
  }
  .cs-media__text {
    font-size: 16px;
  }
  .cs-highlight {
    display: block;
    padding: 50px 0 0;
  }
  .cs-highlight__body,
  .cs-highlight--no-image .cs-highlight__body {
    max-width: none;
    padding: 0 var(--cs-gutter);
  }
  .cs-highlight--no-image {
    padding-bottom: 50px;
  }
  .cs-highlight__image {
    margin-top: 36px;
  }
  .cs-highlight__image img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .cs-text {
    padding: 45px 0 40px;
  }
  .cs-text__divider {
    margin-bottom: 28px;
  }
  #mainContent .cs-highlight__title br,
  #mainContent .cs-text__title br {
    display: none;
  }
  .cs-press {
    padding: 45px 0 40px;
  }
  #mainContent .cs-press__title {
    font-size: 26px;
  }
  .cs-press__divider {
    margin-bottom: 28px;
  }
  .cs-press__grid,
  .cs-press--no-video .cs-press__grid {
    grid-template-columns: 1fr;
  }
  .cs-press__video {
    margin-bottom: 24px;
  }
  .cs-press__item + .cs-press__item {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #c3cad6;
  }
  .cs-video-banner {
    padding: 40px 0;
  }
  .cs-video-banner__button {
    height: 220px;
  }
  .cs-video-banner__play {
    width: 90px;
    height: 90px;
  }
  .cs-video-banner__play::after {
    border-width: 12px 0 12px 20px;
  }
  .cs-stats,
  .cs-stats--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cs-stats__col {
    min-height: 150px;
  }
  .cs-stats__col--logo {
    grid-column: 1 / -1;
    min-height: 120px;
  }
  /* Odd stat count: the last stat takes the full row */
  .cs-stats__col:nth-child(even):last-child {
    grid-column: 1 / -1;
  }
  .cs-reviews {
    padding: 45px 0;
  }
  #mainContent .cs-reviews__title {
    font-size: 26px;
  }
  .cs-reviews__divider {
    margin-bottom: 28px;
  }
  .cs-reviews__intro {
    padding: 52px 22px 30px;
  }
  .cs-reviews__more {
    margin-right: -22px;
  }
  #mainContent .cs-reviews__heading {
    font-size: 22px;
  }
  .cs-review {
    padding: 32px 22px 28px;
  }
  .cs-review__footer {
    flex-direction: column;
    gap: 4px;
  }
  .cs-closing {
    padding: 45px 0 80px;
  }
  .cs-closing__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  #mainContent .cs-closing__title {
    font-size: 26px;
  }
  .cs-closing__divider {
    margin-bottom: 24px;
  }
  .cs-closing__figure {
    width: 100%;
    max-width: 382px;
    margin: 0 auto;
  }
  body.cs-page--closing .container.footer-form {
    margin-top: -30px !important;
  }
}

@media (max-width: 375px) {
  #mainContent .cs-hero__title {
    font-size: 24px;
  }
  #mainContent .cs-intro__title {
    font-size: 23px;
  }
}
