/**
 * RCS page — mobile scroll stability + compact funnel layout.
 * Loaded after mobile-product.css.
 */
br.gt-mobile-br {
  display: none;
}

@media (max-width: 1024px) {
  br.gt-mobile-br {
    display: block !important;
    height: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
  }

  .sms-page .scale__title {
    line-height: 1.22;
  }

  .sms-page .scale__title span {
    display: block !important;
    white-space: nowrap !important;
    text-align: center;
  }

  .sms-page .faq__title {
    font-size: clamp(19px, calc(6vw - 2px), 26px) !important;
    line-height: 1.22;
    width: calc(100% + 20px);
    max-width: none;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 2px;
    padding-right: 2px;
    box-sizing: border-box;
  }

  @media (max-width: 480px) {
    .sms-page .faq__title {
      font-size: max(19px, calc(6.8vw - 3px)) !important;
    }
  }

  .sms-page .faq__title br {
    display: none !important;
  }

  .sms-page .faq__title .faq-title__line {
    display: block !important;
    width: 100%;
    text-align: center;
  }

  .sms-page .faq__title .faq-title__line:first-child,
  .sms-page .faq__title .faq-title__line:last-child {
    white-space: nowrap !important;
  }

  /* Desktop accordion/carousel leftovers can cause repaint jank during mobile scroll */
  .journey:not(.journey--scroll-stack) .journey-card,
  .scale-card,
  .scale-card.is-active,
  .scale-card__media,
  .scale-card__media img,
  .scale-card__copy,
  .why__cards,
  .why-card {
    will-change: auto !important;
    transition: none !important;
  }

  /* Word reveal spans — no transform animation on touch devices */
  .gt-words .gt-word,
  [data-animate-words] .gt-word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  /* Scale card 2 (Travel Offers) — vertically center image in media area */
  .sms-page .scale-card:nth-child(2) .scale-card__media,
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media {
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .sms-page .scale-card:nth-child(2) .scale-card__media img,
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media img,
  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="rcs-Card%202"],
  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="rcs-Card 2"] {
    object-position: center center !important;
  }

  /* Funnel — desktop flex:1 visual area causes layout jump during mobile scroll */
  .sms-page .funnel {
    min-height: 0 !important;
    height: auto !important;
  }

  .sms-page .funnel__panel {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .sms-page .funnel__list {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 16px 16px 8px !important;
    gap: 14px !important;
  }

  .sms-page .funnel__visual {
    flex: 0 0 auto !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 100% !important;
    max-height: 200px !important;
    padding: 4px 12px 0 !important;
    overflow: hidden !important;
  }

  .sms-page .funnel__visual img {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 188px !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }

  /* Why section — bottom-aligned images in colored inner bands */
  .sms-page .why-card--peach .why-card__media {
    background-color: var(--peach-card, #faebe6) !important;
  }

  .sms-page .why-card--green .why-card__media {
    background-color: var(--green-card, #e8fae6) !important;
  }

  .sms-page .why-card--blue .why-card__media {
    background-color: var(--blue-card, #e6f0fa) !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media,
  .sms-page .why-card:nth-child(2) .why-card__media,
  .sms-page .why-card:nth-child(3) .why-card__media,
  .sms-page .why-card:nth-child(4) .why-card__media {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: calc(100% - 20px) !important;
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    padding: 0 !important;
    margin: 8px auto 0 !important;
    overflow: hidden !important;
    box-sizing: border-box;
    line-height: 0;
    border-radius: 12px;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media img,
  .sms-page .why-card:nth-child(2) .why-card__media img,
  .sms-page .why-card:nth-child(3) .why-card__media img,
  .sms-page .why-card:nth-child(4) .why-card__media img {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media img {
    max-width: 130% !important;
    max-height: 142px !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media img[src*="Trusted%20Channel%201"],
  .sms-page .why-card:nth-child(1) .why-card__media img[src*="Trusted Channel 1"] {
    max-width: 130% !important;
    max-height: 142px !important;
  }

  .sms-page .why-card:nth-child(2) .why-card__media img {
    max-width: 127% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(2) .why-card__media img[src*="Trusted%20Channel%202"],
  .sms-page .why-card:nth-child(2) .why-card__media img[src*="Trusted Channel 2"] {
    max-width: 127% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(3) .why-card__media img {
    max-width: 118% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(4) .why-card__media img {
    max-width: 104% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(4) .why-card__media img[src*="Trusted%20Channel%204"],
  .sms-page .why-card:nth-child(4) .why-card__media img[src*="Trusted Channel 4"] {
    left: 12px !important;
    width: 85% !important;
    height: 95% !important;
    max-width: none !important;
    transform: none !important;
  }

  .sms-page .why-card {
    height: auto !important;
    min-height: 0 !important;
  }

  /* Benefits tab visuals — match Email mobile (load after global.css) */
  .sms-page .benefits__visual,
  .sms-page .benefits__visual-frame,
  .sms-page #benefitsVisual {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .sms-page #benefitsVisual {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
  }
}

@media (max-width: 768px) {
  /*
   * Fixed 100dvh hero height jumps when the mobile browser chrome shows/hides,
   * which feels like the page shaking during scroll.
   */
  .sms-page .hero {
    min-height: 100svh;
    height: auto !important;
    max-height: none !important;
  }

  .sms-page .funnel__visual {
    max-height: 168px !important;
  }

  .sms-page .funnel__visual img {
    max-height: 156px !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media,
  .sms-page .why-card:nth-child(2) .why-card__media,
  .sms-page .why-card:nth-child(3) .why-card__media,
  .sms-page .why-card:nth-child(4) .why-card__media {
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media img {
    max-width: 130% !important;
    max-height: 142px !important;
  }

  .sms-page .why-card:nth-child(1) .why-card__media img[src*="Trusted%20Channel%201"],
  .sms-page .why-card:nth-child(1) .why-card__media img[src*="Trusted Channel 1"] {
    max-width: 130% !important;
    max-height: 142px !important;
  }

  .sms-page .why-card:nth-child(2) .why-card__media img {
    max-width: 127% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(2) .why-card__media img[src*="Trusted%20Channel%202"],
  .sms-page .why-card:nth-child(2) .why-card__media img[src*="Trusted Channel 2"] {
    max-width: 127% !important;
    max-height: 168px !important;
  }

  .sms-page .why-card:nth-child(3) .why-card__media img {
    max-height: 148px !important;
  }

  .sms-page .why-card:nth-child(4) .why-card__media img[src*="Trusted%20Channel%204"],
  .sms-page .why-card:nth-child(4) .why-card__media img[src*="Trusted Channel 4"] {
    left: 12px !important;
    width: 85% !important;
    height: 95% !important;
    max-width: none !important;
    transform: none !important;
  }

  .sms-page .benefits__visual,
  .sms-page .benefits__visual-frame,
  .sms-page #benefitsVisual {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .sms-page .benefit:nth-child(1) h3 br.gt-mobile-br,
  .sms-page .benefit:nth-child(2) h3 br.gt-mobile-br,
  .sms-page .benefit:nth-child(3) h3 br.gt-mobile-br,
  .sms-page .benefit:nth-child(4) h3 br.gt-mobile-br {
    display: none !important;
  }

  .sms-page .benefit:nth-child(1) h3,
  .sms-page .benefit:nth-child(2) h3,
  .sms-page .benefit:nth-child(3) h3,
  .sms-page .benefit:nth-child(4) h3 {
    line-height: 1.22 !important;
    margin-bottom: 6px !important;
  }

  .sms-page .benefit:nth-child(1) h3 .benefit-title__line,
  .sms-page .benefit:nth-child(2) h3 .benefit-title__line,
  .sms-page .benefit:nth-child(3) h3 .benefit-title__line,
  .sms-page .benefit:nth-child(4) h3 .benefit-title__line {
    display: block !important;
    white-space: nowrap !important;
    line-height: 1.22 !important;
  }

  /* Card 1 — Verified Business (.journey__phone--a) */
  .sms-page .journey.journey--scroll-stack.journey--stack-idle .journey__phone--a.is-active,
  .sms-page .journey.journey--scroll-stack:not(.journey--stack-idle)
    .journey__body:has(.journey__phone--a) .journey__phone--a.is-active {
    --journey-mob-phone-h: 257px;
    height: var(--journey-mob-phone-h, 257px) !important;
    max-height: var(--journey-mob-phone-h, 257px) !important;
    min-height: var(--journey-mob-phone-h, 257px) !important;
    top: -16px !important;
    left: -7px !important;
  }
}
