/* ============================================
   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 (.container-hard-f184) is a descendant of
   .disabled_9420 (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.slider-89ff {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".photo-mini-ad29" 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.outline_6c21 so it can't cause
   horizontal overflow anyway. */
.solid_230e,
.overlay-active-ec26,
.dirty_e7cf,
.search_74fc,
.paragraph-414d,
.video_95b5,
.list-1903,
.outline_silver_b73f,
.tag_d12b,
.photo-paper-e2ac,
.heading_3568 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .secondary-medium-91a3 {
    padding: 8px 0;
  }
  
  .frame_pro_e0b6 img {
    height: 28px;
    width: auto;
  }
  
  .hard_4120 {
    display: none !important;
  }
  
  .breadcrumb-action-23a1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .breadcrumb-action-23a1 svg {
    width: 14px;
    height: 14px;
  }
  
  .form_motion_6d1f {
    padding: 6px;
  }
  
  .hover-4e6f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .dirty_e7cf,
  .overlay-active-ec26,
  .search_74fc,
  .paragraph-414d,
  .element_small_bcf9,
  .text-eef5,
  .carousel-plasma-6e8e,
  .row-fddb,
  .mask-stale-44ac,
  .hero_old_e919,
  .east_7ac2,
  .paragraph-1e9b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .sidebar-864a,
  .chip-5da8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .prev-95ef,
  .video-black-ae11,
  .dark_f5e7,
  .gold_c7c4,
  .current-a9d2,
  .old-2b81,
  .link-simple-b153 {
    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 */
  .warm-04dd,
  .input-pink-ae92,
  .out_8910,
  .in_9f5f,
  .accordion-c5b4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tall-2886,
  .east-df63,
  .picture-hovered-8d55,
  .section-77f6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .progress_glass_b2e0,
  .header-gas-bc39 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tooltip-tall-c8e6,
  .blue-9e3d,
  .icon_8156,
  .title_33de {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dirty_df97,
  .texture_7201,
  .short-ab69,
  .out-9b25,
  .hot_96f6,
  .alert_2ac4 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .warm-04dd,
  .input-pink-ae92,
  .in_9f5f {
    max-width: none !important;
  }
  
  .photo-mini-ad29 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tall-2886 {
    font-size: 1.5rem !important;
  }
  
  .east-df63 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .module-fast-b9c6,
  .copper-fbf6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .picture-hovered-8d55 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .grid-south-292f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .texture_small_6ff9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .warm-04dd,
  .in_9f5f {
    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: f561 */
.widget-item-z9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
