/* ============================================
   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 (.form_8496) is a descendant of
   .nav-227e (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.
   Two site templates coexist: legacy obfuscated-class (header.shadow_clean_368a)
   and the redesigned template (header.gradient_cool_9e14). Keep both selectors. */
header.shadow_clean_368a,
header.gradient_cool_9e14 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".focus_1479" 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.disabled_dirty_fb5c so it can't cause
   horizontal overflow anyway. */
.nav-in-f21f,
.south-f884,
.yellow-54c1,
.secondary_active_7fb8,
.hidden_cold_f2ac,
.primary-38b7,
.hover-e7a5,
.modal-huge-aa60,
.content_3c21,
.breadcrumb_huge_ed42,
.aside_smooth_509c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .row_e842 {
    padding: 8px 0;
  }
  
  .accordion_wide_dcc9 img {
    height: 28px;
    width: auto;
  }
  
  .backdrop-fresh-f813 {
    display: none !important;
  }
  
  .pattern_1f89 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pattern_1f89 svg {
    width: 14px;
    height: 14px;
  }
  
  .shadow_hard_09db {
    padding: 6px;
  }
  
  .video_white_9d6c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .yellow-54c1,
  .south-f884,
  .secondary_active_7fb8,
  .hidden_cold_f2ac,
  .pattern-north-801a,
  .link-white-1c5c,
  .gold-bb77,
  .old_2049,
  .accordion-dark-13d7,
  .stone-f832,
  .large_1ae0,
  .outer_098c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .backdrop-current-b6a5,
  .border-fresh-284d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .caption-pro-ab7b,
  .hard-39f5,
  .secondary-6898,
  .focus_hard_bd9d,
  .active_2d4d,
  .gallery_341e,
  .input_267f {
    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 */
  .smooth-dcc0,
  .selected_a588,
  .highlight_complex_4187,
  .modal_light_f114,
  .pro-baed {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .focus_red_db35,
  .bottom-49c0,
  .table_3a49,
  .purple_b278 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tiny-0550,
  .hover-9de2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .highlight-slow-19e2,
  .purple_e1e6,
  .overlay-6dba,
  .modal-fixed-dd8f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hover_2286,
  .focused_d1ee,
  .form_8ad2,
  .column-25b9,
  .gold-af90,
  .pagination-black-3519 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .smooth-dcc0,
  .selected_a588,
  .modal_light_f114 {
    max-width: none !important;
  }
  
  .focus_1479 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .focus_red_db35 {
    font-size: 1.5rem !important;
  }
  
  .bottom-49c0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .fresh_0672,
  .logo-f117 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .table_3a49 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .block-small-fef7 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .focus-c67f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .smooth-dcc0,
  .modal_light_f114 {
    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: 94a5 */
.border-clean-6855 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}

/* css-noise: cb71 */
.promo-block-q6 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.0;
}
