/* ==========================================================================
   Mobile hero — the desktop story, in less height
   The phone hero carried its own headline ("Kenya Premium Health Covers")
   directly under the same words used as the eyebrow, then a tall logo block, so
   it ran to two screens before the quote form. These rules keep the eyebrow,
   the two-line headline, the insurer logos, the stats and the journey badge —
   just tighter.

   The selectors carry body[data-mobile="true"] (as the earlier mobile sheets
   do) and the file loads last, so it wins without touching those sheets.
   ========================================================================== */

/* The mobile page is also opened in narrow desktop panels, where its own styles
   switch to a two-column hero, so these rules cover every width up to where the
   page hands over to its full desktop layout. */
@media (max-width: 1100px) {
  /* ===== Dental / Optical: limit and basis on one line =====
     Each row carries two selectors (the limit, then the basis, which reads
     "Standalone" until another basis is offered). They were stacked; on mobile
     they share one row. */
  body[data-mobile="true"] #quote-form .form-row.dental-row .form-group,
  body[data-mobile="true"] #quote-form .form-row.optical-row .form-group {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
  }

  body[data-mobile="true"] #quote-form .form-row.dental-row .limit-scope-wrapper,
  body[data-mobile="true"] #quote-form .form-row.optical-row .limit-scope-wrapper {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr) !important;
    column-gap: 0.5rem !important;
    align-items: center !important;
    width: 100% !important;
  }

  body[data-mobile="true"] #quote-form .form-row.dental-row #dentalLimit,
  body[data-mobile="true"] #quote-form .form-row.optical-row #opticalLimit,
  body[data-mobile="true"] #quote-form .form-row.dental-row #dentalBasis,
  body[data-mobile="true"] #quote-form .form-row.optical-row #opticalBasis {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* The limit selector is not allowed to span the row: it shares it with the
     basis selector beside it. (styles.css spans it with :not(:has(...)) rules,
     so the selector here carries enough classes to win.) */
  body[data-mobile="true"] #quote-form .quote-step-benefits .optional-benefit-row.form-row.dental-row #dentalLimit,
  body[data-mobile="true"] #quote-form .quote-step-benefits .optional-benefit-row.form-row.optical-row #opticalLimit {
    grid-column: 1 !important;
  }

  body[data-mobile="true"] #quote-form .quote-step-benefits .optional-benefit-row.form-row.dental-row #dentalBasis,
  body[data-mobile="true"] #quote-form .quote-step-benefits .optional-benefit-row.form-row.optical-row #opticalBasis {
    grid-column: 2 !important;
  }

  /* ===== Light green header on the mobile page =====
     The dark green band becomes a light tint of the same green, so the brand
     and the menu need the darker ink and the buttons a solid ground. */
  body[data-mobile="true"] header {
    background: #e6f2e9 !important;
    border-bottom: 1px solid #cfe3d6 !important;
  }

  /* mobile-quote.css paints the brand name white for the dark band; the light
     band needs the dark ink, so the same selector path is used here. */
  body[data-mobile="true"] header .header-brand .brand-name,
  body[data-mobile="true"] header .header-brand .brand-name span {
    color: #123524 !important;
  }

  body[data-mobile="true"] header .brand-tagline,
  body[data-mobile="true"] header .brand-tagline span {
    color: #1b5e20 !important;
  }

  body[data-mobile="true"] header .nav-links a,
  body[data-mobile="true"] header .nav-links li a,
  body[data-mobile="true"] header nav a {
    color: #123524 !important;
  }

  body[data-mobile="true"] header .nav-links a.active,
  body[data-mobile="true"] header .nav-links a:hover,
  body[data-mobile="true"] header .nav-links li a.active {
    color: #1b5e20 !important;
  }

  body[data-mobile="true"] header .nav-cta .phone {
    background: #ffffff !important;
    border: 1px solid #cfe3d6 !important;
    color: #1b5e20 !important;
  }

  body[data-mobile="true"] header .nav-cta .nav-icon-btn {
    background: #ffffff !important;
    border: 1px solid #cfe3d6 !important;
    color: #1b5e20 !important;
  }

  /* The menu carries one item more than it used to (Guide), and styles.css
     flattens the nav on phones, so the list scrolls sideways instead of
     spilling out of the viewport. */
  body[data-mobile="true"] header .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body[data-mobile="true"] header .nav-links::-webkit-scrollbar {
    display: none;
  }

  body[data-mobile="true"] header .nav-links li {
    flex: 0 0 auto;
  }

  body[data-mobile="true"] #hero {
    padding-top: 0.85rem !important;
    padding-bottom: 0.95rem !important;
  }

  body[data-mobile="true"] #hero .hero-grid,
  body[data-mobile="true"] #hero .hero-text {
    gap: 0.3rem !important;
  }

  /* In the two-column layout the text column used to stretch to the quote form
     and push the logos to the foot of a tall empty block. */
  body[data-mobile="true"] #hero .hero-text {
    align-content: start !important;
    align-self: start !important;
    justify-content: start !important;
  }

  body[data-mobile="true"] #hero .hero-buy-line {
    font-size: 0.68rem !important;
    letter-spacing: 0.13em !important;
    margin: 0 0 0.1rem !important;
  }

  body[data-mobile="true"] #hero .hero-text h1 {
    /* One line on mobile, so the size steps down to fit "Protect What Matters Most". */
    font-size: clamp(1.05rem, 6vw, 1.55rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.01em !important;
    margin: 0.05rem 0 0.4rem !important;
    white-space: nowrap !important;
  }

  body[data-mobile="true"] #hero .hero-text h1 br {
    display: none !important;
  }

  body[data-mobile="true"] #hero .hero-text h1 span {
    display: inline !important;
  }

  body[data-mobile="true"] #hero .hero-text > p:not(.hero-buy-line) {
    font-size: 0.88rem !important;
    line-height: 1.42 !important;
    margin: 0 0 0.5rem !important;
  }

  body[data-mobile="true"] #hero .hero-insurer-grid {
    /* One compact row of logos that can be swiped, instead of two stacked rows. */
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem !important;
    margin: 0.2rem 0 0.4rem !important;
    padding-bottom: 2px !important;
  }

  body[data-mobile="true"] #hero .hero-insurer-grid::-webkit-scrollbar {
    display: none;
  }

  body[data-mobile="true"] #hero .hero-text .hero-insurer-tile {
    flex: 0 0 auto !important;
    padding: 0.14rem 0.3rem !important;
    min-height: 0 !important;
    border-radius: 9px !important;
  }

  body[data-mobile="true"] #hero .hero-text .hero-insurer-tile img {
    height: 16px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  body[data-mobile="true"] #hero .hero-stats {
    gap: 0.3rem !important;
    margin: 0.1rem 0 0.45rem !important;
  }

  body[data-mobile="true"] #hero .hero-text .stat-card {
    padding: 0.34rem 0.3rem !important;
    border-radius: 11px !important;
  }

  body[data-mobile="true"] #hero .hero-text .stat-card .num {
    font-size: 0.94rem !important;
    line-height: 1.12 !important;
  }

  body[data-mobile="true"] #hero .hero-text .stat-card .label {
    font-size: 0.6rem !important;
    line-height: 1.22 !important;
  }

  body[data-mobile="true"] #hero .hero-journey-badge {
    padding: 0.45rem 0.6rem !important;
  }

  body[data-mobile="true"] #hero .hero-journey-label {
    font-size: 0.64rem !important;
    margin-bottom: 0.1rem !important;
  }

  body[data-mobile="true"] #hero .hero-journey-steps,
  body[data-mobile="true"] #hero .hero-journey-line {
    font-size: 0.7rem !important;
    line-height: 1.32 !important;
  }
}
