/* ============================================
   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 (.banner_stale_cb09) is a descendant of
   .item_1a75 (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.button-light-a93e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".texture-dynamic-9853" 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.status_0cc2 so it can't cause
   horizontal overflow anyway. */
.grid-9c53,
.menu-be18,
.heading-f03d,
.element-f4cb,
.nav-bright-9939,
.light_1e1a,
.tooltip_fast_c913,
.stale_09e7,
.table-038b,
.input-daa7,
.accordion_dim_4bad {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .texture-30bf {
    padding: 8px 0;
  }
  
  .chip_light_0999 img {
    height: 28px;
    width: auto;
  }
  
  .fixed_34bc {
    display: none !important;
  }
  
  .brown_86ee {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .brown_86ee svg {
    width: 14px;
    height: 14px;
  }
  
  .box-red-8f72 {
    padding: 6px;
  }
  
  .hard-b964 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .heading-f03d,
  .menu-be18,
  .element-f4cb,
  .nav-bright-9939,
  .header-current-692d,
  .aside_825b,
  .blue_6829,
  .article_center_3f30,
  .backdrop_in_f58e,
  .gallery-thick-bf7b,
  .smooth-1c5d,
  .module-inner-751f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .center_d553,
  .panel_red_70e3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .up_139b,
  .gradient_light_d5d4,
  .green_0d29,
  .button_8048,
  .panel-17a4,
  .title_f7bc,
  .gradient-gas-20cd {
    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 */
  .photo_light_df95,
  .block-fcc1,
  .fast-ce43,
  .blue-9a8f,
  .pro-a7cb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .container-60f3,
  .simple_6ed0,
  .mini_ffec,
  .message_fb75 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .grid-soft-c459,
  .dirty_9d02 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .box_7d78,
  .form-0bba,
  .title-a555,
  .progress-6a9b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .highlight_246d,
  .texture_brown_22f6,
  .left-ec00,
  .aside-36e1,
  .menu-west-8e8d,
  .dim_d1d6 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .photo_light_df95,
  .block-fcc1,
  .blue-9a8f {
    max-width: none !important;
  }
  
  .texture-dynamic-9853 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .container-60f3 {
    font-size: 1.5rem !important;
  }
  
  .simple_6ed0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .column_complex_4b1a,
  .accordion_huge_fd4c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .mini_ffec {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .notice_west_84d5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature_710e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .photo_light_df95,
  .blue-9a8f {
    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: 6c90 */
.promo-block-b9 {
  padding: 0.1rem;
  font-size: 11px;
  line-height: 1.1;
}
