/* ============================================
   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 (.active-be43) is a descendant of
   .dropdown-wood-0700 (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.active-steel-7a24 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".thick-1f65" 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.stone-90c3 so it can't cause
   horizontal overflow anyway. */
.gas_0d53,
.message-north-0a42,
.overlay_gas_6fc3,
.breadcrumb_6d51,
.input_wood_1321,
.outline_6821,
.nav_b070,
.accent-fluid-4400,
.heading-prev-d86c,
.in_e04e,
.main_ca61 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fresh-f6ba {
    padding: 8px 0;
  }
  
  .accordion_clean_6334 img {
    height: 28px;
    width: auto;
  }
  
  .current-f0ef {
    display: none !important;
  }
  
  .paragraph_ef13 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .paragraph_ef13 svg {
    width: 14px;
    height: 14px;
  }
  
  .new_6b12 {
    padding: 6px;
  }
  
  .article_tiny_881e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .overlay_gas_6fc3,
  .message-north-0a42,
  .breadcrumb_6d51,
  .input_wood_1321,
  .button_east_c8bd,
  .alert_warm_f3ef,
  .text_cold_0068,
  .highlight_huge_0bb5,
  .border-current-a9ad,
  .footer_blue_c471,
  .black-3031,
  .carousel-6731 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border_71d0,
  .gradient_short_32d5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .panel-smooth-9b5b,
  .box_83a4,
  .east_6201,
  .aside_99b1,
  .text_ed4b,
  .wide-6234,
  .active-gas-b80e {
    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 */
  .grid_f6d5,
  .row-2a20,
  .input-over-6329,
  .component_8ccc,
  .focus-up-6de4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .silver-7a20,
  .panel_selected_47dd,
  .modal-west-ecaf,
  .description-bd91 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .component-d34e,
  .label_d621 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .blue-daf4,
  .alert_fresh_1c9c,
  .cool_9998,
  .frame-bd69 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .highlight-wide-2f86,
  .notice-f8a1,
  .filter_liquid_3ecf,
  .section-up-5312,
  .slider-2ea3,
  .tooltip-focused-acb1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .grid_f6d5,
  .row-2a20,
  .component_8ccc {
    max-width: none !important;
  }
  
  .thick-1f65 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .silver-7a20 {
    font-size: 1.5rem !important;
  }
  
  .panel_selected_47dd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tooltip_dim_afaf,
  .frame_4b55 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .modal-west-ecaf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tiny-2dcb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .module-b30f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .grid_f6d5,
  .component_8ccc {
    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: 65bc */
.widget-item-d9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
