/* Estilos do motor (compartilhados por todos os sites).
   As cores vêm de --brand e --accent, definidas no layout a partir do config.json. */

:root {
    --brand: #2457A7;
    --accent: #F2A900;
    --ink: #1d2433;
    --muted: #5d6677;
    --surface: #f5f7fb;
    --line: #e3e7ef;
    --radius: .75rem;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 36, 87, 167;
}

body { color: var(--ink); background: #fff; }
a { color: var(--brand); }
a:hover { color: color-mix(in srgb, var(--brand) 75%, #000); }
h1, h2, h3, .h1, .h2, .h3 { font-weight: 800; letter-spacing: -.01em; }
.text-brand { color: var(--brand) !important; }

.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: .5rem; }

/* Botões */
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus-visible { background: color-mix(in srgb, var(--brand) 85%, #000); border-color: color-mix(in srgb, var(--brand) 85%, #000); color: #fff; }
.btn-brand-accent { background: var(--accent); border-color: var(--accent); color: #1b1b1b; font-weight: 600; }
.btn-brand-accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); color: #1b1b1b; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-buy { background: var(--accent); border-color: var(--accent); color: #1b1b1b; font-weight: 700; }
.btn-buy:hover, .btn-buy:focus-visible { background: color-mix(in srgb, var(--accent) 85%, #000); border-color: color-mix(in srgb, var(--accent) 85%, #000); color: #1b1b1b; }

/* Header */
.topbar { background: var(--brand); color: rgba(255,255,255,.9); font-size: .8rem; padding: .3rem 0; }
.site-header .navbar { padding-block: .75rem; }
.navbar-brand img { height: 40px; width: auto; }
.site-header .nav-link { font-weight: 600; color: var(--ink); }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--brand); }
.search-compact { min-width: 15rem; }
@media (min-width: 992px) {
    .mega-menu { width: 46rem; }
    .mega-sub { margin: 0 0 .5rem; padding-left: 1rem; }
    .mega-sub a { display: block; font-size: .85rem; color: var(--muted); text-decoration: none; padding: .1rem 0; }
    .mega-sub a:hover { color: var(--brand); }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #0b1730)); color: #fff; }
.hero-title { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.hero-subtitle { font-size: 1.15rem; opacity: .9; margin: 1rem auto 1.75rem; max-width: 40rem; }
.hero-search { max-width: 40rem; }
.hero-popular, .hero-popular a { color: rgba(255,255,255,.85); }
.hero-popular a:hover { color: #fff; }
.hero .btn-brand { background: var(--accent); border-color: var(--accent); color: #1b1b1b; }

/* Títulos de seção no estilo "portal" */
.section-title { font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1rem; padding-left: .75rem; border-left: 4px solid var(--accent); }

/* Tiles de categoria e projeto */
.category-tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.25rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; text-align: center; height: 100%; transition: border-color .15s, transform .15s; }
.category-tile:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.category-tile-initial { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); font-size: 1.3rem; font-weight: 900; }
.project-tile { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.project-tile:hover { border-color: var(--accent); }
.project-tile-title { font-weight: 800; }
.project-tile-text { font-size: .85rem; color: var(--muted); }

/* Cards */
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s; }
.post-card:hover { box-shadow: 0 .5rem 1.5rem rgba(20, 30, 60, .1); }
.post-card-img { background: var(--surface); }
.post-card-img img { object-fit: cover; }
.post-card .card-title a { color: var(--ink); text-decoration: none; }
.post-card:hover .card-title a { color: var(--brand); }
.post-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .75rem; }
.badge-type { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.post-card-author { color: var(--muted); }

.product-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); }
.product-card-img { padding: 1rem; text-align: center; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; }
.product-card-img img { max-height: 180px; width: auto; object-fit: contain; }
.product-badge, .badge-pick { background: var(--accent); color: #1b1b1b; font-weight: 700; }
.product-badge { position: absolute; top: .75rem; left: .75rem; padding: .25rem .5rem; border-radius: .4rem; font-size: .75rem; z-index: 1; }

/* Cabeçalhos de páginas */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb a { text-decoration: none; }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 2rem; text-decoration: none; color: var(--ink); background: #fff; font-size: .9rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-sm { font-size: .8rem; padding: .2rem .65rem; }
.category-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.category-card h2 a { color: var(--ink); text-decoration: none; }
.empty-state { background: var(--surface); border-radius: var(--radius); padding: 2rem; max-width: 40rem; }

/* Artigos */
.article { max-width: 60rem; }
.article-header h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.article-meta { color: var(--muted); }
.content-body { font-size: 1.05rem; line-height: 1.7; }
.content-body h2 { margin-top: 2.25rem; font-size: 1.6rem; }
.content-body h3 { margin-top: 1.5rem; font-size: 1.25rem; }
h2[id], h3[id], li[id], section[id] { scroll-margin-top: 1rem; }
.affiliate-disclosure { background: var(--surface); border-left: 4px solid var(--accent); padding: .75rem 1rem; border-radius: .4rem; margin: 1rem 0 1.5rem; color: var(--muted); }
.toc { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.toc summary { font-weight: 800; cursor: pointer; }
.toc ol { margin-top: .75rem; columns: 2 16rem; }
.callout { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; background: color-mix(in srgb, var(--brand) 8%, #fff); border-left: 4px solid var(--brand); }
.callout-tip { background: #eef8f0; border-color: #2f8a46; }
.callout-warning { background: #fff7e3; border-color: var(--accent); }
.callout-title { font-weight: 800; margin-bottom: .25rem; }

.criteria { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; }
.criteria-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; }
.criteria-weight { margin-left: .4rem; background: var(--brand); color: #fff; border-radius: .3rem; padding: 0 .35rem; font-size: .75rem; font-weight: 700; }

.summary-table img, .comparison-table img { object-fit: contain; background: var(--surface); border-radius: .4rem; }
.summary-table th, .comparison-table thead th { font-size: .8rem; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.comparison-table td, .comparison-table th { min-width: 9rem; }

.ranking-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.ranking-head { display: flex; gap: 1rem; align-items: center; }
.ranking-position { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 900; }
.ranking-img { max-width: 100%; height: auto; max-height: 260px; object-fit: contain; background: var(--surface); border-radius: var(--radius); }
.verdict { background: color-mix(in srgb, var(--accent) 14%, #fff); border-radius: var(--radius); padding: 1rem 1.25rem; }
.verdict-title { font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; margin-bottom: .25rem; }
.fit-list { padding-left: 1.1rem; }
.fit { border-radius: var(--radius); padding: 1rem; height: 100%; }
.fit-yes { background: #eef8f0; }
.fit-no { background: #fdeeee; }
.specs-table th { width: 45%; color: var(--muted); font-weight: 600; }
.specs-table caption { caption-side: top; font-weight: 700; color: var(--ink); }
.pros, .cons { border-radius: var(--radius); padding: 1rem 1.25rem; }
.pros { background: #eef8f0; }
.cons { background: #fdeeee; }
.pros ul, .cons ul { padding-left: 1.1rem; margin: 0; }
.pros-cons-title { font-weight: 800; margin-bottom: .5rem; }
.pros .pros-cons-title { color: #2f8a46; }
.cons .pros-cons-title { color: #b42318; }

.faq-item { border-bottom: 1px solid var(--line); padding: .85rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin-top: .5rem; }
.conclusion { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; }
.conclusion h2 { margin-top: 0; }

.author-box { display: flex; gap: 1rem; align-items: flex-start; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.5rem 0; margin-top: 2rem; }
.author-avatar { flex: 0 0 auto; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.4rem; font-weight: 800; }
.author-avatar:is(img) { object-fit: cover; background: var(--surface); }
.author-name { font-weight: 800; }
.author-role { color: var(--muted); }
.article-meta-avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: .35rem; }
.author-profile { display: flex; gap: 1.25rem; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 1.25rem; margin: 1rem 0 1.5rem; }
.author-profile img { flex: 0 0 auto; width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover; }
@media (max-width: 575.98px) { .author-profile { flex-direction: column; text-align: center; } }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.prev-next a { display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.prev-next a:hover { border-color: var(--brand); }
.prev-next .next { text-align: right; }

.methodology { background: var(--surface); border-radius: var(--radius); padding: 2rem; }
.methodology-step { font-weight: 800; color: var(--brand); margin-bottom: .25rem; }

/* Footer */
.site-footer { background: #121a2b; color: rgba(255,255,255,.75); }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer li { margin-bottom: .35rem; }
.footer-brand { color: #fff; font-weight: 800; }
.footer-title { color: #fff; font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }
.footer-disclosure { opacity: .7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }

/* Barra lateral dos artigos (computador) */
.article-sidebar { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding-bottom: 1rem; }
.article-sidebar .toc { margin-top: 1rem; }
.article-sidebar .toc:first-child { margin-top: 0; }
.article-sidebar .toc ol { columns: 1; }
.sidebar-picks { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; animation: sidebar-in .25s ease-out; }
.sidebar-picks.is-pending { display: none; }
@keyframes sidebar-in { from { opacity: 0; transform: translateY(-.35rem); } }
@media (prefers-reduced-motion: reduce) { .sidebar-picks { animation: none; } }
.sidebar-title { font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; color: var(--muted); margin-bottom: .75rem; }
.sidebar-pick + .sidebar-pick { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .75rem; }
.sidebar-pick-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.sidebar-pick-head img { flex: none; object-fit: contain; background: var(--surface); border-radius: .4rem; }
.sidebar-pick-name { font-weight: 700; line-height: 1.25; margin-bottom: 0; }
.sidebar-pick-name a { color: var(--ink); text-decoration: none; }
.sidebar-pick-name a:hover { color: var(--brand); }

/* Cookies */
.cookie-banner { position: fixed; inset: auto 0 0 0; z-index: 1080; background: #121a2b; color: #fff; padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -.5rem 1.5rem rgba(0,0,0,.2); }
.cookie-banner a { color: var(--accent); }

@media (max-width: 575.98px) {
    .ranking-item { padding: 1rem; }
    .prev-next { grid-template-columns: 1fr; }
    .prev-next .next { text-align: left; }
    .methodology, .conclusion { padding: 1.25rem; }
}
