/* Hero partilhado — Calendário / Resultados / Classificação */

.fcf-match-page {
	--fcf-match-ink: #fff;
	--fcf-match-muted: rgba(255, 255, 255, 0.72);
	--fcf-match-media-height: clamp(320px, 58vh, 640px);
	position: relative;
	isolation: isolate;
	overflow-x: clip;
	color: var(--fcf-match-ink);
	padding: 0 0 var(--fcf-page-section-padding-bottom);
}

.fcf-match-page__media {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 0;
	width: 100vw;
	height: var(--fcf-match-media-height);
	transform: translateX(-50%);
	overflow: hidden;
	pointer-events: none;
	background-color: var(--fcf-blue-900, #051e33);
	isolation: isolate;
}

.fcf-match-page__bg {
	position: absolute;
	inset: 0;
	/*
	 * Azul só no branco/opaco da imagem.
	 * A máscara usa o alpha da própria imagem → zonas transparentes
	 * ficam o navy do fundo, sem azul.
	 */
	background-color: #123357;
	background-image: var(--fcf-match-bg);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-blend-mode: multiply;
	-webkit-mask-image: var(--fcf-match-bg);
	mask-image: var(--fcf-match-bg);
	-webkit-mask-position: center center;
	mask-position: center center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: cover;
	mask-size: cover;
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
}

.fcf-match-page__bg--mobile {
	display: none;
}

/* Overlay sem tint global — só serve de âncora; o fade vai no ::after */
.fcf-match-page__overlay {
	display: none;
}

/* Overlay de baixo para cima: opacidade 100 → 0 (todos os banners match-page) */
.fcf-match-page__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(5, 30, 51, 1) 0%,
		rgba(5, 30, 51, 0) 100%
	);
}

.fcf-match-page__hero {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: var(--fcf-page-container-width);
	max-width: var(--fcf-page-container-max-width);
	margin-inline: auto;
	padding:
		calc(var(--header-height, 120px) + clamp(1.5rem, 4vh, 3rem))
		0
		clamp(1.25rem, 3vh, 2.25rem);
}

.fcf-match-page__title {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--fcf-match-ink) !important;
	background: none !important;
	font-family: var(--fcf-font-display, "korolev-compressed", sans-serif) !important;
	font-size: clamp(2.75rem, 5vw, 3.75rem) !important;
	font-weight: var(--fcf-h1-weight, 700) !important;
	line-height: 1.05 !important;
	letter-spacing: var(--fcf-h1-spacing, 0.02em) !important;
	text-transform: uppercase;
}

