/* ============================================
   vitae — Responsive Styles
   ============================================ */

/* ---- Tablet (max-width: 1024px) ---- */
@media (max-width: 1024px) {
  .builder-layout {
    flex-direction: column;
  }

  .builder-sidebar {
    width: 100%;
    min-width: unset;
    max-height: 45vh;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .builder-preview {
    flex: 1;
    min-height: 55vh;
  }

  .preview-canvas {
    width: 100% !important;
    min-height: auto !important;
  }
}

/* ---- Mobile Landscape / Small Tablet (max-width: 768px) ---- */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .steps-grid,
  .features-grid,
  .ats-info-grid,
  .reviews-preview-grid,
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .template-grid,
  .template-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .templates-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .templates-toolbar .search-input-wrapper {
    max-width: 100%;
  }

  .filter-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
  }

  .advanced-filters {
    flex-direction: column;
  }

  .builder-header-actions {
    gap: var(--space-1);
  }

  .builder-header-actions .btn {
    font-size: var(--text-xs);
    padding: 0.375rem 0.75rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card--featured {
    transform: none;
  }

  .faq-categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: var(--space-2);
  }

  .cta-title {
    font-size: var(--text-2xl);
  }

  .cta-subtitle {
    font-size: var(--text-base);
  }

  .preview-main {
    padding: var(--space-4);
  }

  .preview-page-container {
    width: 100%;
  }
}

/* ---- Mobile Portrait (max-width: 480px) ---- */
@media (max-width: 480px) {
  .template-grid,
  .template-modal-grid {
    grid-template-columns: 1fr;
  }

  .builder-header-inner {
    padding: 0 var(--space-2);
  }

  .builder-logo-text {
    display: none;
  }

  .sidebar-scroll {
    padding: var(--space-3);
  }

  .section-form {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .toast {
    min-width: unset;
  }
}

/* ---- Print styles ---- */
@media print {
  .site-header,
  .builder-header,
  .builder-sidebar,
  .preview-toolbar,
  .preview-header,
  .site-footer,
  .btn,
  .header-tagline-bar,
  .skip-link {
    display: none !important;
  }

  .builder-preview,
  .preview-main {
    padding: 0;
    background: white;
  }

  .preview-canvas,
  .preview-page-container {
    box-shadow: none;
    width: 100%;
    border-radius: 0;
    margin: 0;
  }

  body {
    background: white;
    color: black;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}