/* #####################################

	Theme Name: E/Contábil
	Theme URI: https://econtabilconsultoria.com.br
	Description: Tema desenvolvido de forma exclusiva para a E/Contábil Consultoria.
	Author: Gabriel Amarante
	Author URI: https://gabrielfreelancer.com.br
	Version: 1.0.0
	Requires at least: 6.0
	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: custom-theme
	Domain Path: /languages
	Tags: custom-theme

##################################### */

@charset "UTF-8";

/* ######
	Base
############ */

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-height) + 20px);
}

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

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

body {
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-primary);
	font-size: var(--size-body);
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color .25s ease, background-color .25s ease, opacity .25s ease;
}

a:hover,
a:focus-visible {
	color: var(--color-orange);
}

:focus:not(:focus-visible) { outline: none; }

:focus-visible {
	outline: 2px solid var(--color-orange);
	outline-offset: 3px;
}

.site {
	overflow-x: clip;
}

/* ######
	Cabeçalho
############ */

#header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--color-white);
	transition: transform .35s ease;
}

#header.is-hidden {
	transform: translateY(-100%);
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: clamp(14px, 1.5vw, 24px);
}

.brand img {
	width: 245px;
	max-width: 90%;
	height: auto;
}

.topbar__aside {
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.9vw, 36px);
}

.portal-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: var(--size-nav);
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--color-dark);
	white-space: nowrap;
}

.portal-link strong {
	background: var(--color-yellow);
	color: var(--color-white);
	font-weight: 700;
	padding: 6px 12px;
}

.social-list {
	text-align: center;
	display: block;
}

.social-list li {
	display: inline-block;
	margin: 0;
}

.social-list a {
	color: var(--color-yellow);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
}

.social-list svg {
	width: clamp(20px, 1.8vw, 34px);
	height: clamp(20px, 1.8vw, 34px);
}

.social-list a:hover { color: var(--color-dark); }

.topbar__divider {
	width: 1px;
	height: 40px;
	background: var(--color-line);
}

.topbar .whatsapp-link {
	color: var(--color-green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin-inline: -10px;
}

.topbar .whatsapp-link svg {
	width: clamp(24px, 1.95vw, 37px);
	height: clamp(24px, 1.95vw, 37px);
}

/* Barra de navegação */

.navbar-bar {
	background: var(--color-dark);
}

.navbar-inner {
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	gap: clamp(20px, 2.2vw, 40px);
	min-height: clamp(44px, 3vw, 54px);
}

.navbar ul {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.1vw, 40px);
	height: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
}

.navbar a {
	color: #D9D6D4;
	display: flex;
	align-items: center;
	font-size: var(--size-nav);
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
}

.navbar a:hover,
.navbar .current-menu-item > a,
.navbar .current_page_parent > a {
	color: var(--color-white);
	font-weight: 700;
}

/* Faixa amarela da busca: listra branca + amarelo sangrando até a borda. */

.navbar-search {
	position: relative;
	display: flex;
	align-items: center;
	padding-left: clamp(24px, 2.4vw, 44px);
}

.navbar-search::before,
.navbar-search::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	right: -100vw;
	clip-path: polygon(29px 0, 100% 0, 100% 100%, 0 100%);
}

.navbar-search::before {
	left: -13px;
	background: var(--color-white);
}

.navbar-search::after {
	left: 0;
	background: var(--color-yellow);
}

.navbar-search > * {
	position: relative;
	z-index: 1;
}

.search-toggle {
	color: var(--color-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 4px;
}

.search-toggle svg {
	width: clamp(20px, 1.5vw, 29px);
	height: clamp(20px, 1.5vw, 29px);
}

.search-panel {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 2;
	display: flex;
	width: min(420px, 90vw);
	background: var(--color-white);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.search-panel[hidden] { display: none; }

.search-panel input[type='search'] {
	flex: 1;
	border: 0;
	padding: 16px 20px;
	font-size: var(--size-small);
}

.search-panel button {
	background: var(--color-yellow);
	color: var(--color-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding-inline: 20px;
}

.search-panel button:hover,
.search-panel button:focus-visible {
	background: var(--color-dark);
}

.search-panel button svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	color: var(--color-white);
	padding: 8px;
}

.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1023px) {
	.navbar { display: none; }
	.menu-toggle { display: inline-flex; align-items: center; margin-right: auto; }
	.topbar__aside .portal-link span { display: none; }
}

/* No celular o topo fica só com a marca, o portal e o WhatsApp; as redes
   sociais continuam acessíveis no rodapé. */
@media (max-width: 767px) {
	.topbar { gap: 14px; }
	.topbar .social-list,
	.topbar__divider { display: none; }
	.brand img { width: min(168px, 42vw); }
}

/* ######
	Menu mobile
############ */

#mobile {
	position: fixed;
	inset: 0;
	z-index: -1;
	opacity: 0;
	background: rgba(0, 0, 0, .92);
	transition: opacity .3s ease;
}

#mobile.is-open {
	z-index: 60;
	opacity: 1;
}

#mobile .box-contain {
	position: absolute;
	top: 50%;
	left: 50%;
	width: calc(100% - 40px);
	max-width: 420px;
	padding: 24px 28px 36px;
	transform: translate(-50%, -50%);
	background: var(--color-dark);
}

#mobile .close-menu {
	color: var(--color-white);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -10px -10px 14px auto;
}

#mobile .close-menu svg { width: 20px; height: 20px; }

#mobile ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#mobile li + li { border-top: 1px solid #3A3637; }

#mobile a {
	color: #E0DEDC;
	display: block;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .1em;
	padding: 14px 0;
	text-transform: uppercase;
}

#mobile a:hover { color: var(--color-yellow); }

/* ######
	Rodapé
############ */

