/**
 * Cloud Telephony — mobile scroll stability.
 * 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;
  }

  /* Benefits — same mobile layout as Email page (icons + tab visual) */
  .sms-page .benefits .benefit img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin-bottom: 10px !important;
    object-fit: contain !important;
  }

  .sms-page .benefits__visual,
  .sms-page .benefits__visual-frame,
  .sms-page #benefitsVisual {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .sms-page #benefitsVisual {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
  }

  /* Scale card 1 — Virtual Numbers art (avoid SMS first-card mobile sizing) */
  .sms-page .scale-card:first-child .scale-card__media:has(img[src*="cloud-telephony-smrc"]) {
    overflow: hidden !important;
    padding: 8px 12px 8px 4px !important;
    justify-content: center !important;
  }

  .sms-page .scale-card:first-child .scale-card__media img[src*="cloud-telephony-smrc"],
  .sms-page .scale-card:first-child.is-active .scale-card__media img[src*="cloud-telephony-smrc"] {
    width: 90% !important;
    max-width: 90% !important;
    max-height: 126px !important;
    min-height: 0 !important;
    height: auto !important;
    transform: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Scale card 2 — Cloud Telephony diagram (vertical center in card) */
  .sms-page .scale-card:nth-child(2) .scale-card__media:has(img[src*="cloud-telephony-Card%202"]),
  .sms-page .scale-card:nth-child(2) .scale-card__media:has(img[src*="cloud-telephony-Card 2"]) {
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 10px 8px 4px !important;
  }

  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="cloud-telephony-Card%202"],
  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="cloud-telephony-Card 2"],
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media img[src*="cloud-telephony-Card%202"],
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media img[src*="cloud-telephony-Card 2"] {
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Desktop accordion/carousel leftovers can cause repaint jank while scrolling */
  .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;
  }
}

@media (max-width: 768px) {
  .sms-page .scale-card:first-child .scale-card__media:has(img[src*="cloud-telephony-smrc"]) {
    overflow: hidden !important;
    padding: 6px 14px 6px 4px !important;
    justify-content: center !important;
  }

  .sms-page .scale-card:first-child .scale-card__media img[src*="cloud-telephony-smrc"],
  .sms-page .scale-card:first-child.is-active .scale-card__media img[src*="cloud-telephony-smrc"] {
    width: 84% !important;
    max-width: 84% !important;
    max-height: 112px !important;
    min-height: 0 !important;
    height: auto !important;
    transform: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .sms-page .scale-card:nth-child(2) .scale-card__media:has(img[src*="cloud-telephony-Card%202"]),
  .sms-page .scale-card:nth-child(2) .scale-card__media:has(img[src*="cloud-telephony-Card 2"]) {
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 10px 8px 4px !important;
  }

  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="cloud-telephony-Card%202"],
  .sms-page .scale-card:nth-child(2) .scale-card__media img[src*="cloud-telephony-Card 2"],
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media img[src*="cloud-telephony-Card%202"],
  .sms-page .scale-card:nth-child(2).is-active .scale-card__media img[src*="cloud-telephony-Card 2"] {
    object-fit: contain !important;
    object-position: center center !important;
  }

  /*
   * 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;
  }
}

/* Why section — bottom-aligned images in colored inner bands (mobile only) */
@media (max-width: 1024px) {
  .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,
  .sms-page .why-card:nth-child(2) .why-card__media img,
  .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[src*="Trusted%20Channel%204"],
  .sms-page .why-card:nth-child(4) .why-card__media img[src*="Trusted Channel 4"] {
    left: 19px !important;
    bottom: -28px !important;
    width: 79% !important;
    max-width: none !important;
    transform: none !important;
  }

  /* Why cards — prevent desktop fixed card height from stretching layout */
  .sms-page .why-card {
    height: auto !important;
    min-height: 0 !important;
  }

  /* Funnel panel — desktop flex:1 + centered visual leaves a huge empty gap on mobile */
  .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__list p {
    font-size: var(--gt-text-sm, 14px) !important;
    line-height: 1.4 !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 12px !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;
  }
}

@media (max-width: 768px) {
  .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,
  .sms-page .why-card:nth-child(2) .why-card__media img,
  .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: 19px !important;
    bottom: -28px !important;
    width: 79% !important;
    max-width: none !important;
    transform: none !important;
  }

  .sms-page .funnel__visual {
    max-height: 168px !important;
  }

  .sms-page .funnel__visual img {
    max-height: 156px !important;
  }

  .cloud-telephony-page .why__title {
    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;
    margin-bottom: var(--gt-space-heading-gap) !important;
  }

  .cloud-telephony-page .why__title br {
    display: none !important;
  }

  .cloud-telephony-page .why__title .why-title__line {
    display: block !important;
    width: 100%;
    text-align: center;
  }

  .cloud-telephony-page .why__title .why-title__line:first-child {
    white-space: nowrap !important;
  }

  .cloud-telephony-page .faq__title {
    font-size: clamp(20px, 6vw, 28px) !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;
  }

  .cloud-telephony-page .faq__title br {
    display: none !important;
  }

  .cloud-telephony-page .faq__title .faq-title__line {
    display: block !important;
    width: 100%;
    text-align: center;
  }

  .cloud-telephony-page .faq__title .faq-title__line:first-child,
  .cloud-telephony-page .faq__title .faq-title__line:last-child {
    white-space: nowrap !important;
  }

  .cloud-telephony-page .benefit:nth-child(1) h3 br.gt-mobile-br,
  .cloud-telephony-page .benefit:nth-child(2) h3 br.gt-mobile-br,
  .cloud-telephony-page .benefit:nth-child(3) h3 br.gt-mobile-br {
    display: none !important;
  }

  .cloud-telephony-page .benefit:nth-child(1) h3,
  .cloud-telephony-page .benefit:nth-child(2) h3,
  .cloud-telephony-page .benefit:nth-child(3) h3 {
    line-height: 1.22 !important;
    margin-bottom: 6px !important;
  }

  .cloud-telephony-page .benefit:nth-child(1) h3 .benefit-title__line,
  .cloud-telephony-page .benefit:nth-child(2) h3 .benefit-title__line,
  .cloud-telephony-page .benefit:nth-child(3) h3 .benefit-title__line {
    display: block !important;
    white-space: nowrap !important;
    line-height: 1.22 !important;
  }
}
