/* ============================================
   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 (.black-fbb5) is a descendant of
   .column-orange-b2b7 (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.video-short-8b03 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper_c3d4" 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.media_ba6f so it can't cause
   horizontal overflow anyway. */
.short-7d3e,
.action-f63e,
.picture_thick_4429,
.hot_9729,
.block-a796,
.badge_5e0a,
.down_61e8,
.breadcrumb-ed17,
.border_cold_53cf,
.sidebar-a0b6,
.section-brown-3cea {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid_inner_45cb {
    padding: 8px 0;
  }
  
  .solid_d176 img {
    height: 28px;
    width: auto;
  }
  
  .paragraph-6796 {
    display: none !important;
  }
  
  .cold_1afe {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cold_1afe svg {
    width: 14px;
    height: 14px;
  }
  
  .border-7465 {
    padding: 6px;
  }
  
  .focus-tiny-1a5a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .picture_thick_4429,
  .action-f63e,
  .hot_9729,
  .block-a796,
  .accordion-bottom-5eeb,
  .new-0ad3,
  .wrapper_static_2c8e,
  .bronze-63d9,
  .media-323f,
  .hero-5bf8,
  .element_c2e1,
  .info-huge-7b95 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pressed_9402,
  .static-709f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .easy-40a7,
  .block_d1a9,
  .disabled-d6ea,
  .dark-df98,
  .shade_focused_a4aa,
  .focus-copper-c5a4,
  .blue-b01d {
    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 */
  .large-f37b,
  .column-ac56,
  .gold-6999,
  .caption_right_c10b,
  .tiny_a4f5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .caption-aec3,
  .title-629d,
  .photo_action_dc57,
  .form_light_bb00 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .logo_7e7c,
  .paragraph-a707 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pro-8e63,
  .black_2ed4,
  .nav-c5c6,
  .media-6b7c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .surface_9c3c,
  .text-ff37,
  .top-000b,
  .alert_c564,
  .picture-lower-d1e6,
  .main_78b0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .large-f37b,
  .column-ac56,
  .caption_right_c10b {
    max-width: none !important;
  }
  
  .wrapper_c3d4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .caption-aec3 {
    font-size: 1.5rem !important;
  }
  
  .title-629d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .secondary-ee41,
  .filter-easy-de55 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo_action_dc57 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .grid_d416 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .inner_10ec {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .large-f37b,
  .caption_right_c10b {
    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: a0cf */
.ghost-box-p3 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.3;
}
