.apaferj-arquivo {
  --arquivo-paper: #ddd4c7;
  --arquivo-surface: #f0e9df;
  --arquivo-ink: #29384a;
  --arquivo-muted: #515c67;
  --arquivo-line: #d7dce3;
  --arquivo-gold: #9b6f29;
  color: var(--arquivo-ink);
  background: var(--arquivo-paper);
}
.apaferj-arquivo * { box-sizing: border-box; }
html[data-apaferj-tema="escuro"] .apaferj-arquivo { --arquivo-paper:#202936; --arquivo-surface:#293443; --arquivo-ink:#f2efe8; --arquivo-muted:#c1c8d2; --arquivo-line:#435166; --arquivo-gold:#e1bd72; }

.apaferj-arquivo-hero { position: relative; overflow: hidden; padding: clamp(2rem,3.5vw,2.8rem) 1.5rem; color:#fff; background:radial-gradient(circle at 88% 10%,rgba(52,92,186,.38),transparent 35%),linear-gradient(120deg,#071a39,#0b2853 65%,#102f5d); }
.apaferj-arquivo-hero::after { content:""; position:absolute; right:-120px; bottom:-220px; width:520px; height:520px; opacity:.12; background:url("../images/brand/procurador-federal-watermark.png") center/contain no-repeat; }
.apaferj-arquivo-hero__inner { position:relative; z-index:1; }
.apaferj-arquivo__kicker { margin:0 0 1rem; color:#efd9a4; font-size:.75rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.apaferj-arquivo__kicker::before { content:""; display:inline-block; width:24px; height:2px; margin:0 10px 3px 0; background:currentColor; }
.apaferj-arquivo-hero h1 { max-width:900px; margin:0; color:#fff!important; font-size:clamp(1.75rem,2.8vw,2.45rem); line-height:1.06; letter-spacing:-.025em; }
.apaferj-arquivo-lista .apaferj-layout-com-rail .apaferj-arquivo-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
.apaferj-arquivo__lead { max-width:680px; margin:1.25rem 0 0; color:#ccd7e7; font-size:1rem; }
.apaferj-arquivo__apoio { align-items:center; gap:1.5rem; margin-top:3rem; padding-top:1.5rem; border-top:1px solid rgba(255,255,255,.18); }
.apaferj-arquivo__apoio > p { margin:0; color:#aebed3; font-size:.84rem; }
.apaferj-arquivo__apoio .wp-block-search { width:min(100%,360px); }
.apaferj-arquivo__apoio .wp-block-search__inside-wrapper { padding:4px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25); border-radius:999px; }
.apaferj-arquivo__apoio .wp-block-search__input { min-width:0; color:#fff; background:transparent; border:0; }
.apaferj-arquivo__apoio .wp-block-search__input::placeholder { color:#c4d0e0; }
.apaferj-arquivo__apoio .wp-block-search__button { margin:0; color:#0a2146; background:#fff; border-radius:999px; }

.apaferj-arquivo-lista { padding:clamp(2rem,4vw,3.35rem) 1.5rem; }
.apaferj-arquivo .apaferj-arquivo-grid { gap:1.25rem; }
.apaferj-arquivo .apaferj-arquivo-grid > li { overflow:hidden; padding:0; background:var(--arquivo-surface); border:1px solid var(--arquivo-line); border-radius:20px; box-shadow:0 10px 28px rgba(7,27,58,.08); transition:transform 240ms ease,background-color 240ms ease,border-color 240ms ease,box-shadow 240ms ease; }
.apaferj-arquivo .apaferj-arquivo-grid > li:hover,
.apaferj-arquivo .apaferj-arquivo-grid > li:focus-within { transform:translateY(-7px); background:color-mix(in srgb,var(--arquivo-gold) 7%,var(--arquivo-surface)); border-color:color-mix(in srgb,var(--arquivo-gold) 48%,var(--arquivo-line)); box-shadow:0 24px 55px rgba(7,27,58,.14); }
.apaferj-arquivo-documento { position:relative; isolation:isolate; height:200px; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; padding:1.25rem; color:#fff; background:radial-gradient(circle at 100% 0,rgba(70,120,205,.5),transparent 52%),linear-gradient(145deg,#09234b,#194d8b); }
.apaferj-arquivo-foto { height:200px; margin:0; overflow:hidden; background:#d9d3c8; }
.apaferj-arquivo-foto a { display:block; height:100%; }
.apaferj-arquivo-foto img { width:100%; height:100%; object-fit:cover; transition:transform 420ms ease; }
.apaferj-arquivo-card:has(.apaferj-arquivo-foto img) .apaferj-arquivo-documento { display:none; }
.apaferj-arquivo-card:hover .apaferj-arquivo-foto img { transform:scale(1.025); }
.apaferj-arquivo-documento { transition:filter 240ms ease,transform 420ms ease; transform-origin:center; }
.apaferj-arquivo-grid > li:hover .apaferj-arquivo-documento,
.apaferj-arquivo-grid > li:focus-within .apaferj-arquivo-documento { filter:saturate(1.15) brightness(1.05); transform:scale(1.018); }
.apaferj-arquivo-documento::after { content:""; position:absolute; z-index:-1; right:-65px; bottom:-75px; width:260px; height:260px; opacity:.2; background:url("../images/brand/procurador-federal-watermark.png") center/contain no-repeat; }
.apaferj-arquivo-documento > span { display:flex; align-items:center; gap:.7rem; font-size:.7rem; letter-spacing:.14em; }
.apaferj-arquivo-documento img { width:42px; height:42px; object-fit:contain; filter:drop-shadow(0 5px 8px rgba(0,0,0,.22)); }
.apaferj-arquivo-documento div { display:flex; flex-direction:column; }
.apaferj-arquivo-documento small { margin-bottom:.45rem; color:#eed9aa; font-size:.67rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.apaferj-arquivo-documento strong { font-family:var(--wp--preset--font-family--serif); font-size:1.65rem; line-height:1.04; }
.apaferj-arquivo-documento i { position:absolute; inset:auto 0 0; height:6px; background:linear-gradient(90deg,#c62b39 0 66%,#d8e62d 66%); }
.apaferj-arquivo-card__body { padding:1.3rem 1.4rem 1.45rem; }
.apaferj-arquivo-card__body .wp-block-post-date { margin:0 0 .65rem; color:var(--arquivo-gold); font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.apaferj-arquivo-card__body h2 { margin:0 0 .8rem; color:var(--arquivo-ink); font-size:1.25rem; line-height:1.16; }
.apaferj-arquivo-card__body h2 a { color:inherit!important; text-decoration:none; }
.apaferj-arquivo-card__body .wp-block-post-excerpt { margin:0; color:var(--arquivo-muted); font-size:.92rem; }
.apaferj-arquivo-card__body .wp-block-post-excerpt__more-link { display:inline-flex; margin-top:1rem; color:var(--arquivo-ink)!important; font-weight:700; text-decoration:none; }
.apaferj-arquivo-paginacao { gap:1rem; margin-top:3rem; padding-top:2rem; border-top:1px solid var(--arquivo-line); }
.apaferj-arquivo-paginacao a,
.apaferj-arquivo-paginacao .current { color:var(--arquivo-ink)!important; background:var(--arquivo-surface); }

@media(max-width:900px){.apaferj-arquivo .apaferj-arquivo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:600px){
  .apaferj-arquivo-hero{padding:3rem 1rem 3.5rem}.apaferj-arquivo-hero h1{font-size:2.75rem}.apaferj-arquivo__lead{font-size:1rem}.apaferj-arquivo__apoio{align-items:stretch!important;flex-direction:column}.apaferj-arquivo__apoio .wp-block-search{width:100%}.apaferj-arquivo-lista{padding:3rem .85rem}.apaferj-arquivo .apaferj-arquivo-grid{grid-template-columns:1fr!important;gap:1.25rem}.apaferj-arquivo-documento{height:210px}.apaferj-arquivo-card__body{padding:1.4rem}.apaferj-arquivo-paginacao{align-items:stretch!important;flex-direction:column}.apaferj-arquivo-paginacao a{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){.apaferj-arquivo-grid>li,.apaferj-arquivo-documento{transition:none!important;transform:none!important}}

/* Hub Editorial: as quatro portas usam uma única família de componente. */
.apaferj-editorial { --arquivo-paper:#ddd4c7; --arquivo-surface:#f0e9df; --arquivo-ink:#233552; --arquivo-muted:#515c67; --arquivo-line:#c1b7a8; --arquivo-gold:#8b6925; background:var(--arquivo-paper); }
html[data-apaferj-tema="escuro"] .apaferj-editorial { --arquivo-paper:#202936; --arquivo-surface:#293443; --arquivo-ink:#f2efe8; --arquivo-muted:#c1c8d2; --arquivo-line:#435166; --arquivo-gold:#e1bd72; }
.apaferj-editorial-hero { position:relative; overflow:hidden; padding:clamp(2.35rem,4.5vw,3.8rem) 1.5rem; color:#fff; background:radial-gradient(circle at 82% 20%,rgba(64,105,190,.34),transparent 34%),linear-gradient(120deg,#071a39,#0c2c5d); }
.apaferj-editorial-hero::after { content:""; position:absolute; right:-8rem; bottom:-13rem; width:32rem; height:32rem; opacity:.1; background:url("../images/brand/procurador-federal-watermark.png") center/contain no-repeat; }
.apaferj-editorial-hero__inner { position:relative; z-index:1; max-width:52rem; margin-left:0!important; }
.apaferj-editorial-hero h1 { margin:0 0 .8rem; color:#fff!important; font-size:clamp(1.85rem,3.2vw,2.65rem); }
.apaferj-editorial-hero p:last-child { max-width:45rem; margin-bottom:0; color:#d2ddec; }
.apaferj-editorial-conteudo { padding:clamp(2.2rem,4vw,3.5rem) 1.5rem; }
.apaferj-editorial-portas { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.apaferj-editorial-portas a { position:relative; min-height:10.5rem; display:flex; flex-direction:column; overflow:hidden; padding:1.25rem; color:var(--arquivo-ink)!important; background:var(--arquivo-surface); border:1px solid var(--arquivo-line); border-radius:16px; box-shadow:0 8px 22px rgba(7,27,58,.06); text-decoration:none; transition:transform 240ms ease,border-color 240ms ease,box-shadow 240ms ease; }
.apaferj-editorial-portas a::after { content:""; position:absolute; inset:0 0 auto; height:3px; background:linear-gradient(90deg,#102d65 0 78%,#b48a39 78%); }
.apaferj-editorial-portas a.is-destaque { color:#fff!important; background:linear-gradient(140deg,#0a2148,#12417c); border-color:transparent; }
.apaferj-editorial-portas a:is(:hover,:focus-visible) { transform:translateY(-.3rem); border-color:color-mix(in srgb,var(--arquivo-gold) 55%,var(--arquivo-line)); box-shadow:0 20px 44px rgba(7,27,58,.12); }
.apaferj-editorial-portas small { color:var(--arquivo-gold); font-size:.7rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.apaferj-editorial-portas .is-destaque small { color:#f0d79f; }
.apaferj-editorial-portas strong { margin:.55rem 0; font-family:var(--wp--preset--font-family--serif); font-size:1.2rem; line-height:1.14; }
.apaferj-editorial-portas span { margin-top:auto; color:var(--arquivo-muted); font-size:.85rem; line-height:1.5; }
.apaferj-editorial-portas .is-destaque span { color:#d3deed; }
.apaferj-editorial-recentes__cabecalho { align-items:end; gap:1rem; margin:2.2rem 0 1rem; }
.apaferj-editorial-recentes__cabecalho h2 { margin:0; }
.apaferj-editorial-recentes__cabecalho > p { margin:0; }
.apaferj-editorial-recentes__cabecalho a { color:var(--arquivo-ink); font-weight:700; }
.apaferj-editorial-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:1rem!important; margin:0; padding:0; }
.apaferj-editorial-grid > li { overflow:hidden; padding:0!important; background:var(--arquivo-surface)!important; border:1px solid var(--arquivo-line)!important; border-radius:20px!important; }
.apaferj-editorial-grid .apaferj-arquivo-documento,.apaferj-editorial-grid .apaferj-arquivo-foto { height:165px; }
.apaferj-editorial-grid .apaferj-arquivo-card__body { padding:1.1rem; }
.apaferj-editorial-grid .apaferj-arquivo-card__body h3 { margin:0 0 .7rem; color:var(--arquivo-ink); font-size:1.15rem; line-height:1.18; }
.apaferj-editorial-grid .apaferj-arquivo-card__body h3 a { color:inherit!important; text-decoration:none; }
.apaferj-editorial-jornal { position:relative; overflow:hidden; margin-top:2.2rem; padding:clamp(1.35rem,3vw,2rem); background:color-mix(in srgb,var(--arquivo-gold) 8%,var(--arquivo-surface)); border:1px solid color-mix(in srgb,var(--arquivo-gold) 42%,var(--arquivo-line)); border-radius:17px; }
.apaferj-editorial-jornal::after { content:"J"; position:absolute; right:1.5rem; bottom:-3rem; color:color-mix(in srgb,var(--arquivo-gold) 10%,transparent); font-family:var(--wp--preset--font-family--serif); font-size:14rem; line-height:1; }
.apaferj-editorial-jornal > * { position:relative; z-index:1; max-width:42rem; }
.apaferj-editorial-jornal h2 { margin:0 0 .8rem; color:var(--arquivo-ink); }
.apaferj-editorial-jornal p { color:var(--arquivo-muted); }
.apaferj-editais .apaferj-arquivo-documento strong { font-size:1.5rem; }
.apaferj-editais-vazio { padding:2rem; background:var(--arquivo-surface); border:1px solid var(--arquivo-line); border-radius:20px; }
.apaferj-editais-vazio h2 { margin-top:0; color:var(--arquivo-ink); }

@media(max-width:760px){
  .apaferj-editorial-hero{padding:3rem 1rem}.apaferj-editorial-conteudo{padding:2.5rem .85rem}.apaferj-editorial-portas,.apaferj-editorial-grid{grid-template-columns:1fr!important}.apaferj-editorial-portas a{min-height:10.5rem}.apaferj-editorial-jornal::after{display:none}
}

@media(prefers-reduced-motion:reduce){.apaferj-editorial-portas a{transition:none!important;transform:none!important}}
