/* ============================================
   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 (.accent_f97a) is a descendant of
   .gradient-pink-8f87 (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.footer_yellow_e42e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tertiary_in_1298" 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.brown_6440 so it can't cause
   horizontal overflow anyway. */
.layout_2d15,
.accordion-white-ed36,
.component_ffee,
.notice-inner-e2d4,
.slider-5a87,
.title-old-a86f,
.caption-hovered-4cbb,
.steel-829e,
.disabled_first_4568,
.focused-7880,
.pink-0d9c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .caption_inner_3ffb {
    padding: 8px 0;
  }
  
  .highlight-liquid-4484 img {
    height: 28px;
    width: auto;
  }
  
  .thick-5799 {
    display: none !important;
  }
  
  .first_bf1c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .first_bf1c svg {
    width: 14px;
    height: 14px;
  }
  
  .label_down_c568 {
    padding: 6px;
  }
  
  .over-ddda {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .component_ffee,
  .accordion-white-ed36,
  .notice-inner-e2d4,
  .slider-5a87,
  .dropdown-2862,
  .media-smooth-eec8,
  .last_6e86,
  .hidden-blue-6ef6,
  .slider_iron_b1f1,
  .row_north_0cbc,
  .lower_df33,
  .progress-in-b398 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .iron-36f8,
  .gradient-upper-edec {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .column_356b,
  .text-purple-83e5,
  .summary_57f2,
  .popup_lower_2254,
  .badge_1c9a,
  .menu_action_a025,
  .primary_7152 {
    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 */
  .main-cold-3acc,
  .backdrop_black_3d4f,
  .media_pro_7f54,
  .message-small-6ff6,
  .complex-3647 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .link-selected-b669,
  .header_blue_960d,
  .content-basic-f116,
  .warm_0960 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tabs_narrow_0749,
  .shade-outer-c23e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section_paper_66e5,
  .glass-2df7,
  .slider-8a4d,
  .modal_a4c6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gallery_action_006b,
  .tabs_25e5,
  .component_stone_c036,
  .orange-0d16,
  .down-a57f,
  .down-3a38 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .main-cold-3acc,
  .backdrop_black_3d4f,
  .message-small-6ff6 {
    max-width: none !important;
  }
  
  .tertiary_in_1298 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .link-selected-b669 {
    font-size: 1.5rem !important;
  }
  
  .header_blue_960d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .widget-3b17,
  .form-pro-a0ab {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .content-basic-f116 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature_de56 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .yellow_f1a9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .main-cold-3acc,
  .message-small-6ff6 {
    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: 6349 */
.widget-item-o6 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
