/* ==========================================================================
   Notícias FAPD — tema público "Oceano Editorial" v2
   --------------------------------------------------------------------------
   DIREÇÃO VISUAL (definida antes da implementação)
   1. Paleta: fundo gelo-azulado #f4f9fc · superfícies brancas · tinta
      petróleo #0a2433 · azul-petróleo #063d52 (profundidade/títulos) ·
      azul-oceano #0a6e8f (marca) · ciano #1195ab · espuma #e2f1f8 ·
      coral #f2684c (acento quente: botões, kickers, números).
   2. Tipografia: Playfair Display (títulos, serif editorial) · Inter
      (corpo/UI) · Source Serif 4 (corpo do artigo, 18.5px/1.8).
   3. Hierarquia: masthead claro com onda para o conteúdo · nav sticky de
      pills · herói com imagem e overlay petróleo · secções com título
      Playfair sublinhado a coral · cartões arredondados (20-26px).
   4. Modo escuro: data-theme="dark" no <html>, preferência em localStorage,
      respeitando prefers-color-scheme.
   5. Compatibilidade: as variáveis antigas (--navy, --yellow, etc.) são
      mantidas mapeadas para a nova paleta — o backoffice (admin.css)
      acompanha a identidade sem alterações.
   ========================================================================== */

:root {
  color-scheme: light;
  /* Paleta nova */
  --bg: #f4f9fc;
  --surface: #ffffff;
  --ink: #0a2433;
  --ink-2: #40627a;
  --ink-3: #7d9dae;
  --mute: #52748a;
  --line: #d9e8f1;
  --deep: #063d52;
  --heading: #063d52;
  --brand: #0a6e8f;
  --brand-d: #08546e;
  --ocean: #1195ab;
  --foam: #e2f1f8;
  --coral: #f2684c;
  --coral-d: #d95539;
  --coral-ink: #ffffff;
  --brand-ink: #ffffff;
  --danger: #de020d;
  --ok: #1b8a5a;

  /* Compatibilidade com admin.css (nomes antigos → nova paleta) */
  --navy: #063d52;
  --navy-2: #08546e;
  --yellow: #f2684c;
  --bg-old: #f4f9fc;

  /* Tipografia */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow-1: 0 1px 2px rgba(8, 52, 74, 0.05), 0 2px 8px rgba(8, 52, 74, 0.06);
  --shadow-2: 0 12px 32px rgba(8, 52, 74, 0.10);
  --container: 1200px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #081c26;
  --surface: #0e2b3a;
  --ink: #e9f4fa;
  --ink-2: #c2dcea;
  --ink-3: #8fb6c9;
  --mute: #a6c9db;
  --line: #26566d;
  --deep: #05242f;
  --heading: #f1f9fd;
  --brand: #4fc4de;
  --brand-d: #8adff0;
  --ocean: #2a9db8;
  --foam: #10303f;
  --coral: #ff8465;
  --coral-d: #ff9d82;
  --coral-ink: #081c26;
  --brand-ink: #04222e;
  --navy: #05242f;
  --navy-2: #0b3346;
  --yellow: #ff8465;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--heading);
}

::selection { background: var(--ocean); color: #fff; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--deep); color: #fff; padding: 10px 16px; z-index: 100;
  border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}
.container--narrow { max-width: 800px; }

.site-main { min-height: 60vh; }

/* ---------- Masthead (cabeçalho editorial) ---------- */
.masthead {
  background: linear-gradient(180deg, var(--foam) 0%, var(--bg) 100%);
  position: relative;
}
.masthead::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 28px;
  background: var(--surface);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 34' preserveAspectRatio='none'%3E%3Cpath d='M0 18C180 0 300 34 480 18s300-18 480 0 300 16 480 0V34H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 34' preserveAspectRatio='none'%3E%3Cpath d='M0 18C180 0 300 34 480 18s300-18 480 0 300 16 480 0V34H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.masthead-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
  padding-top: 30px; padding-bottom: 56px;
}

.brandbox { display: flex; align-items: center; gap: 16px; min-width: 0; }
.logo-img { height: 60px; width: auto; max-width: 170px; object-fit: contain; flex: none; }
.brand-word {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--heading);
}
.brand-word strong { color: var(--brand); }
.brandbox:hover .brand-word { color: var(--brand-d); }
.brandbox:hover .brand-word strong { color: var(--ocean); }
.fed {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  color: var(--mute);
  letter-spacing: 0.03em;
}

.search-pill {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 20px;
  min-width: 300px; max-width: 380px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 110, 143, 0.12); }
