/*
Theme Name: Concursos Hub
Theme URI: https://example.com/
Author: Concursos Hub
Description: Tema leve e independente, feito para a plataforma Concursos Hub. Sem tema-pai e sem construtor visual: cabeçalho, rodapé e páginas usam os textos, o logotipo e as cores definidos no painel. Todo o conteúdo do catálogo vem do plugin Concursos Hub.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: concursos-hub-theme
Tags: education, custom-menu, custom-logo, translation-ready, block-styles, wide-blocks
*/

/* ------------------------------------------------------------- Tokens -- */

:root {
	--cht-primary: #1e4fd8;
	--cht-dark: #12246b;
	--cht-accent: #0f9d58;
	--cht-bg: #f5f7fc;
	--cht-radius: 16px;

	--cht-ink: #0c1424;
	--cht-muted: #5a6780;
	--cht-border: #e3e8f2;
	--cht-surface: #fff;

	--cht-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--cht-pad: 20px;
	--cht-header-h: 62px;
}

/* --------------------------------------------------------------- Base -- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--cht-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--cht-ink);
	background: var(--cht-surface);
	-webkit-font-smoothing: antialiased;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--cht-primary);
}

h1, h2, h3, h4 {
	line-height: 1.25;
	letter-spacing: -.015em;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cht-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #fff;
	padding: 12px 18px;
	z-index: 999;
	border-radius: 0 0 10px 0;
}

.cht-skip:focus {
	left: 0;
}

.cht-wrap {
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: var(--cht-pad);
}

/* ----------------------------------------------------------- Cabeçalho - */

.cht-header {
	position: sticky;
	top: 0;
	z-index: 80;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--cht-border);
}

.cht-header__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--cht-header-h);
}

.cht-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--cht-ink);
	font-weight: 800;
	font-size: 17px;
	letter-spacing: -.02em;
	margin-right: auto;
	min-width: 0;
}

.cht-brand img {
	max-height: 36px;
	width: auto;
}

.cht-brand span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cht-nav {
	display: none;
}

.cht-nav ul {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cht-nav a {
	display: block;
	padding: 8px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--cht-ink);
	font-size: 15px;
	font-weight: 550;
	transition: background .16s ease, color .16s ease;
}

.cht-nav a:hover,
.cht-nav .current-menu-item > a {
	background: var(--cht-bg);
	color: var(--cht-primary);
}

.cht-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cht-iconbtn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid var(--cht-border);
	background: #fff;
	color: var(--cht-ink);
	cursor: pointer;
	padding: 0;
}

.cht-iconbtn:hover {
	border-color: var(--cht-primary);
	color: var(--cht-primary);
}

.cht-iconbtn svg {
	width: 20px;
	height: 20px;
}

.cht-login {
	display: none;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 12px;
	background: var(--cht-primary);
	color: #fff;
	text-decoration: none;
	font-weight: 650;
	font-size: 14px;
	white-space: nowrap;
}

.cht-login:hover {
	background: var(--cht-dark);
	color: #fff;
}

/* Busca do cabeçalho */

.cht-headsearch {
	display: none;
	border-top: 1px solid var(--cht-border);
	background: #fff;
	padding: 12px 0;
}

.cht-headsearch.is-open {
	display: block;
}

.cht-headsearch form {
	display: flex;
	gap: 8px;
}

.cht-headsearch input[type="search"] {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid var(--cht-border);
	border-radius: 12px;
	font-size: 16px;
}

.cht-headsearch button {
	padding: 12px 18px;
	border: 0;
	border-radius: 12px;
	background: var(--cht-primary);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

/* Menu do celular */

.cht-drawer {
	position: fixed;
	inset: 0;
	z-index: 95;
	visibility: hidden;
}

.cht-drawer.is-open {
	visibility: visible;
}

.cht-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(12, 20, 36, .5);
	opacity: 0;
	transition: opacity .2s ease;
}

