@font-face {
    font-family: 'Bitter';
    src: url('<?php echo get_bloginfo("template_directory") ?>/fonts/Bitter.ttf') format('truetype');
}

@font-face {
    font-family: 'Poppins';
    src: url('<?php echo get_bloginfo("template_directory") ?>/fonts/Poppins.ttf') format('truetype');
}

:root {
    --diel-bg: #f2e6d5;
    --diel-primary: #4e290d;
    --diel-secondary: #5c7d58;
    --diel-accent: #8b6a4f;
    --diel-light: #ccd5c0;
    --diel-success: #28a745;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: var(--diel-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bitter', Georgia, serif;
}

/* Cores customizadas */
.text-primary { color: var(--diel-primary) !important; }
.text-secondary { color: var(--diel-secondary) !important; }
.text-accent { color: var(--diel-accent) !important; }
.bg-primary { background-color: var(--diel-primary) !important; }
.bg-secondary { background-color: var(--diel-secondary) !important; }
.bg-accent { background-color: var(--diel-accent) !important; }
.bg-success { background-color: var(--diel-success) !important; }
.bg-light { background-color: var(--diel-light) !important; }

/* Gradientes */
.bg-primary-gradient { background: linear-gradient(45deg, var(--diel-primary), var(--diel-secondary)); }
.bg-secondary-gradient { background: linear-gradient(45deg, var(--diel-secondary), var(--diel-accent)); }
.bg-accent-gradient { background: linear-gradient(45deg, var(--diel-accent), var(--diel-primary)); }
.bg-success-gradient { background: linear-gradient(45deg, var(--diel-success), var(--diel-secondary)); }

/* Classe para melhor contraste - WCAG AA/AAA */
.text-white-light {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-equipe {
    background: linear-gradient(135deg, var(--diel-bg) 0%, var(--diel-light) 100%);
}

/* Animações */
.animate-fade-in {
    animation: fadeIn 1.2s ease-in;
}

.animate-slide-in-delay {
    animation: slideInUp 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card da Líder */
.leader-card {
    overflow: hidden;
    border-radius: 15px;
}

.leader-photo-container {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.leader-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(78, 41, 13, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.leader-photo-container:hover .photo-overlay {
    opacity: 1;
}

.leader-photo-container:hover .leader-photo {
    transform: scale(1.05);
}

.leader-info {
    background: var(--white);
}

.leader-name {
    color: var(--diel-primary);
    font-size: 1.5rem;
}

.credential-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(78, 41, 13, 0.1);
}

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

/* Grid de Membros */
.membros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.membro-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(78, 41, 13, 0.15);
    transition: all 0.3s ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(78, 41, 13, 0.25);
}

.membro-photo-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.membro-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.default-photo {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.membro-photo-container .photo-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.lattes-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.lattes-link:hover {
    transform: scale(1.1);
}

.lattes-icon {
    width: 30px;
    height: 30px;
}

.membro-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}

.membro-nome {
    font-size: 1.1rem;
    line-height: 1.3;
    text-align: center;
}

.membro-funcao,
.membro-cargo {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.membro-funcao i,
.membro-cargo i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ajustar altura do card para acomodar mais informações */
.membro-card {
    min-height: 380px;
}

/* Ajustar a área da foto para dar mais espaço ao texto */
.membro-photo-container {
    height: 180px;
}

/* Badge do Lattes Superior (único badge) */
.lattes-badge-top {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.lattes-badge-link-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lattes-badge-link-top:hover {
    transform: scale(1.1);
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lattes-badge-icon-top {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.lattes-badge-link-top:hover .lattes-badge-icon-top {
    transform: scale(1.1);
}

/* Seções de Nível */
.nivel-section {
    margin-bottom: 4rem;
}

.nivel-header {
    margin-bottom: 2rem;
}

.badge {
    font-family: 'Bitter', Georgia, serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Responsividade */
@media (max-width: 768px) {
    .membros-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .leader-photo-container {
        min-height: 300px;
    }
    
    .leader-info {
        padding: 2rem 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .membro-card {
        min-height: 280px;
    }
    
    .membro-photo-container {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .membros-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .leader-credentials .row {
        --bs-gutter-x: 0.5rem;
    }
    
    .credential-item small {
        font-size: 0.8rem;
    }
}