/* Estudar Grátis — estilos complementares ao Tailwind */

:root {
	--eg-brand: #16a34a;
	--eg-ink: #0f172a;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Limita linhas (line-clamp) caso o Tailwind CDN não traga o utilitário */
.line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Remove a setinha padrão do <summary> no acordeão FAQ */
.eg-faq-item summary::-webkit-details-marker { display: none; }
.eg-faq-item summary { list-style: none; }

/* ============================================================
   Paginação — vale para posts (the_posts_pagination),
   comentários (the_comments_pagination) e arquivos.
   ============================================================ */
.navigation.pagination,
.navigation.comments-pagination,
.navigation.posts-pagination,
.eg-pagination {
	display: flex;
	justify-content: center;
	margin-top: 3rem;
}
.pagination .nav-links,
.comments-pagination .nav-links,
.posts-pagination .nav-links,
.eg-pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
}

/* Cada "botão" da paginação (links, página atual e reticências) */
.page-numbers {
	display: inline-flex;
	min-width: 2.6rem;
	height: 2.6rem;
	align-items: center;
	justify-content: center;
	padding: 0 .8rem;
	border-radius: .8rem;
	border: 1px solid #e8edf3;
	background: #fff;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1;
	color: #475569;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
a.page-numbers:hover {
	border-color: var(--eg-brand);
	color: var(--eg-brand);
	transform: translateY(-1px);
}
.page-numbers.current {
	background: var(--eg-brand);
	border-color: var(--eg-brand);
	color: #fff;
	box-shadow: 0 6px 16px -6px rgba(22, 163, 74, .5);
}
/* Reticências: sem caixa */
.page-numbers.dots {
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #94a3b8;
	min-width: 1.5rem;
}
/* Setas « » */
.page-numbers.prev,
.page-numbers.next {
	color: var(--eg-brand);
	font-weight: 700;
}
.page-numbers.prev:hover,
.page-numbers.next:hover {
	background: #ecfdf3;
}

.prose img { height: auto; }

/* ============================================================
   Tabelas do conteúdo — sobrescreve os estilos inline pretos
   antigos por um visual claro, on-brand e responsivo.
   ============================================================ */
.prose table {
	display: table !important;
	width: 100% !important;
	margin: 1.5rem 0 !important;
	border: 1px solid #e8edf3 !important;
	border-collapse: collapse !important;
	border-radius: .85rem;
	overflow: hidden;
	font-family: Inter, sans-serif !important;
	font-size: .95rem !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.prose table thead tr,
.prose table thead th {
	background: #ecfdf3 !important;
	color: #15803d !important;
}
.prose table thead th {
	border: 0 !important;
	border-bottom: 1px solid #d1fadf !important;
	padding: .8rem 1rem !important;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif !important;
	font-weight: 700 !important;
	text-align: left !important;
}
.prose table tbody td {
	border: 0 !important;
	border-bottom: 1px solid #eef2f7 !important;
	padding: .75rem 1rem !important;
	color: #475569 !important;
	vertical-align: top;
	text-align: left !important;
}
.prose table tbody tr:nth-child(even) { background: #f9fafb; }
.prose table tbody tr:last-child td { border-bottom: 0 !important; }
.prose table td:first-child {
	font-weight: 600 !important;
	color: #162033 !important;
}

/* Container rola no mobile se a tabela for larga */
.prose table { display: block !important; overflow-x: auto; white-space: normal; }
@media (min-width: 640px) {
	.prose table { display: table !important; }
}

/* Garante que imagens de posts antigos não estourem o container */
.prose iframe { max-width: 100%; }

/* ============================================================
   Shortcodes nativos do tema (su_button, su_list, su_box, su_note)
   ============================================================ */
.eg-su-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.eg-su-button:active { transform: translateY(0); }

.prose .eg-su-list ul {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
}
.prose .eg-su-list li {
	position: relative;
	padding-left: 1.6rem;
	margin: .35rem 0;
}
.prose .eg-su-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .5em;
	width: .7rem;
	height: .7rem;
	border-radius: 9999px;
	background: var(--eg-li, #16a34a);
}

.prose .eg-su-box {
	border: 2px solid #16a34a;
	border-radius: .9rem;
	overflow: hidden;
	margin: 1.5rem 0;
	background: #fff;
}
.prose .eg-su-box-title {
	padding: .7rem 1rem;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-weight: 700;
}
.prose .eg-su-box-body { padding: 1rem; }
.prose .eg-su-box-body > p:first-child { margin-top: 0; }
.prose .eg-su-box-body > p:last-child { margin-bottom: 0; }

.prose .eg-su-note {
	border-radius: .9rem;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
}
.prose .eg-su-note p:first-child { margin-top: 0; }
.prose .eg-su-note p:last-child { margin-bottom: 0; }
.prose .eg-su-note a { color: inherit; text-decoration: underline; }

/* ============================================================
   FAQ embutida no conteúdo (.faq-item) — vinda dos posts antigos
   Estiliza como acordeão compatível com o tema.
   ============================================================ */
.prose .faq-item,
.faq-item {
	margin: .6rem 0;
	border: 1px solid #e8edf3;
	border-radius: .9rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.faq-item:hover { border-color: #d1fadf; }

.prose .faq-question,
.faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 1rem 1.2rem;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-weight: 700;
	color: #162033;
	line-height: 1.4;
	cursor: pointer;
	user-select: none;
}
.faq-question:hover { color: #16a34a; }

/* Ícone da FAQ: esconde o caractere (▼/?) vindo do conteúdo e desenha
   um chevron limpo via CSS (mask), que gira ao abrir. */
.prose .faq-question .arrow,
.faq-question .arrow {
	flex: 0 0 auto;
	display: inline-block;
	width: 1.15rem;
	height: 1.15rem;
	font-size: 0;            /* some com o ▼/? do conteúdo */
	line-height: 0;
	color: transparent;
	background-color: #94a3b8;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat;
	transition: transform .25s ease, background-color .15s ease;
}
.faq-item:not(.eg-collapsed) .arrow { transform: rotate(180deg); background-color: #16a34a; }
.faq-question:hover .arrow { background-color: #16a34a; }

.prose .faq-answer,
.faq-answer {
	padding: 0 1.2rem 1.1rem;
	color: #475569;
	line-height: 1.7;
}
.prose .faq-answer p:first-child { margin-top: 0; }
.prose .faq-answer p:last-child { margin-bottom: 0; }

/* Recolhido (ativado por JS; sem JS fica tudo aberto = acessível/SEO) */
.faq-item.eg-collapsed .faq-answer { display: none; }

/* Título "Perguntas Frequentes" dentro do conteúdo */
.prose h2:has(+ .faq-item),
.prose h2 + .faq-item { scroll-margin-top: 5rem; }

/* ============================================================
   GRADES DA HOME/ARQUIVO (.eg-grid--*) + CARDS (.eg-card--*)
   Estrutura em CSS real (independe de recompilar o Tailwind).
   ============================================================ */

/* ---------- Card base ---------- */
.eg-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: 1rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.eg-card:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -22px rgba(15, 23, 42, .28); }
.eg-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	background: #f1f5f9;
	aspect-ratio: 16 / 10;
}
.eg-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.eg-card:hover .eg-card__img { transform: scale(1.05); }
.eg-card__cat {
	position: absolute; left: .75rem; top: .75rem;
	background: rgba(255, 255, 255, .95); color: #15803d;
	font-size: .72rem; font-weight: 600; padding: .25rem .6rem;
	border-radius: 9999px; box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
	text-decoration: none;
}
.eg-card__cat--inline { position: static; align-self: flex-start; background: #ecfdf3; }
.eg-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; gap: .5rem; }
.eg-card__title { font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: #0f172a; margin: 0; }
.eg-card__title a { color: inherit; text-decoration: none; transition: color .15s; }
.eg-card__title a:hover { color: var(--eg-brand); }
.eg-card__excerpt { font-size: .875rem; line-height: 1.6; color: #64748b; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eg-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; margin-top: .25rem; padding-top: .6rem; border-top: 1px solid #f5f8fb; font-size: .72rem; color: #94a3b8; }
.eg-card__metaitem { display: inline-flex; align-items: center; gap: .3rem; }
.eg-card__metaitem svg { width: .85rem; height: .85rem; }
.eg-card__media--ph .eg-card__ph,
.eg-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #bbf7d0; }
.eg-card__ph svg { width: 3rem; height: 3rem; }

/* ---------- Aspectos por estilo de imagem ---------- */
.eg-card--square  .eg-card__media { aspect-ratio: 1 / 1; }
.eg-card--poster  .eg-card__media { aspect-ratio: 2 / 3; }
.eg-card--story   .eg-card__media { aspect-ratio: 9 / 16; }
.eg-card--overlay .eg-card__media { aspect-ratio: 3 / 4; }

/* ---------- Círculo ---------- */
.eg-card--circle { align-items: center; text-align: center; padding-top: 1.5rem; }
.eg-card--circle .eg-card__media { width: 96px; height: 96px; aspect-ratio: 1 / 1; border-radius: 9999px; flex: 0 0 auto; }
.eg-card--circle .eg-card__body { align-items: center; }
.eg-card--circle .eg-card__meta { justify-content: center; border-top: 0; }

/* ---------- Sem imagem ---------- */
.eg-card--none .eg-card__body { padding: 1.4rem; }

/* ---------- Overlay (texto sobre a imagem) ---------- */
.eg-card--overlay { border: 0; }
.eg-card__media--overlay { position: relative; display: block; height: 100%; }
.eg-card__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 6, 23, .88) 0%, rgba(2, 6, 23, .30) 46%, transparent 72%); }
.eg-card__overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; color: #fff; }
.eg-card__overlay .eg-card__title { color: #fff; }
.eg-card__overlay .eg-card__meta { color: rgba(255, 255, 255, .82); border-top: 0; padding-top: 0; margin-top: .15rem; }
.eg-card__cat--over { position: static; align-self: flex-start; background: var(--eg-brand); color: #fff; box-shadow: none; }

/* ---------- Grade: Cards (padrão) ---------- */
.eg-grid--cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 1023px) { .eg-grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .eg-grid--cards { grid-template-columns: 1fr; } }

/* ---------- Grade: Compacto ---------- */
.eg-grid--compact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.eg-grid--compact .eg-card__body { padding: .9rem; gap: .35rem; }
.eg-grid--compact .eg-card__title { font-size: .95rem; }
.eg-grid--compact .eg-card__excerpt { -webkit-line-clamp: 2; }
@media (max-width: 1023px) { .eg-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .eg-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Grade: Revista ---------- */
.eg-grid--magazine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.eg-grid--magazine > .eg-card:first-child { grid-column: span 2; grid-row: span 2; }
.eg-grid--magazine > .eg-card:first-child .eg-card__title { font-size: 1.6rem; }
.eg-grid--magazine > .eg-card:first-child .eg-card__excerpt { -webkit-line-clamp: 4; font-size: 1rem; }
@media (max-width: 1023px) { .eg-grid--magazine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .eg-grid--magazine { grid-template-columns: 1fr; } .eg-grid--magazine > .eg-card:first-child { grid-column: auto; grid-row: auto; } }

/* ---------- Grade: Lista ---------- */
.eg-grid--list { display: flex; flex-direction: column; gap: 1rem; }
.eg-grid--list .eg-card { flex-direction: row; align-items: stretch; }
.eg-grid--list .eg-card__media { flex: 0 0 36%; width: 36%; }
.eg-grid--list .eg-card--none .eg-card__body { width: 100%; }
@media (max-width: 639px) { .eg-grid--list .eg-card { flex-direction: column; } .eg-grid--list .eg-card__media { width: 100%; flex: auto; } }

/* ---------- Grade: Story / Reels (rolagem horizontal) ---------- */
.eg-grid--story { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.eg-grid--story > .eg-card { flex: 0 0 auto; width: 215px; scroll-snap-align: start; }
.eg-grid--story .eg-card__excerpt { -webkit-line-clamp: 2; }
.eg-grid--story::-webkit-scrollbar { height: 8px; }
.eg-grid--story::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 9999px; }

/* ---------- Grade: Mosaico (masonry via colunas) ---------- */
.eg-grid--mosaic { column-count: 3; column-gap: 1.25rem; }
.eg-grid--mosaic > .eg-card { break-inside: avoid; width: 100%; margin-bottom: 1.25rem; }
@media (max-width: 1023px) { .eg-grid--mosaic { column-count: 2; } }
@media (max-width: 639px)  { .eg-grid--mosaic { column-count: 1; } }

/* ---------- Chrome de edição no Customizer (inerte no site publicado) ---------- */
[data-eg-edit].eg-inline-editing { outline: 2px dashed rgba(37, 99, 235, .7); outline-offset: 3px; border-radius: 4px; cursor: text; }

/* ============================================================
   ÍNDICE DO ARTIGO — "Neste artigo" (.eg-toc)
   ============================================================ */
.eg-toc {
	margin: 0 0 1.9rem;
	padding: 1.1rem 1.3rem;
	background: #f8fafc;
	border: 1px solid #e8edf3;
	border-radius: .9rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-toc__title {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0 0 .7rem !important;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-size: .95rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
}
.eg-toc__title::before {
	content: "";
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	background-color: var(--eg-brand);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/></svg>") center / contain no-repeat;
	        mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/></svg>") center / contain no-repeat;
}
.eg-toc__list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	counter-reset: eg-toc;
	display: grid;
	gap: .45rem;
}
.eg-toc__list li {
	counter-increment: eg-toc;
	position: relative;
	margin: 0 !important;
	padding: 0 0 0 2rem;
}
.eg-toc__list li::before {
	content: counter(eg-toc);
	position: absolute;
	left: 0;
	top: .05rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.45rem;
	height: 1.45rem;
	background: #ecfdf3;
	color: #15803d;
	border-radius: 9999px;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
}
.eg-toc__list a {
	color: #475569;
	text-decoration: none;
	font-size: .92rem;
	line-height: 1.55;
	transition: color .15s ease;
}
.eg-toc__list a:hover,
.eg-toc__list a:focus {
	color: var(--eg-brand);
	text-decoration: underline;
}

/* Rola suavemente e não deixa o H2 grudar no topo ao clicar na âncora */
.single .prose h2 { scroll-margin-top: 5rem; }

@media (max-width: 640px) {
	.eg-toc { padding: 1rem 1.05rem; }
	.eg-toc__list a { font-size: .88rem; }
	.eg-toc__list li { padding-left: 1.85rem; }
}

/* ============================================================
   POSTS RELACIONADOS — "Leia também" (.eg-related)
   ============================================================ */
.eg-related__title {
	margin: 0 0 1.1rem !important;
	font-family: 'Plus Jakarta Sans', Inter, sans-serif;
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
}
.eg-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.1rem;
}
.eg-related__item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: .9rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.eg-related__item:hover { transform: translateY(-2px); border-color: #d1fadf; box-shadow: 0 18px 36px -20px rgba(15, 23, 42, .28); }
.eg-related__thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f1f5f9; }
.eg-related__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; margin: 0 !important; border-radius: 0 !important; }
.eg-related__item:hover .eg-related__img { transform: scale(1.05); }
.eg-related__ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #bbf7d0; }
.eg-related__ph svg { width: 2.4rem; height: 2.4rem; }
.eg-related__body { display: flex; flex-direction: column; gap: .3rem; padding: .85rem .9rem 1rem; }
.eg-related__cat { align-self: flex-start; background: #ecfdf3; color: #15803d; font-size: .68rem; font-weight: 700; padding: .15rem .55rem; border-radius: 9999px; }
.eg-related__name { font-family: 'Plus Jakarta Sans', Inter, sans-serif; font-size: .92rem; font-weight: 700; line-height: 1.35; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eg-related__item:hover .eg-related__name { color: var(--eg-brand); }
.eg-related__meta { font-size: .72rem; color: #94a3b8; }

@media (max-width: 640px) {
	.eg-related__grid { grid-template-columns: 1fr; }
	.eg-related__item { flex-direction: row; }
	.eg-related__thumb { flex: 0 0 38%; width: 38%; aspect-ratio: 4 / 3; }
	.eg-related__body { flex: 1; justify-content: center; }
	.eg-related__name { -webkit-line-clamp: 2; }
}

