/* ============================================
   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 (.carousel_under_93c5) is a descendant of
   .hard-5e63 (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.medium_3827 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".old_ef10" 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.module_static_e796 so it can't cause
   horizontal overflow anyway. */
.tabs-bronze-5402,
.block-ea2f,
.accordion_ffac,
.text_a290,
.panel-soft-706b,
.widget-simple-33ea,
.notification-94fb,
.icon-71c3,
.thick_b20c,
.heading_32b1,
.shade-yellow-e45d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .photo-3915 {
    padding: 8px 0;
  }
  
  .element-new-64ce img {
    height: 28px;
    width: auto;
  }
  
  .sort_new_eeac {
    display: none !important;
  }
  
  .status_4912 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .status_4912 svg {
    width: 14px;
    height: 14px;
  }
  
  .input_gold_fdab {
    padding: 6px;
  }
  
  .steel-8491 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .accordion_ffac,
  .block-ea2f,
  .text_a290,
  .panel-soft-706b,
  .slider_left_b8fc,
  .slider_bae8,
  .motion-0a89,
  .info-dirty-298c,
  .badge_2171,
  .warm-e6b3,
  .media_smooth_49ba,
  .secondary_bee2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .media-a766,
  .cool_9abc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .badge-e28a,
  .detail-3d31,
  .light-0ee7,
  .filter_dirty_3780,
  .inner-b668,
  .search_old_fb6a,
  .accent-hot-03eb {
    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 */
  .heading-615c,
  .link_9274,
  .sort_south_ed76,
  .pattern_a481,
  .thumbnail-dirty-d6f8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .widget_06e5,
  .video-focused-699f,
  .tertiary-gas-c3cb,
  .dynamic-c20c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hero_thick_4991,
  .active_87e8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .logo_south_c7e7,
  .paragraph-blue-90bc,
  .badge_4f49,
  .label-narrow-a4b7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fixed_1ef7,
  .static-cd52,
  .advanced-e51e,
  .surface-8eb9,
  .container_089e,
  .preview_left_360e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .heading-615c,
  .link_9274,
  .pattern_a481 {
    max-width: none !important;
  }
  
  .old_ef10 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .widget_06e5 {
    font-size: 1.5rem !important;
  }
  
  .video-focused-699f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .caption_0500,
  .menu-5175 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tertiary-gas-c3cb {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .image-4679 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .status_dirty_3656 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .heading-615c,
  .pattern_a481 {
    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: 5725 */
.shadow-element-p5 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
