/* ============================================
   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 (.notification_8575) is a descendant of
   .link_wood_6d9f (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.search-fresh-a271 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".lite_414a" 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.thick-a6cb so it can't cause
   horizontal overflow anyway. */
.pattern_in_1617,
.secondary_ae7d,
.tertiary_d971,
.section_middle_2acb,
.banner_large_d34c,
.pink_3629,
.over_94b9,
.text-4ad7,
.stone_765c,
.article_warm_5b5e,
.tag-f2fd {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .container_light_05f5 {
    padding: 8px 0;
  }
  
  .photo_116a img {
    height: 28px;
    width: auto;
  }
  
  .gallery_full_8a0c {
    display: none !important;
  }
  
  .motion_77aa {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .motion_77aa svg {
    width: 14px;
    height: 14px;
  }
  
  .picture-wood-5731 {
    padding: 6px;
  }
  
  .modal-paper-92d7 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tertiary_d971,
  .secondary_ae7d,
  .section_middle_2acb,
  .banner_large_d34c,
  .widget-gas-56bd,
  .clean-3e8f,
  .summary_rough_14b4,
  .shade_short_a9b9,
  .image-5dcb,
  .primary-e6e0,
  .over-32ae,
  .action-a4d8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .avatar_center_eea1,
  .active-static-39cf {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .module_2ae2,
  .banner_5d74,
  .soft-d194,
  .banner_eb25,
  .image-1e0c,
  .list_lower_7382,
  .form_in_dd03 {
    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 */
  .highlight-warm-e69e,
  .hover-3dbd,
  .notice_9f29,
  .breadcrumb-slow-6546,
  .north-d885 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dark_8c44,
  .shade-fa45,
  .item-8a3a,
  .info-3b56 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .module-glass-7b57,
  .top_1495 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .article_4af4,
  .description_fresh_adb7,
  .accordion_west_be0f,
  .huge_b294 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .form_40d3,
  .mini_402e,
  .down-369d,
  .fast-8e6f,
  .dirty-31d5,
  .lite-1174 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .highlight-warm-e69e,
  .hover-3dbd,
  .breadcrumb-slow-6546 {
    max-width: none !important;
  }
  
  .lite_414a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dark_8c44 {
    font-size: 1.5rem !important;
  }
  
  .shade-fa45 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .card-c27c,
  .media_1ca8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .item-8a3a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature-west-6a43 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .old-1ad7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .highlight-warm-e69e,
  .breadcrumb-slow-6546 {
    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: 08c9 */
.ghost-box-o9 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.2;
}
