/* Container dos Filtros */
.filtros-container {
    background: linear-gradient(135deg, #ef5a23 0%, #ef5a23 100%);
    border-radius: 0 0 12px 12px;
    padding: 30px 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin-top: -5px;
}

#filtros-pre-candidatos {
    margin: 0;
}

#filtros-pre-candidatos .row {
    margin-left: 0;
    margin-right: 0;
}

#filtros-pre-candidatos .row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Labels */
.form-label-custom {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-label-custom .label-icon {
    color: #fff;
    margin-right: 8px;
    font-size: 13px;
    width: 16px;
    text-align: center;
}

/* Inputs */
.input-custom {
    border-radius: 6px;
    border: 2px solid #ffffff !important;
    padding: 13px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #2c3e50;
    width: 100%;
    box-sizing: border-box;
}

.input-custom:focus {
    border-color: #1a2948 !important;
    box-shadow: 0 0 0 3px rgba(26,41,72,0.15);
    outline: none;
    background-color: #fff;
}

.input-custom::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Selects - garantir que não cortem o texto */
.select-custom {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    -ms-appearance: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 6px;
    border: 2px solid #ffffff;
    padding: 13px 75px 13px 18px !important;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    cursor: pointer;
    color: #2c3e50 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%231a2948" d="M8 11L3 6h10z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 16px !important;
    text-indent: 0 !important;
    max-width: 100% !important;
}

.select-custom:focus {
    border-color: #1a2948 !important;
    box-shadow: 0 0 0 3px rgba(26,41,72,0.15);
    outline: none;
    overflow: visible !important;
}

.select-custom:hover {
    border-color: #f0f0f0;
    background-color: #fafafa;
}

.select-custom option {
    padding: 12px 18px;
    white-space: normal;
    word-wrap: break-word;
    background-color: #fff;
    color: #2c3e50;
}

/* Para IE */
.select-custom::-ms-expand {
    display: none !important;
}

/* Para Chrome/Safari - garantir que não corte */
.select-custom::-webkit-scrollbar {
    width: 8px;
}

.select-custom::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.select-custom::-webkit-scrollbar-thumb {
    background: #ef5a23;
    border-radius: 4px;
}

/* Remover qualquer estilo do Bootstrap que possa estar interferindo */
.select-custom.form-control {
    height: auto !important;
    line-height: normal !important;
}

/* Container dos Botões */
.botoes-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Botões */
.btn-buscar,
.btn-limpar {
    min-width: 180px;
    border-radius: 6px;
    padding: 14px 35px;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-buscar {
    background-color: #10385a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16,56,90,0.3);
}

.btn-buscar:hover {
    background-color: #004777;
    box-shadow: 0 6px 16px rgba(16,56,90,0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-buscar:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16,56,90,0.3);
}

.btn-limpar {
    background-color: #fdc908;
    color: #fff;
    box-shadow: 0 4px 12px rgba(253,201,8,0.3);
}

.btn-limpar:hover {
    background-color: #e5b807;
    box-shadow: 0 6px 16px rgba(253,201,8,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-limpar:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(253,201,8,0.3);
}

.btn-buscar i,
.btn-limpar i {
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    .filtros-container {
        padding: 25px 20px;
    }
    
    #filtros-pre-candidatos .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .botoes-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-buscar,
    .btn-limpar {
        width: 100%;
        min-width: auto;
    }
    
    .select-custom {
        padding: 13px 65px 13px 15px !important;
    }
}

@media (max-width: 576px) {
    .filtros-container {
        padding: 20px 15px;
    }
    
    .form-label-custom {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .input-custom,
    .select-custom {
        font-size: 14px;
        padding: 12px 15px !important;
    }
    
    .select-custom {
        padding-right: 55px !important;
    }
    
    #filtros-pre-candidatos .row > [class*="col-"] {
        padding-left: 7px;
        padding-right: 7px;
    }
    
    #filtros-pre-candidatos .row {
        margin-bottom: 0;
    }
    
    #filtros-pre-candidatos .mb-3 {
        margin-bottom: 15px !important;
    }
}

/* ============================================
   SEÇÃO DE RESULTADOS - CARDS DE CANDIDATOS
   ============================================ */

/* Container de Resultados */
.resultados-container {
    margin-top: 50px;
    min-height: 200px;
}

.loading-resultados,
.sem-resultados,
.erro-resultados {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #666;
}

.loading-resultados i {
    margin-right: 10px;
    font-size: 24px;
    color: #ef5a23;
}

.erro-resultados {
    color: #e74c3c;
}

/* Grid de Candidatos - 4 colunas */
.grid-candidatos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 30px;
    align-items: stretch;
}

