/* Portal público — mobile-first */

/* Cabeçalho */
.topbar { background: var(--brand-dark); color: #fff; font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: 12px; }
.topbar a { color: #fff; opacity: .85; }
.topbar .today { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; border-bottom: 3px solid var(--accent); }
.header .brand-name small { color: #cfcde0; }
.header .search-form input { background: #1a1a24; border-color: #2c2c3a; color: #fff; }
.header .search-form input::placeholder { color: #8c8ca0; }
.header .search-form .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.header .wrap > * { min-width: 0; }
.header .brand { flex: 1 1 auto; }
.header .brand-name { overflow: hidden; }
.header .brand-name small { white-space: normal; line-height: 1.3; }
@media (max-width: 899px) { .header .brand-name { font-size: 22px; } .header .brand-name small { font-size: 8px; letter-spacing: .08em; } }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 10px; background: none; border: 0; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; }
.search-form { display: none; }
.search-form input { width: 220px; padding: 8px 12px; border-radius: 999px; }
.nav { display: none; border-top: 1px solid #22222e; background: var(--ink); color: #fff; }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-direction: column; }
.nav a { display: block; padding: 10px 16px; font-family: var(--font-ui); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; border-left: 4px solid transparent; }
.nav a:hover, .nav a.active { border-left-color: var(--ed, var(--accent)); background: #1a1a24; color: var(--accent); text-decoration: none; }
.nav .nav-search { padding: 8px 16px 12px; }
.nav .nav-search form { display: flex; gap: 6px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .search-form { display: flex; gap: 6px; }
  .nav { display: block; }
  .nav ul { flex-direction: row; padding: 0; overflow-x: auto; }
  .nav a { padding: 10px 14px; border-left: 0; border-bottom: 3px solid transparent; font-size: 13px; }
  .nav a:hover, .nav a.active { border-bottom-color: var(--ed, var(--accent)); background: transparent; }
  .nav .nav-search { display: none; }
}

/* Seções */
.section { padding: 28px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; border-bottom: 2px solid var(--brand); padding-bottom: 8px; }
.section-head h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.section-head h2::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--ed, var(--accent)); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.section-head a { font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }

/* Cards */
.card { display: flex; flex-direction: column; gap: 8px; }
.card .thumb { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.03); }
.card h3 { font-size: 18px; }
.card h3 a:hover { color: var(--brand); text-decoration: none; }
.card .resumo { font-family: var(--font-body); color: var(--ink-2); font-size: 15px; margin: 0; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* Mais visualizadas (topo da home) */
.top-views { padding-top: 8px; }
.card-top { background: var(--paper-2); border-radius: var(--radius); padding: 14px; }
.card-top .thumb { position: relative; }
.card-top .rank { position: absolute; top: 8px; left: 8px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--ink-2); font-family: var(--font-head); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.card-top .label-top { display: block; font-family: var(--font-head); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; color: var(--brand-dark); margin-bottom: 6px; }
.card-top .label-top::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* Grade principal: notícias + publicidade lateral */
.main-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .main-grid { grid-template-columns: 1fr 300px; } }
.sidebar { display: flex; flex-direction: column; }

.grid-4, .grid-6 { display: grid; gap: 18px; }
.grid-4 .card h3, .grid-6 .card h3 { font-size: 15px; }
.grid-4 .card .resumo, .grid-6 .card .resumo { display: none; }
@media (min-width: 480px) { .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 740px) { .grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-6 { grid-template-columns: repeat(6, 1fr); } .grid-6 .card h3 { font-size: 14px; } }

/* Listagem (editoria/busca) */
.list-latest { display: flex; flex-direction: column; }
.list-latest .card { flex-direction: row; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-latest .thumb { flex: 0 0 96px; aspect-ratio: 1; }
.list-latest h3 { font-size: 16px; }
.list-latest .resumo { display: none; }
@media (min-width: 600px) { .list-latest .thumb { flex-basis: 180px; aspect-ratio: 16/10; } .list-latest .resumo { display: block; } .list-latest h3 { font-size: 19px; } }

.grid-3 { display: grid; gap: 20px; }
@media (min-width: 600px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Mais lidas */
.ranking { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranking li { counter-increment: r; display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ranking li::before { content: counter(r); font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1; min-width: 24px; }
.ranking h4 { font-size: 15px; font-weight: 700; }
.ranking h4 a:hover { color: var(--brand); text-decoration: none; }

/* Cidades */
.cities { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cities a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; }
.cities a:hover, .cities a.active { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }

/* Caixa institucional */
.box { background: var(--paper-2); border-radius: var(--radius); padding: 18px; }
.box h3 { font-size: 16px; margin-bottom: 6px; }
.box p { font-size: 14px; color: var(--ink-2); }

/* Rodapé */
.footer { margin-top: 40px; background: var(--ink); color: #c9c7d8; padding: 36px 0 20px; font-size: 14px; border-top: 4px solid var(--brand); }
.footer .grid { display: grid; gap: 24px; }
@media (min-width: 700px) { .footer .grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h4 { color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a:hover { color: #fff; }
.footer .brand small { color: #9a98b0; }
.footer .legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid #2a2a38; font-size: 12px; color: #8a88a0; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid #39394a; border-radius: 50%; }
.social a:hover { background: var(--brand); border-color: var(--brand); }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* Página de listagem */
.page-title { padding: 24px 0 8px; }
.page-title h1 { font-size: clamp(26px, 5vw, 36px); }
.page-title p { color: var(--ink-3); font-family: var(--font-body); }
.filters { display: grid; gap: 10px; margin: 16px 0 22px; padding: 14px; background: var(--paper-2); border-radius: var(--radius); }
.filters .field { margin: 0; }
.filters .actions { display: flex; gap: 8px; align-items: end; }
@media (min-width: 700px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; } }
.result-count { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }

/* Reportagem */
.article { padding-top: 20px; }
.article-head { max-width: none; }
.article-head h1 { font-size: clamp(28px, 5.5vw, 44px); font-weight: 800; margin: 10px 0 12px; }
.article-head .sub { font-family: var(--font-body); font-size: 19px; color: var(--ink-2); line-height: 1.45; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.byline .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-head); }
.byline .who b { display: block; }
.byline .when { color: var(--ink-3); font-size: 13px; }
.share { margin-left: auto; display: flex; gap: 8px; }
.cover { margin: 22px auto; }
.cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }
.cover figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.cover figcaption b { color: var(--ink-2); font-weight: 600; }
.body { max-width: none; margin-inline: auto; font-family: var(--font-body); font-size: 18px; line-height: 1.7; color: #1d1d2a; }
.body p { margin-bottom: 1.3em; }
.body h2 { font-size: 24px; margin: 1.4em 0 .6em; }
.body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand); font-style: italic; color: var(--ink-2); }
.body > .body-ad + p::first-letter { font-family: var(--font-head); font-size: 3.2em; float: left; line-height: .85; padding: 4px 8px 0 0; color: var(--brand); font-weight: 800; }
.article-tags { margin: 24px auto; display: flex; flex-wrap: wrap; gap: 8px; }
.share-bottom { margin: 0 auto 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.wa { background: #25d366; border-color: #25d366; }
.wa:hover { background: #1da851; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.body-ad { margin: 0 0 16px; }
.body-ad .ad { margin: 0; }
@media (min-width: 740px) { .body-ad { float: right; width: 300px; margin: 0 0 16px 28px; } .body::after { content: ""; display: block; clear: both; } }
.breadcrumb { font-size: 13px; color: var(--ink-3); padding-top: 16px; }
.breadcrumb a:hover { color: var(--brand); }

/* Espaços publicitários (placeholders) */
.ad { position: relative; margin: 16px auto; display: flex; flex-direction: column; align-items: center; width: 100%; }
.ad-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.ad-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; border: 1px dashed #c9c3e0; border-radius: var(--radius); background: repeating-linear-gradient(135deg, var(--paper-2) 0 10px, #fff 10px 20px); color: var(--ink-3); font-size: 13px; text-align: center; }
.ad-inner b { color: var(--brand); font-family: var(--font-ui); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.ad-inner small { font-size: 11px; }
.ad-leaderboard .ad-inner { max-width: 970px; min-height: 300px; }
@media (min-width: 740px) { .ad-leaderboard .ad-inner { min-height: 270px; } }
.ad-rect .ad-inner { max-width: 300px; min-height: 250px; }
.ad-halfpage .ad-inner { max-width: 300px; min-height: 600px; }
.sidebar .ad { margin: 0 auto; flex: 1; }
.sidebar .ad-halfpage .ad-inner { flex: 1; }
.sidebar .ad.is-filled .ad-inner { flex: 1; }
.sidebar .ad.is-filled .ad-inner img { height: 100%; aspect-ratio: auto; }
.ad.is-filled .ad-inner { border: 0; background: none; min-height: 0; padding: 0; display: block; overflow: hidden; border-radius: var(--radius); }
.ad.is-filled .ad-inner img { width: 100%; height: auto; display: block; object-fit: cover; }
.ad.is-filled.ad-leaderboard .ad-inner img { aspect-ratio: 970/270; }
.ad.is-filled.ad-rect .ad-inner img { aspect-ratio: 300/250; }
.ad.is-filled.ad-halfpage .ad-inner img { aspect-ratio: 300/600; }
@media (max-width: 739px) { .ad.is-filled.ad-leaderboard .ad-inner img { aspect-ratio: 320/300; } }
