/* =========================================================================
   diretoria.css - Estilos Específicos da Página Diretoria
   ========================================================================= */

main { 
    max-width: 1200px; /* Aumentei um pouco para caber 3 cards com folga */
    margin: 2rem auto; 
    padding: 0 1rem; 
    flex: 1; 
}

/* --- Foto da Equipe --- */
.team-photo-container { 
    text-align: center; 
    margin-bottom: 3rem; 
}
.team-photo-container img {
    max-width: 100%; 
    height: auto; 
    border-radius: var(--border-radius);
    box-shadow: var(--shadow); 
    border: 4px solid var(--white);
}

/* --- Títulos --- */
.section-title {
    text-align: center; 
    color: var(--dark-blue); 
    margin: 3rem 0 2rem 0;
    font-size: 1.8rem; 
    position: relative; 
    padding-bottom: 10px;
}
.section-title::after {
    content: ''; 
    display: block; 
    width: 60px; 
    height: 4px;
    background: var(--primary-blue); 
    margin: 10px auto 0; 
    border-radius: 2px;
}

/* =========================================================================
   1. DIRETORIA ATUAL (3 por linha)
   ========================================================================= */
.current-board-grid {
    display: grid !important; /* Força o uso de Grid */
    /* O SEGREDO: minmax(0, 1fr) evita que cards estourem o tamanho da coluna */
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: 2rem; /* Espaço igual entre os cards */
    margin-bottom: 4rem;
    width: 100%;
}

.card {
    background: var(--white); 
    padding: 1.5rem; 
    border-radius: var(--border-radius);
    box-shadow: var(--shadow); 
    border-left: 5px solid var(--primary-blue);
    transition: transform 0.2s;
    
    /* Layout Interno do Card (Foto + Texto) */
    display: flex;
    flex-direction: row; 
    align-items: center; 
    gap: 15px; 
    
    /* Garante que o card não quebre se o conteúdo for grande */
    overflow: hidden; 
}
.card:hover { transform: translateY(-5px); }

/* Foto Redonda */
.card-avatar {
    width: 80px;  
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Garante que a foto não amasse */
    display: block;
}

/* Container de Texto do Card */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Permite que o texto quebre linha corretamente dentro do flex */
}

.card-role { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: var(--text-light); 
    font-weight: 700; 
    margin-bottom: 2px; 
}
.card-name { 
    font-size: 1rem; 
    font-weight: 700; 
    color: var(--dark-blue); 
    margin-bottom: 4px; 
    line-height: 1.3;
}
.card-inst { 
    font-size: 0.8rem; 
    font-style: italic; 
    color: #555; 
    margin-bottom: 8px; 
}

.btn-lattes {
    align-self: flex-start; 
    background-color: transparent; 
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue); 
    padding: 3px 10px; 
    border-radius: 20px;
    font-size: 0.7rem; 
    font-weight: 600;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
    text-decoration: none; /* Garante que não tenha sublinhado */
}
.btn-lattes:hover { 
    background-color: var(--primary-blue); 
    color: var(--white); 
}

/* =========================================================================
   2. DIRETORIAS ANTERIORES (2 por linha)
   ========================================================================= */
.timeline { 
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem; 
    max-width: 100%; 
    margin: 0 auto; 
    width: 100%;
}

.timeline-item {
    background: var(--white); 
    padding: 1.5rem;
    border-radius: var(--border-radius); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #ccc; 
    height: 100%; 
}

.timeline-year {
    font-size: 1.3rem; 
    font-weight: 800; 
    color: var(--text-color);
    margin-bottom: 1rem; 
    display: inline-block; 
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.timeline-content p { 
    margin-bottom: 0.4rem; 
    font-size: 0.9rem; 
    line-height: 1.4;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 2px;
}
.timeline-content strong { color: var(--dark-blue); }

/* =========================================================================
   3. RESPONSIVIDADE (Importante!)
   ========================================================================= */

/* Tablets (Telas médias, ex: iPads ou janelas menores): Vira 2 colunas */
@media (max-width: 950px) {
    .current-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Celulares (Telas pequenas): Tudo vira 1 coluna */
@media (max-width: 600px) {
    .current-board-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        grid-template-columns: 1fr;
    }

    .card {
        flex-direction: column; /* No celular, foto em cima, texto embaixo */
        text-align: center;
        gap: 10px;
    }
    
    .btn-lattes {
        align-self: center; /* Centraliza o botão no mobile */
    }
    
    .card-info {
        width: 100%; /* Garante largura total no mobile */
    }
}