/* ============================================
   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 (.fresh-ba71) is a descendant of
   .caption-4f0a (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.badge-last-c9d4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".card_e060" 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.center-10d2 so it can't cause
   horizontal overflow anyway. */
.main_c5e4,
.frame_a94c,
.modal_top_8c91,
.gallery_585f,
.tabs-23f4,
.advanced_cecc,
.blue_326f,
.fresh_9f83,
.gradient_wood_2f9a,
.active_f327,
.selected_abfb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .image_stale_4bee {
    padding: 8px 0;
  }
  
  .focus-ddb0 img {
    height: 28px;
    width: auto;
  }
  
  .thumbnail_tall_0723 {
    display: none !important;
  }
  
  .east_79b4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .east_79b4 svg {
    width: 14px;
    height: 14px;
  }
  
  .search_d628 {
    padding: 6px;
  }
  
  .text-east-a374 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .modal_top_8c91,
  .frame_a94c,
  .gallery_585f,
  .tabs-23f4,
  .texture-4e1a,
  .brown-c65d,
  .thumbnail-solid-6266,
  .title-middle-c22e,
  .content-c48f,
  .tertiary-3d5e,
  .overlay-complex-3707,
  .backdrop_4ac1 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focused_882a,
  .thick-b8c2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .chip-slow-37c1,
  .disabled-hard-90eb,
  .tiny_d06d,
  .secondary-inner-acc9,
  .notice_6036,
  .hidden_9a9d,
  .hard_f1dd {
    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 */
  .overlay_6d5f,
  .menu-soft-4886,
  .thick-328a,
  .video_pro_9514,
  .link-73c8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .title-fresh-1b40,
  .breadcrumb-under-e2d7,
  .dropdown_0b22,
  .outline-7b77 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .menu-df3c,
  .hovered-de9b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .input_fdac,
  .filter_brown_1740,
  .first-fb17,
  .under_cb3d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .carousel-orange-639f,
  .panel-ce62,
  .simple-a035,
  .avatar-dim-5345,
  .steel-88d6,
  .bright-bb47 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .overlay_6d5f,
  .menu-soft-4886,
  .video_pro_9514 {
    max-width: none !important;
  }
  
  .card_e060 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .title-fresh-1b40 {
    font-size: 1.5rem !important;
  }
  
  .breadcrumb-under-e2d7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .image_22f2,
  .element-lite-900c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dropdown_0b22 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tag_d772 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .filter-bronze-d801 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .overlay_6d5f,
  .video_pro_9514 {
    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: c0f6 */
.widget-item-r1 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.0;
}
