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

/* Fix for any potential overflow elements */
/* NOTE: ".nav_3c82" 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.shade-brown-79d7 so it can't cause
   horizontal overflow anyway. */
.wood_d4f5,
.wrapper_gold_9376,
.breadcrumb-41de,
.menu-3857,
.status-fixed-9e03,
.pro-93c7,
.panel-full-c0ab,
.cold-14b7,
.west-1bdb,
.hero_f4e9,
.accordion-west-177b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .row_6f5e {
    padding: 8px 0;
  }
  
  .new_0647 img {
    height: 28px;
    width: auto;
  }
  
  .bronze-0767 {
    display: none !important;
  }
  
  .slider-old-ccb6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slider-old-ccb6 svg {
    width: 14px;
    height: 14px;
  }
  
  .fixed_3467 {
    padding: 6px;
  }
  
  .table-246a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .breadcrumb-41de,
  .wrapper_gold_9376,
  .menu-3857,
  .status-fixed-9e03,
  .container-solid-9591,
  .notification-b13b,
  .west-963f,
  .thumbnail-small-ec07,
  .short-e7d0,
  .background_ed83,
  .progress_narrow_af77,
  .bottom_2511 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .photo_0cf1,
  .popup-east-6ab5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .component_east_dc4f,
  .pattern_next_f1fe,
  .container-7f83,
  .widget_blue_0a89,
  .menu_current_a5dd,
  .module-dark-546a,
  .picture_fast_25c6 {
    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 */
  .north_d97e,
  .wide-9793,
  .info_steel_75c8,
  .cool_c385,
  .east_7329 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .search_blue_c760,
  .action-3317,
  .south_246d,
  .steel-5640 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .photo-bronze-2cb2,
  .widget_focused_dcba {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .last-3daa,
  .new-3c61,
  .dropdown-dynamic-dd3d,
  .fixed-d7ca {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tertiary_pressed_4173,
  .hover-stone-af73,
  .detail-3ac0,
  .paragraph-f897,
  .under_99e6,
  .column-88ae {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .north_d97e,
  .wide-9793,
  .cool_c385 {
    max-width: none !important;
  }
  
  .nav_3c82 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .search_blue_c760 {
    font-size: 1.5rem !important;
  }
  
  .action-3317 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dark-b853,
  .message_gas_d017 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .south_246d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .medium_cb38 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .form-4e48 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .north_d97e,
  .cool_c385 {
    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: 86ca */
.promo-block-d8 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.1;
}
