/**
 * Header Blocksy — overlay sobre a 1.ª secção + padding alinhado ao site (todas as páginas).
 */

body {
	--has-transparent-header: 1;
}

#main-container {
	position: relative;
}

.ct-header-spacer {
	display: none !important;
}

[data-header*="type-1"] #header.ct-header,
#header.ct-header {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	max-width: none !important;
	z-index: 300;
	margin: 0 !important;
	background: transparent !important;
	pointer-events: none;
}

body.admin-bar #header.ct-header {
	top: 0 !important;
}

[data-header*="type-1"] #header.ct-header .ct-container,
#header.ct-header .ct-container {
	max-width: none !important;
	width: 100% !important;
	margin-inline: 0 !important;
	padding-inline: var(--ligarena-site-pad-x) !important;
	box-sizing: border-box;
}

[data-header*="type-1"] #header.ct-header [data-row*='boxed'] > div,
#header.ct-header [data-row*='boxed'] > div {
	max-width: none !important;
	width: 100% !important;
	margin-inline: 0 !important;
	padding-inline: var(--ligarena-site-pad-x) !important;
	border-radius: 0;
	box-shadow: none !important;
	box-sizing: border-box;
}

[data-header*="type-1"] #header.ct-header [data-device],
#header.ct-header [data-device] {
	width: 100%;
	pointer-events: auto;
}

[data-header*="type-1"] #header.ct-header [data-row],
#header.ct-header [data-row] {
	--theme-box-shadow: none;
	--theme-border-top: none;
	--theme-border-bottom: none;
	--theme-backdrop-blur: 0;
	width: 100%;
}

/* Fundo sticky azul: troca imediata (sem fade) ao fixar / desfiar */
#header.ct-header,
#header.ct-header [data-sticky],
#header.ct-header [data-sticky] [data-row],
#header.ct-header [data-sticky] [data-row] > div,
#header.ct-header [data-sticky] [data-row*="boxed"] > div {
	--header-sticky-animation-speed: 0s;
	transition: none !important;
}

[data-header*="type-1"] #header.ct-header:not([data-sticky*='yes-end']) [data-row],
[data-header*="type-1"] #header.ct-header:not([data-sticky*='yes-end']) [data-row] > div,
#header.ct-header:not([data-sticky*='yes-end']) [data-row],
#header.ct-header:not([data-sticky*='yes-end']) [data-row] > div {
	background-color: transparent !important;
	background-image: none !important;
}

/* Conteúdo começa no topo — a 1.ª secção fica por baixo do header */
main#main,
.site-main,
article,
.entry-content,
.ct-container,
.ct-content-block,
.site-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

[data-vertical-spacing*='top'] {
	padding-top: 0 !important;
}

.hero-section,
.ct-page-title,
.entry-header {
	display: none;
}

.entry-content > :first-child {
	margin-block-start: 0 !important;
	margin-top: 0 !important;
}

/* Páginas com hero/fundo escuro — header em versão branca */
body.ligarena-dark-hero #header.ct-header {
	--theme-link-initial-color: #ffffff;
	--theme-link-hover-color: rgba(255, 255, 255, 0.78);
	--theme-icon-color: #ffffff;
	--theme-text-color: #ffffff;
	color: #ffffff;
}

body.ligarena-dark-hero #header.ct-header [data-id="logo"] .default-logo,
body.ligarena-dark-hero #header.ct-header [data-id="logo"] .sticky-logo,
body.ligarena-dark-hero #header.ct-header [data-id="logo"] .site-logo-container img,
body.ligarena-dark-hero #header.ct-header [data-id="widget-area-1"] img {
	filter: brightness(0) invert(1);
}

body.ligarena-dark-hero #header.ct-header [data-id="logo"] .site-title {
	--theme-link-initial-color: #ffffff;
	--theme-link-hover-color: rgba(255, 255, 255, 0.78);
}

body.ligarena-dark-hero #header.ct-header [data-id="trigger"] {
	color: #ffffff;
}

body.ligarena-dark-hero #header.ct-header [data-id="trigger"] .ct-label {
	color: #ffffff;
}

body.ligarena-dark-hero #header.ct-header [data-id="trigger"] .ct-icon,
body.ligarena-dark-hero #header.ct-header [data-id="trigger"] .ct-icon rect {
	fill: currentColor;
	color: #ffffff;
}

