/* ============================================
   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-copper-883f) is a descendant of
   .overlay_8e82 (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.orange-c29a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".sidebar_inner_c106" 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.mask-d2fb so it can't cause
   horizontal overflow anyway. */
.wrapper-a355,
.red-9ab9,
.link-gas-81b5,
.stale-f484,
.secondary_motion_1376,
.avatar-b146,
.paragraph_out_611f,
.module_up_e196,
.container_80c8,
.article_brown_baa2,
.widget_solid_8e47 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fixed-657e {
    padding: 8px 0;
  }
  
  .soft-5535 img {
    height: 28px;
    width: auto;
  }
  
  .modal_pro_1931 {
    display: none !important;
  }
  
  .content_a418 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .content_a418 svg {
    width: 14px;
    height: 14px;
  }
  
  .current-9aed {
    padding: 6px;
  }
  
  .easy_cded {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .link-gas-81b5,
  .red-9ab9,
  .stale-f484,
  .secondary_motion_1376,
  .tabs-ac90,
  .heading-5eb9,
  .message-deb6,
  .active_east_2dd8,
  .border_cbe1,
  .right_8831,
  .green-a488,
  .icon_thick_f1fc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .warm_5725,
  .disabled_fluid_0859 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gold-2b5e,
  .light-2589,
  .accordion-middle-8435,
  .breadcrumb-complex-a037,
  .tabs_dbc3,
  .pro_8fda,
  .paragraph-easy-553f {
    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 */
  .left-be04,
  .heading_soft_b188,
  .soft-e88d,
  .form-active-2e05,
  .label_1132 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .layout-basic-26ce,
  .sidebar_basic_4016,
  .white-33e4,
  .tall_5fdc {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .column_top_68e3,
  .form_074b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .under_acc2,
  .alert-c84b,
  .panel-0137,
  .notification_orange_f326 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .container_59ac,
  .list_pro_572e,
  .pro-0db5,
  .glass-8e1d,
  .dark_6eda,
  .sort-west-a3f2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .left-be04,
  .heading_soft_b188,
  .form-active-2e05 {
    max-width: none !important;
  }
  
  .sidebar_inner_c106 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .layout-basic-26ce {
    font-size: 1.5rem !important;
  }
  
  .sidebar_basic_4016 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .row_in_2158,
  .hovered-a561 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .white-33e4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .wood-b1fb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .bright-c031 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .left-be04,
  .form-active-2e05 {
    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: 031c */
.promo-block-c4 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.1;
}
