/* === ESTILOS PARA PÁGINA DE REGISTRO === */
/* Layout base para evitar scroll y fijar footer abajo */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Permite desplazamiento sin mostrar la barra de scroll */
html, body {
  overflow-y: auto;
  -ms-overflow-style: none; /* IE y Edge */
  scrollbar-width: none;    /* Firefox */
}
body::-webkit-scrollbar {
  display: none;             /* Chrome, Safari */
}

/* === REGISTRO === */
.registro-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(to bottom, #f9f9f9, #e6e6f5);
  padding: 2rem;
}

.registro-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 500px;
}

.registro-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1e1e2f;
  font-size: 1.8rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #1e1e2f;
  font-size: 0.95rem;
}

input, select {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  outline: none;
  transition: border 0.3s;
  box-sizing: border-box;
}

input:focus, select:focus {
  border-color: #5a67d8;
}

.btn-registro {
  width: 100%;
  background: #5a67d8;
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-registro:hover {
  background: #434190;
}

.login-link {
  text-align: center;
  margin-top: 1.5rem;
}

.login-link a {
  color: #5a67d8;
  text-decoration: none;
  font-weight: 600;
}

.logo-header h1 {
  text-align: center;
  color: #5a67d8;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}


.registro-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem;
  gap: 1rem;
  max-width: 1200px;
  margin: auto;
  flex: 1; /* ocupa el espacio disponible entre header y footer */
}

.registro-imagen {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 750px;
  position: relative;
}

.registro-imagen img {
  max-height: 500px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  transform: translateX(-20px);
  position: relative;
  z-index: 2;
}

/* Logo superpuesto sobre la imagen principal */
.registro-imagen .hero-logo {
  position: absolute;
  top: -70px;
  left: 58%;
  transform: translateX(-50%);
  height: 320px;
  width: auto;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.registro-formulario {
  flex: 1;
  max-width: 550px;
  background-color: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.registro-formulario form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

/* Campos en 2 columnas por defecto */
.registro-formulario form label,
.registro-formulario form input,
.registro-formulario form select {
  grid-column: span 1;
}

/* Campos que ocupan ancho completo */
.registro-formulario form label[for="rol"],
.registro-formulario form select#rol,
.registro-formulario form button,
.registro-formulario form .login-link,
#mensajeRef,
#campoCodigoAfiliado,
#campoWhatsApp {
  grid-column: span 2;
}

/* Hidden input no afecta el grid */
.registro-formulario form input[type="hidden"] {
  display: none;
}

/* Hidden input no afecta el grid */
.registro-formulario form input[type="hidden"] {
  display: none;
}

/* Estilos específicos para campos condicionales */
#campoCodigoAfiliado,
#campoWhatsApp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  grid-column: span 2;
}

#campoCodigoAfiliado label,
#campoWhatsApp label {
  grid-column: span 2;
}

#campoCodigoAfiliado input,
#campoWhatsApp input {
  grid-column: span 2;
}

#campoWhatsApp small {
  grid-column: span 2;
  margin-top: -0.5rem;
}

/* Botón de registro */
.btn-registro {
  grid-column: span 2;
  margin-top: 0.5rem;
}

/* Mensaje de referencia */
#mensajeRef {
  grid-column: span 2;
}


.registro-formulario h2 {
  margin-bottom: 1rem;
  color: #5a67d8;
  font-size: 1.8rem;
  text-align: center;
}

.login-link {
  text-align: center;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .registro-section {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    gap: 1rem;
  }

  .registro-imagen img {
    max-height: 270px;
    transform: translateX(-10px);
  }

  .registro-imagen .hero-logo {
    height: 200px;
    top: -50px;
    left: 58%;
  }

  .registro-formulario {
    width: 100%;
    padding: 1rem;
  }
  
  .logo-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
  }
  
  /* En móvil volver a 1 columna */
  .registro-formulario form {
    grid-template-columns: 1fr;
  }
  
  .registro-formulario form label,
  .registro-formulario form input,
  .registro-formulario form select,
  .registro-formulario form button {
    grid-column: span 1;
  }
}
/* Campos condicionales específicos (ya tienen grid definido arriba) */
#campoCodigoAfiliado {
  margin-top: 0;
}

#campoCodigoAfiliado label,
#campoWhatsApp label {
  font-weight: bold;
}

/* === ALERTAS === */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.alert-success {
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}
/* === Footer consistente con Quiénes Somos === */
footer {
  background: #1e1e2f;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto; /* fija al fondo sin crear scroll cuando el contenido es corto */
}
