/* ============================================
   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 (.tag_d779) is a descendant of
   .tertiary_brown_aead (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.component_36df {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".banner-old-ac27" 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.grid_static_41f3 so it can't cause
   horizontal overflow anyway. */
.hover-center-6c52,
.media-wide-c2b2,
.action_1484,
.form-060f,
.action_51a9,
.footer_new_41d5,
.blue-acac,
.center-b9b5,
.secondary-blue-9fa0,
.thick_ee84,
.breadcrumb-a0a9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hot-8cfd {
    padding: 8px 0;
  }
  
  .large_de52 img {
    height: 28px;
    width: auto;
  }
  
  .simple-aff3 {
    display: none !important;
  }
  
  .message_hovered_0a40 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .message_hovered_0a40 svg {
    width: 14px;
    height: 14px;
  }
  
  .small-e119 {
    padding: 6px;
  }
  
  .media_hovered_9d55 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .action_1484,
  .media-wide-c2b2,
  .form-060f,
  .action_51a9,
  .blue-eab3,
  .accordion-59c5,
  .overlay-dirty-7ce5,
  .brown_cf32,
  .icon_old_2a28,
  .article_east_52b7,
  .row_c653 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .input_806c,
  .outer_5b0d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .highlight-fixed-5564,
  .footer-south-3964,
  .hidden_full_2dea,
  .popup-west-863b,
  .border_hovered_d809,
  .container-blue-be4f,
  .wood_1d2a {
    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 */
  .focus-stale-6dd6,
  .heading_172d,
  .down-0d20,
  .hover-inner-ef74,
  .summary-mini-416f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .header-848d,
  .slow-6cdf,
  .heading_action_573f,
  .header-f778 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gallery-under-3998,
  .media_light_21fb {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .breadcrumb-075b,
  .focused_c9b7,
  .search-pink-b3e5,
  .panel-49b0 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pagination_b35f,
  .bright_5c8a,
  .last_73c3,
  .slider-pressed-1298,
  .hero-bea6,
  .south-513f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .focus-stale-6dd6,
  .heading_172d,
  .hover-inner-ef74 {
    max-width: none !important;
  }
  
  .banner-old-ac27 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .header-848d {
    font-size: 1.5rem !important;
  }
  
  .slow-6cdf {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu_a898,
  .block-pink-c809 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .heading_action_573f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shade_9763 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .link-active-4ff5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .focus-stale-6dd6,
  .hover-inner-ef74 {
    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: 46aa */
.widget-item-v7 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.2;
}
