/* ============================================
   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 (.module_de1f) is a descendant of
   .hover-853e (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.footer_middle_778d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".secondary_b675" 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.shadow-over-13f8 so it can't cause
   horizontal overflow anyway. */
.right-8fdf,
.hero-south-3ddd,
.main-775a,
.small-703c,
.full_3cff,
.preview-complex-3264,
.narrow_f9a9,
.summary_white_6953,
.input-8314,
.section_3412,
.blue-d47a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dark_49fc {
    padding: 8px 0;
  }
  
  .filter-c3fd img {
    height: 28px;
    width: auto;
  }
  
  .table_dim_5d63 {
    display: none !important;
  }
  
  .north-c500 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .north-c500 svg {
    width: 14px;
    height: 14px;
  }
  
  .advanced_337e {
    padding: 6px;
  }
  
  .west-899f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .main-775a,
  .hero-south-3ddd,
  .small-703c,
  .full_3cff,
  .outer_fa46,
  .left-e672,
  .frame_in_21e4,
  .paper_b45b,
  .border-upper-f968,
  .last_53dd,
  .status_brown_8b18,
  .orange-320a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .search_yellow_4624,
  .notice-glass-39d1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notification_4e48,
  .section_14b6,
  .fast_d118,
  .wrapper-64e9,
  .status_6099,
  .card-blue-3143,
  .heading-e466 {
    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 */
  .slider_72d3,
  .top_8c6a,
  .dark_57a8,
  .caption_gold_e3fa,
  .focus_fresh_33a9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .background-top-d354,
  .nav-f884,
  .next-b8e0,
  .in_035e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .summary_first_3277,
  .widget_a7ab {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .static-153f,
  .outline_7205,
  .gradient-affe,
  .slider_377f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .badge_stale_3293,
  .rough-8d14,
  .shade-lite-509a,
  .paragraph_ba48,
  .first-d1f5,
  .hidden_d538 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .slider_72d3,
  .top_8c6a,
  .caption_gold_e3fa {
    max-width: none !important;
  }
  
  .secondary_b675 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .background-top-d354 {
    font-size: 1.5rem !important;
  }
  
  .nav-f884 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .texture_plasma_403d,
  .shadow_db66 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .next-b8e0 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .banner-liquid-1aea {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .under_3a33 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slider_72d3,
  .caption_gold_e3fa {
    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: fd7c */
.widget-item-u7 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
