/* ==================================================
   ANCESGEN PUBLICAÇÕES — artigos e matérias por ano
   Tudo com prefixo .apb- para não conflitar com o tema.
================================================== */

.apb-ano {
    --apb-verde: #16a68a;
    --apb-verde-escuro: #0e7f69;
    --apb-verde-claro: #f1f8f5;
    --apb-vermelho: #c00000;
    --apb-texto: #111;
    --apb-texto-suave: #4a4a4a;
    --apb-borda: #e2ebe7;

    margin: 36px 0 0;
    font-family: Arial, sans-serif;
}

.apb-titulo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--apb-texto);
}

.apb-titulo::before {
    content: "";
    flex: 0 0 auto;
    width: 30px;
    height: 5px;
    margin-top: .55em;
    border-radius: 3px;
    background: var(--apb-vermelho);
}

.apb-artigos,
.apb-materias {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------- Artigos: periódico | referência | botão ---------- */

.apb-artigos {
    display: grid;
    gap: 14px;
}

.apb-artigo {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 16px 20px 16px 16px;
    background: #fff;
    border: 1px solid var(--apb-borda);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(16, 70, 55, .05);
}

.apb-selo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    overflow: hidden;
}

/* quadro com o nome do periódico, no estilo do site */
.apb-periodico {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 14px 16px;
    background:
        radial-gradient(circle at 85% 20%, rgba(22, 166, 138, .35) 0, transparent 55%),
        linear-gradient(135deg, #0e5c4f 0%, #0e7f69 60%, #16a68a 100%);
    color: #fff;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    border-left: 4px solid var(--apb-vermelho);
}

.apb-capa {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pagina-quem-somos .apb-referencia,
.apb-referencia {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--apb-texto-suave);
    overflow-wrap: anywhere;
}

.apb-referencia strong {
    color: var(--apb-texto);
}

.apb-botao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--apb-verde);
    border-radius: 6px;
    background: #fff;
    color: var(--apb-verde-escuro) !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none !important;
}

.apb-botao::before {
    content: "";
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.apb-botao:hover,
.apb-botao:focus-visible {
    background: var(--apb-verde-claro);
}

.apb-botao:focus-visible,
.apb-materia:focus-visible {
    outline: 2px solid var(--apb-verde);
    outline-offset: 2px;
}

/* ---------- Matérias: veículo | site | ler ---------- */

.apb-materias {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.apb-materias > li {
    display: flex;
    min-width: 0;
}

.apb-materia {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "veiculo ler" "site ler";
    align-items: center;
    column-gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--apb-borda);
    border-left: 3px solid var(--apb-verde);
    border-radius: 8px;
    text-decoration: none !important;
    transition: border-color .15s ease, background-color .15s ease;
}

.apb-materia:hover {
    background: var(--apb-verde-claro);
    border-color: var(--apb-verde);
}

.apb-veiculo {
    grid-area: veiculo;
    font-size: 14px;
    font-weight: 700;
    color: var(--apb-texto);
}

.apb-site {
    grid-area: site;
    margin-top: 2px;
    font-size: 12px;
    color: var(--apb-texto-suave);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apb-ler {
    grid-area: ler;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--apb-verde-escuro);
    white-space: nowrap;
}

.apb-ler::after {
    content: "";
    width: 13px;
    height: 13px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* aviso curto abaixo das matérias */
.pagina-quem-somos .apb-aviso,
.apb-aviso {
    margin: 14px 0 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-style: italic;
    line-height: 1.5;
    color: #6b6b6b;
}

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
    .apb-artigo {
        grid-template-columns: 140px minmax(0, 1fr);
    }
    .apb-botao {
        grid-column: 2;
        justify-self: start;
    }
    .apb-materias { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Celular ---------- */

@media (max-width: 640px) {
    .apb-titulo { font-size: 18px; }
    .apb-artigo {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .apb-selo { aspect-ratio: auto; height: 72px; }
    .apb-botao { grid-column: auto; }
    .apb-materias { grid-template-columns: minmax(0, 1fr); }
}
