/* ==========================================================================
   Infoprodutos Etudo — componentes WordPress
   Depende de base.css (identidade herdada do layout aprovado).
   ========================================================================== */

/* --- Acessibilidade ------------------------------------------------------ */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: #f4b643;
	color: #081321;
	padding: 12px 18px;
	font-size: 12px;
	font-weight: 900;
	border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fbfaf6;
	clip-path: none;
	color: #081321;
	display: block;
	font-size: 14px;
	font-weight: 700;
	height: auto;
	left: 8px;
	line-height: 1.4;
	padding: 14px 20px;
	text-decoration: none;
	top: 8px;
	width: auto;
	z-index: 100000;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid #75b5ff;
	outline-offset: 3px;
	border-radius: 2px;
}
.site-header :where(a, button):focus-visible,
.newsletter :where(a, button, input):focus-visible { outline-color: #f4b643; }

/* A barra de administração não deve cobrir o header sticky. */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* --- Header / menu ------------------------------------------------------- */
/* O logo é sempre 40x40 (classe .brand-symbol do base.css); a regra abaixo
   garante o mesmo tamanho quando o logo vem da Biblioteca de Mídia. */
.site-header .brand .brand-symbol,
.site-header .brand .brand-logo { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }

.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { color: #f4b643; }
.nav-links ul { list-style: none; margin: 0; padding: 0; }
/* o <a> precisa ser item de flex (como na referência) para a caixa ter a
   mesma altura de linha; dentro de um <li> inline ele mede 15px em vez de 18px. */
.nav-links > li { display: flex; align-items: center; }

.menu-toggle .menu-toggle-icon { display: block; line-height: 1; }
.nav-links.open { display: flex; }

/* O CTA é o último item do menu; +4px de margem reproduz o gap de 32px do
   .nav da referência entre "Linha própria" e "Receber novidades". */
.nav-links .nav-cta-item { margin-left: 4px; }

/* --- Botões de ícone (busca) -------------------------------------------- */
.icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #fff;
	background: transparent;
	cursor: pointer;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.12); }
.icon-button svg { width: 16px; height: 16px; }

/* Item de menu em formato de CTA (Receber novidades) */
.nav-links .nav-cta-item > a {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, 0.34);
	border-radius: 999px;
	padding: 11px 17px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	white-space: nowrap;
}
.nav-links .nav-cta-item > a:hover,
.nav-links .nav-cta-item > a:focus-visible {
	background: #f4b643;
	border-color: #f4b643;
	color: #081321;
}

/* Busca no cabeçalho: removida para manter o header idêntico à referência aprovada.
   O formulário de busca segue no rodapé, na página 404 e no template de resultados. */


/* Busca no rodapé: ícone discreto na barra inferior, painel absoluto (não altera
   a altura do rodapé). Antes o formulário ficava no bloco "Sobre" e empurrava o
   rodapé 37px além da referência aprovada. */
