/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Laptop */
@media (max-width: 1180px) {
  .container { padding: 0 20px; }
  .hero-inner { gap: 32px; }
}

/* Tablet */
@media (max-width: 1000px) {
  .header-actions .btn { display: none; }
  .main-nav { position: fixed; top: var(--header-height, 73px); left: 0; right: 0; bottom: 0; background: #fff; padding: 24px; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 998; overflow-y: auto; visibility: hidden; }
  .main-nav.open { visibility: visible; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .main-nav a { display: block; padding: 14px 8px; font-size: 1.05rem; width: 100%; border-bottom: 1px solid var(--border); }
  .hamburger { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; margin: 0 auto; }

  .calc-body { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .timeline::before { display: none; }
}

/* Large mobile */
@media (max-width: 700px) {
  section { padding: 60px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .calc-tabs { flex-wrap: nowrap; }
  .field-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .about-points { gap: 14px; }

  /* Responsive tables: stack rows as cards instead of horizontal scroll */
  .table-wrap { overflow-x: visible; border: none; box-shadow: none; }
  table { min-width: 0; width: 100%; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    overflow: hidden; box-shadow: var(--shadow-sm); background: var(--card);
  }
  tbody tr:last-child { margin-bottom: 0; }
  td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    text-align: right; padding: 10px 14px; border: none; border-bottom: 1px solid var(--border);
  }
  td:last-child { border-bottom: none; }
  td::before {
    content: attr(data-label); text-align: left; font-family: var(--font-mono);
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--text-muted); font-weight: 600; flex-shrink: 0;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .header-inner { padding: 14px 16px; }
  .logo { font-size: 1.05rem; }
  .hero h1 { font-size: 2rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .calc-body { padding: 20px; }
  .calc-tab { padding: 14px 16px; font-size: 0.84rem; }
  .result-primary .value { font-size: 2.1rem; }
  .timeline { grid-template-columns: 1fr; }
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 32px 0; }
}
