:root {
  --ac-navy: #0b2a6f;
  --ac-navy-dark: #081f55;
  --ac-yellow: #ffc61a;
  --ac-soft: #eef2fb;
  --ac-text: #2b3550;
  --ac-line: #e3e8f4;
}

.post-wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* ---------- Topo ---------- */
.post-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #f3f6fd 0%, #fff 100%);
  padding: 56px 0 84px;
}
.post-hero--sem-capa { padding-bottom: 40px; }
.post-hero::before {              /* arco amarelo, o mesmo recurso visual da home */
  content: ""; position: absolute; right: -130px; top: -150px;
  width: 440px; height: 440px; border-radius: 50%;
  border: 38px solid rgba(255, 198, 26, .22); pointer-events: none;
  /* some suavemente embaixo, em vez de ser cortado em linha reta quando o topo é baixo */
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}
.post-hero__inner { position: relative; }

.post-breadcrumb {
  display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none;
  font: 600 13px/1.4 'Montserrat', sans-serif; color: #6b7590;
}
.post-breadcrumb li { flex: 0 0 auto; }
.post-breadcrumb a { color: var(--ac-navy); text-decoration: none; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #b4bccf; }
.post-breadcrumb li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post-hero__title {
  margin: 0 0 18px; font-family: 'Montserrat', sans-serif; font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -.02em; color: var(--ac-navy);
}
.post-hero__lead { margin: 0 0 22px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.7; color: #3f4658; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; font: 600 14px/1 'Open Sans', sans-serif; color: #5b6580; }
.post-meta span { display: inline-flex; align-items: center; gap: 8px; }
.post-meta i { color: #c28a00; }

/* ---------- Capa ---------- */
.post-cover { position: relative; z-index: 2; max-width: 1080px; margin: -44px auto 0; padding: 0 20px; }
.post-cover__frame {
  position: relative; margin: 0; overflow: hidden; isolation: isolate;
  border-radius: 22px; background: var(--ac-soft); box-shadow: 0 18px 50px rgba(11, 42, 111, .16);
}
/* Se a foto não tiver a proporção do quadro, o espaço é preenchido com ela mesma, desfocada. Nada é cortado. */
.post-cover__frame::before {
  content: ""; position: absolute; inset: -24px; z-index: -1; opacity: .6;
  background: var(--cover) center / cover no-repeat; filter: blur(26px) saturate(1.15);
}
.post-cover__frame img {
  display: block; width: 100%; height: auto; max-height: 560px; margin: 0 auto; object-fit: contain;
}

/* ---------- Texto ---------- */
.post-article { padding-top: 56px; padding-bottom: 8px; }
.post-conteudo {
  display: flow-root;            /* contém imagens flutuantes */
  font: 400 18px/1.85 'Open Sans', sans-serif; color: var(--ac-text); overflow-wrap: break-word;
}
.post-conteudo > :first-child { margin-top: 0; }
.post-conteudo p { margin: 0 0 1.35em; line-height: 1.85; color: inherit; }
.post-conteudo p[style*="justify"] { hyphens: auto; }

/* texto colado do Word costuma trazer fonte, tamanho e entrelinha próprios: aqui eles não valem */
.post-conteudo [style*="font-family"] { font-family: inherit !important; }
.post-conteudo [style*="font-size"]   { font-size: inherit !important; }
.post-conteudo [style*="line-height"] { line-height: inherit !important; }

.post-conteudo h2, .post-conteudo h3, .post-conteudo h4 { clear: both; font-family: 'Montserrat', sans-serif; color: var(--ac-navy); }
.post-conteudo h2 { margin: 2.3em 0 .75em; font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.01em; }
.post-conteudo h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 14px; border-radius: 4px; background: var(--ac-yellow); }
.post-conteudo h3 { margin: 1.9em 0 .6em; font-weight: 700; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.3; }
.post-conteudo h4, .post-conteudo h5, .post-conteudo h6 { margin: 1.6em 0 .5em; font-weight: 700; font-size: 18px; line-height: 1.4; }

.post-conteudo strong, .post-conteudo b { color: var(--ac-navy); font-weight: 700; }
.post-conteudo a {
  color: var(--ac-navy); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--ac-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.post-conteudo a:hover { background: rgba(255, 198, 26, .35); text-decoration-color: transparent; }

/* listas */
.post-conteudo ul, .post-conteudo ol { margin: 0 0 1.5em; padding: 0; list-style: none; }
.post-conteudo ol { counter-reset: item; }
.post-conteudo li { position: relative; margin: 0 0 .6em; padding-left: 34px; }
.post-conteudo ul > li::before {
  content: ""; position: absolute; left: 6px; top: .72em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ac-yellow); box-shadow: 0 0 0 3px rgba(255, 198, 26, .28);
}
.post-conteudo ol > li { counter-increment: item; }
.post-conteudo ol > li::before {
  content: counter(item); position: absolute; left: 0; top: .32em; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ac-navy); color: #fff; font: 700 13px/24px 'Montserrat', sans-serif; text-align: center;
}
.post-conteudo li > ul, .post-conteudo li > ol { margin: .6em 0 .2em; }

/* citação, linha, código */
.post-conteudo blockquote {
  margin: 2em 0; padding: 22px 26px 22px 30px; font-size: 1.08em; color: var(--ac-navy);
  background: var(--ac-soft); border-left: 5px solid var(--ac-yellow); border-radius: 0 16px 16px 0;
}
.post-conteudo blockquote p:last-child { margin-bottom: 0; }
.post-conteudo hr { width: 80px; height: 4px; margin: 2.8em auto; border: 0; border-radius: 4px; background: var(--ac-yellow); opacity: 1; }
.post-conteudo pre {
  margin: 2em 0; padding: 18px 20px; overflow-x: auto; font-size: 15px; line-height: 1.6;
  color: #e8edff; background: #0f1b3d; border-radius: 14px;
}
.post-conteudo code { padding: 2px 6px; font-size: .9em; background: var(--ac-soft); border-radius: 6px; }
.post-conteudo pre code { padding: 0; background: none; }

/* tabelas rolam dentro do próprio quadro, sem alargar a página */
.post-conteudo table { display: block; width: 100%; max-width: 100%; margin: 2em 0; overflow-x: auto; border-collapse: collapse; font-size: 16px; }
.post-conteudo th, .post-conteudo td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--ac-line); }
.post-conteudo th { font-family: 'Montserrat', sans-serif; color: var(--ac-navy); background: var(--ac-soft); }

