
/* ==========================================================================
   MOBILE RESPONSIVE OPTIMIZATIONS (Wave 15 - 2026-05-21)
   ========================================================================== */

/* Universal: prevent horizontal overflow */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, iframe { max-width: 100%; }

/* Tables: scrollable wrapper behavior on mobile */
@media (max-width: 1024px) {
  .lc-single__article,
  .lc-page-hub .lc-single__article {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden;
  }
  .lc-single__content,
  .entry-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .lc-single__content table,
  .entry-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* Ticker container: never let scroll track expand body */
.lc-ticker { overflow: hidden !important; max-width: 100vw; }
.lc-ticker__track { min-width: 0; }

/* Header: hide "Comparer" CTA button on mobile (hamburger menu takes over) */
@media (max-width: 1024px) {
  .lc-header__cta .lc-btn { display: none !important; }
  .lc-header__inner { gap: 16px; padding: 0 16px; }
  .lc-header__logo svg { height: 28px; }
  .lc-mobile-toggle {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
  }
  .lc-mobile-toggle:hover { background: rgba(255,255,255,0.12); }
}

/* Mobile menu items full-width tap target */
@media (max-width: 1024px) {
  .lc-header__nav.is-open { gap: 0 !important; padding: 12px 16px !important; }
  .lc-header__nav.is-open li { width: 100%; list-style: none; }
  .lc-header__nav.is-open a {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .lc-header__nav.is-open a::after { display: none; }
}

/* Topbar: hide secondary links on mobile */
@media (max-width: 640px) {
  .lc-topbar { height: 30px; font-size: 11px; }
  .lc-topbar__meta { gap: 8px; }
  .lc-topbar__meta a { display: none; }
  .lc-topbar__meta .lc-topbar__badge { display: inline-flex; }
}

/* Ticker: smaller on mobile */
@media (max-width: 640px) {
  .lc-ticker { height: 36px; font-size: 12px; }
  .lc-ticker__label { padding: 0 10px; font-size: 11px; }
}

/* Hero: tighten typography + spacing */
@media (max-width: 782px) {
  .lc-hero { padding: 48px 0 56px; }
  .lc-hero__inner { padding: 0 16px; }
  .lc-hero__title { font-size: clamp(28px, 8vw, 40px); }
  .lc-hero__lead { font-size: 15px; line-height: 1.55; }
  .lc-hero__cta { gap: 10px; }
  .lc-hero__cta .lc-btn { padding: 12px 18px; font-size: 14px; }
  .lc-hero__stats { gap: 8px; }
  .lc-hero__stat { min-width: 0; flex: 1 1 calc(50% - 4px); padding: 12px 14px; }
  .lc-hero__stat-value { font-size: 22px; }
  .lc-hero__stat-label { font-size: 10px; }
  .lc-hero__visual--video { max-width: 100% !important; margin: 24px 0 !important; }
}

/* Hub pages: tighter padding on mobile */
@media (max-width: 782px) {
  .lc-page-hub .lc-single__layout { padding: 24px 16px 0; }
  .lc-page-hub .lc-single__article > h1 { font-size: 26px; line-height: 1.2; }
  .lc-single__article h1 { font-size: 26px !important; }
  .lc-single__meta { font-size: 13px; gap: 8px; }
}

/* Tables: horizontal scroll on small screens */
@media (max-width: 782px) {
  .lc-single__content table,
  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
    border-radius: 8px;
  }
  .lc-single__content table th,
  .lc-single__content table td,
  .entry-content table th,
  .entry-content table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Cards in hub pages: full-width on mobile */
@media (max-width: 640px) {
  .lc-single__content .row,
  .lc-single__content .columns,
  .entry-content .row {
    display: block !important;
  }
  .lc-single__content .col,
  .lc-single__content [class*="col-"],
  .entry-content .col,
  .entry-content [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 16px;
  }
  .lc-single__content .icon-box,
  .lc-single__content .col-inner {
    padding: 16px !important;
  }
}

/* Section paddings reduced on mobile */
@media (max-width: 640px) {
  .lc-section, .lc-articles, .lc-markets, .lc-trust, .lc-comparator, .lc-cta-strip {
    padding: 48px 0 !important;
  }
  .lc-container { padding-left: 16px; padding-right: 16px; }
  .lc-section__header h2, .lc-articles__header h2 {
    font-size: 26px;
    line-height: 1.2;
  }
}

/* Cards: full-width, neat spacing on mobile */
@media (max-width: 640px) {
  .lc-articles__grid, .lc-markets__grid, .lc-trust__grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .lc-card { width: 100%; }
  .lc-card__media { aspect-ratio: 16/9; }
}

/* Footer: stack columns, smaller text */
@media (max-width: 640px) {
  .lc-footer__grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .lc-footer { padding: 40px 0 24px; }
  .lc-footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 12px;
  }
}

/* RunwayML / chat widgets: ensure they don't cover content */
@media (max-width: 640px) {
  iframe[id*="runwayml"],
  div[id*="runwayml"],
  div[class*="runwayml"] {
    bottom: 12px !important;
    right: 12px !important;
    z-index: 999 !important;
  }
}

/* Cookie button: keep small + opposite corner of widget */
@media (max-width: 640px) {
  .cookieadmin_re_consent {
    width: 38px !important;
    height: 38px !important;
    bottom: 12px !important;
    left: 12px !important;
  }
}

/* Single article: tighter on mobile */
@media (max-width: 640px) {
  .lc-single__hero { aspect-ratio: 16 / 10; margin-bottom: 24px; }
  .lc-single__layout { padding: 0 16px; gap: 24px; }
  .lc-single__content { font-size: 16px; }
  .lc-single__content h2 { font-size: 22px; margin-top: 32px; }
  .lc-single__content h3 { font-size: 18px; margin-top: 24px; }
  .lc-single__content img { margin: 16px 0; }
}

/* TOC: collapsed on mobile (already display:none via .lc-page-hub but for articles too) */
@media (max-width: 1024px) {
  .lc-toc { display: none !important; }
}

/* Comparer page: bigger tap targets for table */
@media (max-width: 640px) {
  .wptb-preview-table { font-size: 12px !important; }
  .wptb-preview-table th, .wptb-preview-table td { padding: 8px 6px !important; }
}

/* Buttons: ensure tap-friendly size */
@media (max-width: 640px) {
  .lc-btn { min-height: 44px; }
}
