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

/* Fix for any potential overflow elements */
/* NOTE: ".notice_a0f2" 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.logo_8e93 so it can't cause
   horizontal overflow anyway. */
.item_c6a9,
.heading_new_4892,
.description_gold_2c40,
.focused_49ad,
.solid-1c4c,
.layout_east_7e42,
.bright_54f8,
.shadow_brown_34a9,
.panel_lite_2948,
.overlay-action-3737,
.icon_medium_38d6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .box_pink_2555 {
    padding: 8px 0;
  }
  
  .footer-055d img {
    height: 28px;
    width: auto;
  }
  
  .block-f543 {
    display: none !important;
  }
  
  .west-d1b7 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .west-d1b7 svg {
    width: 14px;
    height: 14px;
  }
  
  .wood-afa3 {
    padding: 6px;
  }
  
  .motion-734f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .description_gold_2c40,
  .heading_new_4892,
  .focused_49ad,
  .solid-1c4c,
  .feature_99ac,
  .message-narrow-3e02,
  .container_complex_d78c,
  .title-c91d,
  .fixed-31a8,
  .stone-a366,
  .smooth_42d1,
  .clean-b5c7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .next_f72b,
  .main-8423 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .primary-3910,
  .pink_bd87,
  .active-3077,
  .texture_hard_7d8f,
  .section-0e02,
  .component_f7dd,
  .wrapper_433d {
    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 */
  .dropdown-02c3,
  .background-dc23,
  .shadow-a85d,
  .carousel_0372,
  .article_73e7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .stale_1b97,
  .image-1454,
  .image-d1ea,
  .shadow-simple-2771 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gold-3ccb,
  .tall_e9d0 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .photo-slow-b29e,
  .preview-inner-9732,
  .row_mini_a5df,
  .tabs_e2ad {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .link-42b7,
  .top-967d,
  .modal-white-bef8,
  .selected_f112,
  .pattern-tall-4b4b,
  .lite_1c99 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dropdown-02c3,
  .background-dc23,
  .carousel_0372 {
    max-width: none !important;
  }
  
  .notice_a0f2 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .stale_1b97 {
    font-size: 1.5rem !important;
  }
  
  .image-1454 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .sidebar_blue_092c,
  .block_center_862f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .image-d1ea {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .last_4e4d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .prev-cddc {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dropdown-02c3,
  .carousel_0372 {
    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: 54cc */
.widget-item-e4 {
  padding: 0.3rem;
  font-size: 11px;
  line-height: 1.0;
}
