/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.advanced-6300) is a descendant of
   .picture_e951 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.summary-action-3472 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dynamic_537a" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.row_b489 so it can't cause
   horizontal overflow anyway. */
.disabled_aab2,
.selected-791f,
.pattern_2799,
.summary_dcc3,
.title_bright_e7de,
.video_3fb9,
.bright-82ee,
.badge-fluid-56f3,
.panel-stone-1cdf,
.header-6ce7,
.backdrop_355d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .light-c224 {
    padding: 8px 0;
  }
  
  .title-steel-bdd1 img {
    height: 28px;
    width: auto;
  }
  
  .slider-narrow-cf8b {
    display: none !important;
  }
  
  .breadcrumb-advanced-1507 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .breadcrumb-advanced-1507 svg {
    width: 14px;
    height: 14px;
  }
  
  .image-e6c0 {
    padding: 6px;
  }
  
  .tall_ad81 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pattern_2799,
  .selected-791f,
  .summary_dcc3,
  .title_bright_e7de,
  .hidden_easy_017e,
  .fresh_547e,
  .row_8e7d,
  .aside_ba86,
  .notification_db04,
  .white_aabb,
  .short-4ad7,
  .action_ab95 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .detail-next-ec3a,
  .selected_090a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .menu-bright-242d,
  .basic-7028,
  .breadcrumb-action-223f,
  .hard-5544,
  .content-bottom-fe44,
  .wide_0468,
  .warm-e0a8 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .box_df0f,
  .slider_e868,
  .message-wood-f21e,
  .header_58eb,
  .description-orange-6820 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gradient_a1d1,
  .fast-7254,
  .focus_b313,
  .center_2924 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .disabled_right_d76d,
  .summary-outer-5950 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .lite-09c2,
  .component_in_868f,
  .tabs_6b92,
  .black_3995 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .chip_4fca,
  .panel-e966,
  .south_5d26,
  .shadow-over-4480,
  .advanced_2865,
  .label_3e5c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .box_df0f,
  .slider_e868,
  .header_58eb {
    max-width: none !important;
  }
  
  .dynamic_537a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gradient_a1d1 {
    font-size: 1.5rem !important;
  }
  
  .fast-7254 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .south-9e31,
  .texture-simple-c497 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .focus_b313 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .badge_ac82 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .avatar-e945 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .box_df0f,
  .header_58eb {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 9d11 */
.promo-block-r6 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.1;
}