.search-pill input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: 0;
  font: 400 14.5px/1.4 var(--font-body);
  color: var(--ink);
  padding: 9px 0;
}
.search-pill input::placeholder { color: var(--ink-3); }
.search-pill button {
  flex: none;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--coral); color: var(--coral-ink);
  cursor: pointer;
  transition: background 0.18s ease;
}
.search-pill button:hover { background: var(--coral-d); }

/* ---------- Nav de secções (sticky) ---------- */
.catnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.catnav-in {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
}
.cats {
  flex: 1; min-width: 0;
  display: flex; gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 9px 0;
}
.cats::-webkit-scrollbar { display: none; }
.cat-link {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  white-space: nowrap;
  color: var(--mute);
  transition: background 0.18s ease, color 0.18s ease;
}
.cat-link:hover { background: var(--foam); color: var(--brand-d); }
.cat-link.is-active { background: var(--brand); color: var(--brand-ink); }

.catnav-tools { flex: none; display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.theme-toggle:hover { background: var(--foam); color: var(--brand-d); border-color: var(--brand); }
.theme-toggle .icon-sun { display: none; }
html[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
html[data-theme='dark'] .theme-toggle .icon-moon { display: none; }

.site-btn {
  display: inline-block;
  background: var(--coral); color: var(--coral-ink);
  font-weight: 600; font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.site-btn:hover { background: var(--coral-d); color: var(--coral-ink); }

/* ---------- Herói ---------- */
.hero {
  position: relative;
  margin-top: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: clamp(380px, 44vw, 540px);
  display: flex;
  isolation: isolate;
  background: linear-gradient(135deg, var(--deep) 0%, var(--brand) 60%, var(--ocean) 100%);
  box-shadow: var(--shadow-2);
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 90% at 85% -10%, rgba(255, 255, 255, 0.16), transparent 55%);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 6s ease;
}
.hero:hover .hero-media img { transform: scale(1.04); }
.hero-overlay {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end;
  width: 100%;
  background: linear-gradient(180deg, rgba(4, 26, 36, 0) 0%, rgba(4, 26, 36, 0.32) 45%, rgba(3, 20, 28, 0.85) 100%);
}
.hero-content { padding: clamp(22px, 4vw, 42px); max-width: 800px; }

.badge-featured {
  display: inline-block;
  background: var(--coral); color: var(--coral-ink);
  font-family: var(--font-body);
  font-weight: 700; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 12px;
  color: #fff;
  max-width: 24ch;
  text-shadow: 0 1px 24px rgba(3, 20, 28, 0.45);
}
.hero-title a { color: #fff; }
.hero-title a:hover { color: var(--coral); }
.hero-excerpt {
  color: #e8f4f8; font-size: 17px; line-height: 1.6; margin: 0 0 16px; max-width: 64ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: rgba(255, 255, 255, 0.82); font-size: 13.5px;
}

/* ---------- Chips / kickers ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--foam); color: var(--brand-d);
  font-size: 12.5px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.chip small { font-weight: 600; color: var(--ink-3); }
.chip:hover { background: var(--brand); color: var(--brand-ink); }
.chip:hover small { color: var(--brand-ink); }
.chip--lg { font-size: 14.5px; padding: 8px 18px; }
.chip--light {
  background: rgba(255, 255, 255, 0.16); color: #fff;
  backdrop-filter: blur(4px);
}
.chip--light:hover { background: var(--coral); color: var(--coral-ink); }

.chips-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips-cloud--lg { gap: 12px; }

/* ---------- Secções ---------- */
.section { margin-top: clamp(36px, 5vw, 52px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--coral);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700; margin: 0; color: var(--heading);
}
.section-link { font-weight: 600; font-size: 14.5px; white-space: nowrap; color: var(--brand-d); }
.section-link:hover { color: var(--coral-d); }

/* ---------- Cartões ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); }
.card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--foam); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .card-media img { transform: scale(1.05); }

.card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--ink-3);
}
.card-title {
  font-family: var(--font-display);
  font-size: 19.5px; font-weight: 700; margin: 0; line-height: 1.28;
  color: var(--ink);
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--brand); }
.card-excerpt {
  margin: 0; color: var(--mute); font-size: 14.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Linhas de notícia ---------- */
.post-rows { display: flex; flex-direction: column; }
.post-row {
  display: flex; gap: 18px; padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.post-row:first-child { padding-top: 4px; }
.row-media {
  flex: 0 0 168px; aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--foam);
}
.row-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-row:hover .row-media img { transform: scale(1.05); }
.row-body { min-width: 0; }
.row-title {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; margin: 4px 0 6px; line-height: 1.3;
  color: var(--ink);
}
.row-title a { color: inherit; }
.row-title a:hover { color: var(--brand); }
.row-excerpt {
  margin: 0; color: var(--mute); font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Sidebar ---------- */
.home-columns {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px;
  margin-top: clamp(36px, 5vw, 52px);
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 22px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; margin: 0 0 14px;
  color: var(--heading);
  padding-left: 12px;
  border-left: 4px solid var(--coral);
  line-height: 1.25;
}

.mini-list { display: flex; flex-direction: column; }
.post-mini {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.post-mini:first-child { border-top: 0; padding-top: 0; }
.mini-rank {
  font-family: var(--font-display);
  font-weight: 800; font-size: 26px; line-height: 1;
  color: var(--coral);
  min-width: 30px; padding-top: 2px;
}
.mini-media {
  flex: 0 0 72px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--foam);
}
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-body { min-width: 0; }
.mini-title { font-size: 14.5px; font-weight: 600; margin: 0 0 4px; line-height: 1.4; color: var(--ink); }
.mini-title a { color: inherit; }
.mini-title a:hover { color: var(--brand); }
.mini-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }

.panel--institutional {
  background: linear-gradient(160deg, var(--deep), #04212d 80%);
  border-color: transparent;
  color: #cfe6ef;
}
.panel--institutional .panel-title { color: #fff; border-left-color: var(--coral); }
.panel--institutional p { font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.panel--institutional .btn { background: var(--coral); color: var(--coral-ink); border: 0; }
.panel--institutional .btn:hover { background: var(--coral-d); color: var(--coral-ink); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 15px;
  padding: 10px 20px; border-radius: 999px;
  border: 0; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-primary { background: var(--coral); color: var(--coral-ink); }
.btn-primary:hover { background: var(--coral-d); color: var(--coral-ink); }
.btn-outline { border: 2px solid var(--brand); color: var(--brand-d); background: transparent; }
.btn-outline:hover { background: var(--brand); color: var(--brand-ink); }
.btn-outline-light { border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Cabeçalhos de página ---------- */
.page-head { padding: clamp(28px, 4vw, 44px) 0 8px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 6px;
}
.page-lead { color: var(--mute); font-size: 16.5px; margin: 0 0 10px; }

.search-form {
  display: flex; gap: 10px; max-width: 540px; margin: 18px 0 8px;
}
.search-form input {
  flex: 1;
  font: 400 15px/1.4 var(--font-body);
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.search-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 110, 143, 0.12); }
.search-form .btn { flex: none; }

/* ---------- Paginação ---------- */
.pagination {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: clamp(32px, 5vw, 48px) 0 8px;
}
.page-btn {
  min-width: 40px; padding: 9px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  color: var(--mute);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.page-btn:hover { border-color: var(--brand); color: var(--brand-d); background: var(--foam); }
.page-btn.is-current {
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
  font-weight: 700;
}
.page-gap { align-self: center; color: var(--ink-3); padding: 0 2px; }

/* ---------- Artigo ---------- */
.article { padding-top: clamp(20px, 3vw, 32px); }
.breadcrumbs {
  font-size: 13.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--mute); font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current] { color: var(--ink-3); }

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 48px);
  box-shadow: var(--shadow-2);
  margin-bottom: 36px;
}
.article-head { margin-bottom: 8px; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 10px 0 14px;
}
.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--ink-3); font-size: 13.5px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.meta-author { font-weight: 600; color: var(--ink-2); }

.article-body {
  font-family: var(--font-serif);
  font-size: 18.5px; line-height: 1.8;
  color: var(--ink);
  margin-top: 12px;
}
.article-body .block { margin: 0 0 22px; }
.article-body .block-text p { margin: 0 0 18px; }
.article-body .block-text h3 {
  font-family: var(--font-display);
  font-size: 24px; margin: 1.4em 0 0.5em;
}
.article-body .block-text h4 {
  font-family: var(--font-display);
  font-size: 19.5px; margin: 1.3em 0 0.45em;
}
.article-body .block-text blockquote {
  margin: 20px 0; padding: 14px 22px;
  border-left: 4px solid var(--coral);
  background: var(--foam);
  border-radius: 0 14px 14px 0;
  color: var(--ink-2); font-style: italic;
}
.article-body .block-text ul, .article-body .block-text ol { padding-left: 24px; margin: 0 0 18px; }
.article-body .block-text li { margin-bottom: 6px; }
.article-body .block-text a { color: var(--brand-d); text-decoration: underline; text-underline-offset: 3px; }
.article-body .block-text a:hover { color: var(--coral-d); }

.block-figure { margin: 26px 0; }
.block-figure img { width: 100%; border-radius: 14px; box-shadow: var(--shadow-1); }
.block-figure figcaption {
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--ink-3); margin-top: 9px;
  padding-left: 12px; border-left: 3px solid var(--coral);
}

.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.gallery-item { margin: 0; }
.gallery-zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--foam);
}
.gallery-zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-zoom:hover img { transform: scale(1.06); }
.gallery-caption {
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0;
  padding-left: 12px; border-left: 3px solid var(--coral);
}

.block-video { margin: 26px 0; }
.block-video video {
  width: 100%; border-radius: 14px;
  background: #000; box-shadow: var(--shadow-1);
  aspect-ratio: 16 / 9;
}
.block-video figcaption {
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--ink-3); margin-top: 9px;
  padding-left: 12px; border-left: 3px solid var(--coral);
}

