/* 01-base.css
 * Estilos globais, reset e tokens
 * Criado por Agência Federal
 * https://agencia.federal.gov.br
 */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--af-white);
    background: var(--af-black);
    line-height: 1.5;
}

a {
    color: var(--af-gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.af-container {
    width: min(var(--af-max), calc(100% - 32px));
    margin: 0 auto;
}

/* ✅ Skip link (sem overflow horizontal) */
.af-skip {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 9999;

    /* fica fora da tela sem estourar largura */
    transform: translateY(-220%);
    opacity: 0;
    pointer-events: none;

    /* já deixa com “cara” de foco */
    padding: 10px 12px;
    background: var(--af-white);
    color: #000;
    border-radius: 10px;
}

.af-skip:focus,
.af-skip:focus-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    outline: none;
}

/* Forms (ajuda plugins) */
input,
select,
textarea {
    max-width: 100%;
}

.af-content input,
.af-content select,
.af-content textarea {
    background: #0d1118;
    border: 1px solid var(--af-border);
    color: var(--af-white);
    border-radius: 12px;
    padding: 10px 12px;
}

.af-content button,
.af-content input[type="submit"] {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(212, 175, 55, .45);
    background: rgba(212, 175, 55, .12);
    color: var(--af-white);
    cursor: pointer;
}

/* =========================================================
   AF TOPCARD (GLOBAL)
   Usado em home, category, search etc.
   ========================================================= */

.af-topcard {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: var(--af-radius);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.af-topcard-media {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    background: #f2f4f7;
}

.af-topcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

.af-topcard-ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, .18), rgba(0, 0, 0, .04));
}

.af-topcard-body {
    padding: 12px 12px 14px 12px;
}

.af-topcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(0, 0, 0, .62);
    font-size: 12.5px;
    margin-bottom: 8px;
}

.af-topcard-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    line-height: 1.25;
}

.af-topcard-title a {
    color: #111;
    text-decoration: none;
}

.af-topcard-title a:hover {
    text-decoration: underline;
}

.af-topcard-excerpt {
    margin: 0;
    color: rgba(0, 0, 0, .74);
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}