/* =============================================
   Estilos específicos para el formulario de afiliación
   ============================================= */

:root {
  --bg:          #0A0F1E;
  --bg-card:     rgba(26, 35, 64, 0.75);
  --green:       #6BBF3D;
  --green-dim:   rgba(107, 191, 61, 0.15);
  --green-border:rgba(107, 191, 61, 0.25);
  --green-glow:  rgba(107, 191, 61, 0.2);
  --white:       #FFFFFF;
  --slate:       #94A3B8;
  --border:      rgba(255,255,255,0.07);
  --nav-h:       72px;
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--white);
  line-height: 1.6;
  background-image: url('bg-a320neo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(10,15,30,0.85) 0%, rgba(10,15,30,0.95) 100%);
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0; }

/* Buttons & Glass */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #0A0F1E;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 0 20px var(--green-glow);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: #7fd44a;
  box-shadow: 0 0 32px rgba(107,191,61,0.45);
  transform: translateY(-2px);
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1.5px solid rgba(107,191,61,0.6);
  transition: var(--transition);
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--green);
  background: var(--green-dim);
  transform: translateY(-2px);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 15, 30, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 60px;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 50px; width: auto; }
.logo-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.2); margin: 0 16px; }
.logo-uso { height: 35px; }

.form-container {
  min-height: 100vh;
  padding: 120px 20px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.form-wrapper {
  width: 100%;
  max-width: 800px;
  padding: 40px 50px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}
.form-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--white);
}
.form-sub {
  color: var(--slate);
  font-size: 1rem;
}

/* Indicador de pasos */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
  gap: 16px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: var(--transition);
}
.step.active {
  opacity: 1;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--slate);
}
.step.active .step-num {
  background: var(--green);
  border-color: var(--green);
  color: #0A0F1E;
  box-shadow: 0 0 15px var(--green-glow);
}
.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.step.active .step-label {
  color: var(--green);
}
.step-line {
  height: 2px;
  width: 100px;
  background: var(--slate);
  opacity: 0.3;
  margin-top: -24px;
}

/* Formulario */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.span-2 {
  grid-column: span 2;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}
.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 3px var(--green-dim);
}

/* Checkboxes & RGPD */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--slate);
  border-radius: 4px;
  background: rgba(0,0,0,0.2);
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0A0F1E;
  font-size: 14px;
  font-weight: 900;
}
.checkbox-label span {
  flex: 1;
}

.rgpd-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.rgpd-box h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--white);
}
.rgpd-box p {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 8px;
  line-height: 1.5;
}
.rgpd-box p:last-of-type {
  margin-bottom: 0;
}

.mt-2 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }

.form-actions {
  margin-top: 32px;
  display: flex;
}
.form-actions.right {
  justify-content: flex-end;
}
.form-actions.split {
  justify-content: space-between;
}

#form-messages {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  display: none;
}
#form-messages.success {
  display: block;
  background: rgba(107, 191, 61, 0.2);
  color: var(--green);
  border: 1px solid var(--green);
}
#form-messages.error {
  display: block;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Responsivo */
@media (max-width: 768px) {
  .input-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .form-wrapper {
    padding: 30px 20px;
  }
  .step-line {
    width: 40px;
  }
}
