/* =============================================================================
   RM HEALTHCARE - MOBILE CARD & HORIZONTAL SCROLL POLISH
   Premium Mobile UX: Scroll-Snap Peek Carousels, 2x2 Dense Grids, Row News
   ============================================================================= */

@media (max-width: 767.98px) {
  /* ---------------------------------------------------------------------------
     0. Mobile Swipe Hint Badges
     --------------------------------------------------------------------------- */
  .rmh-mobile-swipe-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--rmh-wow-orange, #ff6a21);
    background: rgba(255, 106, 33, 0.08);
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
  }

  /* ---------------------------------------------------------------------------
     1. Category Chips: Horizontal Scroll-Snap Strip
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-category-chips {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 18px !important;
    gap: 10px !important;
    margin-inline: -22px !important;
    padding: 6px 22px 14px 22px !important;
    margin-bottom: 24px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    mask-image: linear-gradient(90deg, #000 86%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent 100%);
  }

  body.rmh-home-page .rmh-category-chips::-webkit-scrollbar {
    display: none !important;
  }

  body.rmh-home-page .rmh-category-chips a {
    flex: 0 0 auto !important;
    scroll-snap-align: start !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    font-size: 12.5px !important;
    border-radius: 99px !important;
    white-space: nowrap !important;
  }

  body.rmh-home-page .rmh-category-chips a > i {
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px !important;
    font-size: 13px !important;
    margin-right: 8px !important;
  }

  /* ---------------------------------------------------------------------------
     2. Product Showcase: Horizontal Scroll-Snap Peek Carousel (78vw)
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-product-showcase {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  body.rmh-home-page .rmh-product-intro {
    max-width: 100% !important;
    min-height: auto !important;
    padding: 24px 20px !important;
    border-radius: 20px !important;
  }

  body.rmh-home-page .rmh-product-intro h3 {
    font-size: 26px !important;
    margin-bottom: 10px !important;
  }

  body.rmh-home-page .rmh-product-intro p {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
  }

  body.rmh-home-page .rmh-product-grid {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 22px !important;
    gap: 14px !important;
    margin-inline: -22px !important;
    padding: 6px 22px 24px 22px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.rmh-home-page .rmh-product-grid::-webkit-scrollbar {
    display: none !important;
  }

  body.rmh-home-page .rmh-product-card {
    flex: 0 0 calc(78vw - 12px) !important;
    max-width: 295px !important;
    min-width: 240px !important;
    min-height: 360px !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    border-radius: 22px !important;
    padding: 16px 14px 20px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 32px rgba(16, 47, 78, 0.08) !important;
    border: 1px solid rgba(16, 47, 78, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body.rmh-home-page .rmh-product-image {
    height: 180px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
  }

  body.rmh-home-page .rmh-product-card h3 {
    font-size: 16px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }

  body.rmh-home-page .rmh-product-card p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    flex-grow: 1 !important;
    margin-bottom: 14px !important;
  }

  /* ---------------------------------------------------------------------------
     3. Our Journey / Timeline: Horizontal Chronological Stream (82vw)
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-timeline {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 22px !important;
    gap: 16px !important;
    margin-inline: -22px !important;
    padding: 6px 22px 24px 22px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.rmh-home-page .rmh-timeline::-webkit-scrollbar {
    display: none !important;
  }

  body.rmh-home-page .rmh-milestone,
  body.rmh-home-page .rmh-milestone.featured,
  body.rmh-home-page .rmh-milestone:last-of-type {
    flex: 0 0 calc(82vw - 16px) !important;
    max-width: 320px !important;
    min-width: 255px !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    padding: 20px !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 1px solid rgba(16, 47, 78, 0.08) !important;
    box-shadow: 0 14px 36px rgba(16, 47, 78, 0.07) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  body.rmh-home-page .rmh-milestone-image,
  body.rmh-home-page .rmh-milestone.featured .rmh-milestone-image,
  body.rmh-home-page .rmh-milestone:not(.featured) .rmh-milestone-image {
    width: 100% !important;
    height: 175px !important;
    border-radius: 16px !important;
    margin: 0 0 16px 0 !important;
  }

  body.rmh-home-page .rmh-milestone .rmh-year {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--rmh-wow-orange, #ff6a21) !important;
    margin-bottom: 6px !important;
  }

  body.rmh-home-page .rmh-milestone h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    text-align: left !important;
    margin-inline: 0 !important;
  }

  body.rmh-home-page .rmh-milestone p {
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    margin-inline: 0 !important;
  }

  body.rmh-home-page .rmh-milestone::before,
  body.rmh-home-page .rmh-milestone::after,
  body.rmh-home-page .rmh-timeline::before {
    display: none !important;
  }

  /* ---------------------------------------------------------------------------
     4. Statistics / Numbers: Locked 2x2 Dense Grid
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  body.rmh-home-page .rmh-stat-grid article {
    min-height: 155px !important;
    padding: 20px 12px !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body.rmh-home-page .rmh-stat-grid article i {
    font-size: 22px !important;
    margin-bottom: 10px !important;
  }

  body.rmh-home-page .rmh-stat-grid strong {
    font-size: clamp(28px, 7.8vw, 36px) !important;
    line-height: 1 !important;
    margin-bottom: 6px !important;
  }

  body.rmh-home-page .rmh-stat-grid span {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  /* ---------------------------------------------------------------------------
     5. Partners & Clients: Mini 3-Column Logo Grid
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-partner-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.rmh-home-page .rmh-partner-card {
    min-height: 68px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.rmh-home-page .rmh-partner-card img {
    max-height: 38px !important;
    max-width: 90% !important;
  }

  /* ---------------------------------------------------------------------------
     6. News & Events: Compact Horizontal Row Cards
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-news-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 12px !important;
  }

  body.rmh-home-page .rmh-news-card {
    display: grid !important;
    grid-template-columns: 86px 1fr 34px !important;
    grid-template-areas: "thumb text arrow" !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(16, 47, 78, 0.08) !important;
    box-shadow: 0 6px 20px rgba(16, 47, 78, 0.05) !important;
    min-height: auto !important;
  }

  body.rmh-home-page .rmh-news-image {
    grid-area: thumb !important;
    width: 86px !important;
    height: 86px !important;
    border-radius: 12px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.rmh-home-page .rmh-news-image time {
    font-size: 9px !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
  }

  body.rmh-home-page .rmh-news-card > span {
    display: none !important;
  }

  body.rmh-home-page .rmh-news-card h3 {
    grid-area: text !important;
    font-size: 14px !important;
    line-height: 1.38 !important;
    margin: 0 !important;
    min-height: auto !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  body.rmh-home-page .rmh-news-card .rmh-card-link {
    grid-area: arrow !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 106, 33, 0.1) !important;
    color: var(--rmh-wow-orange, #ff6a21) !important;
    margin: 0 !important;
    font-size: 16px !important;
  }

  /* ---------------------------------------------------------------------------
     7. Careers: Streamlined Vertical Cards
     --------------------------------------------------------------------------- */
  body.rmh-home-page .rmh-career-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  body.rmh-home-page .rmh-career-photo {
    height: 200px !important;
    border-radius: 20px !important;
  }

  body.rmh-home-page .rmh-job-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 12px !important;
  }

  body.rmh-home-page .rmh-job-card {
    min-height: auto !important;
    padding: 18px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(16, 47, 78, 0.08) !important;
    box-shadow: 0 6px 20px rgba(16, 47, 78, 0.04) !important;
  }

  body.rmh-home-page .rmh-job-card .job-thumb {
    display: none !important;
  }

  body.rmh-home-page .rmh-job-card h3 {
    font-size: 16px !important;
    min-height: auto !important;
    margin-bottom: 8px !important;
  }
}

/* ---------------------------------------------------------------------------
   Ultra-compact Mobile Devices (< 380px: iPhone SE, Galaxy Fold)
   --------------------------------------------------------------------------- */
@media (max-width: 380px) {
  body.rmh-home-page .rmh-product-card {
    flex: 0 0 calc(85vw - 12px) !important;
  }

  body.rmh-home-page .rmh-milestone,
  body.rmh-home-page .rmh-milestone.featured,
  body.rmh-home-page .rmh-milestone:last-of-type {
    flex: 0 0 calc(88vw - 16px) !important;
  }

  body.rmh-home-page .rmh-partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rmh-home-page .rmh-news-card {
    grid-template-columns: 74px 1fr 28px !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  body.rmh-home-page .rmh-news-image {
    width: 74px !important;
    height: 74px !important;
  }
}
