/* ===== Tablet Landscape (1024px) ===== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .hero-photo-frame {
    width: 160px;
    height: 160px;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .process-steps::before {
    display: none;
  }

  .comparison-cell {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* ===== Tablet Portrait (768px) ===== */

@media (max-width: 768px) {
  :root {
    --section-py: 80px;
    --container-px: 20px;
  }

  /* Navbar - show hamburger */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-actions .btn {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }

  .hero-photo-frame {
    width: 150px;
    height: 150px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    text-align: center;
  }

  /* Stats — stack vertically */
  .stats-grid {
    flex-direction: column;
    gap: 0;
  }

  .stat-item {
    padding: 14px 0;
  }

  .stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: auto;
    bottom: 0;
    inset-inline-end: 15%;
    inset-inline-start: 15%;
    width: auto;
    height: 1px;
    background: #e5e7eb;
    color: transparent;
    font-size: 0;
    transform: none;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: start;
  }

  .step-number {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin: 0;
  }

  /* Portfolio filters — horizontal scroll */
  .portfolio-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
    gap: 8px;
  }

  .filter-btn {
    flex-shrink: 0;
    min-height: 44px;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Video */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .video-play-btn svg {
    width: 48px;
    height: 48px;
  }

  /* Advantage — card layout on mobile */
  .comparison-table {
    border: none;
    border-radius: 0;
  }

  .comparison-row {
    grid-template-columns: 1fr;
    border-bottom: none;
    margin-bottom: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
  }

  .comparison-cell:not(:last-child) {
    border-inline-end: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .comparison-row.header {
    display: none;
  }

  .comparison-cell {
    padding: 12px 16px;
  }

  .comparison-cell::before {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 28px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* Touch targets — minimum 44px */
  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .hamburger {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }

  .lang-switch a {
    padding: 8px 14px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
}

/* ===== Phone (480px) ===== */

@media (max-width: 480px) {
  :root {
    --section-py: 64px;
    --container-px: 16px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .section-header {
    margin-bottom: 40px;
  }

  .card {
    padding: 24px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .faq-question {
    padding: 16px 20px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 0.9rem;
  }

  /* Hero — tighter on small phones */
  .hero {
    padding: 100px 0 60px;
  }

  .hero-photo-frame {
    width: 130px;
    height: 130px;
  }

  /* Stats — stack vertically */
  .stat-item {
    gap: 12px;
  }

  .stat-item h3 {
    font-size: 1.8rem;
    min-width: 70px;
  }

  /* Portfolio card body */
  .portfolio-body {
    padding: 16px;
  }

  .portfolio-body h3 {
    font-size: 1.05rem;
  }

  /* Contact form */
  .contact-form {
    padding: 20px;
  }

  /* Video card body */
  .video-card-body {
    padding: 16px;
  }
}

/* ===== Very Small Phone (360px) ===== */

@media (max-width: 360px) {
  :root {
    --container-px: 12px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }

  .hero-photo-frame {
    width: 110px;
    height: 110px;
  }
}

/* ===== Landscape Phone ===== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px 0 40px;
  }

  .hero-grid {
    gap: 20px;
  }

  .assistant-panel {
    max-height: 80vh;
  }

  .mobile-menu {
    overflow-y: auto;
    padding: 20px;
    justify-content: flex-start;
    gap: 20px;
  }
}
