/* Container Principal */
.bento-grid {
    display: flex;
    flex-wrap: wrap; /* Permite que os cards quebrem a linha */
    gap: 20px;
    justify-content: flex-start; /* Alinha à esquerda */
    align-items: flex-start; /* Evita que um card estique o outro da mesma linha */
}

/* Base do Card */
.card {
    flex: 1 1 calc(33.333% - 20px); /* 3 colunas menos o gap */
    min-width: 280px; /* Garante responsividade em telas menores */
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    text-decoration: none !important;
    transition: transform 0.3s ease;
    background-size: cover;
    background-position: center;
    background-color: #032655;
    display: block;
}

.card:hover { transform: translateY(-5px); }

/* Alturas Controladas (Ajuste aqui conforme seu gosto, Dré) */
.card-small { height: 180px; }
.card-medium { height: 260px; }
.card-large { height: 350px; }
.card-featured { height: 300px; flex: 1 1 calc(66.666% - 20px); } /* Ocupa 2 colunas */

/* Conteúdo */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 15px;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.card-content h3 { 
    color: #fff; 
    margin: 0; 
    font-size: 1rem; 
    line-height: 1.2;
    font-weight: 600;
}

/* Ajuste Responsivo */
@media (max-width: 992px) {
    .card { flex: 1 1 calc(50% - 20px); }
    .card-featured { flex: 1 1 100%; }
}

@media (max-width: 600px) {
    .card { flex: 1 1 100%; }
}
#politicas { 
        padding-bottom: 0 !important; 
        position: relative;
    }

    /* Section com o gradiente Laranja para Branco */
    #archives {
        position: relative;
        overflow: hidden;
        background: linear-gradient(180deg, #F56C07 0%, #FFFFFF 100%);
        padding: 60px 0 0 0;
    }

    .container-ged { 
        width: 100%; 
        max-width: 1200px; 
        margin: 0 auto; 
        padding: 0 20px; 
        position: relative;
        z-index: 2;
    }
    
    /* Grid de 4 colunas (cada uma = 25w) */
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr); 
        grid-auto-rows: 180px; /* Base 25h */
        gap: 20px;
        margin-bottom: 40px;
    }

    .card {
        position: relative;
        border-radius: 16px;
        overflow: hidden;
        background-color: #032655;
        background-size: cover !important;
        background-position: center !important;
        text-decoration: none !important;
        transition: transform 0.3s ease;
        display: block;
        z-index: 3;
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: linear-gradient(0deg, rgba(3, 38, 85, 0.9) 0%, rgba(3, 38, 85, 0.3) 50%, transparent 100%);
        z-index: 1;
    }

    .card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

    /* Mapeamento do Novo Layout do Dré */
    .card-1 { grid-column: span 1; grid-row: span 1; } /* 25w / 25h */
    .card-2 { grid-column: span 1; grid-row: span 1; } /* 25w / 25h */
    .card-3 { grid-column: span 2; grid-row: span 2; } /* 50w / 50h (Destaque) */
    .card-4 { grid-column: span 1; grid-row: span 1; } /* 25w / 25h */
    .card-5 { grid-column: span 1; grid-row: span 1; } /* 25w / 25h */
    .card-6 { grid-column: span 2; grid-row: span 1; } /* 50w / 25h */
    .card-7 { grid-column: span 2; grid-row: span 1; } /* 50w / 25h */

    .card-content {
        position: absolute;
        bottom: 0; left: 0; width: 100%;
        padding: 20px;
        z-index: 2;
    }

    .card-content h3 { color: #fff; font-size: 1.1rem; margin: 0; font-weight: 600; }

    /* Imagem de Fundo da Equipe */
    .footer-bg-image {
        position: absolute;
        bottom: 0;
        left: 65%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 1000px;
        height: 350px;
        z-index: 1;
        pointer-events: none;
    }

    .footer-bg-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        vertical-align: bottom;
    }

    @media (max-width: 1024px) {
        .bento-grid { grid-template-columns: repeat(2, 1fr); }
        .card { grid-column: span 1 !important; grid-row: span 1 !important; }
        .footer-bg-image { width: 100%; height: auto; position: relative; transform: none; left: 0; }
    }

    /* Modal */
    .ged-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
    .ged-modal-content { background: #fff; margin: 10% auto; padding: 30px; border-radius: 15px; width: 80%; max-width: 600px; position: relative; }
    .ged-modal-close { position: absolute; right: 20px; top: 10px; font-size: 30px; cursor: pointer; }