/* Achados do Acervo: vitrine (achados.php), detalhe (achado.php) e bloco da
   home. Paleta e tipografia do portal (css/theme.css, Merriweather/Inter). */

.ach-page { padding: 118px 0 64px; background: var(--phc-bg); color: var(--phc-text); }
.ach-page .container { max-width: 1180px; }

.ach-eyebrow { font: 600 12px/1.4 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--phc-brown); margin: 0 0 8px; }
.ach-title { font: 700 clamp(28px, 4.2vw, 40px)/1.15 'Merriweather', serif; color: var(--phc-text-heading); margin: 0 0 12px; text-align: left; }
.ach-lead { font: 300 17px/1.6 'Merriweather', serif; color: var(--phc-text-secondary); max-width: 720px; margin: 0; }
.ach-hero { margin-bottom: 22px; }

/* abas de ordem */
.ach-abas { display: flex; gap: 6px; border-bottom: 1px solid var(--phc-border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.ach-abas::-webkit-scrollbar { display: none; }
.ach-aba { font: 600 14px 'Inter', sans-serif; color: var(--phc-text-secondary); padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.ach-aba:hover { color: var(--phc-brown); text-decoration: none; }
.ach-aba.is-ativa { color: var(--phc-brown); border-bottom-color: var(--phc-gold); }

/* filtros */
.ach-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.ach-busca { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 14px; height: 42px; border: 1px solid var(--phc-border); border-radius: 999px; background: var(--phc-bg-warm); }
.ach-busca i { color: var(--phc-text-muted); }
.ach-busca input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--phc-text); font: 400 15px 'Inter', sans-serif; outline: none; }
.ach-select { margin: 0; flex: 0 1 auto; }
.ach-select select { height: 42px; max-width: 220px; padding: 0 34px 0 14px; border: 1px solid var(--phc-border); border-radius: 999px; background: var(--phc-input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--phc-input-text); font: 500 14px 'Inter', sans-serif; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ach-select select:focus, .ach-busca:focus-within { border-color: var(--phc-gold); outline: none; box-shadow: 0 0 0 3px rgba(211, 158, 0, .18); }

.ach-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 1px solid var(--phc-brown); border-radius: 999px; background: var(--phc-brown); color: #fff; font: 600 14px 'Inter', sans-serif; cursor: pointer; text-decoration: none; transition: filter .15s; }
.ach-btn:hover { filter: brightness(1.12); color: #fff; text-decoration: none; }
.ach-btn-contorno { background: transparent; color: var(--phc-brown); }
.ach-btn-contorno:hover { background: var(--phc-bg-warm); color: var(--phc-brown); filter: none; }
[data-theme="dark"] .ach-btn { color: #1a1a1a; }
[data-theme="dark"] .ach-btn-contorno { color: var(--phc-brown); }

.ach-resumo { font: 400 14px 'Inter', sans-serif; color: var(--phc-text-muted); margin: 0 0 18px; }
.ach-resumo a { color: var(--phc-brown); }
.ach-resumo-nota { display: inline-block; margin-left: 10px; }
.ach-vazio { font: 300 16px/1.6 'Merriweather', serif; color: var(--phc-text-muted); padding: 28px; border: 1px dashed var(--phc-border); border-radius: 12px; text-align: center; }
.ach-vazio a { color: var(--phc-brown); }

/* grade de cards */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.ach-card { min-width: 0; }
.ach-card-link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--phc-card-border); border-radius: 12px; overflow: hidden; background: var(--phc-card-bg); color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; }
.ach-card-link:hover, .ach-card-link:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 26px var(--phc-card-shadow); border-color: var(--phc-gold); color: inherit; text-decoration: none; }
.ach-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--phc-bg-warm); overflow: hidden; }
.ach-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; filter: brightness(var(--phc-img-brightness, 1)); transition: transform .4s; }
.ach-card-link:hover .ach-card-img img { transform: scale(1.03); }
.ach-card-tipo { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(20, 16, 8, .72); color: #fff; font: 600 11px/1.4 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.ach-card-corpo { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.ach-card-titulo { font: 700 17px/1.35 'Merriweather', serif; color: var(--phc-text-heading); margin: 0; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ach-card-fonte { font: 400 13px/1.4 'Inter', sans-serif; color: var(--phc-text-secondary); margin: 0; }
.ach-card-selos { margin: auto 0 0; padding-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }

.ach-selo { display: inline-flex; align-items: center; gap: 5px; font: 500 12px/1 'Inter', sans-serif; color: var(--phc-text-secondary); background: var(--phc-bg-warm); border: 1px solid var(--phc-border); border-radius: 999px; padding: 5px 9px; }
.ach-selo .fa-heart { color: #c0392b; }
.ach-selo-novo { color: var(--phc-brown); border-color: rgba(211, 158, 0, .45); background: rgba(244, 208, 63, .16); }

.ach-epoca { margin-bottom: 34px; }
.ach-epoca-titulo { font: 700 22px/1.2 'Merriweather', serif; color: var(--phc-text-heading); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--phc-border); text-align: left; }
.ach-mais-wrap { text-align: center; margin: 30px 0 0; }

/* detalhe */
.ach-detalhe-page { padding-top: 108px; }
.ach-trilha { font: 400 14px 'Inter', sans-serif; color: var(--phc-text-muted); display: flex; gap: 8px; margin-bottom: 18px; }
.ach-trilha a { color: var(--phc-brown); text-decoration: none; }
.ach-trilha a:hover { text-decoration: underline; }

.ach-detalhe { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.ach-midia { position: sticky; top: 96px; min-width: 0; }
.ach-figura { margin: 0; }
.ach-figura-botao { display: block; width: 100%; padding: 0; border: 1px solid var(--phc-border); border-radius: 12px; background: var(--phc-bg-warm); overflow: hidden; cursor: zoom-in; position: relative; }
.ach-figura-botao img { display: block; width: 100%; height: auto; max-height: calc(100vh - 190px); object-fit: contain; filter: brightness(var(--phc-img-brightness, 1)); }
.ach-figura-lupa { position: absolute; right: 12px; bottom: 12px; padding: 6px 11px; border-radius: 999px; background: rgba(20, 16, 8, .72); color: #fff; font: 600 12px 'Inter', sans-serif; opacity: .9; }
.ach-figura figcaption { font: 400 13px/1.5 'Inter', sans-serif; color: var(--phc-text-muted); margin-top: 8px; }
.ach-miniaturas { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.ach-mini { flex: 0 0 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--phc-bg-warm); cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.ach-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ach-mini:hover, .ach-mini.is-atual { opacity: 1; border-color: var(--phc-gold); }

.ach-texto { min-width: 0; }
.ach-h1 { font: 700 clamp(26px, 3.4vw, 36px)/1.2 'Merriweather', serif; color: var(--phc-text-heading); margin: 0 0 10px; text-align: left; }
.ach-subtitulo { font: 300 19px/1.5 'Merriweather', serif; color: var(--phc-text-secondary); margin: 0 0 14px; }
.ach-publico { display: flex; gap: 8px; flex-wrap: wrap; min-height: 26px; margin-bottom: 18px; }
.ach-corpo { font: 400 17px/1.75 'Merriweather', serif; color: var(--phc-text); }
.ach-corpo p { margin: 0 0 1.1em; font: inherit; color: inherit; text-align: left; }
.ach-btn-origem { margin: 6px 0 22px; height: 46px; }

.ach-ficha { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 22px; padding: 16px 0; border-top: 1px solid var(--phc-border); border-bottom: 1px solid var(--phc-border); font: 400 14px/1.5 'Inter', sans-serif; }
.ach-ficha dt { font-weight: 600; color: var(--phc-text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; padding-top: 3px; }
.ach-ficha dd { margin: 0; color: var(--phc-text); }
.ach-temas { display: flex; flex-wrap: wrap; gap: 6px; }
.ach-tema { padding: 3px 11px; border-radius: 999px; border: 1px solid var(--phc-border); background: var(--phc-bg-warm); color: var(--phc-brown); font: 500 13px 'Inter', sans-serif; text-decoration: none; }
.ach-tema:hover { border-color: var(--phc-gold); color: var(--phc-brown); text-decoration: none; }

.ach-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ach-acoes-rotulo { font: 600 11px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--phc-text-muted); margin-left: 6px; }
.ach-curtir + .ach-acoes-rotulo { margin-left: 10px; }
.ach-curtir[hidden] + .ach-acoes-rotulo { margin-left: 0; }
.ach-share, .ach-curtir { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid var(--phc-border); border-radius: 999px; background: var(--phc-card-bg); color: var(--phc-text); font: 600 13px 'Inter', sans-serif; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.ach-share:hover, .ach-curtir:hover { border-color: var(--phc-gold); color: var(--phc-text); text-decoration: none; }
.ach-share .fa { font-size: 16px; }
.ach-share-whats .fa { color: #1faa53; }
.ach-share-face .fa { color: #1877f2; }
.ach-curtir .fa { color: #c0392b; font-size: 16px; }
.ach-curtir.is-curtido { background: rgba(192, 57, 43, .08); border-color: rgba(192, 57, 43, .45); }

.ach-relacionados { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--phc-border); }
.ach-secao-titulo { font: 700 24px/1.2 'Merriweather', serif; color: var(--phc-text-heading); margin: 0 0 18px; text-align: left; }

/* lightbox */
.ach-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 8, 4, .94); display: flex; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.ach-lightbox[hidden] { display: none; }
.ach-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ach-lb-fechar, .ach-lb-nav { position: absolute; border: 0; border-radius: 999px; width: 44px; height: 44px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer; }
.ach-lb-fechar:hover, .ach-lb-nav:hover { background: rgba(255, 255, 255, .26); }
.ach-lb-fechar { top: 12px; right: 12px; }
.ach-lb-nav { top: 50%; transform: translateY(-50%); }
.ach-lb-ant { left: 12px; }
.ach-lb-prox { right: 12px; }
body.ach-sem-rolagem { overflow: hidden; }

/* bloco da home */
.ach-home { padding: 64px 0; background: var(--phc-bg-warm); }
.ach-home-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ach-home-topo h2 { font: 700 clamp(26px, 3.4vw, 34px)/1.2 'Merriweather', serif; color: var(--phc-text-heading); margin: 0; text-align: left; }
.ach-home-topo p { font: 300 16px/1.6 'Merriweather', serif; color: var(--phc-text-secondary); margin: 6px 0 0; max-width: 620px; }
.ach-home .ach-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (max-width: 991px) {
    .ach-detalhe { grid-template-columns: 1fr; gap: 24px; }
    .ach-midia { position: static; }
    .ach-figura-botao img { max-height: 72vh; }
}

@media (max-width: 575px) {
    .ach-page { padding-top: 96px; }
    .ach-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .ach-card-corpo { padding: 10px 11px 12px; gap: 4px; }
    .ach-card-titulo { font-size: 14px; }
    .ach-card-fonte { font-size: 12px; }
    .ach-card-tipo { font-size: 10px; left: 7px; top: 7px; padding: 2px 7px; }
    .ach-filtros .ach-select { flex: 1 1 calc(50% - 5px); }
    .ach-select select { max-width: none; width: 100%; }
    .ach-filtros .ach-btn { display: none; }
    .ach-resumo-nota { display: block; margin: 4px 0 0; }
    .ach-corpo { font-size: 16px; }
    .ach-acoes-rotulo { display: none; }
    .ach-share span { display: none; }
    .ach-share { width: 44px; padding: 0; justify-content: center; }
    .ach-home { padding: 44px 0; }
    .ach-home .ach-grid { grid-template-columns: 1fr 1fr; }
}