/* ---------- Partilha ---------- */
.share-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 26px 0 4px; padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}
.share-label {
  font-family: var(--font-body);
  font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--mute); margin-right: 4px;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--foam); color: var(--brand-d);
  border: 0; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.share-btn:hover { background: var(--brand); color: var(--brand-ink); transform: translateY(-2px); }
.share-btn.is-copied { background: var(--ok); color: #fff; }

/* ---------- Relacionadas ---------- */
.related { margin-top: 8px; }

/* ---------- Estados vazios / erros ---------- */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 64px 28px;
  margin-top: 32px;
  color: var(--mute);
}
.empty-state h1 { font-size: 28px; }
.empty-state p { max-width: 520px; margin: 0 auto 18px; }
.error-state { margin-top: 48px; }
.error-code {
  font-family: var(--font-display);
  font-size: 76px; font-weight: 800; line-height: 1;
  color: var(--coral);
  margin: 0 0 8px;
}

.muted { color: var(--ink-3); font-size: 15px; }

.preview-banner {
  background: var(--coral); color: var(--coral-ink);
  font-weight: 700; font-size: 14px;
  text-align: center; padding: 9px 16px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 26, 36, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 94vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: 0; cursor: pointer;
  font-size: 40px; line-height: 1; color: #fff;
}

