/* ============================================
   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 (.overlay_down_9c6a) is a descendant of
   .grid-easy-fdac (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.under-db36 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hover_middle_deb7" 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.menu_39c9 so it can't cause
   horizontal overflow anyway. */
.breadcrumb_ed34,
.south_69a4,
.search_b5f2,
.action_b9b7,
.chip_d788,
.logo_88db,
.banner-bright-5bc2,
.breadcrumb-left-cd7f,
.outer_7e81,
.focused_b75a,
.article_f402 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pressed_6503 {
    padding: 8px 0;
  }
  
  .basic-f256 img {
    height: 28px;
    width: auto;
  }
  
  .paragraph-stone-1f31 {
    display: none !important;
  }
  
  .button-3e67 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .button-3e67 svg {
    width: 14px;
    height: 14px;
  }
  
  .content-0ece {
    padding: 6px;
  }
  
  .wrapper_50b4 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .search_b5f2,
  .south_69a4,
  .action_b9b7,
  .chip_d788,
  .short-f4ca,
  .message_cbfd,
  .row-slow-8e54,
  .inner-99a1,
  .left_88f5,
  .focus-out-dc6f,
  .bronze-1066,
  .module-paper-f538 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .avatar-red-92af,
  .column-hard-bcfd {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_c8cc,
  .progress_in_fec7,
  .stone-4a86,
  .photo_e48e,
  .frame_up_e632,
  .active_d76e,
  .item_d90e {
    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 */
  .block-a1eb,
  .picture-new-cc07,
  .breadcrumb-lite-09c6,
  .huge_8883,
  .detail-dfd9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .module_prev_e0ab,
  .short-f6a1,
  .progress-6b39,
  .modal_4b27 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_d7ea,
  .static_81d0 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .video_e873,
  .hero_brown_7f17,
  .primary_fb56,
  .lower_60ee {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .notification_e6f0,
  .search_down_c9a4,
  .tertiary-ba45,
  .shadow-9ee2,
  .pink-d1aa,
  .modal-61d1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .block-a1eb,
  .picture-new-cc07,
  .huge_8883 {
    max-width: none !important;
  }
  
  .hover_middle_deb7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .module_prev_e0ab {
    font-size: 1.5rem !important;
  }
  
  .short-f6a1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .search_786a,
  .video-a11c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .progress-6b39 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shade_outer_8208 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .row_hot_4ef2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .block-a1eb,
  .huge_8883 {
    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: e0c6 */
.promo-block-h3 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.3;
}
