/* ==========================================================================
   ENSB - ESCUELA NACIONAL SUPERIOR DE BALLET
   Portal de Prematrícula Web | Cursos de Extensión
   Estilo, Colores y Tipografía: ensb4 Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Brand Palette from Manual de Marca ENSB */
  --primary: #1f3c6b;          /* Azul Rey (Pantone 534 C) */
  --primary-dark: #0a1938;     /* Azul Oxford (Pantone 282 C) */
  --primary-light: #2b528f;
  --primary-subtle: rgba(31, 60, 107, 0.05);
  
  --accent: #97110d;           /* Rojo Atardecer / Amanecer (Pantone 7627 C) */
  --accent-hover: #b91c1c;
  --accent-light: rgba(151, 17, 13, 0.05);
  --granate: #5d0201;          /* Rojo Granate (Pantone 1815 C) */

  /* Neutrals & Outline Surfaces */
  --canvas: #f8fafc;           /* Slate-50 */
  --surface: #ffffff;
  --surface-alt: #f1f5f9;      /* Slate-100 */
  --border: #e2e8f0;           /* Slate-200 Clean 1px outline */
  --border-strong: #cbd5e1;    /* Slate-300 */
  --border-hover: #94a3b8;     /* Slate-400 */

  /* Typography Colors */
  --text-heading: #0f172a;     /* Slate-900 */
  --text-body: #334155;        /* Slate-700 */
  --text-muted: #64748b;       /* Slate-500 */
  --text-subtle: #94a3b8;      /* Slate-400 */

  /* Dimensions & Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-content-width: 1440px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--canvas);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.02);
}

.brand-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-titles h1 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.brand-titles p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-access-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}

.admin-access-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-subtle);
}

@media (max-width: 640px) {
  .brand-logo-img {
    height: 38px;
    max-width: 140px;
  }
  .brand-titles h1 {
    font-size: 0.82rem;
  }
  .brand-titles p {
    font-size: 0.68rem;
  }
  .admin-access-btn span {
    display: none;
  }
  .admin-access-btn {
    padding: 0.45rem;
    border-radius: 9999px;
  }
}

@media (max-width: 440px) {
  .brand-divider,
  .brand-titles {
    display: none;
  }
}

/* ==========================================================================
   HERO / PERIODO ACTIVO BANNER
   ========================================================================== */
.period-hero {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
}

.period-hero-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.period-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background-color: rgba(31, 60, 107, 0.08);
  color: var(--primary);
  border: 1px solid rgba(31, 60, 107, 0.2);
  width: fit-content;
}

.period-hero h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

.period-dates-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.period-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   MAIN WRAPPER & STEPPER
   ========================================================================== */
.main-wrapper {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 1.5rem auto 3rem auto;
  padding: 0 1.25rem;
  flex: 1;
}

.wizard-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

@media (min-width: 1200px) {
  .wizard-card {
    padding: 2.25rem;
  }
}

/* Stepper Bar (Estilo ensb4/forms-wizard.html) */
.ensb-stepper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 2rem;
}

@media (min-width: 1200px) {
  .ensb-stepper-grid {
    gap: 0.85rem;
  }
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
  position: relative;
  outline: none;
}

.step-item:hover {
  border-color: var(--border-hover);
  background-color: #f8fafc;
}

.step-item:focus-visible {
  box-shadow: 0 0 0 2px var(--primary);
}

.step-item .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.step-item .step-text {
  overflow: hidden;
  min-width: 0;
}

.step-item .step-num-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  display: block;
}

.step-item .step-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Tooltip oculto por defecto en pantallas grandes de escritorio */
.step-tooltip {
  display: none;
}

/* Step Activo */
.step-item.active {
  border: 2px solid var(--primary);
  background-color: var(--primary-subtle);
}

.step-item.active .step-circle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.step-item.active .step-num-label {
  color: var(--primary);
}

.step-item.active .step-name {
  color: var(--text-heading);
}

/* Step Completado */
.step-item.completed {
  border-color: var(--border-strong);
}

