/* ============================================================================
   NegliMed — Responsive Design
   ============================================================================ */

/* Breakpoints clave: 900px (sidebar/grid 2col → 1col), 700px (hero collapse) */

/* ============================================================================
   TABLET & MOBILE (max-width: 900px)
   ============================================================================ */

@media (max-width: 900px) {
  /* Header */
  .header-container {
    grid-template-columns: auto 1fr;
    gap: var(--s-4);
  }

  .nav-main {
    display: none;
  }

  .cta-header {
    text-align: right;
  }

  /* Hero */
  .hero {
    padding: var(--s-6);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-content .text-display-l {
    font-size: 48px;
    line-height: 1.08;
  }

  .hero-visual {
    aspect-ratio: auto;
    height: 300px;
  }

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

  /* Buttons */
  .hero-cta {
    gap: var(--s-3);
  }

  /* Form */
  .form-multipaso {
    padding: var(--s-6);
  }

  .form-title {
    font-size: 24px;
  }

  /* Cards */
  .card {
    padding: var(--s-5);
  }

  /* Typography */
  .text-display-m {
    font-size: 36px;
    line-height: 1.15;
  }

  .text-display-s {
    font-size: 28px;
    line-height: 1.2;
  }

  .text-body-l {
    font-size: 18px;
    line-height: 140%;
  }
}

/* ============================================================================
   MOBILE (max-width: 700px)
   ============================================================================ */

@media (max-width: 700px) {
  /* Spacing */
  body {
    font-size: 14px;
  }

  /* Header */
  .header {
    padding: var(--s-4);
  }

  .header-container {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .logo img {
    height: 32px;
  }

  .cta-header {
    text-align: left;
  }

  /* Hero */
  .hero {
    padding: var(--s-5);
    margin-bottom: var(--s-6);
  }

  .eyebrow {
    font-size: 11px;
    margin-bottom: var(--s-3);
  }

  .hero-content .text-display-l {
    font-size: 32px;
    line-height: 1.15;
    margin-bottom: var(--s-4);
  }

  .hero-content .text-body-l {
    font-size: 16px;
    line-height: 140%;
    margin-bottom: var(--s-4);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--s-3);
  }

  .hero-visual {
    height: 250px;
  }

  /* Container */
  .container {
    padding: 0 var(--s-4);
  }

  /* Services */
  .services {
    padding: var(--s-5) var(--s-4);
  }

  .services h2 {
    font-size: 32px;
    line-height: 1.15;
    margin-bottom: var(--s-6);
  }

  .services-grid {
    gap: var(--s-4);
  }

  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 7px 12px;
    font-size: 12px;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Inputs */
  .input,
  input[type="text"],
  input[type="email"],
  input[type="phone"],
  input[type="password"],
  textarea,
  select {
    padding: 10px 12px;
    font-size: 13px;
  }

  label {
    font-size: 11px;
  }

  .help-text {
    font-size: 10px;
  }

  /* Cards */
  .card {
    padding: var(--s-4);
  }

  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .card-service h3 {
    font-size: 20px;
  }

  .card-person-info {
    padding: 12px 14px;
  }

  .card-person-name {
    font-size: 16px;
  }

  .card-person-role {
    font-size: 11px;
  }

  /* Typography */
  .text-display-m {
    font-size: 28px;
    line-height: 1.2;
  }

  .text-display-s {
    font-size: 24px;
    line-height: 1.25;
  }

  .text-body-l {
    font-size: 16px;
    line-height: 140%;
  }

  /* Form */
  .form-multipaso {
    padding: var(--s-4);
    border-radius: var(--r-md);
  }

  .form-title {
    font-size: 20px;
  }

  .form-subtitle {
    font-size: 12px;
  }

  .form-actions {
    flex-direction: column;
    gap: var(--s-3);
  }

  /* Footer */
  .footer {
    padding: var(--s-5) var(--s-4) var(--s-4);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }

  .footer-logo {
    height: 32px;
  }

  .footer h4 {
    font-size: 13px;
  }

  .footer-bottom {
    padding-top: var(--s-4);
  }

  /* Timeline */
  .timeline {
    padding-left: var(--s-5);
  }

  .timeline-item::before {
    left: -12px;
  }

  /* FAQ */
  .faq-summary {
    font-size: 15px;
  }

  .faq-answer {
    font-size: 13px;
  }
}

/* ============================================================================
   SMALL MOBILE (max-width: 480px)
   ============================================================================ */

@media (max-width: 480px) {
  /* Hero */
  .hero-content .text-display-l {
    font-size: 28px;
    line-height: 1.2;
  }

  /* Typography for extra small screens */
  .text-display-m {
    font-size: 24px;
    line-height: 1.2;
  }

  /* Buttons stack vertically */
  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* Cards in very small viewport */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Navigation removed on very small screens */
  .nav-main {
    display: none;
  }

  /* Reduce padding */
  .container {
    padding: 0 var(--s-3);
  }

  body {
    font-size: 13px;
  }
}

/* ============================================================================
   PRINT
   ============================================================================ */

@media print {
  body {
    background-color: var(--white);
    color: var(--n-900);
  }

  .header,
  .footer,
  .hero-cta {
    display: none;
  }

  a {
    text-decoration: underline;
  }

  .card {
    page-break-inside: avoid;
  }
}

/* ============================================================================
   PREFERS REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   DARK MODE (opcional, para futuro)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  /* Aquí iría la implementación de dark mode cuando sea requerida */
  /* Por ahora, usar la paleta clara como principal */
}
