/* =============================================================================
   EM ADVOGADOS · Blog — design system "Atelier"
   Herdado do site institucional (emadvogados.adv.br). Navy + ouro sólido,
   Cormorant (títulos) + Manrope (texto). Ouro NUNCA em degradê.
   ========================================================================== */

:root {
  --ema-navy: #122B39;
  --ema-navy-deep: #0C1E29;
  --ema-navy-soft: #1B3A4B;
  --ema-gold: #D2BA89;
  --ema-gold-bright: #E6D4AE;
  --ema-paper: #F5F3EE;
  --ema-paper-line: #E4DFD4;
  --ema-on-dark: #ECE7DC;
  --ema-on-dark-muted: #9DB1BA;
  --ema-on-paper: #122B39;
  --ema-on-paper-muted: #5C6E76;

  --ema-font-serif: 'Cormorant', Georgia, 'Times New Roman', serif;
  --ema-font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ema-font-display: 'Questrial', 'Century Gothic', ui-sans-serif, system-ui, sans-serif;

  --ema-maxw: 1140px;
  --ema-read: 720px;
  --ema-pad: clamp(20px, 5vw, 44px);
  --ema-nav-h: 74px;

  --ema-r-sm: 16px;
  --ema-r-md: 22px;
  --ema-r-lg: 28px;
  --ema-r-pill: 999px;

  --ema-shadow-card: 0 30px 64px -34px rgba(18, 43, 57, .28);
  --ema-shadow-gold: 0 16px 34px -16px rgba(210, 186, 137, .55);
  --ema-ease: cubic-bezier(.22, 1, .36, 1);

  /* Grega (meandro) — assinatura da marca. Faixa, nunca papel de parede. */
  --ema-greek: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18'%3E%3Cpath d='M1 17V1h34v11H11V6h18' fill='none' stroke='%23D2BA89' stroke-width='1.4' stroke-linecap='square'/%3E%3C/svg%3E");
}

/* ---------- base ---------------------------------------------------------- */

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

body {
  background: var(--ema-paper);
  color: var(--ema-on-paper);
  font-family: var(--ema-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.admin-bar .ema-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ema-nav { top: 46px; } }

::selection { background: var(--ema-gold); color: var(--ema-navy); }

a { color: inherit; }

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

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--ema-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.ema-wrap {
  max-width: var(--ema-maxw);
  margin-inline: auto;
  padding-inline: var(--ema-pad);
}

/* ---------- cabeçalho ----------------------------------------------------- */

.ema-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  background: rgba(12, 30, 41, .72);
  -webkit-backdrop-filter: saturate(1.2) blur(18px);
  backdrop-filter: saturate(1.2) blur(18px);
  border-bottom: 1px solid rgba(210, 186, 137, .14);
}

.ema-nav__inner {
  max-width: var(--ema-maxw);
  margin-inline: auto;
  padding: 0 var(--ema-pad);
  height: var(--ema-nav-h);
  display: flex;
  align-items: center;
  gap: 22px;
}

.ema-nav__logo { display: flex; align-items: center; flex: 0 0 auto; }
.ema-nav__logo img { height: 34px; width: auto; display: block; }

.ema-nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.ema-nav__links a {
  color: var(--ema-on-dark);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 400;
  opacity: .88;
  transition: opacity .3s var(--ema-ease), color .3s var(--ema-ease);
}

.ema-nav__links a:hover { opacity: 1; color: var(--ema-gold-bright); }
.ema-nav__links a[aria-current="page"] { color: var(--ema-gold); opacity: 1; }

.ema-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--ema-r-pill);
  padding: .92rem 1.75rem;
  font-family: var(--ema-font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ema-ease), background .35s var(--ema-ease), color .35s var(--ema-ease);
}

.ema-btn--gold {
  background: var(--ema-gold);
  color: var(--ema-navy);
  box-shadow: var(--ema-shadow-gold);
}
.ema-btn--gold:hover { background: var(--ema-gold-bright); transform: translateY(-2px); }

.ema-btn--ghost {
  background: transparent;
  color: var(--ema-on-dark);
  border-color: rgba(236, 231, 220, .28);
}
.ema-btn--ghost:hover { border-color: var(--ema-gold); color: var(--ema-gold-bright); }

.ema-btn--line {
  background: transparent;
  color: var(--ema-navy);
  border-color: rgba(18, 43, 57, .22);
}
.ema-btn--line:hover { border-color: var(--ema-navy); transform: translateY(-2px); }

.ema-nav__cta { padding: .78rem 1.4rem; font-size: .72rem; flex: 0 0 auto; }

