/* ============================================
   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 (.video-smooth-55ce) is a descendant of
   .description-9441 (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.overlay_12f2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".popup_5b5e" 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.background-fast-c1ed so it can't cause
   horizontal overflow anyway. */
.tag_narrow_098c,
.wrapper_dac9,
.button-ebd2,
.secondary-6acd,
.primary_first_aad2,
.middle_dcdb,
.breadcrumb_basic_c5e2,
.element-7abc,
.bright-2336,
.list_fresh_8823,
.south_c167 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .panel-iron-70ab {
    padding: 8px 0;
  }
  
  .notice_mini_d131 img {
    height: 28px;
    width: auto;
  }
  
  .accordion_south_c9c8 {
    display: none !important;
  }
  
  .photo_96d3 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .photo_96d3 svg {
    width: 14px;
    height: 14px;
  }
  
  .status-pressed-c7d4 {
    padding: 6px;
  }
  
  .feature-f2a8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .button-ebd2,
  .wrapper_dac9,
  .secondary-6acd,
  .primary_first_aad2,
  .dropdown-fluid-b321,
  .photo_lite_fdb5,
  .article_right_4def,
  .widget_4ecb,
  .feature_36fa,
  .active_1ba6,
  .box_b914 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .mini_23eb,
  .easy-7a8a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .caption-fluid-f46e,
  .silver-2124,
  .tabs_center_6cbc,
  .simple-b4ec,
  .module-10ed,
  .texture-dim-cc9e,
  .chip-a9d0 {
    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 */
  .over-ab83,
  .notification_iron_2b80,
  .plasma-9213,
  .gallery-5fe2,
  .frame-9b3c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gradient_fluid_08d6,
  .tall_a9ec,
  .texture_orange_1213,
  .column-d342 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .clean-af08,
  .dropdown_wide_d335 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .large-8f22,
  .top_e705,
  .stale_444f,
  .gradient-1fe0 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .description-pressed-b86e,
  .input_blue_8444,
  .detail-thick-9303,
  .photo_4913,
  .hero_steel_1863,
  .in-e6af {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .over-ab83,
  .notification_iron_2b80,
  .gallery-5fe2 {
    max-width: none !important;
  }
  
  .popup_5b5e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gradient_fluid_08d6 {
    font-size: 1.5rem !important;
  }
  
  .tall_a9ec {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accent-9ddf,
  .panel-pressed-89da {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .texture_orange_1213 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shadow-old-c25b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .shade-south-7fda {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .over-ab83,
  .gallery-5fe2 {
    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: 6d6f */
.promo-block-s2 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.0;
}
