/* Projeto Coragem / Tema individual — composição local do Kingster.
   Tokens, cores e componentes reutilizáveis pertencem ao SDB Design System.
   Âmbito rigoroso: este template, nunca artigos/páginas institucionais. */

body.sdb-kingster-child .sdbpc-tema-page {
	padding-block: clamp(32px, 5vw, 76px) clamp(64px, 7vw, 112px);
}

body.sdb-kingster-child .sdbpc-tema__article {
	max-width: 980px;
	margin-inline: auto;
}

body.sdb-kingster-child .sdbpc-tema__header {
	max-width: 820px;
	margin: 0 auto clamp(28px, 4vw, 48px);
}

body.sdb-kingster-child .sdbpc-tema__breadcrumb {
	margin-bottom: clamp(20px, 3vw, 32px);
	font-size: var(--sdb-type-body-sm-size, 14px);
}

body.sdb-kingster-child .sdbpc-tema__breadcrumb a {
	color: var(--sdb-color-primary, #0058b7);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 0.25em;
}

body.sdb-kingster-child .sdbpc-tema__breadcrumb a:hover,
body.sdb-kingster-child .sdbpc-tema__breadcrumb a:focus-visible {
	text-decoration-color: currentColor;
}

body.sdb-kingster-child .sdbpc-tema__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 16px;
	font-size: var(--sdb-type-body-sm-size, 14px);
	font-weight: var(--sdb-font-weight-semibold, 600);
	color: var(--sdb-color-text-muted, #586878);
}

body.sdb-kingster-child .sdbpc-tema__number {
	color: var(--sdb-color-primary, #0058b7);
}

body.sdb-kingster-child .sdbpc-tema__part {
	border-left: 1px solid var(--sdb-color-border, #e3eaf0);
	padding-left: 16px;
}

body.sdb-kingster-child .sdbpc-tema__title {
	margin: 0 0 18px;
	font-family: var(--sdb-font-heading, inherit);
	font-size: clamp(2.2rem, 4.4vw, 3.65rem);
	font-weight: var(--sdb-font-weight-bold, 700);
	line-height: 1.13;
	letter-spacing: -0.035em;
	color: var(--sdb-color-title, #253442);
	text-wrap: balance;
}

body.sdb-kingster-child .sdbpc-tema__scripture {
	margin: 0 0 18px;
	font-size: var(--sdb-type-body-sm-size, 14px);
	color: var(--sdb-color-text, #364048);
}

body.sdb-kingster-child .sdbpc-tema__scripture strong {
	font-weight: var(--sdb-font-weight-semibold, 600);
}

body.sdb-kingster-child .sdbpc-tema__intro {
	max-width: 100%;
	font-size: clamp(1.05rem, 1.65vw, 1.25rem);
	line-height: 1.65;
	color: var(--sdb-color-text, #364048);
}

body.sdb-kingster-child .sdbpc-tema__intro p:last-child {
	margin-bottom: 0;
}

body.sdb-kingster-child .sdbpc-tema__image {
	max-width: 960px;
	width: 100%;
	margin: 0 auto clamp(30px, 5vw, 60px);
}

body.sdb-kingster-child .sdbpc-tema__image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	object-fit: cover;
	object-position: center;
	border-radius: var(--sdb-radius-lg, 14px);
}

body.sdb-kingster-child .sdbpc-tema__image figcaption {
	margin-top: 10px;
	font-size: var(--sdb-type-body-sm-size, 14px);
	line-height: 1.5;
	color: var(--sdb-color-text-muted, #586878);
}

body.sdb-kingster-child .sdbpc-tema__content {
	max-width: 820px;
	margin: 0 auto;
	font-size: var(--sdb-type-body-md-size, 1rem);
	line-height: 1.75;
	color: var(--sdb-color-text, #364048);
	overflow-wrap: anywhere;
}

body.sdb-kingster-child .sdbpc-tema__content :where(img, video, iframe) {
	max-width: 100%;
}

body.sdb-kingster-child .sdbpc-tema__related {
	margin: clamp(44px, 6vw, 76px) auto 0;
	padding-top: clamp(26px, 4vw, 42px);
	border-top: 1px solid var(--sdb-color-border, #e3eaf0);
}

body.sdb-kingster-child .sdbpc-tema__related-header {
	margin-bottom: clamp(18px, 3vw, 28px);
}

body.sdb-kingster-child .sdbpc-tema__related-title {
	margin: 0 0 8px;
	font-family: var(--sdb-font-heading, inherit);
	font-size: clamp(1.4rem, 2.5vw, 1.9rem);
	font-weight: var(--sdb-font-weight-semibold, 600);
	line-height: 1.3;
	color: var(--sdb-color-title, #253442);
}

body.sdb-kingster-child .sdbpc-tema__related-header p {
	margin: 0;
	color: var(--sdb-color-text-muted, #586878);
}

/* Layout only: visual anatomy of the cards is owned by SDB documents. */
body.sdb-kingster-child .sdbpc-tema__resource-list.sdb-document-catalog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body.sdb-kingster-child .sdbpc-tema__resource-item.sdb-document-card {
	min-width: 0;
}
body.sdb-kingster-child .sdbpc-tema__resource-item .sdb-document-card__title a {
	color: inherit;
	text-decoration: none;
}
body.sdb-kingster-child .sdbpc-tema__resource-item .sdb-document-card__title a span {
	white-space: nowrap;
	color: var(--sdb-color-primary, #0058b7);
}
body.sdb-kingster-child .sdbpc-tema__resource-item .sdb-document-card__title a:hover,
body.sdb-kingster-child .sdbpc-tema__resource-item .sdb-document-card__title a:focus-visible {
	color: var(--sdb-color-primary, #0058b7);
	text-decoration: underline;
	text-underline-offset: .2em;
}
body.sdb-kingster-child .sdbpc-tema__resource-item .sdb-document-card__title a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

@media (max-width: 767px) {
	body.sdb-kingster-child .sdbpc-tema__resource-list {
		grid-template-columns: minmax(0, 1fr);
	}

	body.sdb-kingster-child .sdbpc-tema__part {
		border-left: 0;
		padding-left: 0;
	}
}

@media (forced-colors: active) {
	body.sdb-kingster-child .sdbpc-tema__breadcrumb a:focus-visible {
		outline: 2px solid Highlight;
		outline-offset: 3px;
	}
}

/* Navegação editorial sequencial, apenas na página individual de Tema. */
body.sdb-kingster-child .sdbpc-tema__adjacent {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
}
body.sdb-kingster-child .sdbpc-tema__adjacent a {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
	padding: clamp(20px, 3vw, 28px);
	min-height: 108px;
	justify-content: center;
	background: var(--sdb-color-surface, #fff);
	border: 1px solid var(--sdb-color-border, #e3eaf0);
	border-radius: var(--sdb-radius-md, 10px);
	color: var(--sdb-color-text, #364048);
	text-decoration: none;
}
body.sdb-kingster-child .sdbpc-tema__adjacent a[rel="next"] { grid-column: 2; }
body.sdb-kingster-child .sdbpc-tema__adjacent a:only-child { grid-column: 1 / -1; }
body.sdb-kingster-child .sdbpc-tema__adjacent a span {
	font-size: var(--sdb-type-body-sm-size, .875rem);
	color: var(--sdb-color-text-muted, #586878);
}
body.sdb-kingster-child .sdbpc-tema__adjacent a strong { overflow-wrap: anywhere; }
body.sdb-kingster-child .sdbpc-tema__adjacent a:hover,
body.sdb-kingster-child .sdbpc-tema__adjacent a:focus-visible {
	border-color: var(--sdb-color-primary, #0058b7);
}
body.sdb-kingster-child .sdbpc-tema__adjacent a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media (max-width: 620px) {
 body.sdb-kingster-child .sdbpc-tema__adjacent { grid-template-columns: minmax(0, 1fr); }
 body.sdb-kingster-child .sdbpc-tema__adjacent a[rel="next"] { grid-column: auto; }
}

/* Regresso ao indice/biblioteca, usando os botoes oficiais do SDB. */
body.sdb-kingster-child .sdbpc-tema__explore {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 20px 0;
}
body.sdb-kingster-child .sdbpc-tema__explore .sdb-btn { min-height: 44px; }
body.sdb-kingster-child .sdbpc-tema__explore a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Single-template title is the canonical visible H1. The Kingster Page Title
   is duplicated on these CPTs only; other pages/hero banners are untouched. */
body.sdb-kingster-child.single-sdbpc_tema .kingster-page-title-wrap {
	display: none;
}

/* The content uses native Gutenberg/editor headings from a single pasted file.
   No parsing by keywords, no extra meta fields and no redefinition of SDB tokens. */
body.sdb-kingster-child .sdbpc-tema__content {
	font-size: clamp(1.05rem, 1.35vw, 1.16rem);
	line-height: 1.8;
}
body.sdb-kingster-child .sdbpc-tema__content :where(h2, h3, h4) {
	font-family: var(--sdb-font-heading, inherit);
	font-weight: var(--sdb-font-weight-semibold, 600);
	color: var(--sdb-color-title, #253442);
	line-height: 1.3;
	letter-spacing: -.015em;
	text-wrap: balance;
}
body.sdb-kingster-child .sdbpc-tema__content h2 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	margin-block: clamp(30px, 4vw, 46px) 16px;
}
body.sdb-kingster-child .sdbpc-tema__content h3 {
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	margin-block: 28px 12px;
}
body.sdb-kingster-child .sdbpc-tema__content :where(p, ul, ol) {
	margin-block: 0 1.15em;
}
body.sdb-kingster-child .sdbpc-tema__content :where(ul, ol) {
	padding-inline-start: 1.65em;
}
body.sdb-kingster-child .sdbpc-tema__content li + li {
	margin-top: .55em;
}

/* Projeto Coragem: the header, reading and closing measures stay aligned.
   The image is deliberately wider for a 16:9 editorial pause. */
body.sdb-kingster-child .sdbpc-tema__related,
body.sdb-kingster-child .sdbpc-tema__closing {
	max-width: 820px;
	width: 100%;
	margin-inline: auto;
}
body.sdb-kingster-child .sdbpc-tema__closing {
	margin-top: clamp(40px, 6vw, 72px);
	padding-top: clamp(24px, 3vw, 36px);
	border-top: 1px solid var(--sdb-color-border, #e3eaf0);
}
body.sdb-kingster-child .sdbpc-tema__closing-title {
	margin: 0 0 clamp(18px, 2.6vw, 28px);
	font-family: var(--sdb-font-heading, inherit);
	font-size: clamp(1.45rem, 2.4vw, 1.85rem);
	line-height: 1.3;
	font-weight: var(--sdb-font-weight-semibold, 600);
	color: var(--sdb-color-title, #253442);
}
body.sdb-kingster-child .sdbpc-tema__closing .sdbpc-tema__adjacent,
body.sdb-kingster-child .sdbpc-tema__closing .sdbpc-tema__explore {
	max-width: none;
	width: 100%;
}
body.sdb-kingster-child .sdbpc-tema__closing .sdbpc-tema__explore {
	padding-top: 20px;
	border-top: 1px solid var(--sdb-color-border, #e3eaf0);
}
body.sdb-kingster-child .sdbpc-tema__image img {
	object-position: center;
}
@media (max-width: 767px) {
	body.sdb-kingster-child .sdbpc-tema__article,
	body.sdb-kingster-child .sdbpc-tema__image { max-width: 100%; }
}

/* 1.20.53 — superficie editorial a 1240px, independente do artigo a 980px.
   Apenas amplia a folha decorativa lateral; mantem o texto, imagem,
   alinhamentos e sombra da 1.20.52. Nao interfere no header/menu. */
body.sdb-kingster-child.single-sdbpc_tema .sdbpc-tema-page {
    position: relative;
}
body.sdb-kingster-child.single-sdbpc_tema .sdbpc-tema-page::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: 50%;
    width: min(1240px, calc(100% - 40px));
    transform: translateX(-50%);
    background: var(--sdb-color-surface, #fff);
    box-shadow: -7px 0 18px -12px rgb(24 36 58 / 0.16),
                 7px 0 18px -12px rgb(24 36 58 / 0.16);
    pointer-events: none;
    z-index: 0;
}
body.sdb-kingster-child.single-sdbpc_tema .sdbpc-tema-page > .kingster-container {
    position: relative;
    z-index: 1;
}
/* A moldura nao deve apertar o conteudo no telemovel ou surgir no PDF. */
@media (max-width: 767px), print {
    body.sdb-kingster-child.single-sdbpc_tema .sdbpc-tema-page::before {
        display: none;
    }
}
