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

/* Fix for any potential overflow elements */
/* NOTE: ".slider_small_a0ab" 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.filter_dark_6b4f so it can't cause
   horizontal overflow anyway. */
.link-1a66,
.pagination_right_73cc,
.caption-down-90a3,
.module-c550,
.aside_f580,
.dark_5e21,
.section-a7ad,
.yellow_724e,
.feature-b3c9,
.basic-710b,
.next_c10b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .caption-b4e2 {
    padding: 8px 0;
  }
  
  .advanced-2157 img {
    height: 28px;
    width: auto;
  }
  
  .chip_stale_9fa5 {
    display: none !important;
  }
  
  .box-copper-c58a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .box-copper-c58a svg {
    width: 14px;
    height: 14px;
  }
  
  .gallery_fe36 {
    padding: 6px;
  }
  
  .lite-c8a6 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .caption-down-90a3,
  .pagination_right_73cc,
  .module-c550,
  .aside_f580,
  .paragraph-steel-61ba,
  .widget-over-341c,
  .caption-6c82,
  .upper-47e0,
  .feature-right-26f7,
  .row-blue-e7f3,
  .nav_iron_e5fd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .thick_ad57,
  .media-upper-8b47 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-030e,
  .picture_hovered_9803,
  .accordion-wide-2a5f,
  .tabs-88c6,
  .focused_d9c1,
  .glass_310a,
  .outline_892e {
    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 */
  .new_dfc3,
  .notice-1b0e,
  .frame-7ff6,
  .pattern_f7e7,
  .smooth-606a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .component-3200,
  .gold_a61d,
  .photo-38ca,
  .light-be83 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .steel-cbed,
  .complex_abd0 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tertiary-7e16,
  .text-soft-b6dc,
  .card_stone_12e7,
  .left-e605 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tag-6dee,
  .notification_33a4,
  .huge-7e87,
  .chip-a885,
  .breadcrumb_5c31,
  .light_037c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .new_dfc3,
  .notice-1b0e,
  .pattern_f7e7 {
    max-width: none !important;
  }
  
  .slider_small_a0ab {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .component-3200 {
    font-size: 1.5rem !important;
  }
  
  .gold_a61d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .box_clean_504a,
  .highlight-481d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo-38ca {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .main_active_d9de {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .widget_c6fb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .new_dfc3,
  .pattern_f7e7 {
    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: d0e2 */
.ghost-box-q9 {
  padding: 0.1rem;
  font-size: 11px;
  line-height: 1.0;
}
