/**
 * Header — Famalicão Direito (Blocksy Child)
 */

/* Header fixo em todo o site + gradiente azul (cima → baixo) */
#header.ct-header,
#header {
	position: fixed;
	top: var(--admin-bar, 0px);
	left: 0;
	right: 0;
	width: 100%;
	z-index: 10050;
	isolation: isolate;
	background: transparent;
}

#header.ct-header::before,
#header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.35s ease;
	background: linear-gradient(
		to bottom,
		#051e33 0%,
		rgb(5 30 51 / 92%) 22%,
		rgb(5 30 51 / 68%) 48%,
		rgb(5 30 51 / 38%) 72%,
		rgb(5 30 51 / 12%) 88%,
		rgb(5 30 51 / 0%) 100%
	);
}

/* Topo da página (banner / hero): header transparente como antes */
body.is-fcf-header-at-top.home #header::before,
body.is-fcf-header-at-top.single-post #header::before,
body.is-fcf-header-at-top.has-fcf-hero-under-header #header::before,
body.is-fcf-header-at-top.has-fcf-single-post #header::before {
	opacity: 0;
}

#header [data-row] {
	position: relative;
	z-index: 1;
}

/* Compensar altura do header (sai do fluxo do documento) */
body #main-container {
	padding-top: calc(var(--header-height, 70px) + var(--admin-bar, 0px));
}

body.home #main-container,
body.single-post #main-container,
body.has-fcf-hero-under-header #main-container,
body.has-fcf-single-post #main-container,
body.has-fcf-calendario #main-container,
body.has-fcf-resultados #main-container,
body.has-fcf-standings #main-container,
body.has-fcf-plantel #main-container {
	padding-top: 0;
}

/* Tipografia do header (menu Blocksy ~12px por defeito) */
#header [class*="header-menu"] > .menu > li > .ct-menu-link {
	font-size: 0.9375rem;
}

#header .ct-header-text,
#header .ct-header-cta .ct-button {
	font-size: 0.9375rem;
}

@media (min-width: 1000px) {
	#header [class*="header-menu"] > .menu > li > .ct-menu-link {
		font-size: 1.125rem;
	}

	#header .ct-header-text,
	#header .ct-header-cta .ct-button {
		font-size: 1.0625rem;
	}
}

/* Hero por baixo do header: menu claro sobre imagem / banner */
.home #header,
.single-post #header,
body.has-fcf-hero-under-header #header {
	--theme-link-initial-color: var(--fd-color-white);
	--theme-link-hover-color: var(--fd-color-muted);
	--theme-text-color: var(--fd-color-white);
}

#header [data-row],
#header [data-row] > div {
	background: transparent !important;
	box-shadow: none !important;
	border-color: transparent !important;
}

/*
 * Páginas interiores: a paleta global (#051E33) estava a pintar o texto do menu;
 * mantém o fundo do Blocksy e restaura links claros.
 */
body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header {
	--theme-link-initial-color: var(--fd-color-white, #fff);
	--theme-link-hover-color: var(--fd-color-muted, #a2bacc);
	--theme-text-color: var(--fd-color-white, #fff);
}

body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header [class*="header-menu"] > .menu > li > .ct-menu-link,
body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header .ct-header-text,
body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header .site-title-container .site-title {
	color: var(--fd-color-white, #fff);
}

body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header [class*="header-menu"] > .menu > li > .ct-menu-link:hover,
body:not(.home):not(.single-post):not(.has-fcf-hero-under-header) #header [class*="header-menu"] > .menu > li > .ct-menu-link:focus-visible {
	color: var(--fd-color-muted, #a2bacc);
}

/*
 * Admin bar: o WP aplica margin-top ao html (46px ≤782px, 32px ≥783px).
 * O Blocksy usa --admin-bar: 0 abaixo de 600px, daí a faixa branca no meio.
 */
@media screen and (max-width: 782px) {
	body.admin-bar.home,
	body.admin-bar.single-post,
	body.admin-bar.has-fcf-hero-under-header {
		--admin-bar: 46px;
	}

	body.admin-bar.single-post #main-container,
	body.admin-bar.has-fcf-hero-under-header #main-container {
		margin-top: -46px;
		padding-top: 46px;
	}

	body.admin-bar.home #main-container {
		margin-top: -46px;
		padding-top: 0;
	}
}

@media screen and (min-width: 783px) {
	body.admin-bar.home,
	body.admin-bar.single-post,
	body.admin-bar.has-fcf-hero-under-header {
		--admin-bar: 32px;
	}

	body.admin-bar.single-post #main-container,
	body.admin-bar.has-fcf-hero-under-header #main-container {
		margin-top: -32px;
		padding-top: 32px;
	}

	body.admin-bar.home #main-container {
		margin-top: -32px;
		padding-top: 0;
	}
}

