/*
  V34 responsive safety pass
  Keeps every content block readable from wide desktop to narrow mobile.
*/

html {
  overflow-x: hidden;
}

body.cba-page,
body.cba-page main,
body.cba-page section {
  max-width: 100%;
}

body.cba-page img {
  -webkit-user-drag: none;
  user-select: none;
}

.bridge-mobile {
  display: none;
}

/* Case Studies: stack before the two-column minimum widths can crop the copy. */
@media (max-width: 1180px) {
  html body.case-v12 .cs12-case-layout,
  html body.case-v12 .cs12-case-layout.reverse {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 30px !important;
  }

  html body.case-v12 .cs12-case-layout.reverse .cs12-media-stack,
  html body.case-v12 .cs12-case-layout.reverse .cs12-case-copy {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  html body.case-v12 .cs12-case-copy {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  html body.case-v12 .cs12-media-stack {
    width: 100% !important;
    height: auto !important;
  }

  /* Pair each Why Us image with its matching stage at tablet/mobile widths. */
  body.why-v19 .culture-strip,
  body.why-v19 .v19-steps {
    display: none !important;
  }

  body.why-v19 .bridge-mobile {
    display: grid;
    gap: 34px;
    margin-top: 34px;
  }

  body.why-v19 .bridge-mobile-card {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(8, 39, 54, .14);
    opacity: 1 !important;
    transform: none !important;
  }

  body.why-v19 .bridge-mobile-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  body.why-v19 .bridge-mobile-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
  }

  body.why-v19 .bridge-mobile-card h3 {
    margin: 0 0 10px;
  }
}

@media (max-width: 760px) {
  html body.cba-page .container {
    width: calc(100% - 34px) !important;
  }

  html body.case-v12 .cs12-case {
    padding: 58px 0 64px !important;
  }

  html body.case-v12 .cs12-case-head {
    gap: 10px !important;
    margin-bottom: 24px !important;
  }

  html body.case-v12 .cs12-case-head h2 {
    overflow-wrap: anywhere;
  }

  html body.case-v12 .cs12-media-main {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  html body.case-v12 .cs12-thumb-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body.case-v12 .cs12-thumb-row figure {
    height: 96px !important;
    min-width: 0 !important;
  }

  html body.case-v12 .cs12-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
  }

  html body.case-v12 .cs12-before,
  html body.case-v12 .cs12-after,
  html body.case-v12 .cs12-route,
  html body.case-v12 .cs12-highlights,
  html body.case-v12 .cs12-culture {
    max-width: 100% !important;
    overflow: visible !important;
  }

  body.why-v19 .bridge-mobile-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.why-v19 .bridge-mobile-card img {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 420px) {
  html body.case-v12 .cs12-meta {
    grid-template-columns: 1fr;
  }

  html body.case-v12 .cs12-thumb-row figure {
    height: 78px !important;
  }
}
