/* 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;
	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;
}

/* Fade só em baixo para fundir com o fundo da página */
.fcf-match-page__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(5, 30, 51, 0) 0%,
		rgba(5, 30, 51, 0.08) 50%,
		rgba(5, 30, 51, 0.55) 82%,
		rgba(5, 30, 51, 1) 100%
	);
}

.fcf-match-page__hero {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: var(--theme-container-width, min(100%, var(--theme-normal-container-max-width, min(1920px, calc(100vw - (var(--fcf-site-gutter, 0px) * 2))))));
	max-width: var(--theme-normal-container-max-width, min(1920px, calc(100vw - (var(--fcf-site-gutter, 0px) * 2))));
	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;
}

/* Calendário + Resultados + Classificação + Plantel + Equipa Técnica: banner 90vh */
.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: 90vh;
	--fcf-match-media-height: 90svh;
	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: 50px;
	height: calc(var(--fcf-match-media-height) - 50px);
}

.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 {
	--fcf-match-title-bottom: calc(clamp(5.5rem, 11vh, 8rem) + 50px);
	display: block;
	position: relative;
	box-sizing: border-box;
	min-height: calc(90vh - clamp(3.5rem, 7vh, 5.5rem));
	min-height: calc(90svh - clamp(3.5rem, 7vh, 5.5rem));
	padding-top: 0;
	padding-bottom: var(--fcf-match-title-bottom);
}

.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: absolute;
	left: 0;
	right: 0;
	bottom: var(--fcf-match-title-bottom);
	text-transform: none;
}

/* Toolbar do calendário abaixo do título, sem o empurrar */
.fcf-match-page--calendario .fcf-calendario-toolbar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(1.35rem, 3.2vh, 2.25rem);
	margin: 0;
	z-index: 3;
}

.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 {
	margin-top: clamp(-5rem, -10vh, -3.5rem);
}

/* Calendário: não puxar o conteúdo por cima das tabs */
.fcf-match-page--calendario .fcf-match-page__content {
	margin-top: 0;
	padding-top: clamp(0.75rem, 1.5vh, 1.25rem);
	z-index: 1;
}

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

	.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--classificacao,
	.fcf-match-page--plantel,
	.fcf-match-page--equipa-tecnica {
		--fcf-match-media-height: 90vh;
		--fcf-match-media-height: 90svh;
		padding-bottom: clamp(1.5rem, 4vw, 2.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;
		height: var(--fcf-match-media-height);
	}

	.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;
	}

	/* Título no fundo do banner; posição fixa partilhada entre páginas */
	.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 {
		--fcf-match-title-bottom: calc(clamp(4.5rem, 10vh, 6rem) + 50px);
		z-index: 2;
		min-height: calc(90svh - clamp(4.25rem, 9vh, 6rem));
		padding-top: calc(var(--header-height, 70px) + 0.25rem);
		padding-bottom: var(--fcf-match-title-bottom);
	}

	.fcf-match-page--calendario .fcf-calendario-toolbar {
		position: absolute;
		left: 0;
		right: 0;
		bottom: clamp(1.1rem, 2.8vh, 1.75rem);
		z-index: 3;
		margin: 0;
	}

	.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 {
		z-index: 1;
		margin-top: clamp(-3.75rem, -8.5vh, -2.75rem);
	}

	.fcf-match-page--calendario .fcf-match-page__content {
		margin-top: 0;
		padding-top: clamp(0.5rem, 1.2vh, 1rem);
	}
}
