/* ============================================
   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 (.surface-4c21) is a descendant of
   .main_fe88 (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.action-a558 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".blue_abbf" 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.complex_862e so it can't cause
   horizontal overflow anyway. */
.accordion_f56e,
.box_huge_8072,
.east-8ca4,
.texture-purple-659d,
.search-huge-dd96,
.pink-ac22,
.fast_9996,
.paragraph-b6d6,
.pattern-medium-4b1a,
.button_glass_6efc,
.column_b78d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hover-steel-fdd2 {
    padding: 8px 0;
  }
  
  .image_880d img {
    height: 28px;
    width: auto;
  }
  
  .banner_steel_48ca {
    display: none !important;
  }
  
  .tertiary_top_0ff7 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tertiary_top_0ff7 svg {
    width: 14px;
    height: 14px;
  }
  
  .list_orange_141e {
    padding: 6px;
  }
  
  .hidden-93f0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .east-8ca4,
  .box_huge_8072,
  .texture-purple-659d,
  .search-huge-dd96,
  .pagination-e1de,
  .widget_light_c021,
  .preview_55e1,
  .element_3c0b,
  .surface_hovered_12e7,
  .disabled-old-b68b,
  .active_23b0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange_aff0,
  .static-65ac {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .block_orange_8ca0,
  .sidebar_fresh_09d6,
  .accordion_21ae,
  .pagination_16a1,
  .paragraph-black-7495,
  .main-10ae,
  .nav_8ca5 {
    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 */
  .row_steel_30c4,
  .box_757d,
  .active_f03a,
  .panel_5d01,
  .next-4860 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pressed-d632,
  .notification-pro-8542,
  .pagination_244a,
  .short-fa9d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .logo-01ef,
  .paragraph-stale-d837 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .filter_middle_3ac6,
  .title-9c8b,
  .out-315b,
  .north_a51f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .surface-left-b5ec,
  .silver_8d7e,
  .middle-2c0a,
  .black_ec0c,
  .shadow_mini_2211,
  .info-81b4 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .row_steel_30c4,
  .box_757d,
  .panel_5d01 {
    max-width: none !important;
  }
  
  .blue_abbf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pressed-d632 {
    font-size: 1.5rem !important;
  }
  
  .notification-pro-8542 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dropdown_4537,
  .description-1308 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pagination_244a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .alert-42eb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .form_liquid_b3cc {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .row_steel_30c4,
  .panel_5d01 {
    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: a184 */
.promo-block-d9 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.0;
}
