/* ============================================
   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 (.photo_paper_4dd8) is a descendant of
   .component-1999 (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.mask-clean-cf99 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".huge_6f08" 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.paper-7c19 so it can't cause
   horizontal overflow anyway. */
.tertiary_a389,
.fresh_e619,
.shadow_552a,
.dropdown-purple-2a0b,
.highlight_a412,
.detail-gas-0ffa,
.middle-288b,
.gallery_1525,
.texture-dark-e291,
.logo-6395,
.chip_1eba {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .picture_c8c3 {
    padding: 8px 0;
  }
  
  .huge-d899 img {
    height: 28px;
    width: auto;
  }
  
  .banner-clean-36b3 {
    display: none !important;
  }
  
  .active-iron-7709 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .active-iron-7709 svg {
    width: 14px;
    height: 14px;
  }
  
  .progress-eab0 {
    padding: 6px;
  }
  
  .disabled_orange_ae2d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .shadow_552a,
  .fresh_e619,
  .dropdown-purple-2a0b,
  .highlight_a412,
  .accordion-0ea2,
  .fresh_c61a,
  .thick-d661,
  .bright_d160,
  .advanced-a626,
  .shadow_7f43,
  .pro-0507,
  .slider_out_14ca {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .active-bottom-75c2,
  .copper_10df {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .short_4518,
  .heading_fast_3d5c,
  .tabs_1c04,
  .icon_e004,
  .lite-43f7,
  .secondary-04af,
  .tabs_new_a9d2 {
    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 */
  .breadcrumb-c4a7,
  .message-solid-ad2b,
  .backdrop-wood-171e,
  .lite-c196,
  .middle-9c64 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .north-b373,
  .section_bc27,
  .module_5d32,
  .secondary_1a6b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .container_white_fc2f,
  .east-49f8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .block_e3b1,
  .avatar_bright_a603,
  .huge-8bb6,
  .banner_pink_9136 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .center-aa9a,
  .image_fixed_e548,
  .focus-5d7b,
  .upper_21eb,
  .gradient-f1c7,
  .dropdown-fbd4 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .breadcrumb-c4a7,
  .message-solid-ad2b,
  .lite-c196 {
    max-width: none !important;
  }
  
  .huge_6f08 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .north-b373 {
    font-size: 1.5rem !important;
  }
  
  .section_bc27 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .layout_827f,
  .bronze_7b8e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .module_5d32 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .sidebar_right_3302 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .overlay_right_de99 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .breadcrumb-c4a7,
  .lite-c196 {
    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: 3b5c */
.promo-block-q2 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.3;
}
