﻿/* ========================================
   CHECKLIST POPUP CTA
   ======================================== */

.checklist-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.checklist-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.checklist-popup.hide {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.popup-content {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 2.2rem;
    box-shadow: var(--shadow-lg);
    max-width: 380px;
    position: relative;
    border: 1px solid var(--border-color);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #334155;
}

.popup-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.popup-subtitle {
    font-size: 1rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.btn-popup {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(255, 0, 128, 0.3);
}

.btn-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

/* ========================================
   CHECKLIST MODAL
   ======================================== */

.checklist-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checklist-modal.active {
    display: flex;
}

.modal-overlay-checklist {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-container-checklist {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close-checklist {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-checklist:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.modal-content-checklist {
    padding: 3rem 2.5rem;
}

.checklist-modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.checklist-modal-title i {
    font-size: 1.8rem;
}

.checklist-subtitle {
    text-align: center;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.checklist-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Checklist Sections */
.checklist-sections {
    margin-bottom: 2rem;
}

.checklist-section {
    background: var(--bg-section);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.checklist-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.2);
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.checklist-item:hover {
    padding-left: 0.5rem;
}

.checklist-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: white;
}

.checklist-checkbox:checked~.checkbox-custom {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
}

.checklist-checkbox:checked~.checkbox-custom::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.checklist-checkbox:checked~.checklist-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.checklist-text {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
    transition: all 0.3s ease;
}

/* Email Capture */
.email-capture {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #bae6fd;
}

.email-capture-text {
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.email-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.email-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid #bae6fd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-email {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-email:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.email-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.email-error-msg {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.trust-badge i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Primary CTA Button */
.btn-checklist-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    color: var(--dark);
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-checklist-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(251, 191, 36, 0.5);
    background: linear-gradient(135deg, #fbbf24, var(--accent));
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .checklist-popup {
        bottom: 110px;
        /* Subir para librar botón de WhatsApp */
        right: 15px;
        left: auto;
        /* IMPORTANTE: No estirar a la izquierda */
        width: auto;
        max-width: 220px;
        /* Ancho muy compacto */
        pointer-events: none;
        /* Asegura que el contenedor transparente no tape */
    }

    .checklist-popup.show {
        pointer-events: auto;
    }

    .popup-content {
        max-width: 100%;
        padding: 0.8rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    }

    .popup-icon {
        display: none;
        /* Mantener icono oculto para dar espacio al texto */
    }

    .popup-title {
        display: block;
        /* MOSTRAR título */
        font-size: 0.95rem;
        /* Tamaño moderado para móvil */
        font-weight: 700;
        text-align: left;
        margin-bottom: 0.25rem;
        line-height: 1.2;
        color: var(--dark);
    }

    .popup-title::after {
        content: ' 🎉';
    }

    .popup-subtitle {
        display: block;
        /* MOSTRAR subtítulo */
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--primary);
        text-align: left;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .btn-popup {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .modal-content-checklist {
        padding: 2rem 1.5rem;
    }

    .checklist-modal-title {
        font-size: 1.5rem;
    }

    .checklist-section {
        padding: 1rem;
    }

    .email-form {
        flex-direction: column;
    }

    .email-input {
        min-width: 100%;
    }

    .trust-badges {
        gap: 1rem;
    }

    .trust-badge {
        font-size: 0.85rem;
    }

    .btn-checklist-cta {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
}

/* Smooth scrollbar for modal */
.modal-container-checklist::-webkit-scrollbar {
    width: 8px;
}

.modal-container-checklist::-webkit-scrollbar-track {
    background: var(--bg-section);
    border-radius: 10px;
}

.modal-container-checklist::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.modal-container-checklist::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}