/* =========================================================
   Beget Free — адаptивность
   Контрольные точки: 1024 / 900 / 768 / 640 / 480
   ========================================================= */

/* ---------- ≤ 1024px (планшет, ландшафт) ---------- */
@media (max-width: 1024px) {
  .nav-main { display: none; }
  .burger { display: flex; }

  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .related-articles-grid { grid-template-columns: repeat(2, 1fr); }

  .products-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .products-grid .product-card--featured { grid-row: auto; }
  .products-col { grid-template-rows: none; gap: 20px; }

  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-aside .aside-card { flex: 1 1 240px; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- ≤ 900px (планшет, портрет) ---------- */
@media (max-width: 900px) {
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-content .lead { max-width: none; }
  .hero-visual { max-width: 420px; margin-inline: auto; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .pricing-card--featured { transform: none; }
  .pricing-card--featured:hover { transform: translateY(-4px); }

  .steps-list { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

/* ---------- ≤ 768px (мобильный, крупный) ---------- */
@media (max-width: 768px) {
  .cards-grid-4 { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-articles-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand { grid-column: auto; }
  .footer-brand p, .footer-disclaimer { max-width: none; }

  .section-head--split { flex-direction: column; align-items: flex-start; gap: 16px; }

  .article-aside { flex-direction: column; }
  .article-aside .aside-card { flex: none; }

  /* Таблица сравнения → карточки */
  .compare-wrap { border: none; overflow-x: visible; }
  .compare-table { min-width: 0; }
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; width: 100%; }
  .compare-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
  }
  .compare-table tr:last-child { margin-bottom: 0; }
  .compare-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: right;
    padding: 13px 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .compare-table td:last-child { border-bottom: none; }
  .compare-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: left;
    flex-shrink: 0;
  }
  .compare-table td:first-child { background: var(--color-bg-alt); font-size: 1rem; }
  .compare-table td:first-child::before { content: ""; }

  .cta-band { padding: 40px 24px; border-radius: var(--radius-lg); }
}

/* ---------- ≤ 640px (мобильный) ---------- */
@media (max-width: 640px) {
  :root { --header-height: 64px; --container-padding: 20px; }

  .why-grid { grid-template-columns: 1fr; }

  .hero-points { flex-direction: column; align-items: flex-start; gap: 12px; }

  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }

  .panel-mock { max-width: 300px; padding: 18px; }
  .panel-float { padding: 9px 12px; font-size: .75rem; }
  .panel-float svg { width: 16px; height: 16px; }
  .panel-float--1 { top: -4%; left: 4%; }
  .panel-float--2 { bottom: -4%; right: 4%; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .filter-tab { flex-shrink: 0; }

  .article-head-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .article-cover-lg svg { width: 56px; height: 56px; }

  .products-col { gap: 16px; }
  .product-card, .product-card--featured { padding: 24px; }

  .pricing-card { padding: 28px 22px; }
}

/* ---------- ≤ 480px (мобильный, компактный) ---------- */
@media (max-width: 480px) {
  .btn { padding: 13px 22px; font-size: .9rem; }
  .btn-lg { padding: 15px 26px; font-size: .9375rem; }

  .section { padding-block: 44px; }
  .section--tight { padding-block: 32px; }

  .cta-band { padding: 32px 18px; }
  .stat-card { padding: 20px 16px; }
  .feature-card, .step-card { padding: 24px 20px; }

  .icon-showcase { padding: 32px; min-height: 220px; }
  .icon-showcase svg { width: 84px; height: 84px; }

  .pagination a, .pagination span { width: 38px; height: 38px; font-size: .875rem; }
}
