/* ============================================
   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 (.list-warm-a07d) is a descendant of
   .iron_51fd (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.photo_dirty_93ec {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".video-rough-d54f" 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.link_9c6e so it can't cause
   horizontal overflow anyway. */
.selected-acb3,
.hero_1d57,
.old_6a9c,
.next_30b2,
.backdrop-195e,
.icon_hard_8748,
.black-5166,
.highlight-stale-ff1b,
.frame_in_4263,
.overlay-pro-fc9a,
.slider-71a9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .medium_6804 {
    padding: 8px 0;
  }
  
  .cold_ed50 img {
    height: 28px;
    width: auto;
  }
  
  .silver-7ca2 {
    display: none !important;
  }
  
  .in-6882 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .in-6882 svg {
    width: 14px;
    height: 14px;
  }
  
  .panel_903b {
    padding: 6px;
  }
  
  .purple-3612 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .old_6a9c,
  .hero_1d57,
  .next_30b2,
  .backdrop-195e,
  .outline_7f3d,
  .filter_5b9e,
  .row_large_40c6,
  .preview-618d,
  .tag_3ae4,
  .copper_2e69,
  .search_wide_661a,
  .heading_7d80 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .liquid-a7e4,
  .heading_short_4fcd {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .slow-2c31,
  .border-slow-e965,
  .panel-34db,
  .notice_basic_c2cb,
  .large_e091,
  .tall-ede2,
  .image_old_ad4a {
    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 */
  .first-19a2,
  .thumbnail-2485,
  .middle_4c19,
  .smooth_efa5,
  .wrapper_simple_a06e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .icon-b39d,
  .lower_9d88,
  .fresh_0c84,
  .summary-5ff5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .description-pro-d838,
  .pressed_d13e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .layout-fixed-0da1,
  .chip_3c50,
  .slow_9e83,
  .description_566a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .purple_46be,
  .aside_c04f,
  .stale_33c7,
  .south-9c39,
  .red-8c6b,
  .selected-890e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .first-19a2,
  .thumbnail-2485,
  .smooth_efa5 {
    max-width: none !important;
  }
  
  .video-rough-d54f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .icon-b39d {
    font-size: 1.5rem !important;
  }
  
  .lower_9d88 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .thick_41b7,
  .message_f010 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .fresh_0c84 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .search-silver-2ba4 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gradient-yellow-58d0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .first-19a2,
  .smooth_efa5 {
    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: dc8f */
.shadow-element-e7 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
