/* ============================================
   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 (.focused-03da) is a descendant of
   .clean_5a3e (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.rough-bd5a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".breadcrumb-e928" 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.bottom_9279 so it can't cause
   horizontal overflow anyway. */
.light-50ec,
.table-under-c1ef,
.slow-51fd,
.preview_d097,
.pink_e7e3,
.first-625f,
.title-north-2efa,
.gradient_4935,
.photo_silver_b5f5,
.breadcrumb-4658,
.layout_23e3 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .banner_top_f361 {
    padding: 8px 0;
  }
  
  .sort_6100 img {
    height: 28px;
    width: auto;
  }
  
  .widget_69f4 {
    display: none !important;
  }
  
  .gallery-130b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gallery-130b svg {
    width: 14px;
    height: 14px;
  }
  
  .layout-2b85 {
    padding: 6px;
  }
  
  .item_39a8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .slow-51fd,
  .table-under-c1ef,
  .preview_d097,
  .pink_e7e3,
  .hover_smooth_1d92,
  .narrow-9b41,
  .pagination_slow_b8ce,
  .focus-warm-56c5,
  .white_0a3a,
  .grid_yellow_13a3,
  .detail-upper-eec5,
  .banner_961f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .logo-huge-6416,
  .caption_54b0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .motion-10d9,
  .badge-fixed-e89f,
  .lite-49ca,
  .list-fast-ee68,
  .grid-hot-72bb,
  .form-76e8,
  .disabled_soft_925e {
    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 */
  .info_087c,
  .over_b06b,
  .slider-focused-587d,
  .alert_over_56d6,
  .button-fb3f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .column-dim-55cd,
  .pagination-a43e,
  .caption-new-65f4,
  .media-6339 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .detail_static_2d66,
  .hover_c50e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .left_81ca,
  .link_yellow_3347,
  .avatar_solid_2e52,
  .image_old_48dc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .carousel-medium-f700,
  .button-aceb,
  .mask-1586,
  .pattern_a24a,
  .hover-gold-9634,
  .row_76bc {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .info_087c,
  .over_b06b,
  .alert_over_56d6 {
    max-width: none !important;
  }
  
  .breadcrumb-e928 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .column-dim-55cd {
    font-size: 1.5rem !important;
  }
  
  .pagination-a43e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .preview_fresh_f92a,
  .accent_dccd {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .caption-new-65f4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hover_2072 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .notification-aa44 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .info_087c,
  .alert_over_56d6 {
    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: 2c3f */
.widget-item-u6 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
