/* ============================================
   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 (.content_9889) is a descendant of
   .list_0c08 (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.prev-b903 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".red_12c8" 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.widget-focused-4b9c so it can't cause
   horizontal overflow anyway. */
.overlay-fluid-677b,
.hero_0c5b,
.text-stale-5355,
.component-4f89,
.out_1b84,
.icon_12ce,
.active_black_c103,
.slider-8ea6,
.section_static_f172,
.main-4e54,
.panel_0b92 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pro_492a {
    padding: 8px 0;
  }
  
  .video_079f img {
    height: 28px;
    width: auto;
  }
  
  .tall_810e {
    display: none !important;
  }
  
  .bright-cd83 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .bright-cd83 svg {
    width: 14px;
    height: 14px;
  }
  
  .advanced_6e58 {
    padding: 6px;
  }
  
  .list_963b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .text-stale-5355,
  .hero_0c5b,
  .component-4f89,
  .out_1b84,
  .wrapper-slow-16c1,
  .heading_89b1,
  .wrapper_0346,
  .photo_advanced_94fa,
  .under-1fd8,
  .active_first_4f3a,
  .iron-b4c3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .dim_28d0,
  .fresh_17b6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .progress-black-5a20,
  .disabled_408e,
  .backdrop_df13,
  .cool-82bf,
  .purple_01f4,
  .smooth_d588,
  .element_f4d0 {
    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 */
  .mini-620a,
  .secondary-warm-2a45,
  .basic-33da,
  .form-simple-b976,
  .text-tiny-5e44 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .right_5ec5,
  .hero-mini-f4c7,
  .info-47b9,
  .notice_north_44c9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .new-5ca7,
  .mask_cold_0d31 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .module-lower-0320,
  .texture-f16a,
  .title_7d80,
  .element-f100 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .summary-static-8caa,
  .large_98f2,
  .search_5b90,
  .input-easy-d0f6,
  .active-brown-2e59,
  .column_f748 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .mini-620a,
  .secondary-warm-2a45,
  .form-simple-b976 {
    max-width: none !important;
  }
  
  .red_12c8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .right_5ec5 {
    font-size: 1.5rem !important;
  }
  
  .hero-mini-f4c7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .plasma-5645,
  .inner-52ab {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .info-47b9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .action-9674 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .link-18ce {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mini-620a,
  .form-simple-b976 {
    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: dfcb */
.shadow-element-h5 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
