/* ============================================
   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 (.wood_c4aa) is a descendant of
   .nav-tiny-2258 (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.message_bottom_a811 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame_selected_349f" 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.medium-fea8 so it can't cause
   horizontal overflow anyway. */
.column-df69,
.dropdown_hot_9c5a,
.new-eb05,
.silver_d894,
.shadow_5005,
.menu-9fb2,
.rough-72d4,
.new-132d,
.form_right_6d53,
.column_3821,
.green_dfbf {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .full_222f {
    padding: 8px 0;
  }
  
  .video_3b5f img {
    height: 28px;
    width: auto;
  }
  
  .huge-9a07 {
    display: none !important;
  }
  
  .thick-da96 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .thick-da96 svg {
    width: 14px;
    height: 14px;
  }
  
  .shade-upper-1d92 {
    padding: 6px;
  }
  
  .lite-408c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .new-eb05,
  .dropdown_hot_9c5a,
  .silver_d894,
  .shadow_5005,
  .lite-60b4,
  .disabled-brown-1689,
  .header_d297,
  .yellow-3016,
  .notice-black-574a,
  .warm-580d,
  .badge_thick_7003,
  .icon_49a9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focus_a148,
  .active-fc26 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .east_2942,
  .tag-da5a,
  .widget-huge-ab92,
  .breadcrumb-9a04,
  .focused_4800,
  .gallery-4893,
  .heading_bf12 {
    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 */
  .backdrop_white_ac6e,
  .menu_5bce,
  .hot_aaf0,
  .widget-d719,
  .thumbnail_tiny_83bf {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pagination_static_00dd,
  .middle-f74c,
  .focused_b5e3,
  .card-bronze-1650 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .rough-fff6,
  .chip-db42 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hero_a452,
  .soft-8e71,
  .table-wide-fce0,
  .title_9a3d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .highlight-6cd1,
  .smooth-5d51,
  .tall_d8c5,
  .popup_selected_cb68,
  .active-stale-2a1e,
  .accent_basic_3ba4 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .backdrop_white_ac6e,
  .menu_5bce,
  .widget-d719 {
    max-width: none !important;
  }
  
  .frame_selected_349f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pagination_static_00dd {
    font-size: 1.5rem !important;
  }
  
  .middle-f74c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .border_a4cc,
  .first_b1ec {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .focused_b5e3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .border_narrow_a9ae {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .section-liquid-2bce {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .backdrop_white_ac6e,
  .widget-d719 {
    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: 9f17 */
.shadow-element-a3 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.3;
}
