/* ============================================
   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 (.solid-1a6e) is a descendant of
   .background-silver-55e3 (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.aside-old-8cf2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".texture-0e5d" 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.border-gas-ead8 so it can't cause
   horizontal overflow anyway. */
.status_left_6408,
.modal_262d,
.lite-21d0,
.input_2ba1,
.column-2018,
.old-bb8b,
.hero_be04,
.center-b124,
.basic_9e44,
.texture_dynamic_73b3,
.status_3e15 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .under_8dd9 {
    padding: 8px 0;
  }
  
  .hero-medium-24d2 img {
    height: 28px;
    width: auto;
  }
  
  .white-0d1a {
    display: none !important;
  }
  
  .gallery-18f0 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gallery-18f0 svg {
    width: 14px;
    height: 14px;
  }
  
  .logo-5df9 {
    padding: 6px;
  }
  
  .caption-upper-b3bd {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .lite-21d0,
  .modal_262d,
  .input_2ba1,
  .column-2018,
  .left_d154,
  .breadcrumb-down-2197,
  .tag_gold_7ee8,
  .input_fluid_95fb,
  .widget_rough_8903,
  .light_cc42,
  .module_df26,
  .list_010c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border_5eb7,
  .outer-19a1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shadow-top-d203,
  .accordion_fbdb,
  .medium-1995,
  .upper-ffdc,
  .notice_9f0b,
  .action_6d2d,
  .focus-down-f353 {
    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 */
  .slow-d3de,
  .static_6396,
  .secondary-mini-98d6,
  .narrow-6661,
  .advanced-4080 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gradient-center-5e5b,
  .banner_west_a0e3,
  .north-952c,
  .mini_24b4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .medium_8039,
  .dropdown_15f2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .content_ff3d,
  .cold_a487,
  .background_static_db78,
  .plasma_5564 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tooltip-small-d0b5,
  .summary_selected_cee0,
  .carousel-370d,
  .border_e33d,
  .pattern_4f26,
  .item_ebd8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .slow-d3de,
  .static_6396,
  .narrow-6661 {
    max-width: none !important;
  }
  
  .texture-0e5d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gradient-center-5e5b {
    font-size: 1.5rem !important;
  }
  
  .banner_west_a0e3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .basic_a507,
  .hard-a6f4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .north-952c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .nav-bronze-ac03 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .east_78e5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slow-d3de,
  .narrow-6661 {
    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: c0fc */
.widget-item-f1 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