.site-footer .footer-bottom { position: relative; align-items: center; }
.footer-search-toggle {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-left: 8px;
	padding: 0;
	background: none;
	border: 0;
	color: #708091;
	cursor: pointer;
}
.footer-search-toggle svg { width: 12px; height: 12px; }
.footer-search-toggle:hover { color: #f4b643; }
.footer-search-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	z-index: 25;
	width: min(340px, 92vw);
	padding: 12px;
	background: #0d1d31;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 18px 40px rgba(4, 13, 25, 0.35);
}
.footer-search-panel .search-form { max-width: none; }
.footer-search-panel .search-field { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.footer-search-panel .search-submit { background: #f4b643; color: #081321; }
.footer-search-panel [hidden] { display: none; }

/* Cards compactos: 271px é a altura que o layout aprovado entrega no desktop; o
   min-height mantém a coluna lateral com a mesma altura da referência (o card de
   destaque herda a altura da coluna). No mobile a referência usa 175px. */
@media (min-width: 861px) {
	.mini-card { min-height: 271px; }
}

/* --- Barra de revisão (rascunhos visíveis para editores) ---------------- */
.review-bar {
	background: #ffe2a4;
	color: #081321;
	font: 700 11px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	text-align: center;
}
.review-bar a { color: #081321; text-decoration: underline; }

/* --- Artigo / página ---------------------------------------------------- */
.article-hero { background: #081321; color: #fff; padding: 78px 0 0; }
.article-head { width: min(100% - 48px, 820px); margin: auto; text-align: center; }
.article-head h1 {
	max-width: 840px;
	margin: 22px auto 18px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(44px, 7vw, 82px);
	font-weight: 500;
	line-height: 0.96;
	letter-spacing: -0.055em;
}
.article-head .dek {
	max-width: 650px;
	margin: 0 auto;
	color: #b9c6d2;
	font-size: 16px;
	line-height: 1.7;
}
.article-head .byline { margin: 24px 0 52px; color: #8fa1b2; font-size: 11px; }
.article-head .byline strong { color: #fff; }
.article-head .byline a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); }
.article-head .byline a:hover { color: #f4b643; }
.article-cats { margin-top: 18px; }
.article-cats a {
	display: inline-block;
	margin: 0 4px;
	padding: 5px 11px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	color: #d8e0e8;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.article-cats a:hover { background: #f4b643; border-color: #f4b643; color: #081321; }

.cover {
	width: min(100% - 48px, 1180px);
	height: clamp(240px, 42vw, 500px);
	margin: auto;
	position: relative;
	overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(0.82) contrast(1.05); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 19, 33, 0.52), transparent 60%); }
.cover figcaption {
	position: absolute;
	z-index: 1;
	left: 22px;
	bottom: 16px;
	right: 22px;
	color: #e6c87d;
	font-size: 10px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.article-shell {
	width: min(100% - 48px, 920px);
	margin: 64px auto 96px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 220px;
	gap: 70px;
	align-items: start;
}
.article-body {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	line-height: 1.82;
	color: #16232f;
	overflow-wrap: break-word;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 20px; }
.article-body .lead { margin-top: 0; color: #26384a; font-size: 23px; line-height: 1.55; }
.article-body h2 { margin: 46px 0 14px; font-size: 34px; line-height: 1.05; letter-spacing: -0.045em; }
.article-body h3 { margin: 34px 0 12px; font-size: 25px; line-height: 1.15; letter-spacing: -0.035em; }
.article-body h4 { margin: 28px 0 10px; font-size: 20px; }
.article-body blockquote {
	margin: 40px 0;
	padding: 22px 24px;
	border-left: 3px solid #f4b643;
	background: #f1eadb;
	color: #26384a;
	font: italic 24px/1.45 Georgia, serif;
}
.article-body blockquote p { margin: 0 0 10px; }
.article-body blockquote cite { display: block; font: 700 11px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: #667789; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body a { color: #0b5aa3; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover { color: #081321; }
.article-body strong { font-weight: 700; }
.article-body hr { border: 0; border-top: 1px solid rgba(8, 19, 33, 0.14); margin: 40px 0; }
.article-body img, .article-body figure img { width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.article-body figure { margin: 32px 0; }
.article-body figcaption { margin-top: 10px; font: 400 12px/1.6 Inter, ui-sans-serif, system-ui, sans-serif; color: #667789; text-align: center; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 26px; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid rgba(8, 19, 33, 0.14); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: #f5f1e8; font-weight: 700; }
.article-body code { font: 400 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1eadb; padding: 2px 5px; border-radius: 3px; }
.article-body pre { background: #081321; color: #e8eef4; padding: 18px; overflow-x: auto; border-radius: 3px; }
.article-body pre code { background: transparent; color: inherit; padding: 0; }

.article-side {
	position: sticky;
	top: 28px;
	background: #081321;
	color: #fff;
	padding: 18px 18px 0;
	overflow: hidden;
}
.article-side .side-label { color: #f4b643; font-size: 10px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.article-side h3 { margin: 10px 0 0; font-family: Georgia, serif; font-weight: 500; font-size: 24px; line-height: 1.05; letter-spacing: -0.04em; }
.article-side p { color: #aebdca; margin: 7px 0 18px; font-size: 11px; line-height: 1.5; }
.article-side img { width: calc(100% + 36px); height: 250px; object-fit: contain; object-position: center bottom; margin: 0 -18px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35)); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 42px 0 0; padding: 0; list-style: none; }
.article-tags a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid rgba(8, 19, 33, 0.16);
	border-radius: 999px;
	color: #26384a;
	font: 700 10px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}
.article-tags a:hover { background: #081321; border-color: #081321; color: #fff; }

.article-cta { margin-top: 46px; padding: 28px; background: #081321; color: #fff; }
.article-cta strong { display: block; font: 500 28px/1.1 Georgia, serif; letter-spacing: -0.04em; }
.article-cta p { margin: 10px 0 18px; color: #aebdca; font: 14px/1.6 Inter, ui-sans-serif, system-ui, sans-serif; }
.cta-link {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	padding: 0 17px;
	background: #f4b643;
	color: #081321;
	font: 900 11px/1 Inter, ui-sans-serif, system-ui, sans-serif;
	border-radius: 999px;
	text-decoration: none;
}
.cta-link:hover { background: #ffe2a4; color: #081321; }

/* Navegação entre posts */
.post-navigation { margin: 56px 0 0; display: grid; gap: 14px; }
.post-navigation .nav-links-post { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a {
	display: block;
	padding: 18px;
	border: 1px solid rgba(8, 19, 33, 0.14);
	background: #fff;
	text-decoration: none;
	color: #081321;
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-navigation a:hover { border-color: #f4b643; transform: translateY(-2px); }
.post-navigation .nav-label { display: block; font: 900 10px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #a17628; margin-bottom: 6px; }
.post-navigation .nav-title { font: 500 18px/1.25 Georgia, serif; letter-spacing: -0.03em; }
.post-navigation .nav-next { text-align: right; }

/* --- Arquivos, categorias, autor, busca -------------------------------- */
.archive-title { text-align: left; }
.archive-hero { background: #081321; color: #fff; padding: 64px 0 58px; }
.archive-hero .inner { width: min(100% - 48px, 1180px); margin: auto; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.archive-hero h1 {
	margin: 14px 0 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(34px, 5.4vw, 62px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.055em;
	max-width: 760px;
}
.archive-hero .dek { color: #b9c6d2; font-size: 15px; line-height: 1.7; max-width: 560px; margin: 14px 0 0; }
.archive-hero .archive-count { color: #8fa1b2; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.archive-author { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: #b9c6d2; font-size: 12px; }
.archive-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid rgba(244, 182, 67, 0.7); }

.breadcrumbs { font: 700 11px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.06em; color: #8fa1b2; }
.breadcrumbs a { color: #cfdae4; text-decoration: none; }
.breadcrumbs a:hover { color: #f4b643; }
.breadcrumbs .sep { margin: 0 7px; opacity: 0.6; }

.archive-grid { width: min(100% - 48px, 1180px); margin: 56px auto 90px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.archive-grid .post-card { background: #fff; border: 1px solid rgba(8, 19, 33, 0.09); }

.pagination { width: min(100% - 48px, 1180px); margin: 0 auto 90px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(8, 19, 33, 0.16);
	color: #081321;
	font: 800 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
	text-decoration: none;
	border-radius: 999px;
}
.pagination .page-numbers.current { background: #081321; border-color: #081321; color: #fff; }
.pagination .page-numbers:hover { border-color: #f4b643; }

/* Busca */
.search-form { display: flex; gap: 8px; max-width: 460px; }
.search-form label { flex: 1; }
.search-form .search-field {
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(8, 19, 33, 0.2);
	border-radius: 3px;
	background: #fff;
	font: 400 14px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
	color: #081321;
}
.search-form .search-submit {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 3px;
	background: #081321;
	color: #fff;
	font: 900 11px/1 Inter, ui-sans-serif, system-ui, sans-serif;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}
.search-form .search-submit:hover { background: #0d1d31; }
.archive-hero .search-form { margin-top: 22px; }
.archive-hero .search-form .search-field { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06); color: #fff; }
.archive-hero .search-form .search-field::placeholder { color: #8fa1b2; }
.archive-hero .search-form .search-submit { background: #f4b643; color: #081321; }

/* 404 */
.error-page { width: min(100% - 48px, 760px); margin: 96px auto 110px; text-align: center; }
.error-page .error-code { font: 500 96px/1 Georgia, serif; color: #f4b643; letter-spacing: -0.06em; }
.error-page h1 { margin: 12px 0 14px; font-family: Georgia, serif; font-weight: 500; font-size: clamp(30px, 4.6vw, 44px); letter-spacing: -0.045em; line-height: 1.05; }
.error-page p { color: #4a5b6b; font-size: 15px; line-height: 1.7; }
.error-page .search-form { margin: 26px auto 0; }
.error-page .error-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.error-page .error-links a { font: 800 12px/1 Inter, ui-sans-serif, system-ui, sans-serif; padding: 12px 18px; border: 1px solid rgba(8, 19, 33, 0.16); border-radius: 999px; color: #081321; text-decoration: none; }
.error-page .error-links a:hover { background: #081321; color: #fff; border-color: #081321; }

/* --- Newsletter --------------------------------------------------------- */
.newsletter-feedback {
	margin: 10px 0 0;
	max-width: 450px;
	font: 700 11px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
	color: #f4b643;
}
.newsletter-feedback[hidden] { display: none; }

/* --- Rodapé ------------------------------------------------------------- */
.footer-links .footer-widget { margin-bottom: 18px; }
.footer-links .footer-widget a { display: inline-block; }
.footer-links .footer-widget h4 { margin-bottom: 6px; }
.site-footer .footer-links a { display: block; margin-bottom: 6px; }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: #f4b643; }

/* --- Blocos do editor --------------------------------------------------- */
.entry-content > .alignwide { width: min(100% + 120px, 1140px); max-width: none; margin-left: -60px; }
.entry-content > .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.wp-block-image figcaption { text-align: center; }
.wp-block-quote { margin: 40px 0; padding: 22px 24px; border-left: 3px solid #f4b643; background: #f1eadb; }
.wp-block-quote p { margin: 0; }
.wp-block-separator { border: 0; border-top: 1px solid rgba(8, 19, 33, 0.14); margin: 40px auto; max-width: 200px; }
.wp-block-button__link { border-radius: 999px; background: #f4b643; color: #081321; font-weight: 900; }

/* --- Comentários (fechados por padrão) --------------------------------- */
.comments-area { margin-top: 56px; border-top: 1px solid rgba(8, 19, 33, 0.12); padding-top: 28px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.comments-title, .comment-reply-title { font: 500 22px/1.2 Georgia, serif; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid rgba(8, 19, 33, 0.08); }
.comment-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px; border: 1px solid rgba(8, 19, 33, 0.2); border-radius: 3px; font: 400 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
.comment-form .submit { width: auto; padding: 12px 20px; background: #081321; color: #fff; border: 0; border-radius: 999px; font-weight: 900; cursor: pointer; }

/* --- Responsivo --------------------------------------------------------- */
@media (max-width: 1024px) {
	.archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article-shell { grid-template-columns: 1fr; gap: 40px; }
	.article-side { position: relative; top: auto; display: grid; grid-template-columns: 1fr 150px; align-items: end; padding-bottom: 0; }
	.article-side img { width: 165px; height: 190px; grid-column: 2; grid-row: 1 / span 3; margin: 0 -18px 0 0; justify-self: end; }
}

@media (max-width: 860px) {
	.article-hero { padding-top: 54px; }
	.article-head, .cover, .article-shell { width: min(100% - 32px, 920px); }
	.article-shell { margin-top: 44px; margin-bottom: 70px; }
	.article-body { font-size: 17px; }
	.article-body .lead { font-size: 21px; }
	.article-body h2 { font-size: 29px; }
	.article-body blockquote { font-size: 21px; }
	.article-side { grid-template-columns: 1fr 130px; }
	.article-side img { width: 140px; height: 165px; }
	.archive-hero .inner { grid-template-columns: 1fr; align-items: start; gap: 14px; }
	.post-navigation .nav-links-post { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
	.entry-content > .alignwide { width: 100%; margin-left: 0; }
}

@media (max-width: 620px) {
	.archive-grid { grid-template-columns: 1fr; margin-top: 40px; }
	.error-page { margin: 64px auto 80px; }
	.error-page .error-code { font-size: 68px; }
	.article-head .byline { margin-bottom: 34px; }
	.article-side { grid-template-columns: 1fr; }
	.article-side img { grid-column: 1; width: 150px; height: 180px; margin: 0 0 0 -18px; justify-self: start; }
	.search-form { flex-wrap: wrap; }
	.search-form .search-submit { width: 100%; }
}

/* --- Movimento reduzido ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.button:hover, .brand:hover .brand-symbol, .topic:hover, .post-navigation a:hover { transform: none; }
}

/* --- Impressão ---------------------------------------------------------- */
@media print {
	.topline, .site-header, .newsletter, .site-footer, .article-side, .post-navigation { display: none !important; }
	body { background: #fff; color: #000; }
	.article-hero { background: #fff; color: #000; padding: 0; }
	.article-body { font-size: 12pt; }
}
