/* ════════════════════════════════════════════════════════════════════════
   DentGrow — Índice do blog (/blog/ e /category/<slug>/)
   Carregado por mu-plugins/dentgrow-blog-index.php só nessas páginas.

   Manual de normas DentGrow v1.0 (brand/brand-guidelines.html):
     - Inter exclusiva. Display 800 · H1 800 · H2 700 · H3 600–700 · Body 400 16/1.75
     - Labels: Inter 600, 12px, CAPS, tracking largo (+3.5px)
     - DentBlue #1558D6 → CTAs, links, destaques · GrowGreen #00C896 → acento (~10%)
     - DeepNavy #0A1628 → fundos escuros · OffWhite #F1F5F9 → fundo de página
   Texto secundário em #4A5568 (em vez do SlateGray #6B7A95) para passar
   contraste AA (4.5:1) em texto pequeno sobre branco.

   Largura útil: 1200px com 20px de margem — a mesma do menu do header 52,
   para o logótipo, o título e a grelha alinharem na mesma vertical.
   ════════════════════════════════════════════════════════════════════════ */

.dgb {
	--dgb-blue: #1558D6;
	--dgb-blue-d: #0E3FA0;
	--dgb-green: #00C896;
	--dgb-navy: #0A1628;
	--dgb-ink: #1A2332;
	--dgb-ink-soft: #4A5568;
	--dgb-line: #E2E8F0;
	--dgb-line-soft: #F1F5F9;
	--dgb-page: #F1F5F9;
	--dgb-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	font-family: var(--dgb-font);
	color: var(--dgb-ink);
	background: var(--dgb-page);
	-webkit-font-smoothing: antialiased;
}
.dgb *, .dgb *::before, .dgb *::after { box-sizing: border-box; }
.dgb [hidden] { display: none !important; }

/* ── Contentor Divi à volta do shortcode (body 49) ────────────────────────
   O shortcode vive num módulo de texto dentro de secção/linha/coluna Divi.
   Tiramos-lhes padding, largura máxima e fundo para a página ser só nossa. */
body.blog .et-l--body .et_pb_section,
body.category .et-l--body .et_pb_section { padding: 0 !important; background: var(--dgb-page) !important; }
body.blog .et-l--body .et_pb_row,
body.category .et-l--body .et_pb_row {
	width: 100% !important; max-width: 100% !important;
	padding: 0 !important; margin: 0 !important;
}
body.blog .et-l--body .et_pb_column,
body.category .et-l--body .et_pb_column { width: 100% !important; padding: 0 !important; margin: 0 !important; }
body.blog .et-l--body .et_pb_text,
body.category .et-l--body .et_pb_text { margin: 0 !important; padding: 0 !important; }
body.blog .et-l--body .et_pb_text_inner > p:empty,
body.category .et-l--body .et_pb_text_inner > p:empty { display: none; }

/* ── Base ─────────────────────────────────────────────────────────────── */
.dgb-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.dgb a { text-decoration: none; }
.dgb p { margin: 0; padding: 0; }
.dgb h1, .dgb h2, .dgb h3 { font-family: var(--dgb-font); margin: 0; padding: 0; }
.dgb-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dgb-icon { flex: 0 0 auto; display: block; }

.dgb-label {
	display: inline-block;
	font-size: 12px; font-weight: 600; line-height: 1.3;
	letter-spacing: .28em; text-transform: uppercase;
}
.dgb-label--green { color: var(--dgb-green); }
.dgb-label--blue  { color: var(--dgb-blue); }

.dgb-meta { font-size: 13px; color: var(--dgb-ink-soft); }

