/* ============================================
   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 (.complex_6d37) is a descendant of
   .description_7110 (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.avatar_6556 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".component_white_e5f6" 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.fast-ff16 so it can't cause
   horizontal overflow anyway. */
.inner-9d58,
.thick_fae5,
.overlay_dc19,
.title-clean-c77d,
.green-887f,
.tooltip-in-ac80,
.content_8a61,
.slow-662c,
.aside_silver_7e97,
.slider-e4a4,
.badge-advanced-0d45 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .yellow_75cc {
    padding: 8px 0;
  }
  
  .hidden_0a32 img {
    height: 28px;
    width: auto;
  }
  
  .tertiary_f1d9 {
    display: none !important;
  }
  
  .hot-b0a8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hot-b0a8 svg {
    width: 14px;
    height: 14px;
  }
  
  .notice_lite_7a1b {
    padding: 6px;
  }
  
  .component_8feb {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .overlay_dc19,
  .thick_fae5,
  .title-clean-c77d,
  .green-887f,
  .center_05ef,
  .small-fab3,
  .old-cc45,
  .clean_5b71,
  .dim-31ff,
  .outer-7452,
  .sidebar_1f1b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange-dbba,
  .active_a087 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .row_silver_f3ba,
  .gradient_clean_fdc2,
  .media-left-19cc,
  .dropdown_563c,
  .pro-4781,
  .box-be94,
  .first-5ad5 {
    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 */
  .pro_f464,
  .preview_e9dc,
  .left-b4a2,
  .layout-af7e,
  .action_dbc7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .module-old-cec9,
  .box_0155,
  .hero_ae21,
  .text-thick-bc19 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .new_6cc1,
  .orange-01f8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focused-4cd9,
  .nav-fbfc,
  .bronze-e97a,
  .main_white_39a9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .copper-ebd7,
  .element_lower_4e8c,
  .basic_5c7a,
  .sidebar_middle_52dc,
  .inner-bf22,
  .yellow_513c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pro_f464,
  .preview_e9dc,
  .layout-af7e {
    max-width: none !important;
  }
  
  .component_white_e5f6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .module-old-cec9 {
    font-size: 1.5rem !important;
  }
  
  .box_0155 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .link_b2b6,
  .content-5359 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hero_ae21 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .module-e0b7 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .disabled_north_d1bc {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pro_f464,
  .layout-af7e {
    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: 4ea0 */
.widget-item-t7 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.3;
}
