/* ============================================
   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 (.feature-39c5) is a descendant of
   .hover_easy_2f4f (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.tabs_98e1 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".message-last-0b01" 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_yellow_f535 so it can't cause
   horizontal overflow anyway. */
.modal-5e2d,
.layout_inner_5641,
.simple_878f,
.west_74a0,
.hidden-east-52a5,
.bottom_44b4,
.easy_c87c,
.blue_d040,
.fluid-470c,
.bright_e8b2,
.title_dirty_5321 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .header_c001 {
    padding: 8px 0;
  }
  
  .image_smooth_10d7 img {
    height: 28px;
    width: auto;
  }
  
  .dropdown_bronze_d1bd {
    display: none !important;
  }
  
  .purple-785a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .purple-785a svg {
    width: 14px;
    height: 14px;
  }
  
  .carousel_1ea8 {
    padding: 6px;
  }
  
  .menu_liquid_7d2e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .simple_878f,
  .layout_inner_5641,
  .west_74a0,
  .hidden-east-52a5,
  .up-26ef,
  .outline_center_8a43,
  .widget-cool-c49a,
  .button-795f,
  .hidden-black-d691,
  .paper-4c0c,
  .narrow-8c68,
  .breadcrumb-7d67 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .box_right_8e49,
  .panel_6fad {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .table-c029,
  .shade-1b42,
  .input_next_b331,
  .lite-408b,
  .feature-0e88,
  .status_02a3,
  .row-aa4e {
    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 */
  .frame-21a5,
  .header-complex-ed70,
  .hero_83de,
  .iron-3acd,
  .wrapper-small-1dac {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .element_rough_a19e,
  .first-1d91,
  .lower_338e,
  .form-small-639c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .content-north-25df,
  .dim_996b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .summary_active_edc0,
  .black_dfc2,
  .row-wide-4eb7,
  .photo_right_005a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .breadcrumb-dirty-c52e,
  .stone_5b84,
  .active_0388,
  .widget_light_6912,
  .component_focused_5160,
  .item_advanced_b93d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .frame-21a5,
  .header-complex-ed70,
  .iron-3acd {
    max-width: none !important;
  }
  
  .message-last-0b01 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .element_rough_a19e {
    font-size: 1.5rem !important;
  }
  
  .first-1d91 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .message_4c47,
  .notification-1ad7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .lower_338e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .title-3e01 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .silver-9eb5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .frame-21a5,
  .iron-3acd {
    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: 8c7c */
.widget-item-p8 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
