/* ═══════════════════════════════════════════════════════════════
   LEAD MAGNET POPUP - PDF Informe Personalizado
   Aparece después de mostrar resultados básicos del evaluador
   ═══════════════════════════════════════════════════════════════ */

/* Overlay oscuro */
.lead-magnet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.lead-magnet-overlay.active {
    display: block;
}

/* Popup principal */
.lead-magnet-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #D4AF37;
    border-radius: 30px;
    padding: 50px 40px;
    z-index: 9999;
    box-shadow: 0 30px 80px rgba(212, 175, 55, 0.5);
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lead-magnet-popup.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Botón cerrar */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
}

.popup-close:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    color: #FFD700;
    transform: rotate(90deg);
}

/* Badge exclusivo */
.popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    color: #000;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* Título popup */
.popup-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.popup-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Lista de beneficios */
.popup-benefits {
    margin-bottom: 32px;
}

.popup-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.popup-benefit-item:last-child {
    border-bottom: none;
}

.benefit-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    color: #000;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.benefit-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.5;
}

/* Formulario */
.popup-form {
    margin-bottom: 24px;
}

.popup-form-group {
    margin-bottom: 20px;
}

.popup-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.popup-form-input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.popup-form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.popup-form-input.error {
    border-color: #ff4444;
}

.popup-error-message {
    display: none;
    color: #ff4444;
    font-size: 13px;
    margin-top: 6px;
}

.popup-error-message.active {
    display: block;
}

/* Checkbox privacidad */
.popup-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.popup-privacy input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #D4AF37;
}

.popup-privacy label {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.popup-privacy label a {
    color: #FFD700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.popup-privacy label a:hover {
    border-color: #FFD700;
}

/* Botón descargar */
.popup-submit-button {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.popup-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.popup-submit-button:hover::before {
    left: 100%;
}

.popup-submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.6);
}

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

/* Loader del botón */
.popup-button-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.popup-submit-button.loading .popup-button-loader {
    display: block;
}

.popup-submit-button.loading .popup-button-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mensaje de éxito */
.popup-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.popup-success.active {
    display: block;
}

.popup-success-icon {
    font-size: 64px;
    color: #44E08F;
    margin-bottom: 24px;
    animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.popup-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.popup-success-message {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.6;
}

.popup-success-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popup-success-button {
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.popup-success-button.primary {
    background: linear-gradient(135deg, #44E08F 0%, #4ECDC4 100%);
    color: #000;
}

.popup-success-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(68, 224, 143, 0.4);
}

.popup-success-button.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: #FFD700;
}

.popup-success-button.secondary:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

/* Trust badges */
.popup-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.popup-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.popup-trust-item i {
    color: #44E08F;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .lead-magnet-popup {
        padding: 40px 24px;
        max-width: 95%;
    }
    
    .popup-title {
        font-size: 24px;
    }
    
    .popup-subtitle {
        font-size: 14px;
    }
    
    .popup-submit-button {
        font-size: 16px;
        padding: 18px 32px;
    }
    
    .popup-trust {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animación de entrada */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
