/*
Theme Name: ias.news
Theme URI: https://ias.news
Author: ias.news
Author URI: https://ias.news
Description: Tema clássico editorial de ias.news — papel marfim, masthead marinho, acentos dourados. Homepage em três colunas, trilhos de seção e artigo longo.
Version: 0.1.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ias-news
Tags: news, custom-logo, custom-menu, featured-images, translation-ready, blog, one-column, two-columns, sticky-post
*/

:root {
  --ink: #161412;
  --paper: #f6f3ec;
  --muted: #6a6458;
  --hair: #e4dfd4;
  --gold: #b8954a;
  --crimson: #b8954a;
  --bar: #0b1220;
  --gutter: 72px;
  --max: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: "IBM Plex Sans", Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--crimson); }
img { display: block; width: 100%; object-fit: cover; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ===== MASTHEAD ===== */
.mast { background: var(--bar); color: #fff; position: sticky; top: 0; z-index: 20; }
.mast-top { display: flex; align-items: center; gap: 18px; height: 58px; padding: 0 24px; max-width: var(--max); margin: 0 auto; }
.mast-left { display: flex; align-items: center; gap: 14px; color: #fff; flex: 1; }
.icon-btn { width: 20px; height: 20px; display: block; opacity: .85; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  position: relative;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.mast.nav-open .nav-toggle-bars { background: transparent; }
.mast.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.mast.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.icon-btn-wrap {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  line-height: 0;
}
.icon-btn-wrap:hover .icon-btn { opacity: 1; }
.wordmark { display: flex; align-items: center; line-height: 0; }
.wordmark img,
.mast .custom-logo-link img,
.mast .custom-logo {
  height: 26px;
  width: auto;
  display: block;
}
.mast .custom-logo-link { display: flex; align-items: center; line-height: 0; }
.mast-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.subscribe { background: transparent; color: var(--gold) !important; border: 1px solid var(--gold); font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 0; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.subscribe:hover { background: var(--gold); color: #0b1220 !important; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2a2a2a; border: 1px solid #444; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 32px; height: 32px; object-fit: cover; }

.catnav { border-top: 1px solid rgba(184,149,74,.35); border-bottom: 1px solid var(--gold); height: 40px; display: flex; align-items: center; justify-content: flex-start; gap: 22px; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.catnav a { color: #d8d2c4; font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.catnav a:hover,
.catnav .current-menu-item > a,
.catnav .current-cat > a { color: #fff; }
.catnav .div,
.catnav .menu-div {
  width: 1px;
  height: 14px;
  background: #6a6a6a;
  display: block;
  flex-shrink: 0;
  list-style: none;
}
.catnav-menu,
.catnav ul {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  list-style: none;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}
.catnav li { margin: 0; }

.mast-search-panel {
  background: var(--bar);
  border-bottom: 1px solid rgba(184,149,74,.35);
  padding: 12px 0 16px;
}
.mast-search-panel[hidden] { display: none; }
.mast-search-panel .search-form {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 8px;
}
.mast-search-panel input[type="search"] {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold);
  color: #fff;
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
}
.mast-search-panel input[type="search"]::placeholder { color: #9a9488; }
.mast-search-panel .search-submit {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}

/* ===== TRENDING ===== */
.trend { padding: 12px 0 0; }
.trend-row { display: flex; align-items: center; gap: 14px; overflow: hidden; }
.trend-label { color: var(--crimson); font-size: 12px; font-weight: 700; letter-spacing: .12em; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.trend-label svg { width: 12px; height: 12px; }
.trend-items { display: flex; gap: 28px; font-size: 14px; color: #333; white-space: nowrap; }
.edition { font-size: 12px; padding: 0; border: 0; color: var(--muted); margin-left: auto; flex-shrink: 0; letter-spacing: .04em; }

/* ===== HERO 3-COL ===== */
.hero { display: grid; grid-template-columns: 220px 1fr 240px; gap: 28px; padding: 22px 0 28px; }
.brief { border: 1px solid var(--hair); border-radius: 4px; padding: 16px 16px 14px; }
.brief h2 { font-family: "Fraunces", serif; font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.brief p { font-size: 14px; line-height: 1.45; color: #222; }
.brief p a { text-decoration: underline; text-underline-offset: 2px; }
.sourced { margin-top: 12px; font-size: 11px; color: var(--muted); }
.avatars { display: flex; margin-top: 8px; }
.avatars span,
.avatars img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  background: #ccc;
  background-size: cover;
  object-fit: cover;
}
.avatars span:first-child,
.avatars img:first-child { margin-left: 0; }
.player { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.play { width: 40px; height: 40px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.seek { flex: 1; height: 2px; background: #ddd; position: relative; }
.seek i { position: absolute; left: 0; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #111; }
.time { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 18px; margin-top: 18px; border-bottom: 1px solid var(--hair); }
.tabs button { background: none; border: 0; font: inherit; font-size: 14px; padding: 0 0 8px; cursor: pointer; color: var(--muted); }
.tabs .on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--crimson); }
.rank { list-style: none; margin-top: 8px; }
.rank li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14px; line-height: 1.3; }
.rank .n { color: var(--crimson); font-weight: 700; }
.rank .meta { grid-column: 2; font-size: 12px; color: #6a7a8a; margin-top: 4px; }

.lead-img { aspect-ratio: 16/9; overflow: hidden; background: #ddd; margin-bottom: 12px; }
.lead-img img { height: 100%; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.kicker.red { color: var(--crimson); }
.kicker.gray { color: #555; }
h1.hl { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 34px; line-height: 1.08; letter-spacing: -0.01em; }
.dek { margin-top: 10px; font-size: 15px; line-height: 1.45; color: #333; }
.by { margin-top: 8px; font-size: 12px; color: var(--muted); }
.by a { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }

.side-item { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--hair); }
.side-item:last-child { border-bottom: 0; margin: 0; padding: 0; }
.side-item img,
.side-item .ph { aspect-ratio: 16/10; margin-bottom: 8px; }
.side-item h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 18px; line-height: 1.2; }

/* 4-col strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; padding: 8px 0 28px; border-top: 1px solid var(--hair); }
.strip article { padding-right: 18px; border-right: 1px solid var(--hair); }
.strip article:last-child { border-right: 0; padding-right: 0; }
.strip h3 { font-family: "Fraunces", Georgia, serif; font-size: 16px; font-weight: 600; line-height: 1.25; }

/* black promo */
.promo { background: #0b1220; color: #fff; display: grid; grid-template-columns: 1fr 1fr; min-height: 280px; margin: 0 calc(50% - 50vw); }
.promo-copy { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; }
.promo-kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; display: inline-block; border-bottom: 2px solid var(--gold); padding-bottom: 4px; margin-bottom: 16px; width: fit-content; }
.promo h2 { font-family: "Fraunces", Georgia, serif; font-size: 36px; font-weight: 600; line-height: 1.12; color: #fff; }
.promo a.more { color: #fff !important; text-decoration: underline; margin-top: 16px; font-size: 14px; }
.promo-art { background: #0b2a22; position: relative; }
.promo-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.15) 40%, rgba(11,42,34,.35) 100%); }
.promo-art .inner { position: relative; z-index: 1; height: 100%; display: flex; align-items: flex-end; padding: 32px; min-height: 280px; }
.promo-art .inner span { font-family: "Fraunces", serif; font-size: 28px; color: #fff; }

/* rails */
.rail { padding: 32px 0; border-bottom: 1px solid var(--hair); }
.rail > h2 { font-family: "Fraunces", Georgia, serif; font-size: 28px; font-weight: 600; margin-bottom: 18px; }
.rail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; }
.feat img,
.feat .ph { aspect-ratio: 16/9; margin-bottom: 12px; }
.feat h3 { font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1.15; }
.stack-row { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.stack-row:first-child { padding-top: 0; }
.stack-row h3 { font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; line-height: 1.22; }

footer { background: var(--bar); color: #ddd; padding: 36px 0 20px; margin-top: 0; }
footer .wordmark { font-size: 28px; }
footer .wordmark img,
footer .custom-logo {
  height: 28px;
  width: auto;
  display: block;
}
footer p { color: #9a9a9a; font-size: 13px; margin-top: 8px; max-width: 32em; }
.copy { margin-top: 24px; padding-top: 14px; border-top: 1px solid #333; font-size: 11px; color: #777; }
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  list-style: none;
  margin-top: 16px;
}
.footer-menu a { color: #d8d2c4; font-size: 13px; }
.footer-menu a:hover { color: #fff; }

@media (max-width: 900px) {
  .hero, .strip, .promo, .rail-grid { grid-template-columns: 1fr; }
  h1.hl { font-size: 28px; }
  .promo { margin: 0 -24px; }
  .promo-copy { padding: 36px 24px; }
  .strip article { border-right: 0; padding-right: 0; padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .subscribe,
  .mast-right .avatar { display: none; }
  .mast-top { padding: 0 12px; height: 56px; gap: 8px; }
  .mast-left { flex: 0 0 auto; gap: 4px; }
  .wordmark { flex: 1; justify-content: center; }
  .mast-right { margin-left: 0; min-width: 40px; justify-content: flex-end; }
  .catnav {
    display: none;
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(184,149,74,.35);
    border-bottom: 1px solid var(--gold);
    background: var(--bar);
  }
  .mast.nav-open .catnav { display: block; }
  .catnav-menu,
  .catnav ul {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 0;
    width: 100%;
    padding: 8px 0 16px;
  }
  .catnav li { width: 100%; }
  .catnav a {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    color: #f6f3ec;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .catnav .div,
  .catnav .menu-div { display: none; }
  .mast-search-panel .search-form { padding: 0 16px; }
}

/* ===== Theme extras (inner pages, WP chrome) ===== */
.skip-link.screen-reader-text {
  position: absolute;
  left: 6px;
  top: -100px;
  z-index: 100000;
  background: var(--gold);
  color: #0b1220;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
.skip-link.screen-reader-text:focus {
  top: 6px;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.admin-bar .mast { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .mast { top: 46px; }
}

.ph {
  background: var(--hair);
  width: 100%;
  min-height: 80px;
  display: block;
}
.lead-img .ph { aspect-ratio: 16/9; min-height: 0; height: 100%; background: #ddd; }
.feat .ph { min-height: 0; }
.side-item .ph { min-height: 0; }

.page-head {
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 8px;
}
.page-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.12;
}
.page-head .dek { margin-top: 8px; }

.list-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
}
.list-item .list-thumb img,
.list-item .list-thumb .ph {
  aspect-ratio: 16/10;
  min-height: 0;
}
.list-item h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.list-item .dek { margin-top: 8px; font-size: 14px; }
@media (max-width: 700px) {
  .list-item { grid-template-columns: 1fr; }
}

.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.article-wrap h1.hl { font-size: 42px; }
.entry-content {
  font-size: 18px;
  line-height: 1.62;
  margin-top: 28px;
  color: #222;
}
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2,
.entry-content h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 1.5em;
}
.entry-content h2 { font-size: 28px; }
.entry-content h3 { font-size: 22px; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content ul,
.entry-content ol { padding-left: 1.2em; }
.entry-content blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1.35;
  color: #333;
}
.entry-content img { height: auto; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.entry-content .alignleft { float: left; margin: 0 1.2em 0.6em 0; }
.entry-content .alignright { float: right; margin: 0 0 0.6em 1.2em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}
.related > h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.related-list { list-style: none; }
.related-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.related-list h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.22;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 28px 0 48px;
  font-size: 14px;
}
.pagination .current { font-weight: 700; }

.empty-state { padding: 56px 0 72px; }
.empty-state h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 12px;
}
.empty-state p { font-size: 16px; line-height: 1.5; color: #333; max-width: 36em; }
.empty-state .search-form { margin-top: 20px; max-width: 420px; }
.empty-home { padding-bottom: 8px; }

.search-form {
  display: flex;
  gap: 8px;
}
.search-form input[type="search"] {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
  color: var(--ink);
}
.search-submit {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}
.search-submit:hover { background: var(--ink); color: var(--paper); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 14px;
}
.post-nav a { font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.post-nav .label { display: block; font-family: "IBM Plex Sans", sans-serif; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 700; }

.wp-block-image img { height: auto; }
iframe, video { max-width: 100%; }

.page-head .search-form { margin-top: 16px; max-width: 480px; }
.rank-panel[hidden] { display: none; }