body.ligarena-dark-hero #header.ct-header [data-id="button"] .ct-button {
	--theme-button-background-initial-color: #ffffff;
	--theme-button-background-hover-color: rgba(255, 255, 255, 0.9);
	--theme-button-text-initial-color: var(--theme-palette-color-4, #001c48);
	--theme-button-text-hover-color: var(--theme-palette-color-4, #001c48);
	background-color: #ffffff !important;
	color: var(--theme-palette-color-4, #001c48) !important;
	border-color: #ffffff !important;
}

body.ligarena-dark-hero #header.ct-header [data-id="button"] .ct-button-ghost {
	--theme-button-text-initial-color: #ffffff;
	--theme-button-text-hover-color: var(--theme-palette-color-4, #001c48);
	--theme-button-background-initial-color: transparent;
	--theme-button-background-hover-color: #ffffff;
	background-color: transparent !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
}

body.ligarena-dark-hero #header.ct-header [data-id="button"] .ct-button-ghost:hover,
body.ligarena-dark-hero #header.ct-header [data-id="button"] .ct-button-ghost:focus-visible {
	background-color: #ffffff !important;
	color: var(--theme-palette-color-4, #001c48) !important;
}

/* Widget «Managed by» — centrado verticalmente no header */
#header.ct-header [data-id="widget-area-1"] {
	display: flex;
	align-items: center;
	align-self: center;
	margin-block: 0;
}

#header.ct-header [data-id="widget-area-1"] .ct-widget {
	display: flex;
	align-items: center;
	margin-block: 0;
}

#header.ct-header [data-id="widget-area-1"] :is(
	.wp-block-stackable-columns,
	.stk-block-columns,
	.stk-block-image,
	.stk-block-image figure
) {
	margin-block: 0 !important;
}

#header.ct-header [data-id="widget-area-1"] .stk-block-image figure {
	display: flex;
	align-items: center;
}

/*
 * Só no estado sticky activo (data-sticky contém "yes").
 * Não usar "fixed" — no Blocksy isso aparece também no topo, antes do scroll.
 * O atributo está no contentor interno, não em #header.
 */
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) {
	--theme-link-initial-color: #ffffff;
	--theme-link-hover-color: rgba(255, 255, 255, 0.78);
	--theme-icon-color: #ffffff;
	--theme-text-color: #ffffff;
	color: #ffffff;
}

/* Botão + logo «Managed by» mais pequenos só com o header fixo */
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="widget-area-1"] .stk-img-wrapper,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="widget-area-1"] .stk-block-image .stk-img-wrapper {
	width: clamp(5.5rem, 7vw, 7.5rem) !important;
	max-width: 7.5rem !important;
	transition: width 0.25s ease, max-width 0.25s ease;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="widget-area-1"] img {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button-ghost {
	font-size: clamp(0.62rem, 0.28vw + 0.5rem, 0.78rem);
	padding: clamp(0.42rem, 0.22vw + 0.34rem, 0.58rem) clamp(0.9rem, 0.7vw + 0.65rem, 1.25rem) !important;
	min-height: 0 !important;
	line-height: 1.2;
	letter-spacing: 0.04em;
	transition:
		font-size 0.25s ease,
		padding 0.25s ease,
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}

/* Em estado fixo — logo, menu, imagem e botão a branco */
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="logo"] .default-logo,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="logo"] .sticky-logo,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="logo"] .site-logo-container img,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="widget-area-1"] img {
	filter: brightness(0) invert(1) !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="logo"] .site-title {
	--theme-link-initial-color: #ffffff;
	--theme-link-hover-color: rgba(255, 255, 255, 0.78);
	color: #ffffff !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"],
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"] .ct-label {
	color: #ffffff !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"] .ct-icon,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"] .ct-icon rect,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"] svg,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="trigger"] svg * {
	fill: currentColor !important;
	stroke: currentColor;
	color: #ffffff !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button {
	--theme-button-background-initial-color: #ffffff;
	--theme-button-background-hover-color: rgba(255, 255, 255, 0.9);
	--theme-button-text-initial-color: var(--theme-palette-color-4, #001c48);
	--theme-button-text-hover-color: var(--theme-palette-color-4, #001c48);
	background-color: #ffffff !important;
	color: var(--theme-palette-color-4, #001c48) !important;
	border-color: #ffffff !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button-ghost {
	--theme-button-text-initial-color: #ffffff;
	--theme-button-text-hover-color: var(--theme-palette-color-4, #001c48);
	--theme-button-background-initial-color: transparent;
	--theme-button-background-hover-color: #ffffff;
	background-color: transparent !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button-ghost:hover,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="button"] .ct-button-ghost:focus-visible {
	background-color: #ffffff !important;
	color: var(--theme-palette-color-4, #001c48) !important;
}

#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="socials"] a,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="socials"] svg,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) [data-id="socials"] svg *,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) .ct-icon-container,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) .ct-icon-container svg,
#header.ct-header [data-sticky*="yes"]:not([data-sticky*="yes-hide"]) .ct-icon-container svg * {
	color: #ffffff !important;
	fill: currentColor !important;
}
