/**
 * CTL NET Cabeçalho — estilos públicos.
 * As variáveis (--ctlh-*) e a media query do ponto de quebra mobile são
 * geradas dinamicamente em PHP (CTLH_Render::inline_style_tag), a partir das
 * configurações salvas no admin — aqui só a aparência de cada estado.
 */

.ctlh-header {
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: var(--ctlh-bg);
	font-family: var(--ctlh-font);
	z-index: var(--ctlh-zindex);
	box-sizing: border-box;
	transition: box-shadow 0.25s ease;
}
.ctlh-header[data-position="fixed"] {
	position: fixed;
}
.ctlh-header[data-position="static"] {
	position: static;
}
/* A barra de admin do WordPress (visível para quem está logado, ao navegar
 * pelo site) também é fixa no topo — sem isso, ela fica por cima da metade
 * de cima do nosso cabeçalho. 782px é o próprio breakpoint que o WordPress
 * usa para encolher a barra de admin (32px para 46px), não um valor nosso. */
body.admin-bar .ctlh-header[data-position="fixed"] {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .ctlh-header[data-position="fixed"] {
		top: 46px;
	}
}
.ctlh-header.is-scrolled {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.ctlh-header * {
	box-sizing: border-box;
}

.ctlh-container {
	max-width: var(--ctlh-max-width);
	margin: 0 auto;
	height: var(--ctlh-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 0 24px;
}

.ctlh-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}
.ctlh-logo img {
	display: block;
}
.ctlh-logo-text {
	font-size: 28px;
	font-weight: 800;
	color: var(--ctlh-text);
	letter-spacing: 0.5px;
}

.ctlh-nav {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	justify-content: center;
}
.ctlh-menu {
	display: flex;
	align-items: center;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ctlh-menu a {
	display: inline-block;
	color: var(--ctlh-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	padding: 6px 2px;
	position: relative;
	transition: color 0.2s ease;
}
.ctlh-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 2px;
	background: var(--ctlh-hover);
	transition: right 0.2s ease;
}
.ctlh-menu a:hover,
.ctlh-menu a:focus-visible {
	color: var(--ctlh-hover);
}
.ctlh-menu a:hover::after,
.ctlh-menu a:focus-visible::after {
	right: 0;
}

.ctlh-buttons {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}
.ctlh-btn {
	display: inline-block;
	background: var(--ctlh-btn-bg, var(--ctlh-hover));
	color: var(--ctlh-btn-text, #fff);
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	padding: 10px 20px;
	border-radius: var(--ctlh-radius);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.ctlh-btn:hover,
.ctlh-btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
	filter: brightness(1.06);
}

.ctlh-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.ctlh-hamburger span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--ctlh-hamburger);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}
.ctlh-hamburger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.ctlh-hamburger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.ctlh-hamburger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.ctlh-mobile-panel {
	display: none;
	flex-direction: column;
	gap: 20px;
	background: var(--ctlh-mobile-bg);
	padding: 20px 24px 28px;
	max-height: calc(100vh - var(--ctlh-height));
	overflow-y: auto;
}
.ctlh-mobile-panel.is-open {
	display: flex;
}
.ctlh-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ctlh-mobile-menu a {
	display: block;
	color: var(--ctlh-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
	padding: 12px 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ctlh-mobile-menu a:hover,
.ctlh-mobile-menu a:focus-visible {
	color: var(--ctlh-hover);
}
.ctlh-mobile-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ctlh-mobile-buttons .ctlh-btn {
	text-align: center;
}

.ctlh-bottom-line {
	height: 3px;
	width: 100%;
	background: linear-gradient(90deg, var(--ctlh-line-start), var(--ctlh-line-end));
}
