/* =========================================
   MODAL SER SOCIO
   ========================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.activo {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 36px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-cerrar {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}
.modal-cerrar:hover { color: #2D2DE4; }

.modal-titulo {
  font-family: 'Bugaki', sans-serif;
  font-size: 1.8rem;
  color: #2D2DE4;
  margin-bottom: 6px;
  text-align: center;
}

.modal-subtitulo {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #94A3B8;
  text-align: center;
  margin-bottom: 32px;
}

/* --- Planes --- */
.planes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.plan-card {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.plan-card:hover {
  border-color: #2D2DE4;
  transform: translateY(-3px);
}

.plan-card.destacado {
  border-color: #FFB70D;
  background: #fffbf0;
}

.plan-icono {
  font-size: 1.8rem;
}

.plan-nombre {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2D2DE4;
  line-height: 1.3;
}

.plan-precio {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2D2DE4;
  margin: 0;
}

.plan-precio span {
  font-size: 0.75rem;
  font-weight: 400;
  color: #94A3B8;
}

.btn-suscribir {
  background: #FFB70D;
  color: #2D2DE4;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
  margin-top: auto;
}
.btn-suscribir:hover { opacity: 0.85; }

/* --- Formulario --- */
.form-wrapper {
  max-width: 420px;
  margin: 0 auto;
}

.btn-volver {
  background: none;
  border: none;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.btn-volver:hover { color: #2D2DE4; }

.form-titulo {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2D2DE4;
  margin-bottom: 4px;
}

.form-precio-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #FFB70D;
  margin-bottom: 24px;
}

.form-grupo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-grupo label {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2D2DE4;
}

.form-grupo input {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}
.form-grupo input:focus { border-color: #2D2DE4; }
.form-grupo input.invalido { border-color: #ef4444; }

.form-error {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #ef4444;
  min-height: 16px;
}

.btn-confirmar {
  width: 100%;
  background: #2D2DE4;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.btn-confirmar:hover { opacity: 0.88; }
.btn-confirmar:disabled { opacity: 0.5; cursor: not-allowed; }

.form-nota {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #94A3B8;
  margin-top: 12px;
}

.form-exito p {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #16a34a;
  background: #f0fdf4;
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
}

.form-error-global p {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

/* =========================================
   RESPONSIVE MODAL
   ========================================= */
@media (max-width: 768px) {
  .modal-box {
    padding: 32px 20px 28px;
  }

  .planes-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .plan-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .planes-grid {
    grid-template-columns: 1fr;
  }

  .plan-card:last-child {
    grid-column: auto;
  }
}
