/* ============================================
   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 (.layout_b459) is a descendant of
   .silver_7265 (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.lite-b670 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".thumbnail-5149" 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.panel_inner_3441 so it can't cause
   horizontal overflow anyway. */
.texture_lower_ec10,
.brown-4b04,
.focused-4420,
.action_e7b3,
.component-a88c,
.focus-left-187b,
.row_f2e5,
.pattern_2675,
.hovered_c8db,
.component-1901,
.media-glass-72cd {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .complex_ab16 {
    padding: 8px 0;
  }
  
  .wide-5a20 img {
    height: 28px;
    width: auto;
  }
  
  .footer_d9af {
    display: none !important;
  }
  
  .hot-1686 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hot-1686 svg {
    width: 14px;
    height: 14px;
  }
  
  .silver_2434 {
    padding: 6px;
  }
  
  .selected-f691 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .focused-4420,
  .brown-4b04,
  .action_e7b3,
  .component-a88c,
  .blue-b6bd,
  .grid_91e0,
  .border_hovered_1ac8,
  .popup-3124,
  .header_14bd,
  .pagination_action_9fb9,
  .footer_599f,
  .dim-b1da {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .progress-dirty-ee1b,
  .video_08d2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .silver-2f3d,
  .icon-copper-2bef,
  .block-medium-1c51,
  .backdrop_272c,
  .iron_5d55,
  .heading_light_e5fb,
  .grid_blue_ad82 {
    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 */
  .dropdown-blue-76b8,
  .simple_9516,
  .frame_21c9,
  .search_2af4,
  .pressed-8e28 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wood_2b9a,
  .section_plasma_d804,
  .photo-c850,
  .shadow-67d5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .primary_5ce0,
  .block-06d5 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .preview-7a58,
  .breadcrumb-3ef3,
  .main-f110,
  .dark_570d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .table-inner-0f1e,
  .filter-589c,
  .highlight-9e0c,
  .silver-4bbc,
  .pro-504a,
  .thumbnail_a132 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dropdown-blue-76b8,
  .simple_9516,
  .search_2af4 {
    max-width: none !important;
  }
  
  .thumbnail-5149 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wood_2b9a {
    font-size: 1.5rem !important;
  }
  
  .section_plasma_d804 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .banner_green_b24d,
  .photo_bc51 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo-c850 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .photo_f3ab {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .dropdown-63ab {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dropdown-blue-76b8,
  .search_2af4 {
    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: 1391 */
.shadow-element-y4 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
