/* ======================
   FORMULARIO DE REGISTRO - ASESORES RM
   Diseño moderno y responsive
====================== */

/* Variables específicas del formulario */
:root {
    --form-primary: #74ebd5;
    --form-secondary: #acb6e5;
    --form-accent: #4a5568;
    --form-gradient: linear-gradient(135deg, #74ebd5 0%, #acb6e5 100%);
    --form-text-dark: #2d3748;
    --form-text-light: #718096;
    --form-bg-light: #f7fafc;
    --form-border: #e2e8f0;
    --form-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --form-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --form-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   SECCIÓN DEL FORMULARIO DE REGISTRO
========================================== */
.registration-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.registration-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(116, 235, 213, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(172, 182, 229, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.registration-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   HEADER DEL FORMULARIO
========================================== */
.registration-header {
    text-align: center;
    margin-bottom: 3rem;
}

.registration-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--form-text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.registration-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--form-gradient);
    border-radius: 2px;
}

.registration-subtitle {
    font-size: 1.1rem;
    color: var(--form-text-light);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   CONTENEDOR PRINCIPAL DEL FORMULARIO
========================================== */
.registration-form-container {
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: var(--form-shadow-lg);
    border: 1px solid rgba(116, 235, 213, 0.1);
    position: relative;
    overflow: hidden;
}

.registration-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--form-gradient);
    border-radius: 25px 25px 0 0;
}

/* ==========================================
   ESTILOS DEL FORMULARIO
========================================== */
.registration-form .form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.registration-form .form-label {
    font-weight: 600;
    color: var(--form-text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--form-transition);
}

.registration-form .form-label.required::after {
    content: ' *';
    color: #e53e3e;
    font-weight: 700;
}

.registration-form .form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--form-border);
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--form-text-dark);
    background: white;
    transition: var(--form-transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.registration-form .form-control:focus {
    outline: none;
    border-color: var(--form-primary);
    box-shadow: 
        0 0 0 0.3rem rgba(116, 235, 213, 0.15),
        0 4px 20px rgba(116, 235, 213, 0.1);
    transform: translateY(-2px);
}

.registration-form .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.registration-form .form-control:valid {
    border-color: #48bb78;
}

.registration-form .form-control:invalid:not(:placeholder-shown) {
    border-color: #e53e3e;
}

/* ==========================================
   ESTILOS ESPECÍFICOS POR CAMPO
========================================== */

/* Campo de Instagram con ícono */
.instagram-group {
    position: relative;
}

.instagram-group .form-control {
    padding-left: 3.5rem;
}

.instagram-group::before {
    content: '@';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--form-primary);
    z-index: 3;
    margin-top: 0.75rem; /* Ajuste para el label */
}

/* Campo de ocupación como textarea */
.occupation-field {
    min-height: 80px;
    resize: vertical;
}

/* ==========================================
   BOTÓN DE ENVÍO
========================================== */
.registration-submit {
    background: var(--form-gradient);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--form-transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 8px 25px rgba(116, 235, 213, 0.3),
        0 4px 15px rgba(116, 235, 213, 0.2);
    margin-top: 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.registration-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                rgba(255, 255, 255, 0.5), 
                rgba(255, 255, 255, 0.3), 
                transparent);
    transition: left 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.registration-submit:hover::before {
    left: 100%;
}