/* menu mobile sem JS */
.ema-nav__toggle { display: none; }

@media (max-width: 900px) {
  .ema-nav__links { display: none; }
  .ema-nav__cta { margin-left: auto; }
  .ema-nav__toggle {
    display: block;
    margin-left: 0;
    order: 3;
  }
  .ema-nav__toggle summary {
    list-style: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--ema-r-pill);
    border: 1px solid rgba(236, 231, 220, .22);
    color: var(--ema-on-dark);
  }
  .ema-nav__toggle summary::-webkit-details-marker { display: none; }
  .ema-nav__toggle[open] .ema-nav__drawer { display: flex; }
  .ema-nav__drawer {
    display: none;
    position: fixed;
    inset: var(--ema-nav-h) 0 auto 0;
    flex-direction: column;
    gap: 2px;
    padding: 18px var(--ema-pad) 26px;
    background: var(--ema-navy-deep);
    border-bottom: 1px solid rgba(210, 186, 137, .14);
  }
  .ema-nav__drawer a {
    color: var(--ema-on-dark);
    text-decoration: none;
    padding: 13px 0;
    border-bottom: 1px solid rgba(236, 231, 220, .08);
    font-size: 1rem;
  }
}

@media (max-width: 460px) {
  .ema-nav__cta { display: none; }
  .ema-nav__toggle { margin-left: auto; }
}

/* ---------- topo das páginas ---------------------------------------------- */

.ema-top {
  position: relative;
  background: var(--ema-navy-deep);
  color: var(--ema-on-dark);
  padding: calc(var(--ema-nav-h) + clamp(56px, 9vw, 104px)) 0 clamp(48px, 7vw, 86px);
  overflow: hidden;
  isolation: isolate;
}

.ema-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(12, 30, 41, .72) 0%, rgba(12, 30, 41, .94) 62%, var(--ema-navy-deep) 100%), var(--ema-top-img, none);
  background-size: cover;
  background-position: center 32%;
  z-index: -1;
}

.ema-top__inner { max-width: var(--ema-maxw); margin-inline: auto; padding-inline: var(--ema-pad); }

.ema-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(210, 186, 137, .3);
  border-radius: var(--ema-r-pill);
  padding: 8px 18px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ema-gold);
}

.ema-eyebrow--paper { border-color: rgba(18, 43, 57, .16); color: var(--ema-on-paper-muted); }

.ema-top h1,
.ema-top .ema-title {
  font-family: var(--ema-font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  color: var(--ema-on-dark);
  margin: 22px 0 0;
  max-width: 15ch;
}

.ema-top h1 em,
.ema-top .ema-title em { font-style: italic; color: var(--ema-gold); }

.ema-top__lead {
  margin: 20px 0 0;
  max-width: 56ch;
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--ema-on-dark-muted);
}

/* ---------- divisor de grega ---------------------------------------------- */

.ema-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: clamp(38px, 6vw, 64px) 0;
}

.ema-divider::before,
.ema-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ema-paper-line) 22%, var(--ema-paper-line) 78%, transparent);
}

.ema-divider span {
  width: 144px;
  height: 18px;
  background-image: var(--ema-greek);
  background-repeat: repeat-x;
  opacity: .95;
}

.ema-divider--dark::before,
.ema-divider--dark::after {
  background: linear-gradient(90deg, transparent, rgba(210, 186, 137, .3) 22%, rgba(210, 186, 137, .3) 78%, transparent);
}

/* ---------- listagem ------------------------------------------------------ */

.ema-listing { padding: clamp(52px, 8vw, 92px) 0 clamp(64px, 9vw, 108px); }

.ema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(22px, 3vw, 34px);
}

.ema-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ema-paper-line);
  border-radius: var(--ema-r-lg);
  overflow: hidden;
  transition: transform .45s var(--ema-ease), box-shadow .45s var(--ema-ease), border-color .45s var(--ema-ease);
}

.ema-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ema-shadow-card);
  border-color: rgba(210, 186, 137, .55);
}

.ema-card__media {
  aspect-ratio: 16 / 10;
  background: var(--ema-navy-deep) var(--ema-greek) center / 48px 18px repeat;
  overflow: hidden;
}

.ema-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ema-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.ema-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ema-on-paper-muted);
}

.ema-meta a { color: var(--ema-gold); text-decoration: none; }
.ema-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ema-meta span:not(:last-child)::after { content: "·"; margin-left: 14px; opacity: .5; }

