@media (max-width: 1100px) {
  .hero-grid,
  .home-reviews-layout,
  .about-box {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .home-preview-shell {
    order: 2;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .footer-inner,
  .trust-band {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    text-align: center;
  }
}

@media (max-width: 760px) {
  .pipsy-hero__title--home {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .home-preview-body {
    grid-template-columns: 1fr;
  }

  .home-preview-sidebar {
    display: none;
  }

  .screen-top__meta {
    flex-wrap: wrap;
  }

  .stats,
  .metric-row,
  .bar-row,
  .insight-journal-grid,
  .insight-progress-grid,
  .insight-prop-grid,
  .insight-discipline-grid,
  .home-reviews-quotes,
  .cards {
    grid-template-columns: 1fr;
  }

  .home-trial-card__actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .home-trial-card__actions .btn,
  .contact-email {
    width: 100%;
    justify-content: center;
  }

  .pipsy-toast-host {
    width: calc(100vw - 1.5rem);
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1rem;
  }

  .home-preview-shell,
  .screen-carousel,
  .card,
  .trust-pillar,
  .about-main,
  .about-side,
  .home-review-quote,
  .home-reviews-hero,
  .home-trial-card,
  .contact-box {
    border-radius: 1.05rem;
  }

  .screen-carousel {
    padding: 0.9rem;
  }

  .screen-top__meta {
    align-items: flex-start;
  }

  .home-insight-badge {
    align-self: flex-start;
  }

  .screen-title {
    max-width: none;
    font-size: 1.6rem;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  .hero-actions .btn,
  .home-trial-card__actions .btn {
    min-height: 2.85rem;
  }

  .home-faq-list {
    gap: 0.6rem;
  }

  .home-faq-list details {
    padding: 0.85rem 0.95rem;
  }

  .home-faq-answer {
    padding-top: 0.45rem;
    margin-top: 0.45rem;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  .modal-content {
    padding: 1.2rem;
  }
}

/* Főoldal: home-ui.js állítja telefon + tablet (≤1024px) — sima görgetés */
html.home-page-static-mobile,
html.home-page-device-polish {
  scroll-behavior: auto !important;
}

/* ─── Főoldal: app-shell-lel azonos szélesség (main .container); csak finomítások ─── */
@media (max-width: 1024px) {
  html:has(body.home-page) {
    scrollbar-gutter: stable;
  }

  body.home-page {
    min-height: 100dvh;
  }

  /* Sticky fejléc + horgony: kiszámítható görgetési cél */
  body.home-page .home-main section[id] {
    scroll-margin-top: clamp(4.25rem, 10vw, 5.25rem);
  }

  /* Fő sáv: alsó safe area (összhang a bejelentkezett app oldalakkal) */
  body.home-page main.home-main {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  }
}