.cht-drawer.is-open .cht-drawer__overlay {
	opacity: 1;
}

.cht-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(84vw, 340px);
	background: #fff;
	padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
	transform: translateX(100%);
	transition: transform .24s ease;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cht-drawer.is-open .cht-drawer__panel {
	transform: translateX(0);
}

.cht-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cht-drawer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2px;
}

.cht-drawer a {
	display: block;
	padding: 14px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--cht-ink);
	font-weight: 600;
	font-size: 16px;
}

.cht-drawer a:hover,
.cht-drawer .current-menu-item > a {
	background: var(--cht-bg);
	color: var(--cht-primary);
}

.cht-drawer__cta {
	margin-top: auto;
	display: block;
	text-align: center;
	padding: 14px;
	border-radius: 12px;
	background: var(--cht-primary);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
}

/* --------------------------------------------------------- Conteúdo ---- */

.cht-main {
	min-height: 50vh;
}

.cht-page {
	padding: 32px 0 48px;
}

.cht-page__title {
	font-size: clamp(26px, 5vw, 40px);
	margin: 0 0 16px;
	font-weight: 800;
}

.cht-entry {
	font-size: 17px;
	line-height: 1.75;
	color: #2b3549;
}

.cht-entry h2 {
	margin-top: 1.8em;
	font-size: 24px;
}

.cht-entry h3 {
	margin-top: 1.5em;
	font-size: 20px;
}

.cht-entry img {
	border-radius: var(--cht-radius);
}

.cht-entry ul,
.cht-entry ol {
	padding-left: 1.3em;
}

.cht-entry blockquote {
	margin: 1.5em 0;
	padding: 12px 18px;
	border-left: 4px solid var(--cht-primary);
	background: var(--cht-bg);
	border-radius: 0 12px 12px 0;
}

.cht-list {
	display: grid;
	gap: 16px;
	padding: 28px 0 40px;
}

.cht-item {
	border: 1px solid var(--cht-border);
	border-radius: var(--cht-radius);
	padding: 18px;
}

.cht-item h2 {
	margin: 0 0 6px;
	font-size: 20px;
}

.cht-item h2 a {
	color: var(--cht-ink);
	text-decoration: none;
}

.cht-item h2 a:hover {
	color: var(--cht-primary);
}

.cht-item p {
	margin: 0;
	color: var(--cht-muted);
}

.cht-404 {
	text-align: center;
	padding: 60px 0 80px;
}

/* ----------------------------------------------------------- Rodapé ---- */

.cht-footer {
	background: var(--cht-dark);
	color: rgba(255, 255, 255, .8);
	padding: 44px 0 24px;
	margin-top: 40px;
}

.cht-footer a {
	color: rgba(255, 255, 255, .82);
	text-decoration: none;
}

.cht-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.cht-footer__cols {
	display: grid;
	gap: 28px;
}

.cht-footer__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 18px;
	color: #fff;
	text-decoration: none;
	margin-bottom: 10px;
}

.cht-footer__brand img {
	max-height: 34px;
	width: auto;
}

.cht-footer h2 {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #fff;
	margin: 0 0 12px;
}

.cht-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: 15px;
}

.cht-social {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.cht-social a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.cht-social a:hover {
	background: rgba(255, 255, 255, .12);
	text-decoration: none;
}

.cht-footer__bottom {
	margin-top: 30px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .16);
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 13px;
	color: rgba(255, 255, 255, .62);
}

.cht-footer__legal {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

/* ------------------------------------------------------ Breakpoints ---- */

@media (min-width: 900px) {
	:root {
		--cht-pad: 28px;
		--cht-header-h: 72px;
	}

	.cht-nav {
		display: block;
	}

	.cht-login {
		display: inline-flex;
	}

	.cht-menu-toggle {
		display: none;
	}

	.cht-footer__cols {
		grid-template-columns: 1.6fr 1fr 1fr 1fr;
		gap: 32px;
	}

	.cht-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.cht-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition-duration: .001ms !important;
	}
}

