/* =========================================== */
/* DOWNLOAD.CSS - MODAL DE CATÁLOGO            */
/* HR PRÉ MOLDADOS                             */
/* Presente em todas as páginas do site.       */
/*                                             */
/* ÍNDICE:                                     */
/*  1. MODAL — wrapper + backdrop + animação   */
/*  2. CONTAINER DO MODAL                      */
/*  3. BOTÃO DE FECHAR                         */
/*  4. CABEÇALHO DO MODAL                      */
/*  5. FORMULÁRIO E CAMPOS                     */
/*  6. BOTÃO DE SUBMIT (com animação)          */
/*  7. RESPONSIVIDADE (≤ 480px)                */
/* =========================================== */

/* =========================================== */
/* 1. MODAL — wrapper + backdrop + animação    */
/* =========================================== */

.download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.download-modal.active {
    display: flex;
}

.download-modal.active::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--overlay-modal);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* =========================================== */
/* 2. CONTAINER DO MODAL                       */
/* =========================================== */

.modal-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    z-index: 2;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================== */
/* 3. BOTÃO DE FECHAR                          */
/* =========================================== */

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    font-size: 1rem;
    border: none;
}

.modal-close:hover {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* =========================================== */
/* 4. CABEÇALHO DO MODAL                       */
/* =========================================== */

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================== */
/* 5. FORMULÁRIO E CAMPOS                      */
/* =========================================== */

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-field {
    position: relative;
}

.modal-field input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    transform: scale(1.02);
}

.modal-field label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-tertiary);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 0.25rem;
}

.modal-field input:focus ~ label,
.modal-field input:not(:placeholder-shown) ~ label {
    transform: translateY(-2.2rem) translateX(-0.5rem) scale(0.85);
    background: var(--surface);
    color: var(--primary);
    padding: 0 0.5rem;
}

/* =========================================== */
/* 6. BOTÃO DE SUBMIT (com animação)           */
/* =========================================== */

/* BOTÃO COM ÍCONE ANIMADO - VERSÃO FINAL      */
/* =========================================== */

.modal-submit {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    position: relative;
    letter-spacing: 0.3px;
}

.modal-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    gap: 1.2rem;
}

.modal-submit:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.modal-submit span {
    transition: all 0.3s ease;
    display: inline-block;
}

.modal-submit i {
    transition: all 0.4s ease;
    font-size: 1.2rem;
    display: inline-block;
}

/* Efeito combinado no hover */
.modal-submit:hover span {
    transform: translateX(-5px);
    text-shadow: var(--shadow-sm);
}

.modal-submit:hover i {
    transform: translateX(8px) scale(1.2);
    filter: drop-shadow(0 2px 5px var(--shadow-md));
}

/* Efeito de pulso sutil no ícone */
@keyframes pulseIcon {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.modal-submit:hover i {
    animation: pulseIcon 1s ease infinite;
}

/* =========================================== */
/* 7. RESPONSIVIDADE (≤ 480px)                 */
/* =========================================== */

/* Responsividade */
@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-header i {
        font-size: 2.5rem;
    }
    
    .modal-submit {
        padding: 0.9rem;
    }
}