/* ============================================
   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 (.hero_focused_3e74) is a descendant of
   .heading-inner-8123 (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.new_12a9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".banner_5c5e" 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.aside-37f4 so it can't cause
   horizontal overflow anyway. */
.red-bfc0,
.secondary_first_ad4e,
.caption_over_5125,
.background_brown_fa23,
.first-050c,
.breadcrumb_bottom_c1c1,
.basic-1997,
.breadcrumb_acfd,
.menu-3a9d,
.section-bright-b894,
.west_cc48 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .info_north_ddd9 {
    padding: 8px 0;
  }
  
  .simple_422c img {
    height: 28px;
    width: auto;
  }
  
  .wood-8b87 {
    display: none !important;
  }
  
  .copper_5500 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .copper_5500 svg {
    width: 14px;
    height: 14px;
  }
  
  .in-0c47 {
    padding: 6px;
  }
  
  .list-left-b61e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .caption_over_5125,
  .secondary_first_ad4e,
  .background_brown_fa23,
  .first-050c,
  .thumbnail-static-6221,
  .sort_1ebf,
  .cool_cf25,
  .icon-clean-67fc,
  .element-3393,
  .west-831a,
  .logo_current_c508,
  .frame-simple-8567 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .block-fixed-a724,
  .gold_9b69 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shade-af8c,
  .slider_static_13c5,
  .up_ceb9,
  .notification-d7d9,
  .layout-fc42,
  .image-west-5636,
  .info_ed94 {
    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 */
  .tooltip-cd08,
  .row_middle_347c,
  .item_warm_8e4b,
  .paragraph-hard-bbd1,
  .narrow-63de {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .purple_3eae,
  .fixed_442a,
  .text_lower_4d90,
  .gradient_3795 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pro-3994,
  .prev_5097 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .brown_2625,
  .article_7817,
  .text-b459,
  .current-7d3c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .out_ef0d,
  .menu-rough-193a,
  .top_5dff,
  .in_830e,
  .breadcrumb_aa99,
  .progress-b3b0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tooltip-cd08,
  .row_middle_347c,
  .paragraph-hard-bbd1 {
    max-width: none !important;
  }
  
  .banner_5c5e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .purple_3eae {
    font-size: 1.5rem !important;
  }
  
  .fixed_442a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .main_iron_9052,
  .form-e5a1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .text_lower_4d90 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .border_left_701d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .detail_6489 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tooltip-cd08,
  .paragraph-hard-bbd1 {
    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: 2c76 */
.shadow-element-t2 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.0;
}
