/* ============================================
   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 (.outer-d867) is a descendant of
   .overlay_old_dac1 (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.text-hot-8a56 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wide_a528" 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.paragraph_c57c so it can't cause
   horizontal overflow anyway. */
.warm_35fe,
.carousel-gold-c27a,
.overlay_7ed3,
.label_stone_4f45,
.item_small_f36a,
.accent_hovered_b263,
.heading-complex-e668,
.media_e1cd,
.module-dynamic-6778,
.photo_easy_6d9c,
.breadcrumb-2dab {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .button-south-de97 {
    padding: 8px 0;
  }
  
  .full-11c0 img {
    height: 28px;
    width: auto;
  }
  
  .gradient_26b4 {
    display: none !important;
  }
  
  .old-5371 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .old-5371 svg {
    width: 14px;
    height: 14px;
  }
  
  .fixed-f25c {
    padding: 6px;
  }
  
  .primary-6378 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .overlay_7ed3,
  .carousel-gold-c27a,
  .label_stone_4f45,
  .item_small_f36a,
  .aside-pro-92e8,
  .shade-b037,
  .hot-59d9,
  .active_b220,
  .pro-b199,
  .sidebar_active_7397,
  .hovered-6575,
  .slider-a9da {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pro-b987,
  .thumbnail-last-8979 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .prev-1374,
  .basic-0b4a,
  .heading_e030,
  .in-c3ea,
  .layout_bright_13e3,
  .liquid_a1d3,
  .iron_6bfe {
    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 */
  .green-0617,
  .gallery-motion-2bc0,
  .fluid-a062,
  .table_rough_36ae,
  .fixed_10d6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .form_iron_6e38,
  .card-current-68bc,
  .dynamic_b387,
  .purple_1e26 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .down-8449,
  .next_3d82 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .huge-ae60,
  .row_thick_ee9f,
  .gas-4177,
  .frame-0391 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main-rough-f23f,
  .shade-41e7,
  .description-6c67,
  .badge-pressed-fc97,
  .full_115a,
  .content-warm-9d70 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .green-0617,
  .gallery-motion-2bc0,
  .table_rough_36ae {
    max-width: none !important;
  }
  
  .wide_a528 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .form_iron_6e38 {
    font-size: 1.5rem !important;
  }
  
  .card-current-68bc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outline-gold-0d6a,
  .aside-west-3e8a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dynamic_b387 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .element-tiny-ca03 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .frame-center-581c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .green-0617,
  .table_rough_36ae {
    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: 8920 */
.widget-item-v1 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