.fcf-match-page__subtitle {
	margin: clamp(0.35rem, 0.8vw, 0.55rem) 0 0;
	font-family: var(--fcf-font-display, "korolev-compressed", sans-serif);
	font-size: clamp(1.125rem, 1.55vw, 1.3125rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.03em;
	color: var(--fcf-match-muted);
}

.fcf-match-page__content {
	position: relative;
	z-index: 1;
}

/*
 * Banner compacto + título no fundo — mesmo alinhamento das páginas legais.
 * Agenda / Resultados / Classificação / Plantel / Equipa Técnica.
 */
.fcf-match-page--calendario,
.fcf-match-page--resultados,
.fcf-match-page--classificacao,
.fcf-match-page--plantel,
.fcf-match-page--equipa-tecnica {
	--fcf-match-media-height: clamp(420px, 60vh, 600px);
	--fcf-match-pad-x: var(--fcf-site-gutter, clamp(48px, 4vw, 80px));
	--fcf-match-content-pull: 0;
	--fcf-calendario-ink: #fff;
	--fcf-calendario-ink-soft: rgba(255, 255, 255, 0.72);
	--fcf-calendario-ease: cubic-bezier(0.22, 1, 0.36, 1);
	padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.fcf-match-page--calendario .fcf-match-page__media,
.fcf-match-page--resultados .fcf-match-page__media,
.fcf-match-page--classificacao .fcf-match-page__media,
.fcf-match-page--plantel .fcf-match-page__media,
.fcf-match-page--equipa-tecnica .fcf-match-page__media {
	top: 0;
	left: 50%;
	width: 100vw;
	height: var(--fcf-match-media-height);
	transform: translateX(-50%);
}

.fcf-match-page--calendario .fcf-match-page__bg,
.fcf-match-page--resultados .fcf-match-page__bg,
.fcf-match-page--classificacao .fcf-match-page__bg,
.fcf-match-page--plantel .fcf-match-page__bg,
.fcf-match-page--equipa-tecnica .fcf-match-page__bg {
	background-position: center center;
}

.fcf-match-page--calendario .fcf-match-page__hero,
.fcf-match-page--resultados .fcf-match-page__hero,
.fcf-match-page--classificacao .fcf-match-page__hero,
.fcf-match-page--plantel .fcf-match-page__hero,
.fcf-match-page--equipa-tecnica .fcf-match-page__hero {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	gap: clamp(0.85rem, 1.8vw, 1.25rem);
	position: relative;
	box-sizing: border-box;
	width: var(
		--fcf-page-container-width,
		var(--theme-container-width, var(--theme-normal-container-max-width, 90vw))
	);
	max-width: var(
		--fcf-page-container-max-width,
		var(--theme-normal-container-max-width, 90vw)
	);
	height: var(--fcf-match-media-height);
	min-height: var(--fcf-match-media-height);
	margin-inline: auto;
	padding-top: calc(var(--header-height, 96px) + clamp(1rem, 2.5vh, 1.75rem));
	padding-bottom: clamp(1.75rem, 3.5vh, 2.75rem);
	padding-inline: 0;
	z-index: 4;
}

.fcf-match-page--calendario .fcf-match-page__title,
.fcf-match-page--resultados .fcf-match-page__title,
.fcf-match-page--classificacao .fcf-match-page__title,
.fcf-match-page--plantel .fcf-match-page__title,
.fcf-match-page--equipa-tecnica .fcf-match-page__title {
	position: relative;
	left: auto;
	right: auto;
	bottom: auto;
	z-index: 1;
	max-width: min(100%, 22ch);
	margin-top: 0;
	margin-bottom: 0;
	pointer-events: none;
	text-wrap: balance;
	text-transform: none;
}

.fcf-match-page--calendario .fcf-match-page__subtitle,
.fcf-match-page--resultados .fcf-match-page__subtitle,
.fcf-match-page--classificacao .fcf-match-page__subtitle,
.fcf-match-page--plantel .fcf-match-page__subtitle,
.fcf-match-page--equipa-tecnica .fcf-match-page__subtitle {
	margin-top: 0;
}

/* Tabs + filtros — colados em baixo, a seguir ao título */
.fcf-match-page--calendario .fcf-calendario-toolbar,
.fcf-match-page--resultados .fcf-calendario-toolbar,
.fcf-match-page--classificacao .fcf-calendario-toolbar {
	position: relative;
	left: auto;
	right: auto;
	bottom: auto;
	z-index: 5;
	width: 100%;
	margin: 0;
	margin-top: 0;
	flex-shrink: 0;
	pointer-events: auto;
}

.fcf-match-page--calendario .fcf-match-page__content,
.fcf-match-page--resultados .fcf-match-page__content,
.fcf-match-page--plantel .fcf-match-page__content,
.fcf-match-page--equipa-tecnica .fcf-match-page__content,
.fcf-match-page--classificacao .fcf-match-page__content {
	position: relative;
	z-index: 2;
	margin-top: 0;
	padding-top: clamp(1.25rem, 3vh, 2rem);
	pointer-events: auto;
}

.fcf-match-page--classificacao .fcf-match-page__content {
	padding-top: clamp(0.85rem, 2vh, 1.25rem);
}

@media (max-width: 768px) {
	.fcf-match-page {
		--fcf-match-media-height: clamp(360px, 52svh, 480px);
	}

	.fcf-match-page__hero {
		padding-top: calc(var(--header-height, 96px) + clamp(1.1rem, 3vh, 2rem));
	}

	.fcf-match-page__title {
		font-size: clamp(2.35rem, 11vw, 2.85rem) !important;
	}

	.fcf-match-page__bg--desktop {
		display: none;
	}

	.fcf-match-page__bg--mobile {
		display: block;
	}

	.fcf-match-page--calendario,
	.fcf-match-page--resultados,
	.fcf-match-page--plantel,
	.fcf-match-page--equipa-tecnica {
		--fcf-match-media-height: clamp(380px, 55svh, 520px);
		padding-bottom: clamp(1.25rem, 3.5vw, 2rem);
	}

	.fcf-match-page--classificacao {
		--fcf-match-media-height: clamp(380px, 55svh, 520px);
		padding-bottom: 0;
	}

	.fcf-match-page--calendario,
	.fcf-match-page--resultados,
	.fcf-match-page--classificacao {
		--fcf-match-pad-x: var(--fcf-site-gutter, max(24px, 6.5vw));
	}

	.fcf-match-page--plantel,
	.fcf-match-page--equipa-tecnica {
		--fcf-match-pad-x: clamp(1rem, 4vw, 1.5rem);
	}

	.fcf-match-page--calendario .fcf-match-page__hero,
	.fcf-match-page--resultados .fcf-match-page__hero,
	.fcf-match-page--classificacao .fcf-match-page__hero,
	.fcf-match-page--plantel .fcf-match-page__hero,
	.fcf-match-page--equipa-tecnica .fcf-match-page__hero {
		gap: 0.55rem;
		width: var(
			--fcf-page-container-width,
			var(--theme-container-width, var(--theme-normal-container-max-width, 90vw))
		);
		max-width: var(
			--fcf-page-container-max-width,
			var(--theme-normal-container-max-width, 90vw)
		);
		margin-inline: auto;
		height: var(--fcf-match-media-height);
		min-height: var(--fcf-match-media-height);
		padding-top: calc(var(--header-height, 70px) + 0.75rem);
		padding-bottom: clamp(1rem, 2.5vh, 1.5rem);
		padding-inline: 0;
	}

	.fcf-match-page--calendario .fcf-match-page__title,
	.fcf-match-page--resultados .fcf-match-page__title,
	.fcf-match-page--classificacao .fcf-match-page__title,
	.fcf-match-page--plantel .fcf-match-page__title,
	.fcf-match-page--equipa-tecnica .fcf-match-page__title {
		max-width: none;
		font-size: clamp(1.75rem, 7.5vw, 2.35rem) !important;
		line-height: 1.05;
	}

	.fcf-match-page--calendario .fcf-match-page__content,
	.fcf-match-page--resultados .fcf-match-page__content,
	.fcf-match-page--classificacao .fcf-match-page__content,
	.fcf-match-page--plantel .fcf-match-page__content,
	.fcf-match-page--equipa-tecnica .fcf-match-page__content {
		padding-top: clamp(0.85rem, 2.2vh, 1.25rem);
	}

	.fcf-match-page--classificacao .fcf-match-page__content {
		padding-top: clamp(0.55rem, 1.5vh, 0.85rem);
	}
}

/* Classificação — header azul escuro + imagem tintada (multiply) */
.fcf-match-page--classificacao .fcf-match-page__media {
	background-color: var(--fcf-blue-900, #051e33);
}

.fcf-match-page--classificacao .fcf-match-page__bg {
	background-color: #123357;
	background-blend-mode: multiply;
	-webkit-mask-image: var(--fcf-match-bg);
	mask-image: var(--fcf-match-bg);
	-webkit-mask-composite: source-over;
	mask-composite: add;
	-webkit-mask-position: center center;
	mask-position: center center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: cover;
	mask-size: cover;
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
}

/* Sem gap acima do banner (layout Blocksy / Gutenberg) — resto igual ao mockup */
body.has-fcf-calendario main.site-main > .ct-container-full,
body.has-fcf-resultados main.site-main > .ct-container-full,
body.has-fcf-standings main.site-main > .ct-container-full,
body.has-fcf-plantel main.site-main > .ct-container-full {
	padding-top: 0 !important;
}

body.has-fcf-calendario .entry-content.is-layout-constrained > .fcf-match-page:first-child,
body.has-fcf-resultados .entry-content.is-layout-constrained > .fcf-match-page:first-child,
body.has-fcf-standings .entry-content.is-layout-constrained > .fcf-match-page:first-child,
body.has-fcf-plantel .entry-content.is-layout-constrained > .fcf-match-page:first-child {
	margin-block-start: 0 !important;
}

body.has-fcf-calendario .entry-content.is-layout-constrained > .fcf-match-page.alignfull,
body.has-fcf-resultados .entry-content.is-layout-constrained > .fcf-match-page.alignfull,
body.has-fcf-standings .entry-content.is-layout-constrained > .fcf-match-page.alignfull {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

body.has-fcf-calendario .entry-content.is-layout-constrained,
body.has-fcf-resultados .entry-content.is-layout-constrained,
body.has-fcf-standings .entry-content.is-layout-constrained {
	padding-inline: 0 !important;
}

/* Lista de jogos — mesma coluna que o hero (sem padding extra do .ct-container) */
.fcf-match-page--calendario .fcf-match-page__content.ct-container,
.fcf-match-page--resultados .fcf-match-page__content.ct-container,
.fcf-match-page--classificacao .fcf-match-page__content.ct-container {
	width: var(
		--fcf-page-container-width,
		var(--theme-container-width, var(--theme-normal-container-max-width, 90vw))
	);
	max-width: var(
		--fcf-page-container-max-width,
		var(--theme-normal-container-max-width, 90vw)
	);
	margin-inline: auto;
	padding-inline: 0;
}
