/* ============================================================
   SERVICIO.CSS — Página de Servicio & Citas
   ============================================================ */

.svc-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}
.svc-type-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--yellow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.svc-type-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-type-icon {
  width: 48px; height: 48px;
  background: var(--yellow-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.svc-type-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.svc-type-card p  { font-size: 0.82rem; line-height: 1.55; }

@media (max-width: 900px) { .svc-types-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .svc-types-grid { grid-template-columns: 1fr; } }

/* ── Appointment Form Card ──────────────────────────────── */
.appt-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto 4rem;
}
.appt-card-header {
  background: var(--navy);
  padding: 2rem 2.5rem;
  border-bottom: 4px solid var(--yellow);
}
.appt-card-header h2 { color: var(--white); margin-bottom: 0.4rem; font-size: 1.5rem; }
.appt-card-header p  { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar-wrap { padding: 1.75rem 2.5rem 0; }
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.5rem;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
  transition: background var(--transition);
}
.progress-step.done:not(:last-child)::after { background: var(--yellow); }

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
  margin-bottom: 0.4rem;
}
.progress-step.active .step-circle {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.25);
}
.progress-step.done .step-circle { background: var(--green); color: var(--white); }
.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.progress-step.active .step-label { color: var(--navy); }
.progress-step.done  .step-label  { color: var(--green); }

/* ── Form Steps ─────────────────────────────────────────── */
.appt-form-body { padding: 2rem 2.5rem 2.5rem; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.form-actions .btn-primary { margin-left: auto; }

/* ── Success Card ───────────────────────────────────────── */
.appt-success { display: none; padding: 3rem 2.5rem; text-align: center; }
.appt-success.visible { display: block; }
.success-icon {
  width: 80px; height: 80px;
  background: #D1FAE5;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
}
.success-icon svg { color: var(--green); }
.appt-success h2 { color: var(--green); margin-bottom: 0.75rem; }
.appt-success p  { max-width: 480px; margin: 0 auto 0.5rem; }
.ref-number {
  display: inline-block;
  background: var(--yellow-light);
  border: 2px solid var(--yellow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  letter-spacing: 0.08em;
}
.success-phone { font-size: 1.4rem; font-weight: 800; font-family: var(--font-display); color: var(--navy); }
.success-phone a { color: var(--navy); }

@media (max-width: 600px) {
  .appt-card-header, .appt-form-body, .progress-bar-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ── Process Timeline ───────────────────────────────────── */
.process-section { background: var(--gray-50); }
.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5%);
  right: calc(12.5%);
  height: 2px;
  background: var(--yellow);
  z-index: 0;
}
.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}
.process-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}
.process-step h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.process-step p  { font-size: 0.8rem; color: var(--gray-600); }

@media (max-width: 640px) {
  .process-timeline { grid-template-columns: 1fr; gap: 2rem; }
  .process-timeline::before { display: none; }
}

/* ── Emergency CTA ──────────────────────────────────────── */
.emergency-box {
  background: linear-gradient(135deg, #7F1D1D, #991B1B);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 3rem;
}
.emergency-box h3 { color: var(--white); display: flex; align-items: center; gap: 0.75rem; }
.emergency-box .em-phone {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--yellow);
  text-decoration: none;
}
/* Step completado */
.progress-step.completed .step-circle {
  background: #16a34a;   /* verde */
  border-color: #16a34a;
  color: #fff;
}
.progress-step.completed .step-label {
  color: #16a34a;
}
/* Paso activo */
.progress-step.active .step-circle {
  background: var(--navy, #1e3a5f);
  color: #fff;
  border-color: var(--navy, #1e3a5f);
}

/* Paso completado — verde */
.progress-step.completed .step-circle {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.progress-step.completed .step-label {
  color: #16a34a;
}

.emergency-box .em-phone:hover { color: var(--white); }
