/* ============================================
   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_cc61) is a descendant of
   .inner_37ac (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.link_137a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pro-dd6f" 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.info_mini_05a3 so it can't cause
   horizontal overflow anyway. */
.menu-purple-c77a,
.narrow_3ebf,
.wood_4417,
.focus-south-242d,
.button-south-032a,
.logo_gas_91bc,
.copper_069f,
.focus_clean_ec30,
.grid_e644,
.disabled_lite_3118,
.shade_inner_6d49 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .logo_cf03 {
    padding: 8px 0;
  }
  
  .sidebar-9a1c img {
    height: 28px;
    width: auto;
  }
  
  .overlay_gold_0a24 {
    display: none !important;
  }
  
  .detail_a307 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .detail_a307 svg {
    width: 14px;
    height: 14px;
  }
  
  .input-bottom-aab1 {
    padding: 6px;
  }
  
  .label-9dfa {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .wood_4417,
  .narrow_3ebf,
  .focus-south-242d,
  .button-south-032a,
  .outline-aebf,
  .right_e5e0,
  .carousel-down-5668,
  .huge_0a89,
  .progress-tall-d31c,
  .fast-8ea7,
  .container-north-0037,
  .disabled_iron_3dba {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange_9d12,
  .copper_f2b1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-6a06,
  .orange_1f8e,
  .dirty_02c9,
  .nav_2938,
  .article-under-af99,
  .slider_227b,
  .block-1332 {
    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 */
  .hard_7af5,
  .article-center-8d70,
  .item_56d8,
  .gallery-liquid-3eb1,
  .caption_79a5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wood-5681,
  .popup-simple-a64b,
  .list-stale-34bc,
  .nav-stone-d1e9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .widget_focused_38ad,
  .texture-in-1cde {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .element-4912,
  .block-4bac,
  .surface_d78f,
  .modal-bb99 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .block_7b67,
  .item_glass_3754,
  .texture-soft-89e5,
  .gradient-848e,
  .left_b148,
  .liquid_0e85 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hard_7af5,
  .article-center-8d70,
  .gallery-liquid-3eb1 {
    max-width: none !important;
  }
  
  .pro-dd6f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wood-5681 {
    font-size: 1.5rem !important;
  }
  
  .popup-simple-a64b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gallery_61fd,
  .orange_a3e2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .list-stale-34bc {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .logo_gold_345e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .row_718e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hard_7af5,
  .gallery-liquid-3eb1 {
    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: 8e6a */
.widget-item-k3 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.0;
}