.step-item.completed .step-circle {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.step-item.completed .step-name {
  color: var(--text-heading);
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA: CELULARES Y TABLETS VERTICALES
   - Mostrar solo los números en las pestañas del wizard
   - Mostrar los títulos completos dentro de tooltips flotantes
   ========================================================================== */
@media (max-width: 991.98px), (max-width: 1024px) and (orientation: portrait) {
  .ensb-stepper-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
  }

  .step-item {
    justify-content: center;
    padding: 0.65rem 0.25rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* Ocultar títulos de las pestañas */
  .step-item .step-text {
    display: none !important;
  }

  /* Aumentar ligeramente el círculo numérico centrado */
  .step-item .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.86rem;
    margin: 0 auto;
  }

  /* Tooltip flotante */
  .step-tooltip {
    display: block;
    position: absolute;
    bottom: calc(100% + 9px);
    background-color: var(--primary-dark, #0a1938);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.38rem 0.65rem;
    border-radius: var(--radius-sm, 6px);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s ease;
    box-shadow: 0 4px 14px rgba(10, 25, 56, 0.28);
    z-index: 60;
    letter-spacing: 0.01em;
  }

  /* Flecha del tooltip */
  .step-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-dark, #0a1938) transparent transparent transparent;
  }

  /* Alineación para evitar corte en bordes de la pantalla */
  .step-item:nth-child(2) .step-tooltip,
  .step-item:nth-child(3) .step-tooltip {
    left: 50%;
    transform: translateX(-50%) translateY(4px);
  }
  .step-item:nth-child(2) .step-tooltip::after,
  .step-item:nth-child(3) .step-tooltip::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .step-item:first-child .step-tooltip {
    left: 0;
    transform: translateY(4px);
  }
  .step-item:first-child .step-tooltip::after {
    left: 18px;
  }

  .step-item:last-child .step-tooltip {
    right: 0;
    left: auto;
    transform: translateY(4px);
  }
  .step-item:last-child .step-tooltip::after {
    right: 18px;
    left: auto;
  }

  /* Efecto al pasar cursor (hover), foco o tap táctil (.show-tooltip) */
  .step-item:hover .step-tooltip,
  .step-item:focus .step-tooltip,
  .step-item:focus-visible .step-tooltip,
  .step-item.show-tooltip .step-tooltip {
    opacity: 1;
    visibility: visible;
  }

  .step-item:nth-child(2):hover .step-tooltip,
  .step-item:nth-child(2):focus .step-tooltip,
  .step-item:nth-child(2).show-tooltip .step-tooltip,
  .step-item:nth-child(3):hover .step-tooltip,
  .step-item:nth-child(3):focus .step-tooltip,
  .step-item:nth-child(3).show-tooltip .step-tooltip {
    transform: translateX(-50%) translateY(0);
  }

  .step-item:first-child:hover .step-tooltip,
  .step-item:first-child:focus .step-tooltip,
  .step-item:first-child.show-tooltip .step-tooltip,
  .step-item:last-child:hover .step-tooltip,
  .step-item:last-child:focus .step-tooltip,
  .step-item:last-child.show-tooltip .step-tooltip {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .wizard-card {
    padding: 1.25rem 1rem;
  }
}

/* ==========================================================================
   WIZARD STEP HEADINGS
   ========================================================================== */
.step-heading {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.step-heading h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.step-heading p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   ETAPA 1: NIVELES (GRID DE CARDS OUTLINE)
   ========================================================================== */
.levels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .levels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .levels-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .levels-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
  }
}

.level-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.level-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.level-card.selected {
  border: 2px solid var(--primary);
  background-color: var(--primary-subtle);
  box-shadow: 0 0 0 1px var(--primary);
}

.level-card-img-wrap {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background-color: var(--surface-alt);
  position: relative;
}

.level-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.level-card:hover .level-card-img-wrap img {
  transform: scale(1.04);
}

.level-badge-age {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background-color: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.level-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.level-card-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}

.level-card-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.level-card-footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.horarios-counter {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-select-indicator {
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background-color: var(--surface);
  transition: var(--transition);
}

.level-card.selected .btn-select-indicator {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   ETAPA 2: HORARIOS & DOCENTES
   ========================================================================== */
.selected-level-banner {
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.selected-level-banner .selected-level-label,
.selected-level-banner span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.selected-level-banner .selected-level-name,
.selected-level-banner strong,
.selected-level-banner h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  display: inline;
  margin: 0;
  margin-left: auto;
  text-align: right;
}

.horarios-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.horario-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: var(--transition);
  cursor: pointer;
}

@media (min-width: 768px) {
  .horario-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.horario-card:hover {
  border-color: var(--border-hover);
}

.horario-card.selected {
  border: 2px solid var(--primary);
  background-color: var(--primary-subtle);
}

.horario-card.agotado {
  border-left: 3px solid var(--accent);
}

.horario-main-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.docente-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.docente-avatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: var(--primary-subtle);
  border: 1px solid rgba(31, 60, 107, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.docente-avatar.has-photo {
  background-color: #f1f5f9;
  border-color: rgba(31, 60, 107, 0.25);
}

.docente-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.docente-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-heading);
}

.docente-spec {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dias-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dia-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-body);
}

.horario-vacantes-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

@media (min-width: 768px) {
  .horario-vacantes-box {
    align-items: flex-end;
    text-align: right;
  }
}

.vacantes-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.vacantes-badge.disponible {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
}

.vacantes-badge.agotado {
  background-color: rgba(151, 17, 13, 0.08);
  color: var(--accent);
  border-color: rgba(151, 17, 13, 0.25);
}

.vacantes-detalle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ETAPA 3: FORMULARIOS & VALIDACIONES
   ========================================================================== */
.form-section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background-color: var(--surface);
  margin-bottom: 1.25rem;
}

