/* ============================================
   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 (.picture_04d1) is a descendant of
   .advanced_28d9 (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.gradient-stone-a551 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".caption-de96" 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.narrow-45a3 so it can't cause
   horizontal overflow anyway. */
.block_97c6,
.disabled_d6fb,
.thick-df9f,
.row_fixed_1a09,
.frame_west_0928,
.old_04ee,
.row_motion_2fcc,
.hot_1601,
.accent-current-27e6,
.blue_1623,
.element-898d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .border_8dbf {
    padding: 8px 0;
  }
  
  .old-6bd9 img {
    height: 28px;
    width: auto;
  }
  
  .preview-7902 {
    display: none !important;
  }
  
  .info_wood_8b9d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .info_wood_8b9d svg {
    width: 14px;
    height: 14px;
  }
  
  .panel-plasma-3901 {
    padding: 6px;
  }
  
  .tag_solid_82cb {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .thick-df9f,
  .disabled_d6fb,
  .row_fixed_1a09,
  .frame_west_0928,
  .section-copper-1713,
  .card-c105,
  .button-bb50,
  .dark-e5bd,
  .wide_cc50,
  .paragraph-c0da,
  .hard-4951,
  .form-d453 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .chip-7815,
  .widget_hard_6245 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .paper-e77e,
  .progress-slow-c19c,
  .container_893b,
  .over-7f93,
  .fluid_1c27,
  .column-5c92,
  .accent_old_1bbb {
    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 */
  .hidden-down-f3ec,
  .short_7159,
  .border-mini-7599,
  .disabled-d610,
  .plasma_e606 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .detail-d8c5,
  .iron_cce8,
  .disabled_solid_6322,
  .banner-ed4f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .focused-402b,
  .feature_over_db95 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section-hovered-afd7,
  .wide_6209,
  .breadcrumb_solid_d0ab,
  .picture-c517 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .easy-d8ed,
  .feature-009c,
  .description_8c7f,
  .overlay_31ed,
  .red_ef70,
  .table-action-33cb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hidden-down-f3ec,
  .short_7159,
  .disabled-d610 {
    max-width: none !important;
  }
  
  .caption-de96 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .detail-d8c5 {
    font-size: 1.5rem !important;
  }
  
  .iron_cce8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .east_cfcd,
  .texture_e63d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .disabled_solid_6322 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .video-upper-9bb5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .caption-narrow-b583 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hidden-down-f3ec,
  .disabled-d610 {
    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: 6c1a */
.widget-item-h1 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.1;
}
