/* ============================================
   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 (.bright-fb95) is a descendant of
   .form_a2c4 (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.smooth_3981 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slider_glass_0b14" 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.dropdown-d8a5 so it can't cause
   horizontal overflow anyway. */
.carousel_4f02,
.border-right-c88d,
.info_e6e9,
.gallery-orange-d982,
.preview-4bec,
.easy-3273,
.huge-60a7,
.medium-2353,
.slider-new-62a3,
.modal_cb4b,
.tooltip-under-77d7 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pro-7006 {
    padding: 8px 0;
  }
  
  .row_0052 img {
    height: 28px;
    width: auto;
  }
  
  .out-98d7 {
    display: none !important;
  }
  
  .thumbnail-7a2d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .thumbnail-7a2d svg {
    width: 14px;
    height: 14px;
  }
  
  .highlight_medium_0a3d {
    padding: 6px;
  }
  
  .wrapper_cool_0196 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .info_e6e9,
  .border-right-c88d,
  .gallery-orange-d982,
  .preview-4bec,
  .content_motion_0751,
  .message_yellow_e32f,
  .text_9f5e,
  .banner_first_13df,
  .frame_dark_7ff1,
  .accordion_full_bc20,
  .breadcrumb-0956,
  .block_red_83ac {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .active_83d7,
  .wrapper-796e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .fresh-12fd,
  .mask_f64e,
  .top-795f,
  .content-3b96,
  .module_5534,
  .border-406a,
  .frame-motion-7875 {
    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 */
  .dirty-414a,
  .item_ddcf,
  .gold_e86f,
  .form-prev-7e0b,
  .light-de6f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mask-brown-eff7,
  .hard-cb1c,
  .badge_adef,
  .over_acfe {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .container_mini_9d07,
  .video_66b2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .status_hard_53c0,
  .icon_83e6,
  .layout-west-5034,
  .description-full-eda2 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .card-5e82,
  .dim-7671,
  .hidden_glass_b03e,
  .active_a2d8,
  .main-ac64,
  .tertiary_871b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dirty-414a,
  .item_ddcf,
  .form-prev-7e0b {
    max-width: none !important;
  }
  
  .slider_glass_0b14 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mask-brown-eff7 {
    font-size: 1.5rem !important;
  }
  
  .hard-cb1c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .item-simple-fc8a,
  .hard-cd1b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .badge_adef {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .out-79fd {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .shade_tiny_26e9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dirty-414a,
  .form-prev-7e0b {
    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: 9717 */
.widget-item-j9 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.3;
}
