/* ============================================
   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 (.brown_a1b3) is a descendant of
   .old-bd25 (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.bottom-c373 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".video-down-d23e" 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.hero_24aa so it can't cause
   horizontal overflow anyway. */
.focus_green_86e2,
.title_right_7d57,
.in_30a7,
.down_1dca,
.image_afd6,
.tag_basic_6500,
.slow_57ab,
.background-0598,
.image_654c,
.green_ce6e,
.caption_medium_be71 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .progress_1ad9 {
    padding: 8px 0;
  }
  
  .frame-5108 img {
    height: 28px;
    width: auto;
  }
  
  .soft_5412 {
    display: none !important;
  }
  
  .dropdown_1d86 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dropdown_1d86 svg {
    width: 14px;
    height: 14px;
  }
  
  .component-glass-b28e {
    padding: 6px;
  }
  
  .block-51f7 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .in_30a7,
  .title_right_7d57,
  .down_1dca,
  .image_afd6,
  .pattern_4049,
  .advanced_5a60,
  .form-1c77,
  .right-eb08,
  .image_4f0f,
  .picture-west-22fe,
  .accent_d98d,
  .hero_lite_4dc0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .gallery_short_0744,
  .button-ebf1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .wrapper_dim_b97f,
  .backdrop_inner_d70a,
  .tertiary_left_8b5e,
  .hovered-093f,
  .bright_1a99,
  .info_9ffb,
  .brown-14b7 {
    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 */
  .text-1ab8,
  .detail-d9e4,
  .title-tall-0d30,
  .photo-eee7,
  .component-fd17 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mini_f1f5,
  .pink_21df,
  .rough_79a5,
  .badge-wide-db33 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .prev-06df,
  .form_up_2fb3 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .picture_bf10,
  .background-66be,
  .gold_d425,
  .black_2827 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active_45d5,
  .gradient_middle_5f23,
  .slider_9203,
  .notice-5fd3,
  .detail_pink_85cc,
  .hovered_bd69 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .text-1ab8,
  .detail-d9e4,
  .photo-eee7 {
    max-width: none !important;
  }
  
  .video-down-d23e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mini_f1f5 {
    font-size: 1.5rem !important;
  }
  
  .pink_21df {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .button_gold_eda4,
  .cool_4f91 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .rough_79a5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .last_0efc {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .aside-selected-fc41 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-1ab8,
  .photo-eee7 {
    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: 1a39 */
.promo-block-l6 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