#footer {
	background: var(--color-dark);
	color: #B9B6B4;
	padding: 80px 0 40px;
	text-align: center;
}

#footer .brand img {
	margin-inline: auto;
	width: 360px;
	max-width: 100%;
}

.footer-social {
	margin: 34px 0 !important;
}

.footer-social svg {
	width: clamp(28px, 1.8vw, 34px);
	height: clamp(28px, 1.8vw, 34px);
}

.footer-menu ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px clamp(18px, 2vw, 36px);
	list-style: none;
	margin: 0 0 clamp(22px, 2.2vw, 40px);
	padding: 0;
}

.footer-menu a {
	color: var(--color-yellow);
	font-size: var(--size-card-label);
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.footer-menu a:hover { color: var(--color-white); }

.footer-contact {
	font-size: var(--size-button);
	letter-spacing: .08em;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-transform: uppercase;
}

.footer-contact a:hover { color: var(--color-yellow); }

.footer-legal {
	border-top: 1px solid #3A3637;
	margin-top: clamp(20px, 1.9vw, 36px);
	padding-top: clamp(16px, 1.6vw, 30px);
}

.footer-legal ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px clamp(16px, 1.8vw, 32px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-legal a,
.footer-legal span,
.footer-copyright {
	font-size: var(--size-label);
	letter-spacing: .1em;
	text-transform: uppercase;
}

.footer-legal a:hover { color: var(--color-yellow); }

.footer-copyright {
	color: #8A8785;
	margin-top: clamp(18px, 1.8vw, 34px);
}

/* ######
	Flutuantes
############ */

.whatsapp-float {
	position: fixed;
	right: 0;
	top: 50%;
	z-index: 30;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	transform: translateY(-50%);
	color: var(--color-white);
	background: var(--color-green);
}

.whatsapp-float svg { width: 32px; height: 32px; }
.whatsapp-float:hover { color: var(--color-white); background: #6DB121; }

.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 25;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	color: var(--color-white);
	background: var(--color-dark);
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.back-to-top svg { width: 20px; height: 20px; }

@media (max-width: 767px) {
	.whatsapp-float { width: 54px; height: 54px; }
}

/* O botão lateral só cabe fora do conteúdo quando sobra meia largura dele de
   cada lado do container (1180px + 2x62px); abaixo disso vai para o rodapé. */
@media (max-width: 1303px) {
	.whatsapp-float { top: auto; bottom: 24px; transform: none; }
	.back-to-top { right: 24px; bottom: 94px; }
}

/* ######
	Páginas internas
############ */

.page-hero {
	background: var(--color-dark);
	color: var(--color-white);
	padding-block: clamp(32px, 3.2vw, 52px);
}

.page-hero h1 {
	font-size: var(--size-display);
	font-weight: 300;
	letter-spacing: .05em;
	line-height: 1.2;
	text-transform: uppercase;
}

.page-hero h1 strong { font-weight: 700; }

.page-hero .lead { margin-top: 14px; max-width: 62ch; }

.breadcrumbs {
	color: #9E9B99;
	font-size: var(--size-label);
	letter-spacing: .1em;
	margin-bottom: 16px;
	text-transform: uppercase;
}

.breadcrumbs a:hover { color: var(--color-yellow); }

.entry-content {
	max-width: 78ch;
	margin: 0 auto;
	overflow-wrap: break-word;
}

.entry-content > * + * { margin-top: 1.15em; }

.entry-content h2 {
	color: var(--color-dark);
	font-size: var(--size-title);
	font-weight: 700;
	letter-spacing: var(--tracking-title);
	margin-top: 1.8em;
	text-transform: uppercase;
}

.entry-content h3 {
	color: var(--color-orange);
	font-size: var(--size-subtitle);
	font-weight: 700;
	margin-top: 1.6em;
}

.entry-content a {
	color: var(--color-orange);
	text-decoration: underline;
}

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

.entry-content li + li { margin-top: .5em; }

.entry-content blockquote {
	border-left: 4px solid var(--color-yellow);
	font-size: var(--size-body);
	font-style: italic;
	padding-left: 24px;
}

.entry-content img { margin-inline: auto; }

/* alinhamentos do editor */

.alignwide { width: min(100%, 1180px); margin-inline: auto; }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.aligncenter { margin-inline: auto; }

/* ######
	Blog
############ */

.post-grid {
	display: grid;
	gap: 40px 32px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
}

.post-card figure { overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.post-card:hover img { transform: scale(1.04); }

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px 26px;
}

.post-card__category {
	color: var(--color-orange);
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
}

.post-card__title {
	color: var(--color-dark);
	font-size: var(--size-subtitle);
	font-weight: 600;
	line-height: 1.4;
}

.post-card__excerpt {
	color: var(--color-muted);
	font-size: var(--size-small);
	margin-bottom: auto;
}

.post-card__link {
	display: inline-flex;
	align-items: center;
	color: var(--color-dark);
	font-size: var(--size-label);
	font-weight: 600;
	letter-spacing: var(--tracking-label);
	margin-top: 14px;
	text-transform: uppercase;
}

.single-post-header img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.post-meta {
	color: var(--color-muted);
	font-size: var(--size-label);
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 56px;
}

.pagination .page-numbers {
	background: var(--color-white);
	color: var(--color-dark);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	font-size: var(--size-small);
	font-weight: 600;
	padding-inline: 12px;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	background: var(--color-yellow);
	color: var(--color-white);
}

/* ######
	404 e busca
############ */

.state-message {
	padding-block: clamp(48px, 5vw, 80px);
	text-align: center;
}

.state-message__code {
	color: var(--color-yellow);
	font-size: clamp(56px, 7vw, 104px);
	font-weight: 800;
	line-height: 1;
}