.registration-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(116, 235, 213, 0.4),
        0 8px 25px rgba(116, 235, 213, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.registration-submit:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.registration-submit:focus {
    outline: none;
    box-shadow: 
        0 0 0 0.3rem rgba(116, 235, 213, 0.4),
        0 15px 40px rgba(116, 235, 213, 0.4);
}

/* Ícono del botón */
.registration-submit i {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.registration-submit:hover i {
    transform: translateX(3px);
}

/* ==========================================
   INDICADORES DE VALIDACIÓN
========================================== */
.form-group.valid .form-control {
    border-color: #48bb78;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%2348bb78' d='M10.28 2.28L5 7.56l-2.28-2.28a.75.75 0 00-1.06 1.06L4.47 9.15a.75.75 0 001.06 0l6.03-6.03a.75.75 0 000-1.06.75.75 0 00-1.06 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group.invalid .form-control {
    border-color: #e53e3e;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23e53e3e' d='M6 0a6 6 0 1 0 0 12A6 6 0 0 0 6 0zM4.28 3.22a.75.75 0 0 1 1.06 0L6 3.88l.66-.66a.75.75 0 1 1 1.06 1.06L7.06 5l.66.66a.75.75 0 0 1-1.06 1.06L6 6.06l-.66.66a.75.75 0 0 1-1.06-1.06L4.94 5l-.66-.66a.75.75 0 0 1 0-1.06z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* ==========================================
   MENSAJE DE TÉRMINOS Y CONDICIONES
========================================== */
.terms-notice {
    background: rgba(116, 235, 213, 0.05);
    border: 2px solid rgba(116, 235, 213, 0.2);
    border-radius: 15px;
    padding: 1.2rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--form-text-light);
    text-align: center;
    line-height: 1.5;
}

.terms-notice strong {
    color: #79e6d6;
    font-weight: 600;
}

/* ==========================================
   ANIMACIONES Y EFECTOS
========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-form-container {
    animation: fadeInUp 0.8s ease-out forwards;
}

.registration-form .form-group {
    animation: fadeInUp 0.6s ease-out forwards;
}

.registration-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.registration-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.registration-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.registration-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.registration-form .form-group:nth-child(5) { animation-delay: 0.5s; }
.registration-form .form-group:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================
   ESTADOS DE CARGA
========================================== */
.registration-submit.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.registration-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 768px) {
    .registration-section {
        padding: 3rem 0;
    }
    
    .registration-form-container {
        padding: 2rem;
        border-radius: 20px;
        margin: 0 1rem;
    }
    
    .registration-header {
        margin-bottom: 2rem;
    }
    
    .registration-title {
        font-size: 2rem;
    }
    
    .registration-subtitle {
        font-size: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .registration-form .form-control {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .instagram-group .form-control {
        padding-left: 3rem;
    }
    
    .instagram-group::before {
        left: 1rem;
        font-size: 1rem;
    }
    
    .registration-submit {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .registration-form-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
        border-radius: 15px;
    }
    
    .registration-title {
        font-size: 1.8rem;
    }
    
    .registration-subtitle {
        font-size: 0.9rem;
    }
    
    .registration-form .form-group {
        margin-bottom: 1.5rem;
    }
    
    .registration-form .form-control {
        padding: 0.8rem 0.9rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .instagram-group .form-control {
        padding-left: 2.8rem;
    }
    
    .instagram-group::before {
        left: 0.9rem;
        font-size: 0.95rem;
    }
    
    .registration-submit {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 40px;
    }
    
    .terms-notice {
        padding: 1rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }
}

/* ==========================================
   MODO OSCURO (OPCIONAL)
========================================== */
@media (prefers-color-scheme: dark) {
    .registration-section {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .registration-form-container {
        background: #2d3748;
        border-color: rgba(116, 235, 213, 0.2);
    }
    
    .registration-title {
        color: white;
    }
    
    .registration-subtitle {
        color: #a0aec0;
    }
    
    .registration-form .form-label {
        color: white;
    }
    
    .registration-form .form-control {
        background: #4a5568;
        border-color: #718096;
        color: white;
    }
    
    .registration-form .form-control:focus {
        background: #4a5568;
        border-color: var(--form-primary);
    }
    
    .terms-notice {
        background: rgba(116, 235, 213, 0.1);
        border-color: rgba(116, 235, 213, 0.3);
        color: #e2e8f0;
    }
}

/* ==========================================
   ACCESIBILIDAD
========================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para navegación por teclado */
.registration-form .form-control:focus-visible {
    outline: 2px solid var(--form-primary);
    outline-offset: 2px;
}

.registration-submit:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ==========================================
   UTILIDADES ADICIONALES
========================================== */
.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;
}

.form-help-text {
    font-size: 0.85rem;
    color: var(--form-text-light);
    margin-top: 0.25rem;
    display: block;
}

/* Estados de hover para campos */
.registration-form .form-control:hover:not(:focus) {
    border-color: var(--form-primary);
    box-shadow: 0 2px 8px rgba(116, 235, 213, 0.1);
}

.logo-piin{
    width: 90% !important;
}

/* ==========================================
   MODAL DE BIENVENIDA AUTOMÁTICO
========================================== */

.welcome-modal-content {
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(116, 235, 213, 0.2);
    overflow: hidden;
    position: relative;
}

/* Decoraciones del modal */
.welcome-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(116, 235, 213, 0.1), rgba(172, 182, 229, 0.1));
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 100px;
    height: 100px;
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.circle-2 {
    width: 80px;
    height: 80px;
    bottom: -40px;
    left: -40px;
    animation-delay: 2s;
}

.circle-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: -30px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Header del modal */
.welcome-header {
    padding: 1.5rem 1.5rem 0;
    position: relative;
    z-index: 2;
}

.welcome-close {
    font-size: 1.2rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-close:hover {
    opacity: 1;
    background: rgba(116, 235, 213, 0.1);
    transform: rotate(90deg);
}

/* Body del modal */
.welcome-body {
    padding: 2rem 3rem;
    position: relative;
    z-index: 2;
}

.welcome-logo {
    margin-bottom: 2rem;
}

.welcome-logo-img {
    max-height: 125px;
    width: auto;
    filter: drop-shadow(0 4px 15px rgba(116, 235, 213, 0.3));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mensaje de bienvenida */
.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, #006553 0%, #2c3b7e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.welcome-description .lead {
    font-size: 1.1rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.6;
}

.welcome-description p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Botón principal de registro */
.btn-welcome-register {
    background: linear-gradient(135deg, #006553 0%, #2c3b7e 100%);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(116, 235, 213, 0.4);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.btn-welcome-register:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(116, 235, 213, 0.5);
    background: linear-gradient(135deg, #acb6e5 0%, #74ebd5 100%);
}

.btn-welcome-register:active {
    transform: translateY(-1px) scale(1.01);
}

.btn-welcome-register .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.4), 
                rgba(255, 255, 255, 0.6), 
                rgba(255, 255, 255, 0.4), 
                transparent);
    transition: left 0.8s ease;
}

.btn-welcome-register:hover .btn-glow {
    left: 100%;
}

/* Botón de saltar */
.btn-skip {
    background: none;
    border: none;
    color: #718096;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.btn-skip:hover {
    color: #4a5568;
    background: rgba(116, 235, 213, 0.1);
    text-decoration: none;
}

/* Footer del modal */
.welcome-footer {
    padding: 1rem 3rem 2rem;
    position: relative;
    z-index: 2;
}

.welcome-footer-text {
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-footer-text i {
    color: #74ebd5;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-body {
        padding: 1.5rem 2rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-subtitle {
        font-size: 1.3rem;
    }
    
    .welcome-description .lead {
        font-size: 1rem;
    }
    
    .btn-welcome-register {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
    
    .welcome-logo-img {
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .modal-lg {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .welcome-body {
        padding: 1rem 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.6rem;
    }
    
    .welcome-subtitle {
        font-size: 1.2rem;
    }
    
    .btn-welcome-register {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
        width: 100%;
    }
}

/* Animación de entrada */
.modal.fade .modal-dialog {
    transition: transform 0.5s ease-out;
    transform: scale(0.8) translateY(-50px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.notification-info {
    background: linear-gradient(135deg, #74ebd5, #acb6e5) !important;
    color: #1a1a1a !important;
    border-left: 4px solid #48bb78;
}

.notification-info i {
    color: #1a1a1a !important;
}
