/* ============================================
   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 (.sidebar_mini_706e) is a descendant of
   .icon-center-eb73 (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.widget_2f4e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".advanced_1b50" 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.hover-light-362f so it can't cause
   horizontal overflow anyway. */
.thumbnail_simple_1abd,
.status_iron_7bc4,
.shadow-stale-3e49,
.solid-72cb,
.selected-47b6,
.form_red_8678,
.outline_warm_df64,
.badge_fluid_81e5,
.widget_dim_9ccb,
.info-527f,
.list_copper_e807 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .lite_b23f {
    padding: 8px 0;
  }
  
  .module-solid-ffef img {
    height: 28px;
    width: auto;
  }
  
  .brown_ecf9 {
    display: none !important;
  }
  
  .article-a164 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .article-a164 svg {
    width: 14px;
    height: 14px;
  }
  
  .hard-9994 {
    padding: 6px;
  }
  
  .photo-warm-7874 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .shadow-stale-3e49,
  .status_iron_7bc4,
  .solid-72cb,
  .selected-47b6,
  .block-a8d5,
  .description-short-a42b,
  .input-1c09,
  .info_c5ca,
  .main_outer_9b53,
  .rough-8e20,
  .progress_6589,
  .icon_82e7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .picture-0c9f,
  .slider_white_eabd {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .disabled-ad4f,
  .bright_3274,
  .row-advanced-e5e8,
  .light-a64d,
  .accordion_6d28,
  .paragraph-2e59,
  .primary-bronze-7e99 {
    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 */
  .easy_2e5b,
  .card-5278,
  .popup-fluid-7bbc,
  .media_5e12,
  .panel-huge-070c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wrapper-hard-427c,
  .clean_c4d5,
  .list-full-f0ba,
  .text-active-212a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .basic_42c3,
  .hidden_2fd8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .advanced-42a1,
  .focused_e5b3,
  .list-f1ab,
  .box_dirty_1f60 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active-8e65,
  .west_e91f,
  .box_c3c3,
  .modal-befa,
  .text_6ffd,
  .text_medium_4a00 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .easy_2e5b,
  .card-5278,
  .media_5e12 {
    max-width: none !important;
  }
  
  .advanced_1b50 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wrapper-hard-427c {
    font-size: 1.5rem !important;
  }
  
  .clean_c4d5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .upper_32e3,
  .down_4517 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .list-full-f0ba {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .box-26a8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .green-ebae {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .easy_2e5b,
  .media_5e12 {
    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: a79e */
.shadow-element-h2 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.2;
}
