/* ============================================
   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 (.logo-d061) is a descendant of
   .east_ffdc (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.tiny_2c8c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".button-7f2f" 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.outline_dirty_c985 so it can't cause
   horizontal overflow anyway. */
.element_complex_53e4,
.table_hot_0d61,
.south-dd1b,
.popup-black-8a5d,
.article-smooth-5cc3,
.highlight_2ddc,
.accordion-26f5,
.video_smooth_3077,
.focus_3400,
.notification_b0ad,
.outline-lite-5078 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tertiary_e1c2 {
    padding: 8px 0;
  }
  
  .heading_f694 img {
    height: 28px;
    width: auto;
  }
  
  .thumbnail_action_6b21 {
    display: none !important;
  }
  
  .module_db00 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .module_db00 svg {
    width: 14px;
    height: 14px;
  }
  
  .video-6194 {
    padding: 6px;
  }
  
  .tooltip_dim_f5d6 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .south-dd1b,
  .table_hot_0d61,
  .popup-black-8a5d,
  .article-smooth-5cc3,
  .solid_8ea5,
  .focus-0c9a,
  .out_da25,
  .feature-warm-09ce,
  .description_7339,
  .carousel_4323,
  .progress_new_c552,
  .tertiary-28fc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hard_1654,
  .input-3b55 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .lite_6191,
  .next_9c14,
  .hidden-lower-7d87,
  .feature-c0e7,
  .link-black-5445,
  .row-5d03,
  .brown_0868 {
    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 */
  .hover-2ab3,
  .input-3e56,
  .gradient-08eb,
  .main-smooth-9b09,
  .active_37b6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .left-ac4b,
  .link_pro_3193,
  .progress_5254,
  .alert-mini-e38f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .narrow_b8b8,
  .popup-over-c6ef {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .image_over_deae,
  .breadcrumb_df5f,
  .wrapper_warm_a2e9,
  .thick-3a68 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .top_15c7,
  .hero_74d9,
  .gallery_cc95,
  .logo_gas_f3a3,
  .progress_copper_7008,
  .container-384b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hover-2ab3,
  .input-3e56,
  .main-smooth-9b09 {
    max-width: none !important;
  }
  
  .button-7f2f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .left-ac4b {
    font-size: 1.5rem !important;
  }
  
  .link_pro_3193 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .bottom_48e9,
  .card-0af7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .progress_5254 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .icon_pink_1525 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .container-5f4d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hover-2ab3,
  .main-smooth-9b09 {
    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: 1339 */
.shadow-element-k3 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.0;
}
