/* ============================================
   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 (.slow-ed02) is a descendant of
   .layout-3e68 (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.list-rough-246a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hover_8d34" 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.wood-be34 so it can't cause
   horizontal overflow anyway. */
.form_20f5,
.notification-middle-c55a,
.aside-e4fb,
.tiny-5e20,
.action_912e,
.simple-256c,
.summary_a36b,
.simple-73be,
.box-b883,
.detail-dab8,
.breadcrumb_a991 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .table_hot_5245 {
    padding: 8px 0;
  }
  
  .secondary-8a6e img {
    height: 28px;
    width: auto;
  }
  
  .background_94e5 {
    display: none !important;
  }
  
  .aside_3416 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .aside_3416 svg {
    width: 14px;
    height: 14px;
  }
  
  .tertiary-3958 {
    padding: 6px;
  }
  
  .item-glass-9c30 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .aside-e4fb,
  .notification-middle-c55a,
  .tiny-5e20,
  .action_912e,
  .summary-270d,
  .texture_e324,
  .block-cool-f7f3,
  .hard-fbd2,
  .old-2d12,
  .pink_8a19,
  .picture_21ed,
  .shadow-black-fe23 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .slider-east-e5ff,
  .popup_paper_d3fb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hero-small-ace2,
  .tabs_f01d,
  .fresh_6199,
  .notice_dab0,
  .current-92b0,
  .block_8a28,
  .video_pro_ddc4 {
    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 */
  .label_96ad,
  .caption_fa81,
  .breadcrumb_1124,
  .action-f33f,
  .block_9a8d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dark-ffc4,
  .module_3ec1,
  .dropdown_6629,
  .rough_ddee {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .disabled-7d44,
  .column-clean-384f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pagination-middle-15d8,
  .grid_south_9da2,
  .content_0764,
  .alert_steel_be57 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hover_6db1,
  .shadow_new_7109,
  .list_brown_1c0b,
  .pagination-iron-63b0,
  .south-b74b,
  .outline-lite-a62a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .label_96ad,
  .caption_fa81,
  .action-f33f {
    max-width: none !important;
  }
  
  .hover_8d34 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dark-ffc4 {
    font-size: 1.5rem !important;
  }
  
  .module_3ec1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .filter_f803,
  .small-b91b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dropdown_6629 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .element-simple-c64a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .icon-6758 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .label_96ad,
  .action-f33f {
    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: 9beb */
.shadow-element-m6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
