/* ============================================
   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 (.yellow-0e22) is a descendant of
   .blue-081e (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.column_dc3e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".aside-c5d4" 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.search-f6d0 so it can't cause
   horizontal overflow anyway. */
.small-67a0,
.mask_5842,
.title-first-a4c6,
.thick_8796,
.main-653a,
.content-clean-176b,
.table-867e,
.dim_bbed,
.feature-37cb,
.tag_in_4cc7,
.thick-bc87 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .old_be2e {
    padding: 8px 0;
  }
  
  .action-4db6 img {
    height: 28px;
    width: auto;
  }
  
  .article_steel_cc61 {
    display: none !important;
  }
  
  .breadcrumb-left-f2f5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .breadcrumb-left-f2f5 svg {
    width: 14px;
    height: 14px;
  }
  
  .feature_basic_b269 {
    padding: 6px;
  }
  
  .advanced-1fd1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .title-first-a4c6,
  .mask_5842,
  .thick_8796,
  .main-653a,
  .highlight-fast-d361,
  .media_d481,
  .video-solid-1850,
  .avatar-fresh-7230,
  .icon-selected-e347,
  .message-a4f6,
  .background_5c04 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .photo_fast_0a5d,
  .hero-fluid-1234 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notification-focused-8169,
  .backdrop-clean-8dab,
  .thick-64cc,
  .box_dd45,
  .container-cc33,
  .image-90a0,
  .dark-9e72 {
    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 */
  .active-fixed-141e,
  .nav_319b,
  .layout-fluid-f8de,
  .stone-97bf,
  .light-8fcb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .picture_cool_ce8d,
  .current-0c39,
  .logo-a83b,
  .old_15e1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slow-e912,
  .container-4bc7 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .chip_new_9360,
  .blue_9691,
  .box-easy-7434,
  .black_dfae {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .card_5358,
  .banner-b56a,
  .sidebar_a0f6,
  .outer-8e3d,
  .pink-95cb,
  .narrow-eff1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .active-fixed-141e,
  .nav_319b,
  .stone-97bf {
    max-width: none !important;
  }
  
  .aside-c5d4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .picture_cool_ce8d {
    font-size: 1.5rem !important;
  }
  
  .current-0c39 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .nav-glass-d550,
  .table-tiny-77f5 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .logo-a83b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb_08ba {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pagination_red_13c7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .active-fixed-141e,
  .stone-97bf {
    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: 23fe */
.widget-item-m2 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
