/*
 * MFC Hero - Frontend Styles
 * All colors/spacing exposed as CSS variables for easy theming.
 */

/*
 * Self-hosted Vazirmatn (Persian) font.
 * Single variable-weight file (covers 100–900), served from the plugin's
 * own assets folder — no Google Fonts / external CDN, so it always loads
 * the same way regardless of the visitor's network or region.
 */
@font-face {
	font-family: 'Vazirmatn';
	src: url('../fonts/Vazirmatn-Variable.woff2') format('woff2 supports variations'),
		url('../fonts/Vazirmatn-Variable.woff2') format('woff2-variations');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

.mfc-hero {
	--mfc-gold: #d4a017;
	--mfc-gold-light: #e8b93a;
	--mfc-white: #ffffff;
	--mfc-hero-overlay: 0.65;
	--mfc-hero-bg: none;

	position: relative;
	min-height: 100vh;
	width: 100%;
	display: flex;
	align-items: center;
	overflow: hidden;
	background-color: #0a0705;
	background-image: var(--mfc-hero-bg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	direction: rtl;
	box-sizing: border-box;
	font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;

	/* Full-bleed: break out of any theme container width automatically,
	   no matter how narrow or padded the parent content area is. */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.mfc-hero * {
	font-family: inherit;
}

/* When rendered through the dedicated fullscreen page template,
   remove the theme's default body margin so nothing peeks around it. */
body.mfc-hero-fullscreen-page {
	margin: 0;
	padding: 0;
}

.mfc-hero *,
.mfc-hero *::before,
.mfc-hero *::after {
	box-sizing: border-box;
}

.mfc-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(5, 4, 3, calc(var(--mfc-hero-overlay) + 0.25)) 0%,
		rgba(10, 8, 6, var(--mfc-hero-overlay)) 45%,
		rgba(10, 8, 6, calc(var(--mfc-hero-overlay) - 0.15)) 100%
	);
	z-index: 1;
	pointer-events: none;
}

.mfc-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 100px 60px;
}

.mfc-hero__content {
	max-width: 620px;
	text-align: right;
}

/* Brand block */
.mfc-hero__brand {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 28px;
}

.mfc-hero__logo {
	max-height: 84px;
	width: auto;
	display: block;
}

.mfc-hero__brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mfc-hero__title-fa {
	margin: 0;
	color: var(--mfc-white);
	font-size: 2.4rem;
	font-weight: 800;
	line-height: 1.25;
}

.mfc-hero__title-en {
	margin: 4px 0 0;
	color: var(--mfc-gold);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.mfc-hero__subtitle {
	color: var(--mfc-gold-light);
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 12px;
}

.mfc-hero__description {
	color: #eae6df;
	font-size: 1.05rem;
	line-height: 1.9;
	margin: 0 0 34px;
	max-width: 480px;
}

/* CTA buttons */
.mfc-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 46px;
}

.mfc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	border: 2px solid transparent;
	line-height: 1;
}

.mfc-btn--primary {
	background: linear-gradient(135deg, var(--mfc-gold-light), var(--mfc-gold));
	color: #1a1305;
}

.mfc-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(212, 160, 23, 0.35);
	color: #1a1305;
}

.mfc-btn--secondary {
	background: transparent;
	color: var(--mfc-white);
	border-color: rgba(255, 255, 255, 0.5);
}

.mfc-btn--secondary:hover {
	border-color: var(--mfc-white);
	background: rgba(255, 255, 255, 0.08);
	color: var(--mfc-white);
}

/* Category icon row */
.mfc-hero__categories {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0;
	margin: 0;
	padding: 22px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	list-style: none;
}

.mfc-hero__category {
	padding: 0 22px;
	border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
}

.mfc-hero__category:last-child {
	border-inline-end: none;
}

.mfc-hero__category:first-child {
	padding-inline-start: 0;
}

.mfc-hero__category-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #f2ede4;
	text-align: center;
}

.mfc-hero__category-icon {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mfc-hero__category-icon img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: brightness(0) saturate(100%) invert(70%) sepia(45%) saturate(600%) hue-rotate(3deg) brightness(102%);
}

.mfc-hero__category-title {
	font-size: 0.85rem;
	font-weight: 500;
	color: #e6e0d5;
	white-space: nowrap;
}

.mfc-hero__category-link:hover .mfc-hero__category-title,
.mfc-hero__category-link:hover .mfc-hero__category-icon img {
	color: var(--mfc-gold-light);
}

.mfc-hero__category-link:hover .mfc-hero__category-icon img {
	filter: brightness(0) saturate(100%) invert(80%) sepia(60%) saturate(900%) hue-rotate(2deg) brightness(105%);
}

/* Fade-in animation */
.mfc-fade-in {
	opacity: 0;
	transform: translateY(16px);
	animation: mfcHeroFadeIn 0.8s ease forwards;
}

.mfc-hero__brand.mfc-fade-in { animation-delay: 0.05s; }
.mfc-hero__subtitle.mfc-fade-in { animation-delay: 0.2s; }
.mfc-hero__description.mfc-fade-in { animation-delay: 0.35s; }
.mfc-hero__cta.mfc-fade-in { animation-delay: 0.5s; }
.mfc-hero__categories.mfc-fade-in { animation-delay: 0.65s; }

@keyframes mfcHeroFadeIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mfc-fade-in {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

/* Responsive: Tablet */
@media (max-width: 991px) {
	.mfc-hero__inner {
		padding: 80px 40px;
	}

	.mfc-hero__title-fa {
		font-size: 2rem;
	}

	.mfc-hero__content {
		max-width: 100%;
	}

	.mfc-hero__categories {
		flex-wrap: wrap;
		row-gap: 20px;
	}
}

/* Responsive: Mobile */
@media (max-width: 600px) {
	.mfc-hero {
		min-height: 100svh;
	}

	.mfc-hero__inner {
		padding: 56px 22px;
	}

	.mfc-hero__content {
		text-align: center;
	}

	.mfc-hero__brand {
		flex-direction: column;
		text-align: center;
	}

	.mfc-hero__brand-text {
		align-items: center;
	}

	.mfc-hero__title-fa {
		font-size: 1.6rem;
	}

	.mfc-hero__description {
		max-width: 100%;
		font-size: 0.95rem;
	}

	.mfc-hero__cta {
		flex-direction: column;
		width: 100%;
	}

	.mfc-btn {
		width: 100%;
	}

	.mfc-hero__categories {
		justify-content: center;
	}

	.mfc-hero__category {
		padding: 0 14px;
		border-inline-end: none;
		flex: 0 0 45%;
		margin-bottom: 16px;
	}
}
