/* ============================================
   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 (.widget_9f93) is a descendant of
   .stone_7cd4 (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.accordion-3f7c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hover-lite-bcdd" 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.highlight-over-6016 so it can't cause
   horizontal overflow anyway. */
.pink-a562,
.breadcrumb_d4a4,
.breadcrumb-b0f2,
.progress_dim_c3a0,
.article_light_1a91,
.block-steel-d80b,
.purple_1c9e,
.label-86ec,
.avatar_wide_842e,
.text_a025,
.highlight-thick-222a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .element_rough_46bf {
    padding: 8px 0;
  }
  
  .video_hovered_1594 img {
    height: 28px;
    width: auto;
  }
  
  .list-4a3d {
    display: none !important;
  }
  
  .message_47f2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .message_47f2 svg {
    width: 14px;
    height: 14px;
  }
  
  .east_c0e0 {
    padding: 6px;
  }
  
  .feature_f989 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .breadcrumb-b0f2,
  .breadcrumb_d4a4,
  .progress_dim_c3a0,
  .article_light_1a91,
  .short-a8bb,
  .stale-e45e,
  .widget_ff0a,
  .small-3312,
  .accent_0b17,
  .cool_7d19,
  .table-234f,
  .table-white-754f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .north_58f2,
  .accent_40d9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tag-old-46e8,
  .article-light-0b27,
  .pattern_cold_391b,
  .box-a771,
  .fast_1c33,
  .input-dynamic-44d9,
  .west_1efb {
    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 */
  .component-clean-26b7,
  .hard-f239,
  .advanced_c70d,
  .gradient_blue_4b7c,
  .accordion-fe89 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .article_brown_339e,
  .highlight-first-9a2d,
  .notification-1b6d,
  .highlight-36b3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .panel-south-be02,
  .gradient_next_4ac4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .block_0372,
  .old-d734,
  .border_0fb1,
  .highlight-north-fd6e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .wrapper_complex_e6ca,
  .overlay-purple-fdf1,
  .picture_ba1e,
  .menu-advanced-6395,
  .full-5989,
  .right-024f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .component-clean-26b7,
  .hard-f239,
  .gradient_blue_4b7c {
    max-width: none !important;
  }
  
  .hover-lite-bcdd {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .article_brown_339e {
    font-size: 1.5rem !important;
  }
  
  .highlight-first-9a2d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .breadcrumb_8cd2,
  .popup-brown-2440 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .notification-1b6d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .info_00a5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pagination-2855 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .component-clean-26b7,
  .gradient_blue_4b7c {
    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: 3930 */
.promo-block-n5 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.1;
}