@media (max-width: 1400px) {
    .grid-candidatos {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Card de Candidato - Altura uniforme */
.card-candidato {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none !important;
    will-change: transform;
}

.card-candidato:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Header do Card - Design Criativo */
.card-header {
    /*background: linear-gradient(135deg, #1a2948 0%, #2c3e50 100%);*/
    /*height: 300px;*/
    position: relative;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    border: none !important;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(239,90,35,0.1) 100%);
    z-index: 1;
}

/* Badge de Cargo */
.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-badge i {
    color: #fff;
    font-size: 18px;
}

.badge-prefeito {
    background: linear-gradient(135deg, #ef5a23 0%, #d94a1a 100%);
}

.badge-vereador {
    background: linear-gradient(135deg, #10385a 0%, #0d2d47 100%);
}

.badge-vice {
    background: linear-gradient(135deg, #fdc908 0%, #e5b807 100%);
}

.badge-cargo {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.card-candidato:hover .card-badge {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(239,90,35,0.4);
}

/* Padrão Decorativo */
.card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.3) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.3) 2px, transparent 2px),
        radial-gradient(circle at 40% 20%, rgba(255,255,255,0.3) 2px, transparent 2px);
    background-size: 50px 50px, 80px 80px, 60px 60px;
    z-index: 1;
}

.card-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.card-header-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* Overlay na imagem */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(26,41,72,0.3) 100%);
    z-index: 3;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-candidato:hover .card-overlay {
    opacity: 0.7;
}

.logo-novo {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.foto-candidato {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Silhuetas */
.silhueta-male,
.silhueta-female {
    width: 160px;
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.silhueta-male::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 140px;
    background: #ef5a23;
    border-radius: 50% 50% 40% 40% / 55% 55% 45% 45%;
    clip-path: polygon(20% 0%, 80% 0%, 100% 30%, 100% 100%, 0% 100%, 0% 30%);
}

.silhueta-female::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 140px;
    background: #ef5a23;
    border-radius: 50% 50% 40% 40% / 55% 55% 45% 45%;
    clip-path: polygon(15% 0%, 85% 0%, 100% 25%, 100% 100%, 0% 100%, 0% 25%);
}

.silhueta-female::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 30px;
    background: #ef5a23;
    border-radius: 50% 50% 0 0;
}

/* Body do Card - Flex para altura uniforme */
.card-body {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.nome-candidato {
    font-size: 18px;
    font-weight: 700;
    color: #1a2948;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 50px;
}

.cargo-candidato {
    font-size: 14px;
    color: #ef5a23;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-candidato {
    font-size: 14px;
    color: #5a6c7d;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.btn-detalhes {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #10385a 0%, #1a4a6b 100%);
    color: #fff;
    text-align: center;
    padding: 13px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16,56,90,0.2);
    margin-top: auto;
}

.btn-detalhes:hover {
    background: linear-gradient(135deg, #0d2d47 0%, #153d5a 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(16,56,90,0.3);
    transform: translateY(-1px);
}

/* Responsividade dos Cards */
@media (max-width: 1200px) {
    .grid-candidatos {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .card-header {
        height: 280px;
    }
    
    .nome-candidato {
        font-size: 19px;
        min-height: 50px;
    }
    
    .card-body {
        padding: 25px 20px;
    }
}

@media (max-width: 992px) {
    .grid-candidatos {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .card-header {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .grid-candidatos {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .card-header {
        height: 240px;
    }
    
    .card-badge {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }
    
    .card-badge i {
        font-size: 16px;
    }
    
    .card-body {
        padding: 20px 18px;
    }
    
    .nome-candidato {
        font-size: 17px;
        min-height: 44px;
        margin-bottom: 15px;
    }
    
    .card-meta {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .meta-item {
        padding: 10px;
    }
    
    .meta-icon-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .cargo-text,
    .estado-text {
        font-size: 13px;
    }
    
    .btn-detalhes {
        padding: 14px 20px;
        font-size: 13px;
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
    }
    
    .resultados-container {
        margin-top: 30px;
    }
}

@media (max-width: 576px) {
    .grid-candidatos {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .card-header {
        height: 260px;
    }
    
    .card-badge {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .card-badge i {
        font-size: 14px;
    }
    
    .card-body {
        padding: 25px 20px;
    }
    
    .nome-candidato {
        font-size: 18px;
        min-height: auto;
    }
    
    .card-meta {
        gap: 15px;
    }
    
    .meta-item {
        padding: 12px;
    }
    
    .cargo-text,
    .estado-text {
        font-size: 14px;
    }
    
    .btn-detalhes {
        padding: 16px 24px;
    }
}

/* Banner Pré-Candidatos */
.banner-pre-candidatos-wrapper {
    width: 100%;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #fff;
}

.banner-pre-candidatos {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    filter: brightness(1.1) contrast(1.05);
    max-width: 100%;
}

/* Background da seção */
section.py-20 {
    background-image: url('http://novo.org.br/wp-content/uploads/2025/12/fundo-blog-site.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    margin-top: 100px;
}

/* Overlay opcional para melhorar legibilidade do conteúdo */
section.py-20::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

section.py-20 > .container {
    position: relative;
    z-index: 1;
}