/* IMS Mobile Hero Force Scale */
.ims-mobile-hero-force-scale {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  body.ims-mhfs-active .ims-mobile-hero-force-scale {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #06254a !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.ims-mhfs-active .ims-mhfs-image-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    background: #ffffff !important;
    line-height: 0 !important;
  }

  body.ims-mhfs-active .ims-mhfs-image-wrap picture,
  body.ims-mhfs-active .ims-mhfs-image-wrap img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.ims-mhfs-active .ims-mhfs-image-wrap img {
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.ims-mhfs-active .ims-mhfs-mode-card {
    padding: 12px !important;
    background: #f8fbff !important;
  }

  body.ims-mhfs-active .ims-mhfs-mode-card .ims-mhfs-image-wrap {
    border-radius: 18px !important;
    box-shadow: 0 12px 28px rgba(6, 37, 74, 0.10) !important;
  }

  body.ims-mhfs-active .ims-mhfs-copy {
    background: #ffffff !important;
    padding: 20px 18px 22px !important;
    border-bottom: 1px solid rgba(6, 37, 74, 0.08) !important;
  }

  body.ims-mhfs-active .ims-mhfs-copy span {
    display: inline-flex !important;
    color: #c9a142 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 8px !important;
  }

  body.ims-mhfs-active .ims-mhfs-copy h1 {
    color: #06254a !important;
    font-size: 30px !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    margin: 0 0 10px !important;
    font-weight: 900 !important;
  }

  body.ims-mhfs-active .ims-mhfs-copy p {
    color: #5f6f86 !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    margin: 0 0 16px !important;
  }

  body.ims-mhfs-active .ims-mhfs-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  body.ims-mhfs-active .ims-mhfs-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    border-radius: 999px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    text-align: center !important;
  }

  body.ims-mhfs-active .ims-mhfs-primary {
    background: #06254a !important;
    color: #ffffff !important;
  }

  body.ims-mhfs-active .ims-mhfs-outline {
    background: #ffffff !important;
    color: #06254a !important;
    border: 1px solid rgba(6, 37, 74, 0.14) !important;
  }

  body.ims-mhfs-active.ims-mhfs-hide-old .ims-mhfs-hide-target,
  body.ims-mhfs-active.ims-mhfs-hide-old .ims-mhfs-hide-target-parent {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
  }

  /* Stop the old hero image from overflowing horizontally, even before it is hidden. */
  body.ims-mhfs-active main img,
  body.ims-mhfs-active #content img,
  body.ims-mhfs-active .site-content img,
  body.ims-mhfs-active .entry-content img,
  body.ims-mhfs-active .page-content img {
    max-width: 100% !important;
  }
}

@media (max-width: 390px) {
  body.ims-mhfs-active .ims-mhfs-copy h1 {
    font-size: 27px !important;
  }

  body.ims-mhfs-active .ims-mhfs-actions {
    grid-template-columns: 1fr !important;
  }
}