.ema-card__title {
  font-family: var(--ema-font-serif);
  font-weight: 500;
  font-size: 1.62rem;
  line-height: 1.16;
  margin: 0;
}

.ema-card__title a { text-decoration: none; color: var(--ema-navy); transition: color .3s var(--ema-ease); }
.ema-card__title a:hover { color: var(--ema-navy-soft); }

.ema-card__excerpt { margin: 0; color: var(--ema-on-paper-muted); font-size: .98rem; line-height: 1.66; }

.ema-card__more {
  margin-top: auto;
  padding-top: 8px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ema-navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.ema-card__more::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ema-gold);
  transition: width .35s var(--ema-ease);
}

.ema-card:hover .ema-card__more::after { width: 34px; }

/* destaque do primeiro post */
@media (min-width: 900px) {
  .ema-grid--featured > .ema-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .ema-grid--featured > .ema-card:first-child .ema-card__media { flex: 0 0 52%; aspect-ratio: auto; }
  .ema-grid--featured > .ema-card:first-child .ema-card__body { padding: 42px 44px; justify-content: center; gap: 16px; }
  .ema-grid--featured > .ema-card:first-child .ema-card__title { font-size: 2.35rem; }
  .ema-grid--featured > .ema-card:first-child .ema-card__excerpt { font-size: 1.05rem; }
}

/* paginação */
.wp-block-query-pagination {
  margin-top: clamp(40px, 6vw, 64px);
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wp-block-query-pagination a { text-decoration: none; }

.wp-block-query-pagination-numbers .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ema-paper-line);
  border-radius: var(--ema-r-pill);
  transition: border-color .3s var(--ema-ease), background .3s var(--ema-ease);
}

.wp-block-query-pagination-numbers .page-numbers:hover { border-color: var(--ema-gold); }
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--ema-navy); color: var(--ema-on-dark); border-color: var(--ema-navy); }

/* estado vazio */
.ema-empty {
  text-align: center;
  padding: clamp(50px, 8vw, 90px) 0;
  color: var(--ema-on-paper-muted);
}

/* ---------- artigo -------------------------------------------------------- */

.ema-article { padding: clamp(44px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }

.ema-article__inner { max-width: var(--ema-read); margin-inline: auto; padding-inline: var(--ema-pad); }

.ema-article__capa {
  max-width: var(--ema-maxw);
  margin: 0 auto clamp(34px, 5vw, 56px);
  padding-inline: var(--ema-pad);
}

.ema-article__capa img {
  width: 100%;
  border-radius: var(--ema-r-lg);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  box-shadow: var(--ema-shadow-card);
}

/* corpo do texto — leitura longa */
.ema-prose { font-size: 1.0625rem; line-height: 1.78; color: #1d3644; }

.ema-prose > * + * { margin-top: 1.35em; }

.ema-prose p { margin: 0; }

.ema-prose h2 {
  font-family: var(--ema-font-serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.4vw, 2.2rem);
  line-height: 1.2;
  color: var(--ema-navy);
  margin-top: 2.1em;
  margin-bottom: -.2em;
}

.ema-prose h3 {
  font-family: var(--ema-font-serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.28;
  color: var(--ema-navy);
  margin-top: 1.9em;
  margin-bottom: -.3em;
}

.ema-prose a {
  color: var(--ema-navy);
  text-decoration: underline;
  text-decoration-color: var(--ema-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .3s var(--ema-ease);
}

.ema-prose a:hover { color: var(--ema-navy-soft); text-decoration-color: var(--ema-navy-soft); }

.ema-prose strong { font-weight: 700; color: var(--ema-navy); }

.ema-prose ul,
.ema-prose ol { padding-left: 1.3em; }
.ema-prose li + li { margin-top: .5em; }
.ema-prose ul li::marker { color: var(--ema-gold); }
.ema-prose ol li::marker { color: var(--ema-gold); font-weight: 700; }

.ema-prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--ema-gold);
  font-family: var(--ema-font-serif);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--ema-navy);
}

.ema-prose blockquote p { margin: 0; }
.ema-prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--ema-font-body);
  font-style: normal;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ema-on-paper-muted);
}

.ema-prose img,
.ema-prose .wp-block-image img { border-radius: var(--ema-r-md); }

.ema-prose figure { margin: 2em 0; }
.ema-prose figcaption {
  margin-top: 12px;
  font-size: .84rem;
  color: var(--ema-on-paper-muted);
  text-align: center;
}

.ema-prose hr,
.ema-prose .wp-block-separator {
  border: 0;
  height: 18px;
  margin: 2.4em auto;
  width: 144px;
  background-image: var(--ema-greek);
  background-repeat: repeat-x;
  opacity: .9;
}

