/* ============================================================
   SONOMA CONSULTING — RESPONSIVE
   Breakpoints: 320 | 576 | 768 | 1024 | 1280 | 1920
   ============================================================ */

/* ── Extra Large (1920px+) ────────────────────────────────── */
@media (min-width: 1920px) {
  .hero h1 { font-size: 4.25rem; }
  .hero-subtitle { font-size: 1.25rem; }
}

/* ── Large (1280px+) ──────────────────────────────────────── */
@media (min-width: 1280px) {
  .proceso-timeline::before { display: block; }
}

/* ── Tablet & Below (1024px-) ─────────────────────────────── */
@media (max-width: 1024px) {
  :root { --space-section: 4rem; }

  .portal-layout { grid-template-columns: 220px 1fr; }
  .portal-sidebar { position: relative; height: auto; }

  .proceso-timeline::before { display: none; }
  .proceso-step,
  .proceso-step:nth-child(even) { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .proceso-step-card { width: 100%; }

  .hero { min-height: 90vh; }
  .hero-visual { display: none; }
}

/* ── Tablet (768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
  .stat3-bar { flex-direction: column; }
  :root {
    --space-section: 3rem;
    --fs-h1: 2rem;
    --fs-h2: 1.625rem;
    --fs-h3: 1.25rem;
  }

  /* Navbar */
  .navbar-sonoma { padding: 0.75rem 0; }
  .navbar-sonoma.scrolled { padding: 0.5rem 0; }

  .navbar-collapse {
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-modal);
    padding: 1rem 0;
    margin-top: 0.5rem;
  }

  .nav-link { color: var(--gray-800) !important; padding: 0.75rem 1.5rem !important; }
  .nav-link::after { left: 1.5rem; right: 1.5rem; }
  .navbar-cta { margin: 0.75rem 1.5rem; display: block; text-align: center; }

  /* Hero */
  .hero {
    min-height: 100vh;
    background: linear-gradient(150deg, rgba(0,102,204,0.95) 0%, rgba(0,30,80,0.92) 100%),
                url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=800&q=85&auto=format&fit=crop') center/cover no-repeat;
  }

  .hero-content { text-align: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-subtitle { margin: 0 auto var(--space-2xl); text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-trust-item { font-size: 0.75rem; }

  /* Sections */
  .section-wrapper { padding: 3rem 0; }

  /* Stat divider */
  .stat-divider { display: none; }

  /* Blog list card */
  .blog-list-card { flex-direction: column; }
  .blog-list-img { width: 100%; height: 200px; }

  /* Portal */
  .portal-layout { grid-template-columns: 1fr; }

  .portal-sidebar {
    height: auto;
    position: relative;
  }

  .portal-nav { display: flex; overflow-x: auto; padding: 0.5rem; gap: 0.25rem; }
  .portal-nav-item { flex-shrink: 0; border-left: none; border-bottom: 3px solid transparent; padding: 0.625rem 1rem; border-radius: var(--radius-md); }
  .portal-nav-item.active { border-bottom-color: var(--color-primary); border-left: none; }

  .ticket-row { grid-template-columns: 1fr auto; }
  .ticket-row .ticket-id,
  .ticket-row .ticket-fecha { display: none; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }

  .step-connector { width: 40px; }
}

/* ── Mobile (576px) ───────────────────────────────────────── */
@media (max-width: 576px) {
  :root { --fs-h1: 1.75rem; }

  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-sonoma { width: 100%; justify-content: center; }

  .hero-trust { gap: var(--space-md); }
  .hero-trust-item span:last-child { display: none; }

  .hero-card .d-flex { flex-direction: column; }
  .hero-divider { display: none; }

  .form-container { padding: var(--space-xl); }

  .wizard-progress { gap: 0; overflow-x: auto; }
  .step-connector { width: 24px; }

  .time-slots { grid-template-columns: repeat(3, 1fr); }

  .portal-content { padding: var(--space-md); }

  .caso-metrics { grid-template-columns: repeat(3, 1fr); }
  .caso-metric-number { font-size: 1.25rem; }

  .cta-trust { flex-direction: column; align-items: center; gap: var(--space-md); }

  .footer-legal { flex-wrap: wrap; justify-content: center; gap: var(--space-md); }

  /* "SAP Business One" no se separa (nbsp en los títulos): reducimos el tamaño
     del título del hero en móvil para que el nombre completo quepa en una sola
     línea sin provocar scroll horizontal. */
  .hero-mk-title,
  .hero-inner-mk-title { font-size: clamp(2rem, 9vw, 2.75rem); }
}

/* ── Extra Small (375px) ──────────────────────────────────── */
@media (max-width: 375px) {
  .hero h1 { font-size: 1.625rem; }
  .service-checkbox-card { padding: var(--space-md); }
  .wizard-progress { justify-content: flex-start; padding: 0 var(--space-md); }
  .step-label { display: none; }
  .calendar-day { font-size: 0.75rem; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .navbar-sonoma,
  .whatsapp-float,
  .scroll-progress,
  .footer { display: none !important; }

  body { font-size: 12pt; }
  h1, h2, h3 { page-break-after: avoid; }
  .hero { min-height: auto; background: none; color: black; padding: 1rem 0; }
  .hero h1, .hero-subtitle { color: black; }
}