/* ---------- Imagens vindas do TinyMCE ---------- */
/* Padrão: bloco centralizado, cantos arredondados, sombra suave, nunca maior que a coluna e nunca deformada */
.post-conteudo img {
  display: block; max-width: 100%; height: auto !important; max-height: 680px; margin: 2em auto;
  object-fit: contain; background: var(--ac-soft); border-radius: 16px; box-shadow: 0 10px 30px rgba(11, 42, 111, .12);
}
.post-conteudo img.is-zoomable { cursor: zoom-in; }
.post-conteudo a > img { cursor: pointer; }

/* alinhadas à esquerda ou à direita: o texto contorna a imagem */
.post-conteudo img[style*="float: left"], .post-conteudo img[style*="float:left"], .post-conteudo img.alignleft {
  float: left; max-width: 46%; margin: .4em 1.8em 1em 0;
}
.post-conteudo img[style*="float: right"], .post-conteudo img[style*="float:right"], .post-conteudo img.alignright {
  float: right; max-width: 46%; margin: .4em 0 1em 1.8em;
}

/* várias imagens no mesmo parágrafo viram uma grade */
.post-conteudo p:has(> img:nth-of-type(2)) {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 2em 0;
}
.post-conteudo p:has(> img:nth-of-type(2)) > br { display: none; }
.post-conteudo p:has(> img:nth-of-type(2)) > img {
  float: none; width: 100%; max-width: 100%; max-height: none; margin: 0; aspect-ratio: 4 / 3; object-fit: cover;
}

/* legenda: figcaption, ou um parágrafo só em itálico logo abaixo da imagem */
.post-conteudo figure { display: block; margin: 2em 0; text-align: center; }
.post-conteudo figure img { margin: 0 auto; }
.post-conteudo figcaption, .post-conteudo p:has(> img) + p:has(> em:only-child) {
  font-size: 14px; line-height: 1.5; font-style: italic; color: #6b7590; text-align: center;
}
.post-conteudo figcaption { margin-top: 12px; }
.post-conteudo p:has(> img) + p:has(> em:only-child) { margin: -1.2em 0 2em; }

/* vídeo (YouTube etc.) sempre em 16:9 e na largura da coluna */
.post-conteudo iframe, .post-conteudo video {
  display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 2em 0;
  border: 0; border-radius: 16px; background: #0f1b3d; box-shadow: 0 10px 30px rgba(11, 42, 111, .16);
}