/* ── Topo ─────────────────────────────────────────────────────────────── */
.dgb-hero { background: var(--dgb-navy); color: #FFFFFF; }
.dgb-hero .dgb-wrap { padding-top: 72px; padding-bottom: 152px; }
.dgb-hero .dgb-label { margin-bottom: 20px; }
.dgb .dgb-hero__title {
	max-width: 840px;
	color: #FFFFFF;
	font-size: clamp(40px, 5vw, 60px); font-weight: 800; line-height: 1.06;
	letter-spacing: -0.035em;
}
.dgb-accent { color: var(--dgb-green); }
.dgb .dgb-hero__subtitle {
	max-width: 600px; margin-top: 24px;
	font-size: 19px; line-height: 1.6; color: #CBD5E1;
}

/* ── Artigo em destaque ───────────────────────────────────────────────── */
.dgb-featured { margin-top: -104px; position: relative; z-index: 1; }
.dgb-featured__card {
	display: flex; flex-wrap: wrap; overflow: hidden;
	background: #FFFFFF; border-radius: 24px; color: var(--dgb-ink);
	box-shadow: 0 12px 32px rgba(10, 22, 40, .08);
	transition: box-shadow .2s ease, transform .2s ease;
}
.dgb-featured__card:hover { box-shadow: 0 20px 44px rgba(10, 22, 40, .12); transform: translateY(-3px); }
/* A imagem é posta em absoluto dentro do bloco: assim ocupa sempre a altura
   toda do cartão, seja qual for a altura do texto ao lado. */
.dgb-featured__media { position: relative; flex: 1 1 520px; min-width: 0; min-height: 340px; background: var(--dgb-line-soft); overflow: hidden; }
.dgb .dgb-featured__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.dgb-featured__body {
	flex: 1 1 400px; min-width: 0;
	padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.dgb-featured__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dgb-badge-new {
	background: #E6FAF4; color: #006B50; border-radius: 999px; padding: 7px 12px;
	font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.dgb .dgb-featured__title {
	font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.18;
	letter-spacing: -0.02em; color: var(--dgb-navy);
}
.dgb-featured__excerpt { font-size: 17px; line-height: 1.7; color: var(--dgb-ink-soft); }
.dgb-featured__foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px; padding-top: 8px;
}
.dgb-readmore { display: inline-flex; align-items: center; gap: 8px; color: var(--dgb-blue); font-weight: 600; font-size: 15px; }

/* ── Filtros + pesquisa ───────────────────────────────────────────────── */
.dgb-toolbar {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 24px; padding-top: 88px;
}
/* Com um tema escolhido (ou uma pesquisa) não há artigo em destaque: o topo
   fecha mais cedo e os filtros ficam na zona clara, com a mesma estrutura de
   «Todos». Nunca sobrepor os filtros ao topo escuro — cortava o subtítulo. */
.dgb:not(.dgb--browsing) .dgb-hero .dgb-wrap { padding-bottom: 80px; }
.dgb:not(.dgb--browsing) .dgb-toolbar { padding-top: 72px; }

.dgb-toolbar__left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dgb .dgb-section-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--dgb-navy); }
.dgb-topics { display: flex; flex-wrap: wrap; gap: 10px; }
.dgb-pill {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
	padding: 10px 18px; border-radius: 999px;
	background: #FFFFFF; border: 1px solid var(--dgb-line); color: var(--dgb-ink);
	font-size: 14px; font-weight: 600; line-height: 1;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.dgb-pill:hover { border-color: var(--dgb-blue); color: var(--dgb-blue); }
.dgb-pill[aria-current="page"] { background: var(--dgb-blue); border-color: var(--dgb-blue); color: #FFFFFF; }
.dgb-pill__count { font-weight: 500; opacity: .7; }
.dgb-pill:focus-visible, .dgb-search__input:focus-visible,
.dgb-card:focus-visible, .dgb-featured__card:focus-visible, .dgb-btn:focus-visible {
	outline: 3px solid var(--dgb-green); outline-offset: 3px;
}

.dgb-search {
	display: flex; align-items: center; gap: 10px;
	width: 320px; max-width: 100%; height: 48px; padding: 0 18px;
	background: #FFFFFF; border: 1px solid var(--dgb-line); border-radius: 999px;
	color: var(--dgb-ink-soft);
}
.dgb-search:focus-within { border-color: var(--dgb-blue); }
.dgb .dgb-search__input {
	flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0;
	font: inherit; font-size: 15px; color: var(--dgb-ink);
	-webkit-appearance: none; appearance: none; box-shadow: none;
}
.dgb .dgb-search__input:focus-visible { outline: 0; }
.dgb-search:has(.dgb-search__input:focus-visible) { outline: 3px solid var(--dgb-green); outline-offset: 3px; }

/* ── Grelha ───────────────────────────────────────────────────────────── */
.dgb-grid-wrap { padding-top: 40px; }
.dgb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.dgb-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: #FFFFFF; border: 1px solid var(--dgb-line); border-radius: 18px; color: var(--dgb-ink);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.dgb-card:hover { box-shadow: 0 18px 40px rgba(10, 22, 40, .10); transform: translateY(-3px); border-color: #C7D4F0; }
.dgb-card__media { aspect-ratio: 16 / 10; background: var(--dgb-line-soft); overflow: hidden; }
.dgb-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dgb-card__body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 24px; }
.dgb .dgb-card__title { font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; color: var(--dgb-navy); }
.dgb-card:hover .dgb-card__title { color: var(--dgb-blue); }
.dgb-card__excerpt {
	font-size: 15px; line-height: 1.65; color: var(--dgb-ink-soft);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dgb-card__foot {
	margin-top: auto; padding-top: 16px; border-top: 1px solid var(--dgb-line-soft);
	display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dgb-blue);
}

.dgb-empty {
	text-align: center; padding: 72px 24px;
	background: #FFFFFF; border: 1px dashed var(--dgb-line); border-radius: 18px;
}
.dgb-empty__title { font-size: 18px; font-weight: 700; margin-bottom: 8px !important; }
.dgb-empty__text { font-size: 15px; color: var(--dgb-ink-soft); }

/* ── Chamada para a análise gratuita ──────────────────────────────────── */
.dgb-cta-wrap { padding-top: 120px; padding-bottom: 152px; }
.dgb-cta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px;
	background: var(--dgb-navy); color: #FFFFFF; border-radius: 28px; padding: 72px 64px;
}
.dgb-cta__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dgb .dgb-cta__title { color: #FFFFFF; font-size: clamp(28px, 3vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.dgb-cta__sub { font-size: 17px; line-height: 1.6; color: #CBD5E1; }
.dgb .dgb-btn {
	flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
	background: var(--dgb-blue); color: #FFFFFF; border-radius: 10px; padding: 16px 28px;
	font-size: 16px; font-weight: 600; transition: background .15s ease;
}
.dgb .dgb-btn:hover { background: var(--dgb-blue-d); color: #FFFFFF; }

/* ── Fim do artigo [dg_post_end] ──────────────────────────────────────────
   Vive numa secção própria do TB body 47. A coluna estreita tem os mesmos
   760px da coluna de texto do artigo, para o tema e a caixa «Sobre» alinharem
   com o texto. O dentgrow-blog-styles.php centra o texto das secções 2+ do
   artigo (regra antiga da faixa azul): aqui repomos o alinhamento à esquerda. */
.dgb-end { background: #FFFFFF; text-align: left; }
.single-post .et-l--body .et_pb_section:has(.dgb-end) { padding: 0 !important; background: #FFFFFF !important; }
.single-post .et-l--body .et_pb_section:has(.dgb-end) .et_pb_text,
.single-post .et-l--body .et_pb_section:has(.dgb-end) .et_pb_text_inner { margin: 0 !important; padding: 0 !important; text-align: left !important; }

.dgb-narrow { max-width: 800px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.dgb-end__intro { padding-top: 8px; }
.dgb-end__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
	padding-top: 28px; border-top: 1px solid var(--dgb-line);
}
.dgb-end__meta-label { font-size: 14px; color: var(--dgb-ink-soft); }
.dgb-end__spacer { flex: 1 1 auto; }
.dgb .dgb-topic-chip {
	display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px;
	background: #EBF2FF; color: var(--dgb-blue); font-size: 13px; font-weight: 600;
}
.dgb .dgb-topic-chip:hover { background: var(--dgb-blue); color: #FFFFFF; }

.dgb-about {
	margin-top: 40px; padding: 32px; border-radius: 20px; background: var(--dgb-page);
	display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
}
.dgb-about__mark {
	flex: 0 0 64px; width: 64px; height: 64px; border-radius: 16px; background: var(--dgb-navy);
	display: flex; align-items: center; justify-content: center;
	color: #FFFFFF; font-size: 22px; font-weight: 800; letter-spacing: -0.04em;
}
.dgb-about__text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dgb .dgb-about__body { font-size: 16px; line-height: 1.7; color: var(--dgb-ink); }
.dgb-about .dgb-readmore { margin-top: 4px; }

.dgb-end__more { background: var(--dgb-page); margin-top: 96px; }
.dgb-end__related { padding-top: 88px; }
.dgb-end__head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 16px; margin-bottom: 32px;
}
.dgb-end__head-text { display: flex; flex-direction: column; gap: 12px; }
.dgb-end .dgb-cta-wrap { padding-top: 112px; padding-bottom: 120px; }

/* ── Tablet ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
	.dgb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.dgb-featured__body { padding: 40px; }
	.dgb-hero .dgb-wrap { padding-top: 56px; }
	.dgb-cta { padding: 56px 40px; }
}

/* ── Telemóvel ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.dgb-wrap { padding-left: 16px; padding-right: 16px; }
	.dgb-hero .dgb-wrap { padding-top: 48px; padding-bottom: 120px; }
	.dgb:not(.dgb--browsing) .dgb-hero .dgb-wrap { padding-bottom: 56px; }
	.dgb:not(.dgb--browsing) .dgb-toolbar { padding-top: 48px; }
	.dgb .dgb-hero__subtitle { font-size: 17px; }
	.dgb-featured { margin-top: -80px; }
	.dgb-featured__media { min-height: 220px; }
	.dgb-featured__body { padding: 28px 24px; gap: 16px; }
	.dgb-featured__excerpt { font-size: 16px; }
	.dgb-toolbar { padding-top: 64px; }
	.dgb-topics { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
	.dgb-topics::-webkit-scrollbar { display: none; }
	.dgb-pill { flex: 0 0 auto; }
	.dgb-search { width: 100%; }
	.dgb-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.dgb-card__body { padding: 22px 22px 20px; }
	.dgb .dgb-card__title { font-size: 18px; }
	.dgb-cta-wrap { padding-top: 80px; padding-bottom: 104px; }
	.dgb-cta { padding: 40px 24px; border-radius: 22px; }
	.dgb .dgb-btn { width: 100%; justify-content: center; }
	.dgb-narrow { padding-left: 5%; padding-right: 5%; } /* = margens do texto do artigo no telemóvel */
	.dgb-about { padding: 24px; gap: 18px; }
	.dgb-end__more { margin-top: 64px; }
	.dgb-end__related { padding-top: 64px; }
	.dgb-end .dgb-cta-wrap { padding-top: 72px; padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
	.dgb-card, .dgb-featured__card { transition: none; }
	.dgb-card:hover, .dgb-featured__card:hover { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   Bloco «guia» dentro do texto do artigo (aside.dg-guide)
   Escrito no post_content entre <!-- DG-CLUSTER-LINKS-START/END -->.
   - Capítulos (posts 27–33, 35): à esquerda o capítulo e o guia; à direita
     os outros capítulos, numerados pela ordem do índice do guia.
   - Guia (post 26, .dg-guide--toc): os 8 capítulos em duas colunas.
   Sem cartão, sem fundo, sem barra lateral: só filetes, como num índice
   editorial. Os !important repõem o que o Divi impõe a p/ol/li/a do texto.
   ════════════════════════════════════════════════════════════════════════ */
.dg-guide {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 48px;
	margin: 64px 0 16px;
	padding: 28px 0 8px;
	border-top: 2px solid #0A1628;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: left;
}
.dg-guide p { margin: 0 !important; padding: 0 !important; }
.dg-guide .dg-guide__label {
	font-size: 12px; font-weight: 600; line-height: 1.4;
	letter-spacing: .2em; text-transform: uppercase; color: #4A5568;
}
.dg-guide .dg-guide__label b { font-weight: 600; color: #1558D6; }
.dg-guide .dg-guide__lead { margin-top: 18px !important; font-size: 15px; line-height: 1.5; color: #4A5568; }
body .dg-guide a.dg-guide__pillar {
	display: inline; margin-top: 6px;
	font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
	color: #0A1628 !important;
	text-decoration: underline !important; text-decoration-thickness: 1px !important;
	text-decoration-color: #CBD5E1 !important; text-underline-offset: 6px !important;
	border: 0 !important; background: none !important;
	transition: color .15s ease, text-decoration-color .15s ease;
}
.dg-guide .dg-guide__pillar-wrap { margin-top: 6px !important; }
body .dg-guide a.dg-guide__pillar:hover { color: #1558D6 !important; text-decoration-color: #1558D6 !important; }

.dg-guide ol.dg-guide__list {
	list-style: none !important; margin: 14px 0 0 !important; padding: 0 !important;
}
.dg-guide ol.dg-guide__list li {
	list-style: none !important; margin: 0 !important; padding: 0 !important;
	border-top: 1px solid #E2E8F0;
}
.single-post .dg-guide ol.dg-guide__list li { counter-increment: none !important; padding: 0 !important; margin: 0 !important; color: inherit !important; }
.single-post .dg-guide ol.dg-guide__list li::before { content: none !important; display: none !important; }
.dg-guide ol.dg-guide__list li::marker { content: none; }
.dg-guide ol.dg-guide__list li:last-child { border-bottom: 1px solid #E2E8F0; }
body .dg-guide .dg-guide__list a {
	display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline;
	padding: 16px 0; text-decoration: none !important; color: #0A1628 !important;
	border: 0 !important; background: none !important;
}
.dg-guide .dg-guide__num {
	font-size: 13px; font-weight: 600; color: #94A3B8;
	font-variant-numeric: tabular-nums; transition: color .15s ease;
}
.dg-guide .dg-guide__t { font-size: 16px; font-weight: 500; line-height: 1.45; transition: color .15s ease; }
.dg-guide .dg-guide__list a:hover .dg-guide__t,
.dg-guide .dg-guide__list a:hover .dg-guide__num { color: #1558D6; }
.dg-guide a:focus-visible { outline: 3px solid #00C896; outline-offset: 3px; border-radius: 2px; }

/* Guia: cabeçalho por cima, lista em duas colunas. */
.dg-guide--toc { grid-template-columns: minmax(0, 1fr); gap: 0; }
.dg-guide--toc ol.dg-guide__list { columns: 2; column-gap: 40px; margin-top: 20px !important; }
.dg-guide--toc ol.dg-guide__list li { break-inside: avoid; border-bottom: 0; }
.dg-guide--toc ol.dg-guide__list li:last-child { border-bottom: 0; }

@media (max-width: 767px) {
	.dg-guide { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 48px; }
	.dg-guide a.dg-guide__pillar { font-size: 20px; }
	.dg-guide--toc ol.dg-guide__list { columns: 1; }
	.dg-guide .dg-guide__list a { grid-template-columns: 34px minmax(0, 1fr); padding: 14px 0; }
}
@media (prefers-reduced-motion: reduce) {
	.dg-guide a, .dg-guide .dg-guide__num, .dg-guide .dg-guide__t { transition: none; }
}
