/* ============================================
   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 (.photo-wide-98d6) is a descendant of
   .content_dark_e245 (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.steel-2b15 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".layout-5ca5" 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.breadcrumb_east_3280 so it can't cause
   horizontal overflow anyway. */
.smooth_4b73,
.chip-black-59d8,
.filter-bronze-8201,
.dirty-aa8b,
.primary_red_c298,
.preview-huge-465d,
.notification_out_5e27,
.hard_8447,
.pressed-37fb,
.filter-ef9a,
.button-dark-6392 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .yellow-68db {
    padding: 8px 0;
  }
  
  .image_f278 img {
    height: 28px;
    width: auto;
  }
  
  .row-87de {
    display: none !important;
  }
  
  .input-iron-8291 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .input-iron-8291 svg {
    width: 14px;
    height: 14px;
  }
  
  .solid_5789 {
    padding: 6px;
  }
  
  .border-83d8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .filter-bronze-8201,
  .chip-black-59d8,
  .dirty-aa8b,
  .primary_red_c298,
  .grid-7094,
  .paragraph_white_ec01,
  .module_clean_15a7,
  .bronze-a8ec,
  .fresh-90a5,
  .header_complex_d958,
  .north-5620,
  .panel-6bbf {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .main_steel_9a3c,
  .photo_white_49ff {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .top-2bf5,
  .heading_fc0c,
  .input_1a31,
  .static-a2bf,
  .gradient_8349,
  .description-f3d8,
  .element-1066 {
    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 */
  .pro-1512,
  .caption-ba8c,
  .title_bc70,
  .tabs_183d,
  .shadow_4c60 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .south-0774,
  .focus_new_5fd3,
  .carousel-pressed-fce2,
  .accordion-1914 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .layout_tall_19f8,
  .fixed-6466 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .steel_2433,
  .picture-9757,
  .photo_black_abd4,
  .gallery_hovered_aaa3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .message-tall-21ce,
  .hero-6e40,
  .nav_814a,
  .notice_2086,
  .short_9bf2,
  .input-fast-3dac {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pro-1512,
  .caption-ba8c,
  .tabs_183d {
    max-width: none !important;
  }
  
  .layout-5ca5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .south-0774 {
    font-size: 1.5rem !important;
  }
  
  .focus_new_5fd3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hero_solid_da21,
  .dim-0a1a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-pressed-fce2 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .rough-a277 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .progress-1220 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pro-1512,
  .tabs_183d {
    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: 55c0 */
.phantom-card-x7 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.1;
}