/* ---------- Galeria ---------- */
.post-galeria { margin-top: 56px; }
.post-galeria__titulo { margin: 0 0 22px; font: 800 clamp(22px, 2.6vw, 28px)/1.2 'Montserrat', sans-serif; color: var(--ac-navy); }
.post-galeria__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.post-galeria__item { position: relative; display: block; overflow: hidden; border-radius: 14px; background: var(--ac-soft); }
.post-galeria__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.post-galeria__item:hover img { transform: scale(1.06); }
.post-galeria__lupa {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; background: rgba(11, 42, 111, .45); opacity: 0; transition: opacity .3s ease;
}
.post-galeria__item:hover .post-galeria__lupa { opacity: 1; }

/* ---------- Compartilhar ---------- */
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--ac-line); }
.post-share__label { margin-right: 6px; font: 700 14px/1 'Montserrat', sans-serif; color: var(--ac-navy); }
.post-share a, .post-share button {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0;
  font-size: 17px; color: var(--ac-navy); text-decoration: none; background: var(--ac-soft);
  border: 0; border-radius: 50%; cursor: pointer; transition: all .25s ease;
}
.post-share a:hover, .post-share button:hover { color: #fff; background: var(--ac-navy); }
.post-share__msg { font: 600 13px/1 'Open Sans', sans-serif; color: #2e7d32; }

/* ---------- Continue lendo ---------- */
.post-more { margin-top: 64px; padding: 64px 20px; background: var(--ac-soft); }
.post-more__inner { max-width: 1140px; margin: 0 auto; }
.post-more__titulo { margin: 0 0 30px; font: 800 clamp(24px, 3vw, 32px)/1.2 'Montserrat', sans-serif; color: var(--ac-navy); text-align: center; }
.post-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; background: #fff;
  border-radius: 18px; box-shadow: 0 6px 22px rgba(11, 42, 111, .1); transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(11, 42, 111, .18); }
.post-card__img { display: block; overflow: hidden; }
.post-card__img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__titulo { display: block; padding: 18px 20px 6px; font: 700 18px/1.35 'Montserrat', sans-serif; color: var(--ac-navy); }
.post-card__mais { display: block; margin-top: auto; padding: 8px 20px 20px; font: 700 14px/1 'Montserrat', sans-serif; color: #c28a00; }
.post-card:hover .post-card__mais i { margin-left: 4px; }

/* ---------- Chamada final ---------- */
.post-cta { padding: 38px 20px; color: #fff; background: var(--ac-navy); }
.post-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1140px; margin: 0 auto; }
.post-cta__plane { font-size: 54px; opacity: .85; }
.post-cta__texto { flex: 1; }
.post-cta__texto h2 { margin: 0 0 6px; font: 800 30px/1.2 'Montserrat', sans-serif; color: #fff; }
.post-cta__texto p { margin: 0; font-size: 15px; line-height: 1.5; color: #dbe3f7; }
.post-cta__botao {
  display: inline-flex; align-items: center; gap: 8px; padding: 18px 36px; font: 700 16px/1 'Montserrat', sans-serif;
  color: var(--ac-navy); text-decoration: none; background: var(--ac-yellow); border-radius: 40px; transition: all .25s ease;
}
.post-cta__botao:hover { color: var(--ac-navy); background: #fff; }

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .post-cta__inner { flex-direction: column; text-align: center; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  .post-hero { padding: 36px 0 64px; }
  .post-hero--sem-capa { padding-bottom: 28px; }
  .post-hero::before { width: 300px; height: 300px; right: -110px; top: -120px; border-width: 28px; }
  .post-cover { margin-top: -36px; padding: 0 14px; }
  .post-cover__frame { border-radius: 16px; }
  .post-article { padding-top: 40px; }
  .post-conteudo { font-size: 17px; line-height: 1.8; }
  .post-more { padding: 48px 20px; }
  .post-cta__texto h2 { font-size: 24px; }
  .post-cta__plane { display: none; }
  .post-cta__botao { width: 100%; justify-content: center; }
}
@media (max-width: 575px) {
  /* em tela pequena o contorno de texto não funciona: a imagem vira bloco inteiro */
  .post-conteudo img[style*="float"], .post-conteudo img.alignleft, .post-conteudo img.alignright {
    float: none !important; max-width: 100% !important; margin: 1.6em auto !important;
  }
  .post-conteudo p:has(> img:nth-of-type(2)) { grid-template-columns: 1fr 1fr; gap: 10px; }
}