/* Global mobile overflow fix */
html, body { max-width: 100vw; overflow-x: hidden; }
img, iframe, video, embed, object { max-width: 100% !important; height: auto; }

@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  .content, .main, .wrapper, .page, .container { overflow-x: hidden; max-width: 100vw; }

  /* Fix banners and iframes */
  iframe { max-width: 100% !important; }

  /* YezzClips and other banner iframes */
  .yezzclips-banner iframe,
  .headline iframe,
  .infeed-ad iframe { width: 100% !important; max-width: 100% !important; }
}

/* Tablet: hide sidebar (categories already in seo-popular-cats section) */
@media (max-width: 900px) {
  .sidebar { display: none !important; }
}

/* Header mobile overflow fix */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 8px 12px !important;
    gap: 6px !important;
  }
  .logo {
    font-size: 18px !important;
    text-align: center;
  }
  .header-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap !important;
    gap: 6px !important;
    padding: 4px 0 !important;
    justify-content: flex-start !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav .nav-link {
    font-size: 11px !important;
    padding: 4px 6px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .header-nav .premium-btn {
    font-size: 11px !important;
    padding: 4px 8px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .search-box {
    width: 100% !important;
    max-width: 100% !important;
  }
  .search-box input {
    width: calc(100% - 80px) !important;
  }
}