.ema-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ema-prose th,
.ema-prose td { padding: 12px 14px; border-bottom: 1px solid var(--ema-paper-line); text-align: left; }
.ema-prose th { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ema-on-paper-muted); }

/* imagem larga dentro do texto */
.ema-prose .alignwide {
  width: min(var(--ema-maxw), calc(100vw - 2 * var(--ema-pad)));
  margin-inline: calc(50% - min(var(--ema-maxw), calc(100vw - 2 * var(--ema-pad))) / 2);
  max-width: none;
}

/* ---------- blocos de compliance e conversão ------------------------------ */

.ema-oab {
  margin-top: clamp(40px, 6vw, 60px);
  padding: 22px 26px;
  border: 1px solid var(--ema-paper-line);
  border-left: 2px solid var(--ema-gold);
  border-radius: 0 var(--ema-r-sm) var(--ema-r-sm) 0;
  background: rgba(255, 255, 255, .6);
  font-size: .86rem;
  line-height: 1.62;
  color: var(--ema-on-paper-muted);
}

.ema-cta-box {
  margin-top: clamp(34px, 5vw, 52px);
  padding: clamp(32px, 5vw, 46px);
  border-radius: var(--ema-r-lg);
  background: var(--ema-navy-deep);
  color: var(--ema-on-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ema-cta-box::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 192px;
  height: 18px;
  background-image: var(--ema-greek);
  background-repeat: repeat-x;
  opacity: .35;
}

.ema-cta-box h2 {
  font-family: var(--ema-font-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  line-height: 1.2;
  color: var(--ema-on-dark);
  margin: 0 0 12px;
}

.ema-cta-box p {
  margin: 0 auto 26px;
  max-width: 46ch;
  color: var(--ema-on-dark-muted);
  font-size: 1rem;
  line-height: 1.66;
}

/* ---------- relacionados -------------------------------------------------- */

.ema-related { padding: clamp(48px, 7vw, 80px) 0; background: #fff; border-top: 1px solid var(--ema-paper-line); }

.ema-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.ema-related__head h2 {
  font-family: var(--ema-font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
  color: var(--ema-navy);
  margin: 0;
}

/* ---------- rodapé -------------------------------------------------------- */

.ema-footer {
  position: relative;
  background: var(--ema-navy-deep);
  color: var(--ema-on-dark);
  padding: clamp(56px, 8vw, 84px) 0 34px;
  overflow: hidden;
}

.ema-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 48px);
}

.ema-footer__brand img { height: 34px; width: auto; margin-bottom: 18px; }

.ema-footer__brand p {
  margin: 0;
  color: var(--ema-on-dark-muted);
  font-size: .95rem;
  line-height: 1.66;
  max-width: 34ch;
}

.ema-footer h3 {
  font-family: var(--ema-font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ema-gold);
  margin: 0 0 18px;
}

.ema-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.ema-footer a {
  color: var(--ema-on-dark);
  text-decoration: none;
  font-size: .95rem;
  opacity: .86;
  transition: opacity .3s var(--ema-ease), color .3s var(--ema-ease);
}

.ema-footer a:hover { opacity: 1; color: var(--ema-gold-bright); }

.ema-footer li span { color: var(--ema-on-dark-muted); font-size: .95rem; }

.ema-footer__legal {
  margin-top: clamp(38px, 6vw, 56px);
  padding-top: 26px;
  border-top: 1px solid rgba(236, 231, 220, .12);
  text-align: center;
  font-size: .8rem;
  line-height: 1.66;
  color: var(--ema-on-dark-muted);
  max-width: 74ch;
  margin-inline: auto;
}

.ema-footer__copy {
  margin-top: 22px;
  text-align: center;
  font-size: .82rem;
  color: var(--ema-on-dark-muted);
}

@media (max-width: 900px) {
  .ema-footer__grid { grid-template-columns: 1fr 1fr; }
  .ema-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .ema-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- busca e 404 --------------------------------------------------- */

.ema-search-form { display: flex; gap: 10px; max-width: 460px; margin-top: 24px; }

.ema-search-form input[type="search"],
.wp-block-search__input {
  flex: 1;
  border: 1px solid rgba(236, 231, 220, .26);
  background: rgba(255, 255, 255, .06);
  color: var(--ema-on-dark);
  border-radius: var(--ema-r-pill);
  padding: .85rem 1.3rem;
  font-family: var(--ema-font-body);
  font-size: .95rem;
}

.ema-search-form input::placeholder { color: var(--ema-on-dark-muted); }

.wp-block-search__button {
  border: 0;
  background: var(--ema-gold);
  color: var(--ema-navy);
  border-radius: var(--ema-r-pill);
  padding: .85rem 1.6rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- integração com os blocos nativos do WordPress ----------------- */

/* post-template vira a grid; cada <li> abriga um card */
.ema-grid { list-style: none; margin: 0; padding: 0; }
.ema-grid > li { display: flex; margin: 0; }
.ema-grid > li > .ema-card { flex: 1; }

@media (min-width: 900px) {
  .ema-grid--featured > li:first-child { grid-column: 1 / -1; }
  .ema-grid--featured > li:first-child .ema-card { flex-direction: row; align-items: stretch; }
  .ema-grid--featured > li:first-child .ema-card__media { flex: 0 0 54%; aspect-ratio: auto; min-height: 300px; }
  /* a capa carrega texto à esquerda — ancorar ali evita decapitar o título no recorte */
  .ema-grid--featured > li:first-child .ema-card__media img { object-position: left center; }
  .ema-grid--featured > li:first-child .ema-card__body { padding: 44px 46px; justify-content: center; gap: 16px; }
  .ema-grid--featured > li:first-child .ema-card__title { font-size: 2.35rem; }
  .ema-grid--featured > li:first-child .ema-card__excerpt { font-size: 1.05rem; }
}

/* imagem destacada dentro do card */
figure.ema-card__media { margin: 0; }
figure.ema-card__media a { display: block; height: 100%; }
.ema-card__media--vazio { display: block; aspect-ratio: 16 / 10; }

/* data e categoria (blocos) dentro da linha de meta */
.ema-meta > * { margin: 0; font-size: inherit; letter-spacing: inherit; }
.ema-meta > *:not(:last-child)::after { content: "·"; margin-left: 14px; opacity: .5; }
.ema-meta .wp-block-post-terms a,
.ema-meta a { color: var(--ema-gold); text-decoration: none; }
.ema-meta .wp-block-post-date { color: var(--ema-on-paper-muted); }

.ema-meta--dark { color: var(--ema-on-dark-muted); margin-top: 22px; }
.ema-meta--dark .wp-block-post-date { color: var(--ema-on-dark-muted); }

/* título e resumo (blocos) */
h2.ema-card__title,
h3.ema-card__title { margin: 0; }
.ema-card__excerpt { margin: 0; }
.ema-card__excerpt p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.ema-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
a.ema-card__more { margin-top: auto; }

/* topo do artigo — sem foto de fundo, só navy */
.ema-top--article::before { background-image: none; background: var(--ema-navy-deep); }
.ema-top--article { padding-bottom: clamp(38px, 5vw, 58px); }
.ema-top--article .wp-block-post-title,
.ema-top--article h1 {
  font-family: var(--ema-font-serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.4vw, 3.35rem);
  line-height: 1.1;
  color: var(--ema-on-dark);
  margin: 20px 0 0;
  max-width: 20ch;
}
.ema-top--article .ema-eyebrow { text-decoration: none; }
.ema-top--article .ema-eyebrow a { text-decoration: none; color: inherit; }
.ema-top--article .wp-block-query-title { max-width: 18ch; }

/* capa do artigo (bloco featured image) */
figure.ema-article__capa { margin: 0 auto clamp(34px, 5vw, 56px); max-width: var(--ema-maxw); padding-inline: var(--ema-pad); }
figure.ema-article__capa img { width: 100%; border-radius: var(--ema-r-lg); aspect-ratio: 16 / 10; object-fit: cover; box-shadow: var(--ema-shadow-card); }

/* conteúdo do post */
.ema-prose.is-layout-constrained > * { margin-block-start: 1.35em; }
.ema-prose.is-layout-constrained > *:first-child { margin-block-start: 0; }
.ema-prose > .alignwide { max-width: var(--ema-maxw); }

/* busca do 404 sobre fundo navy */
.ema-top .wp-block-search { max-width: 460px; margin-top: 28px; }
.ema-top .wp-block-search__inside-wrapper { gap: 10px; }

/* ---------- respeitar preferência de movimento ---------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- ajustes do editor (Gutenberg) --------------------------------- */

.editor-styles-wrapper {
  background: var(--ema-paper);
  font-family: var(--ema-font-body);
}

.editor-styles-wrapper .wp-block-post-title,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3 { font-family: var(--ema-font-serif); font-weight: 500; color: var(--ema-navy); }
