/* ==========================================================================
   ESTILOS ADICIONAIS PARA A ÁREA DE CERTIFICADOS
   ========================================================================== */

/* Seção Principal */
.certificados-section {
    padding: 120px 0 80px 0; /* Espaço para compensar o menu fixo */
    background-color: #fbfbf9;
    min-height: 80vh;
    font-family: 'Montserrat', sans-serif;
}

.certificados-section h2 {
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #2a3d3d;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.certificados-section h2 .titulo-linha {
    color: #0098aa;
    margin-right: 10px;
    font-weight: 900;
}

.section-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Abas / Filtros Principais */
.certificados-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cert-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    background-color: #ffffff;
    border: 2px solid #e2ded8;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cert-tab-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cert-tab-btn:hover {
    border-color: #f0a25d;
    color: #f0a25d;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(240, 162, 93, 0.15);
}

.cert-tab-btn:hover i {
    transform: scale(1.1);
}

.cert-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #f0a25d, #e87a4a);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(232, 122, 74, 0.3);
}

/* Painéis de Conteúdo */
.cert-panel {
    display: none;
    animation: fadeInSlideUp 0.5s ease forwards;
}

.cert-panel.active {
    display: block;
}

/* Painel de Busca */
.search-panel {
    max-width: 700px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.search-input-wrapper i.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #b2aca3;
    font-size: 1.3rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 18px 20px 18px 56px;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    background-color: #ffffff;
    border: 2px solid #e2ded8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    border-color: #0098aa;
    box-shadow: 0 6px 18px rgba(0, 152, 170, 0.15);
    outline: none;
}

/* Lista de Sugestões / Resultados da Busca */
.search-results-list {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2ded8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 10px;
}

.search-instruction {
    padding: 30px;
    text-align: center;
    color: #888;
    font-style: italic;
    margin: 0;
}

.search-empty-state {
    padding: 40px 30px;
    text-align: center;
    color: #d86a3a;
    font-weight: 500;
    margin: 0;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f2eee8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f4fbfb;
}

.search-result-item .participant-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #4a4a4a;
    transition: color 0.2s ease;
}

.search-result-item:hover .participant-name {
    color: #0098aa;
}

.search-result-item .highlight {
    background-color: rgba(240, 162, 93, 0.2);
    color: #d86a3a;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.search-result-item .select-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0098aa;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
}

.search-result-item:hover .select-badge {
    opacity: 1;
    transform: translateX(0);
}

/* Cartão do Certificado Selecionado (Foco) */
.selected-cert-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2ded8;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    text-align: center;
    margin-top: 20px;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.selected-cert-card .pdf-icon-wrapper {
    width: 90px;
    height: 90px;
    background-color: #fdf2eb;
    color: #e87a4a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin: 0 auto 24px auto;
    box-shadow: 0 8px 20px rgba(232, 122, 74, 0.1);
}

.selected-cert-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2a3d3d;
    margin-bottom: 8px;
}

.selected-cert-card .cert-type {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 24px;
}

.selected-cert-card .action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-download-cert {
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: white;
    background: linear-gradient(135deg, #f0a25d, #e87a4a);
    padding: 14px 28px;
    border-radius: 5px;
    border: none;
    box-shadow: 0 4px 12px rgba(232, 122, 74, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-download-cert:hover {
    background: linear-gradient(135deg, #e0924d, #d86a3a);
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(232, 122, 74, 0.4);
    color: white;
}

.btn-secondary-cert {
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #4a4a4a;
    background-color: #f2eee8;
    padding: 14px 28px;
    border-radius: 5px;
    border: 1px solid #dcd7cf;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.btn-secondary-cert:hover {
    background-color: #e5e0d7;
    color: #222;
}

/* Painel de Lista Completa */
.alphabet-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2ded8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.letter-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4a4a4a;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.letter-btn:hover {
    color: #0098aa;
    background-color: #f4fbfb;
    border-color: #bcecf0;
}

.letter-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.letter-btn.active {
    color: #ffffff;
    background-color: #0098aa;
    border-color: #0098aa;
}

/* Seções de Letras na Lista */
.letter-section {
    margin-bottom: 48px;
    scroll-margin-top: 100px; /* Evita que o cabeçalho fixo cubra a seção ao rolar */
}

.letter-section-header {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0098aa;
    border-bottom: 2px solid #bcecf0;
    padding-bottom: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.certificates-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .certificates-list-grid {
        grid-template-columns: 1fr;
    }
}

.list-cert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #e2ded8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.01);
    transition: all 0.2s ease;
}

.list-cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
    border-color: #bcecf0;
}

.list-cert-item .list-cert-name {
    font-weight: 600;
    font-size: 1rem;
    color: #4a4a4a;
    padding-right: 15px;
}

.btn-list-download {
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    color: #ffffff;
    background: linear-gradient(135deg, #f0a25d, #e87a4a);
    padding: 10px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: fit-content;
}

.btn-list-download:hover {
    background: linear-gradient(135deg, #e0924d, #d86a3a);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(232, 122, 74, 0.25);
}

/* Animações */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsividade Geral */
@media (max-width: 576px) {
    .certificados-section {
        padding-top: 100px;
    }
    
    .cert-tab-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .selected-cert-card {
        padding: 24px 16px;
    }
    
    .selected-cert-card .action-buttons {
        flex-direction: column;
    }
    
    .selected-cert-card .action-buttons a, 
    .selected-cert-card .action-buttons button {
        width: 100%;
        justify-content: center;
    }
}
