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

/* Fix for any potential overflow elements */
/* NOTE: ".smooth-0620" 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.breadcrumb-7508 so it can't cause
   horizontal overflow anyway. */
.footer_48a2,
.message_c4c5,
.tall_aa23,
.header-781a,
.focus-20b2,
.secondary_493a,
.new_f7ab,
.widget_fast_96ff,
.caption_bottom_e276,
.heading-plasma-1370,
.border_e4c4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .north_12fc {
    padding: 8px 0;
  }
  
  .cool_108a img {
    height: 28px;
    width: auto;
  }
  
  .frame-135c {
    display: none !important;
  }
  
  .pro-0cda {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pro-0cda svg {
    width: 14px;
    height: 14px;
  }
  
  .alert-516a {
    padding: 6px;
  }
  
  .active_49ce {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tall_aa23,
  .message_c4c5,
  .header-781a,
  .focus-20b2,
  .layout_6c53,
  .action-9bd2,
  .link_dim_929a,
  .chip_dark_701b,
  .lite-7de3,
  .caption-fa5d,
  .media_tiny_1292,
  .red-dd4c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .lower_05f8,
  .glass_3bbc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header_0be2,
  .secondary_b10a,
  .black_aee7,
  .component_advanced_8737,
  .button_purple_f533,
  .tertiary_9d80,
  .popup_basic_7182 {
    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 */
  .dark-9c26,
  .secondary-7323,
  .in_dcf6,
  .accordion_de17,
  .tiny-bf59 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .section-0705,
  .filter_out_07fc,
  .modal_hot_93a4,
  .large_6922 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .new-bc2e,
  .message-c17e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .info-8cce,
  .simple-e2a9,
  .paper_8ee5,
  .button-thick-63d1 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .box-69cd,
  .row-orange-4586,
  .form-iron-abed,
  .light-cc1d,
  .module-brown-d333,
  .container_9284 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dark-9c26,
  .secondary-7323,
  .accordion_de17 {
    max-width: none !important;
  }
  
  .smooth-0620 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .section-0705 {
    font-size: 1.5rem !important;
  }
  
  .filter_out_07fc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .top_a87d,
  .carousel_4f88 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .modal_hot_93a4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .surface_88c1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .stone_9528 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dark-9c26,
  .accordion_de17 {
    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: e646 */
.widget-item-n9 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.1;
}