.form-section-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-heading);
}

.form-group label .req {
  color: var(--accent);
}

.form-control, .input-outline {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-heading);
  transition: var(--transition);
  outline: none;
}

.form-control:focus, .input-outline:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 60, 107, 0.1);
}

.form-control::placeholder, .input-outline::placeholder {
  color: var(--text-subtle);
}

/* ==========================================================================
   FEEDBACK DE EDAD EN TIEMPO REAL (ETAPA 3)
   ========================================================================== */
.age-feedback-box {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.45;
  border: 1px solid var(--border);
  background-color: var(--surface-alt);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.age-feedback-box.invalid {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.age-feedback-box.valid {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.age-feedback-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 1px;
}

.age-feedback-box.invalid .age-feedback-icon {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.age-feedback-box.valid .age-feedback-icon {
  background-color: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.age-feedback-content {
  flex: 1;
  min-width: 0;
  display: block;
}

.age-feedback-title {
  font-weight: 700;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.age-feedback-box.invalid .age-feedback-title {
  color: #991b1b;
}

.age-feedback-box.valid .age-feedback-title {
  color: #065f46;
}

.age-feedback-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #4b5563;
}

.age-feedback-box.invalid .age-feedback-desc {
  color: #7f1d1d;
}

.age-feedback-box.valid .age-feedback-desc {
  color: #064e3b;
}

.age-feedback-desc strong {
  font-weight: 600;
}

.age-feedback-desc em {
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 767px) {
  .age-feedback-label-spacer {
    display: none !important;
  }
}

/* ==========================================================================
   ETAPA 4: RESUMEN Y CONFIRMACIÓN
   ========================================================================== */
.confirmation-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .confirmation-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .confirmation-summary {
    gap: 1.5rem;
  }
  .summary-block {
    padding: 1.4rem;
  }
}

.summary-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  background-color: var(--surface);
}

.summary-block h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.summary-item .label {
  color: var(--text-muted);
  font-weight: 500;
}

.summary-item .value {
  color: var(--text-heading);
  font-weight: 600;
  text-align: right;
}

/* ==========================================================================
   BOTONERA WIZARD (INFERIOR) & TOP NAV OCULTO
   ========================================================================== */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.wizard-top-nav {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary, .btn-solid-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled), .btn-solid-primary:hover:not(:disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-accent:hover:not(:disabled) {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary, .btn-ghost {
  background-color: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled), .btn-ghost:hover:not(:disabled) {
  background-color: var(--surface-alt);
  color: var(--text-heading);
  border-color: var(--border-hover);
}

/* ==========================================================================
   PANTALLA DE ÉXITO & MODAL
   ========================================================================== */
.success-card {
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 2px solid #10b981;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1.25rem auto;
}

.success-code-box {
  background-color: var(--surface-alt);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-width: 340px;
  margin: 1.5rem auto;
}

.success-code-box .code-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.success-code-box .code-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

/* Consentimiento Legal Ley N° 29733 en Paso 4 */
.consentimiento-box {
  width: 100%;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.consentimiento-box:hover {
  border-color: var(--border-hover);
}

.consentimiento-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
}

.consentimiento-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 0.15rem;
  flex-shrink: 0;
  cursor: pointer;
}

.consentimiento-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-body);
  user-select: none;
}

/* CAPTCHA Matemático en Paso 4 */
.captcha-box {
  width: 100%;
  max-width: 520px;
  margin: 1.25rem auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  box-sizing: border-box;
}

.captcha-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 0;
  cursor: pointer;
}

.captcha-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.captcha-challenge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.captcha-question {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-heading);
  white-space: nowrap;
}

.captcha-input {
  width: 65px !important;
  min-width: 65px !important;
  max-width: 65px !important;
  flex: 0 0 65px !important;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  padding: 0.35rem 0.45rem;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--text-heading);
  box-shadow: none;
}

.captcha-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 60, 107, 0.15);
  outline: none;
}

.btn-refresh-captcha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.btn-refresh-captcha:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: var(--primary-subtle);
  transform: rotate(30deg);
}

.btn-refresh-captcha.spinning i,
.btn-refresh-captcha.spinning svg {
  animation: spinCaptcha 0.6s linear infinite;
}

@keyframes spinCaptcha {
  100% { transform: rotate(360deg); }
}

/* Modal Waitlist */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-overlay.show {
  display: flex !important;
}

.custom-modal {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-icon-warning {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.custom-modal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.custom-modal p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-direction: column;
}

@media (min-width: 480px) {
  .modal-actions {
    flex-direction: row;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Ocultar / Mostrar contenido de pasos */
.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
}
