/* Estilos específicos para el Registro */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variables de colores */
:root {
    --navy: #1e3a8a;
    --gold: #f59e0b;
    --blue-light: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --red-500: #ef4444;
    --green-500: #10b981;
    --yellow-500: #f59e0b;
    --blue-500: #3b82f6;
}

/* Estilos base */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-50);
}

/* Header del registro */
.gradient-bg {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-light) 100%);
}

.gold-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 100%);
}

.form-shadow {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Contenedor principal */
.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Espaciado */
.mb-8 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Texto */
.text-center {
    text-align: center;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* Colores de texto */
.text-white {
    color: white;
}

.text-blue-100 {
    color: #dbeafe;
}

.text-gold {
    color: var(--gold);
}

.text-gray-700 {
    color: var(--gray-700);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-red-500 {
    color: var(--red-500);
}

/* Flexbox */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-6 {
    gap: 1.5rem;
}

/* Padding */
.p-8 {
    padding: 2rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-2 {
    padding: 0.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Bordes */
.border {
    border-width: 1px;
}

.border-gray-200 {
    border-color: var(--gray-200);
}

.border-gray-300 {
    border-color: var(--gray-300);
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.rounded-t-2xl {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.rounded-b-2xl {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Fondo */
.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: var(--gray-50);
}

.bg-navy {
    background-color: var(--navy);
}

.bg-opacity-20 {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ===== NUEVOS ESTILOS DE VALIDACIÓN Y ACCESIBILIDAD ===== */

/* Contenedor de campo con validación */
.field-container {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Inputs mejorados con validación visual */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--gray-800);
    position: relative;
}

/* Estados de focus mejorados */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Estados de validación */
.field-container.valid input,
.field-container.valid select,
.field-container.valid textarea {
    border-color: var(--green-500);
    background-color: #f0fdf4;
}

.field-container.valid::after {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green-500);
    font-weight: bold;
    font-size: 1.125rem;
    z-index: 10;
}

.field-container.error input,
.field-container.error select,
.field-container.error textarea {
    border-color: var(--red-500);
    background-color: #fef2f2;
    animation: shake 0.5s ease-in-out;
}

.field-container.error::after {
    content: '⚠';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--red-500);
    font-weight: bold;
    font-size: 1.125rem;
    z-index: 10;
}

/* Mensajes de error y éxito */
.field-message {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 20;
}

.field-message.error {
    background-color: #fef2f2;
    color: var(--red-500);
    border: 1px solid #fecaca;
    opacity: 1;
    transform: translateY(0);
}

.field-message.success {
    background-color: #f0fdf4;
    color: var(--green-500);
    border: 1px solid #bbf7d0;
    opacity: 1;
    transform: translateY(0);
}

.field-message.info {
    background-color: #eff6ff;
    color: var(--blue-500);
    border: 1px solid #bfdbfe;
    opacity: 1;
    transform: translateY(0);
}

/* Animación de shake para errores */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Labels mejorados */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.field-container.valid label {
    color: var(--green-500);
}

.field-container.error label {
    color: var(--red-500);
}

/* Indicadores de campo requerido */
.required-indicator {
    color: var(--red-500);
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Radio buttons mejorados */
.radio-group {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
}

.radio-option:hover {
    border-color: var(--blue-500);
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.radio-option.selected {
    border-color: var(--gold);
    background-color: #fef3c7;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--gold);
}

.radio-option .radio-label {
    font-weight: 500;
    color: var(--gray-700);
    flex: 1;
}

.radio-option .radio-icon {
    margin-right: 0.75rem;
    color: var(--gold);
    font-size: 1.125rem;
}

/* Botón de envío mejorado */
.submit-button {
    width: 100%;
    background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 100%);
    color: white;
    font-weight: 600;
    padding: 1.25rem 2.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-button.loading {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
}

.submit-button.success {
    background: linear-gradient(135deg, var(--green-500) 0%, #059669 100%);
}

/* Indicador de progreso del formulario */
.form-progress {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    z-index: 100;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--gray-200);
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, #fbbf24 100%);
    transition: width 0.3s ease;
    border-radius: 0.25rem;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Notificaciones toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast.success {
    border-left-color: var(--green-500);
}

.toast.error {
    border-left-color: var(--red-500);
}

.toast.info {
    border-left-color: var(--blue-500);
}

.toast.warning {
    border-left-color: var(--yellow-500);
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Animaciones */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para navegación por teclado */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

/* Estados de hover mejorados */
.radio-option:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .grid-cols-1,
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .field-container {
        margin-bottom: 2rem;
    }
    
    .field-message {
        position: static;
        margin-top: 0.5rem;
        transform: none;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .submit-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-600: #d1d5db;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
    }
    
    body {
        background-color: var(--gray-50);
        color: var(--gray-800);
    }
    
    .bg-white {
        background-color: #1f2937;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
}

/* Estilos para los resultados del test vocacional */
.test-results-content {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    padding: 2rem !important;
    background: white !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    position: relative !important;
    margin: 2rem 0 !important;
    animation: fadeInUp 0.6s ease-out !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.test-results-icon {
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3) !important;
    min-width: 60px !important;
}

.test-results-icon i {
    font-size: 1.5rem !important;
    color: white !important;
    display: block !important;
}

.test-results-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.test-results-info h3 {
    color: #1e3a8a !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
}

.test-results-info p {
    color: #4b5563 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

.test-results-info p:last-child {
    margin-bottom: 0 !important;
}

.test-results-info strong {
    color: #1e3a8a !important;
    font-weight: 600 !important;
}

.test-results-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #64748b !important;
    font-size: 1rem !important;
    z-index: 10 !important;
    min-width: 35px !important;
    min-height: 35px !important;
}

.test-results-close:hover {
    background: #e2e8f0 !important;
    color: #475569 !important;
    transform: scale(1.1) !important;
}

.test-results-close i {
    font-size: 1rem !important;
    display: block !important;
}

/* Animación para los resultados */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para los resultados del test */
@media (max-width: 768px) {
    .test-results-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }
    
    .test-results-icon {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        min-height: 50px !important;
    }
    
    .test-results-icon i {
        font-size: 1.2rem !important;
    }
    
    .test-results-info h3 {
        font-size: 1.3rem !important;
    }
    
    .test-results-info p {
        font-size: 0.95rem !important;
    }
    
    .test-results-close {
        top: 10px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }
}

/* Quitar líneas de contorno del formulario */
fieldset legend.border-b {
    border-bottom: none !important;
}

fieldset legend.border-gray-200 {
    border-color: transparent !important;
}

/* Alternativa más específica */
fieldset .space-y-6 legend.flex.items-center.space-x-3.pb-3.border-b.border-gray-200 {
    border-bottom: none !important;
    border-color: transparent !important;
}

/* Quitar cualquier borde del legend */
legend {
    border: none !important;
}

/* Quitar bordes específicos del fieldset si los hay */
fieldset {
    border: none !important;
    outline: none !important;
}

/* Quitar el padding bottom que puede estar creando espacio extra */
legend.pb-3 {
    padding-bottom: 0 !important;
}

/* ===============================================
   ESTILOS CHECKBOX AVISO DE PRIVACIDAD
   =============================================== */

/* Contenedor del aviso de privacidad */
.bg-gray-50.border-l-4.border-gold {
    background-color: var(--gray-50);
    border-left: 4px solid var(--gold);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.bg-gray-50.border-l-4.border-gold:hover {
    background-color: #f3f4f6;
}

/* Label del checkbox */
.bg-gray-50.border-l-4.border-gold label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.bg-gray-50.border-l-4.border-gold label:hover {
    background-color: #e5e7eb;
}

/* Checkbox personalizado */
input[type="checkbox"]#acepto_privacidad {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
    accent-color: var(--gold);
    border: 2px solid var(--gray-300);
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

input[type="checkbox"]#acepto_privacidad:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

input[type="checkbox"]#acepto_privacidad:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

/* Texto del checkbox */
.bg-gray-50.border-l-4.border-gold label span {
    margin-left: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Link dentro del checkbox */
.bg-gray-50.border-l-4.border-gold label a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bg-gray-50.border-l-4.border-gold label a:hover {
    text-decoration: underline;
    color: #d97706;
}

/* Mensaje de error del checkbox */
#privacidad-error {
    display: none;
    margin-left: 2rem;
    margin-top: 0.5rem;
    color: var(--red-500);
    font-size: 0.875rem;
    font-weight: 600;
}

#privacidad-error.text-red-600 {
    color: #dc2626;
}

/* Estado de error para el label */
.ring-2.ring-red-500 {
    box-shadow: 0 0 0 2px #ef4444;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Indicador requerido */
.bg-gray-50.border-l-4.border-gold .required-indicator {
    color: var(--red-500);
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .bg-gray-50.border-l-4.border-gold {
        padding: 1rem;
    }
    
    .bg-gray-50.border-l-4.border-gold label {
        padding: 0.5rem;
    }
    
    .bg-gray-50.border-l-4.border-gold label span {
        font-size: 0.8125rem;
        margin-left: 0.5rem;
    }
    
    input[type="checkbox"]#acepto_privacidad {
        width: 1.125rem;
        height: 1.125rem;
    }
    
    #privacidad-error {
        margin-left: 1.5rem;
        font-size: 0.8125rem;
    }
}

/* Quitar el padding bottom que puede estar creando espacio extra */
legend.pb-3 {
    padding-bottom: 0 !important;
} 