/* ---------- Rodapé ---------- */
.site-footer {
  background: linear-gradient(160deg, var(--deep), #04212d 80%);
  color: #cfe6ef;
  margin-top: 12px;
  font-size: 13.5px;
}
html[data-theme='dark'] .site-footer { background: #04161e; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: clamp(36px, 5vw, 52px) clamp(16px, 3vw, 32px) 36px;
}
.brand--footer { display: inline-flex; align-items: center; gap: 12px; }
.brand--footer .brand-logo { height: 40px; }
.brand--footer .brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 19px; color: #fff;
}
.brand--footer .brand-text strong { color: var(--coral); }
.footer-about p { font-size: 14px; line-height: 1.7; margin: 14px 0 18px; max-width: 380px; color: #cfe6ef; }
.footer-title {
  color: #fff; font-family: var(--font-body); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.09em;
  margin: 6px 0 14px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #cfe6ef; font-size: 14.5px; font-weight: 500; }
.footer-links a:hover { color: var(--coral); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 16px clamp(16px, 3vw, 32px); font-size: 12.5px; color: #9fc3d2;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .home-columns { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); align-items: start; }
}

@media (max-width: 720px) {
  .masthead-in {
    flex-direction: column; align-items: flex-start;
    gap: 18px; padding-top: 24px; padding-bottom: 50px;
  }
  .search-pill { width: 100%; max-width: none; }
  .logo-img { height: 50px; }
  .catnav-in { gap: 8px; }
  .site-btn { padding: 8px 14px; font-size: 13.5px; }
  .theme-toggle { width: 34px; height: 34px; }
  .hero { min-height: 420px; }
  .hero-content { padding: 20px; }
  .grid-4, .grid-3, .latest-grid { grid-template-columns: 1fr; }
  .post-row { flex-direction: column; gap: 12px; }
  .row-media { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .search-form { flex-direction: column; }
  .search-form .btn { justify-content: center; }
  .article-card { padding: 20px 18px; }
}

@media (max-width: 400px) {
  .logo-img { height: 44px; }
  .site-btn { padding: 7px 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