/* ------------------------------------------------ Modernização 2026 --- */

:root {
	--cht-ink: #111827;
	--cht-muted: #64748b;
	--cht-border: #e2e8f0;
	--cht-bg: #f7f9fc;
	--cht-surface: #ffffff;
	--cht-radius: 20px;
	--cht-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

body {
	background: linear-gradient(180deg, #fff 0, #fbfcff 58%, #f7f9fc 100%);
}

.cht-header {
	background: rgba(255, 255, 255, .82);
	border-bottom-color: rgba(226, 232, 240, .78);
	box-shadow: 0 8px 30px rgba(15, 23, 42, .035);
}

.cht-brand { font-size: 18px; }
.cht-brand::before {
	content: "";
	width: 9px;
	height: 32px;
	border-radius: 99px;
	background: linear-gradient(180deg, var(--cht-primary), var(--cht-accent));
	box-shadow: 0 6px 18px color-mix(in srgb, var(--cht-primary) 30%, transparent);
}
.cht-brand:has(img)::before { display: none; }

.cht-nav ul { gap: 8px; }
.cht-nav a { padding: 10px 14px; border-radius: 999px; }
.cht-nav a:hover,
.cht-nav .current-menu-item > a {
	background: color-mix(in srgb, var(--cht-primary) 9%, white);
}

.cht-iconbtn {
	border-color: transparent;
	background: var(--cht-bg);
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.cht-iconbtn:hover { transform: translateY(-2px); background: #fff; }
.cht-login {
	border-radius: 999px;
	padding: 11px 18px;
	box-shadow: 0 10px 24px color-mix(in srgb, var(--cht-primary) 24%, transparent);
	transition: transform .2s ease, box-shadow .2s ease;
}
.cht-login:hover { transform: translateY(-2px); box-shadow: 0 14px 32px color-mix(in srgb, var(--cht-primary) 30%, transparent); }

.cht-headsearch { background: rgba(255,255,255,.96); }
.cht-headsearch form {
	max-width: 820px;
	margin: 0 auto;
	padding: 7px;
	border: 1px solid var(--cht-border);
	border-radius: 18px;
	box-shadow: var(--cht-shadow);
}
.cht-headsearch input[type="search"] { border: 0; background: var(--cht-bg); }
.cht-headsearch button { border-radius: 13px; padding-inline: 24px; }

.cht-page { padding: 54px 0 76px; }
.cht-page__title { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.035em; }
.cht-entry { max-width: 780px; }
.cht-entry a { text-underline-offset: 3px; }
.cht-entry img { box-shadow: var(--cht-shadow); }
.cht-item {
	background: rgba(255,255,255,.92);
	padding: 24px;
	box-shadow: 0 10px 34px rgba(15,23,42,.05);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cht-item:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--cht-primary) 30%, var(--cht-border)); box-shadow: var(--cht-shadow); }

.cht-footer {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #0b1638, var(--cht-dark));
	padding-top: 64px;
}
.cht-footer::before {
	content: "";
	position: absolute;
	width: 420px;
	height: 420px;
	right: -180px;
	top: -250px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--cht-primary) 55%, transparent), transparent 68%);
	pointer-events: none;
}
.cht-footer__cols { position: relative; }
.cht-footer__brand { font-size: 22px; }
.cht-footer h2 { letter-spacing: .12em; color: rgba(255,255,255,.72); }
.cht-footer li a { display: inline-block; padding-block: 3px; }
.cht-social a { padding: 9px 15px; background: rgba(255,255,255,.06); }

@media (max-width: 899px) {
	.cht-drawer__panel { border-radius: 28px 0 0 28px; box-shadow: -20px 0 60px rgba(15,23,42,.16); }
	.cht-brand::before { height: 28px; }
}

