/* ============================================
   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 (.gallery_bc56) is a descendant of
   .status-smooth-af0e (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.tooltip_simple_45f6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown_ec2a" 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.list-focused-86cc so it can't cause
   horizontal overflow anyway. */
.hard_70e8,
.huge-c765,
.border-580e,
.top-83f9,
.border-63b0,
.smooth-fb46,
.accordion_a2c5,
.photo-orange-a5df,
.alert-blue-01f6,
.filter-active-ac24,
.wood-bc38 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fresh-44d5 {
    padding: 8px 0;
  }
  
  .easy_10a9 img {
    height: 28px;
    width: auto;
  }
  
  .black-0420 {
    display: none !important;
  }
  
  .feature_ca99 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .feature_ca99 svg {
    width: 14px;
    height: 14px;
  }
  
  .current_fd5b {
    padding: 6px;
  }
  
  .photo_easy_b5e0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .border-580e,
  .huge-c765,
  .top-83f9,
  .border-63b0,
  .narrow_9b31,
  .tooltip_bottom_6ec2,
  .picture-top-0079,
  .background-1684,
  .dropdown_ca21,
  .picture-23f6,
  .accent_in_4fd4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .narrow-ffd0,
  .photo-tiny-19f9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .mask_ef6f,
  .border-pink-25f1,
  .element_wide_ee79,
  .thick_dbd1,
  .table-tall-f6d4,
  .mask_4788,
  .caption-easy-3e5a {
    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 */
  .sidebar_ae3c,
  .fresh-42d6,
  .green_8d32,
  .out-e00f,
  .gallery-iron-7679 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pattern-green-bcda,
  .green-d652,
  .left-bbb6,
  .badge-a4b9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .paper_8027,
  .layout-red-72ef {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focused-0576,
  .fresh-a9b9,
  .full-abad,
  .badge-large-7dd1 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active-50df,
  .notification-north-1334,
  .simple_f760,
  .steel-9112,
  .modal_fluid_4594,
  .outline-cool-325d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .sidebar_ae3c,
  .fresh-42d6,
  .out-e00f {
    max-width: none !important;
  }
  
  .dropdown_ec2a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pattern-green-bcda {
    font-size: 1.5rem !important;
  }
  
  .green-d652 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .logo_50f2,
  .green-04d5 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .left-bbb6 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .sidebar_90cb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .outline-8b8b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar_ae3c,
  .out-e00f {
    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: c69b */
.shadow-element-l8 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
