/* 13-officialbar.css
 * Estilos para a barra oficial do governo
 * Criado por Agência Federal
 * https://agencia.federal.gov.br
 */

:root {
    --af-off-bg-top: #0d1016;
    --af-off-bg-open: #0d1016;
    --af-off-border: rgba(255, 255, 255, .10);

    --af-off-pad-x: 18px;
    --af-off-gap: 14px;

    --af-off-title: 20px;
    --af-off-body: 14px;

    --af-off-text: rgba(255, 255, 255, .92);
    --af-off-muted: rgba(255, 255, 255, .78);

    --af-off-ic: 64px;
    --af-off-ic-border: rgba(212, 175, 55, .85);
    --af-off-ic-bg: rgba(255, 255, 255, .03);
}

/* full width + margem lateral pequena */
.af-official {
    background: var(--af-off-bg-top);
    color: var(--af-off-text);
    border-bottom: 1px solid var(--af-off-border);
    font-size: 13px;
}

.af-official .af-official-top {
    background: var(--af-off-bg-top);
}

.af-official .af-official-top-inner {
    max-width: none;
    padding: 10px var(--af-off-pad-x);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

/* botão “Um site oficial...” */
.af-official-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    color: var(--af-off-text);
    cursor: pointer;
    padding: 6px 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.15;
}

.af-official-toggle u {
    text-underline-offset: 2px;
}

.af-official-caret {
    opacity: .75;
    margin-left: 6px;
}

/* mini nav (se existir) */
.af-official-mini-nav {
    margin-left: auto;
}

.af-official-mini-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.af-official-mini-nav a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.af-official-mini-nav a:hover {
    color: #fff;
}

/* painel aberto */
.af-official-details {
    background: var(--af-off-bg-open);
    border-top: 0;
}

/* =========================================================
   GRID DO PAINEL (AJUSTADO: colunas mais próximas)
   ========================================================= */
.af-official-details .af-official-grid {
    max-width: 1100px;
    /* controla largura total */
    margin: 0;
    /* ❌ remove centralização */
    padding: 18px var(--af-off-pad-x) 22px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    column-gap: 12px;
    row-gap: var(--af-off-gap);
}

/* coluna */
.af-official-col {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 0;
    background: transparent;
    border: 0;
    min-width: 0;
}

/* círculo do ícone */
.af-official-ic {
    width: var(--af-off-ic);
    height: var(--af-off-ic);
    flex: 0 0 var(--af-off-ic);
    aspect-ratio: 1/1;
    border-radius: 999px;
    display: grid;
    place-items: center;

    border: 2px solid var(--af-off-ic-border);
    background: var(--af-off-ic-bg);
}

.af-official-txt {
    min-width: 0;
}

.af-official-col h5 {
    margin: 2px 0 6px 0;
    font-size: var(--af-off-title);
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.15;
    max-width: 26ch;
    text-wrap: balance;
}

.af-official-col p {
    margin: 0;
    font-size: var(--af-off-body);
    line-height: 1.35;
    color: var(--af-off-muted);
    max-width: 44ch;
}

/* =========================================================
   ÍCONES (SVG via mask)
   ========================================================= */
.af-svg {
    width: 26px;
    height: 26px;
    display: block;
    background: var(--af-gold);
    opacity: .95;
}

.af-svg-gov {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 2 7v2h20V7L12 2Zm-8 9v8H2v2h20v-2h-2v-8H4Zm2 0h2v8H6v-8Zm4 0h2v8h-2v-8Zm4 0h2v8h-2v-8Zm-9 10h14v1H5v-1Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 2 7v2h20V7L12 2Zm-8 9v8H2v2h20v-2h-2v-8H4Zm2 0h2v8H6v-8Zm4 0h2v8h-2v-8Zm4 0h2v8h-2v-8Zm-9 10h14v1H5v-1Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.af-svg-lock {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 9h-1V7a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2ZM10 7a2 2 0 1 1 4 0v2h-4V7Zm7 13H7v-9h10v9Zm-5-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 9h-1V7a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2ZM10 7a2 2 0 1 1 4 0v2h-4V7Zm7 13H7v-9h10v9Zm-5-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* =========================================================
   BANDEIRA DO BRASIL (SVG no tema)
   ========================================================= */
.af-flag {
    width: 22px;
    height: 15px;
    display: inline-block;
    background: url("../img/bandeira-brasil.svg") no-repeat center/cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, .3);
}

/* =========================================================
   Animação suave de abertura
   ========================================================= */
.af-official-details {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 360ms cubic-bezier(.4, 0, .2, 1),
        opacity 240ms ease;
    will-change: max-height, opacity;
}

.af-official-details.is-open {
    opacity: 1;
}

/* =========================================================
   RESPONSIVO: vira 1 coluna no mobile
   ========================================================= */
@media (max-width: 820px) {
    .af-official-details .af-official-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }
}