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

/* Fix for any potential overflow elements */
/* NOTE: ".shade-f406" 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.carousel_dd6c so it can't cause
   horizontal overflow anyway. */
.tag-new-34c0,
.outer-6cdd,
.main_efd2,
.title_f11a,
.selected_e354,
.gallery_f2b9,
.progress_76cf,
.active-5c0b,
.outline_546e,
.active_b4c3,
.fluid-3b05 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .overlay-left-84d6 {
    padding: 8px 0;
  }
  
  .prev-afc3 img {
    height: 28px;
    width: auto;
  }
  
  .tall-ad8c {
    display: none !important;
  }
  
  .east-bcb5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .east-bcb5 svg {
    width: 14px;
    height: 14px;
  }
  
  .lower_80dc {
    padding: 6px;
  }
  
  .primary-4274 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .main_efd2,
  .outer-6cdd,
  .title_f11a,
  .selected_e354,
  .dim_451d,
  .video-e31b,
  .module_19eb,
  .dim_4eca,
  .gradient_00db,
  .table-1997,
  .background_blue_cb92,
  .thumbnail_action_3252 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tabs-copper-773d,
  .mask-948c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .info-dynamic-0388,
  .tabs_1296,
  .detail_ac5b,
  .dropdown_fresh_3dc3,
  .solid-c090,
  .info-9b2f,
  .lite_088d {
    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 */
  .clean-4d7e,
  .medium-d759,
  .layout-a991,
  .highlight_ceb4,
  .breadcrumb_5a48 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dim-05a5,
  .under-7689,
  .nav-gas-b1f4,
  .up_0cc5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .element_fast_30f7,
  .out-f7ff {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .aside-east-e96f,
  .filter-rough-e421,
  .avatar_4322,
  .backdrop-brown-3a4a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .caption-d663,
  .slider-motion-79de,
  .notification-e39b,
  .box_6f86,
  .bronze_a8e7,
  .hidden-solid-a5c7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .clean-4d7e,
  .medium-d759,
  .highlight_ceb4 {
    max-width: none !important;
  }
  
  .shade-f406 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dim-05a5 {
    font-size: 1.5rem !important;
  }
  
  .under-7689 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .icon_e6ef,
  .old-835c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .nav-gas-b1f4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb-paper-77aa {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .focus-61d5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .clean-4d7e,
  .highlight_ceb4 {
    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: aa69 */
.shadow-element-c6 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
