/* ============================================
   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 (.hard-bd26) is a descendant of
   .solid-1c4c (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.active-current-dcaf {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".popup-e011" 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.blue-9cee so it can't cause
   horizontal overflow anyway. */
.aside_pink_9f37,
.dropdown_73ce,
.easy-fe3a,
.white-f55e,
.thumbnail-5235,
.link_69fc,
.chip-simple-2d2e,
.notification-tall-ef4c,
.wide_23a5,
.notice_current_97b3,
.overlay-purple-2002 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hover-ec72 {
    padding: 8px 0;
  }
  
  .content-gold-3f7d img {
    height: 28px;
    width: auto;
  }
  
  .easy-c236 {
    display: none !important;
  }
  
  .module-9226 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .module-9226 svg {
    width: 14px;
    height: 14px;
  }
  
  .text_smooth_2771 {
    padding: 6px;
  }
  
  .advanced-b19b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .easy-fe3a,
  .dropdown_73ce,
  .white-f55e,
  .thumbnail-5235,
  .east_391a,
  .gas-3aff,
  .table_blue_1327,
  .list_solid_bab3,
  .widget-0145,
  .under_db9d,
  .box-fast-6117,
  .icon_d1c6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .disabled_43f0,
  .huge-6a18 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notice_e95b,
  .green-e29c,
  .heading-full-0a4f,
  .iron-9060,
  .texture_4aae,
  .shade-d6c4,
  .button-right-cc4e {
    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 */
  .pattern-narrow-9d09,
  .tabs-c0c3,
  .bottom-8859,
  .slow_8ff4,
  .banner_upper_d37f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mini-5936,
  .overlay_bottom_0973,
  .last-3283,
  .gradient_north_f175 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .form-89e0,
  .video_cc71 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .south-d721,
  .border_steel_b6f5,
  .breadcrumb_active_4e20,
  .caption_fast_c027 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .menu_368b,
  .tall_0be0,
  .south_6b04,
  .link_9663,
  .dark-aca7,
  .carousel-liquid-14fa {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pattern-narrow-9d09,
  .tabs-c0c3,
  .slow_8ff4 {
    max-width: none !important;
  }
  
  .popup-e011 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mini-5936 {
    font-size: 1.5rem !important;
  }
  
  .overlay_bottom_0973 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .feature-985f,
  .tooltip-simple-17e9 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .last-3283 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tooltip-out-abda {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .stone_d45f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pattern-narrow-9d09,
  .slow_8ff4 {
    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: b66e */
.widget-item-x8 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.3;
}
