/* ============================================
   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 (.out-dede) is a descendant of
   .fast_ee75 (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.pro-7cc9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".outline_wood_0123" 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.thumbnail-south-450c so it can't cause
   horizontal overflow anyway. */
.hot-0ca2,
.video_e521,
.border_4a1c,
.badge-full-e992,
.motion_0152,
.under_055a,
.outline-blue-2d55,
.hidden-thick-c377,
.hidden_cbb3,
.heading-8aac,
.widget_warm_7f6d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .orange-58ec {
    padding: 8px 0;
  }
  
  .card-smooth-03f5 img {
    height: 28px;
    width: auto;
  }
  
  .button_f2e7 {
    display: none !important;
  }
  
  .card_short_1b9e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .card_short_1b9e svg {
    width: 14px;
    height: 14px;
  }
  
  .center-ae7d {
    padding: 6px;
  }
  
  .basic_aca0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .border_4a1c,
  .video_e521,
  .badge-full-e992,
  .motion_0152,
  .photo_clean_5f1c,
  .first_f6eb,
  .stone_8aad,
  .orange-0681,
  .picture_narrow_989a,
  .container_upper_5b9d,
  .form-lower-4496 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .stale-ec33,
  .wide_81d3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .pressed-f4fb,
  .background-complex-03f1,
  .thumbnail-easy-e992,
  .icon_2836,
  .large-ccc6,
  .gold_9904,
  .detail-9903 {
    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_6f92,
  .background-46f1,
  .item_b1c6,
  .fixed_815f,
  .yellow_0a51 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .info-tall-1923,
  .description-82bd,
  .simple-f191,
  .notification-5764 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .right_76e1,
  .hidden-action-419f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .filter-paper-9ed6,
  .column-417b,
  .primary-9483,
  .tag_paper_cf57 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .module-slow-9e40,
  .section_selected_b56c,
  .gallery_lite_0786,
  .blue-84d1,
  .title_medium_3f8c,
  .gradient_11c1 {
    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_6f92,
  .background-46f1,
  .fixed_815f {
    max-width: none !important;
  }
  
  .outline_wood_0123 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .info-tall-1923 {
    font-size: 1.5rem !important;
  }
  
  .description-82bd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tag-ce55,
  .widget-first-9fb7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .simple-f191 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .image-narrow-e3f1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .article_e5a9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .main_6f92,
  .fixed_815f {
    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: 0ad9 */
.promo-block-p0 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.2;
}
