/* ==========================================================
   Momzi — Home: Hero + "چرا مام‌زی" (Figma "Landing 1", 1920 frame)
   Loaded on the front page only (library/enqueue-scripts.php).
   --u = one design pixel of the 1920 frame, measured on the stage width.
============================================================ */
.mz-stage {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	container-type: inline-size;
	background: var(--site-bg, #fff8f6);
}
.mz-stage *,
.mz-stage *::before,
.mz-stage *::after {
	--u: calc(100cqw / 1920);
}

/* Blurred colour blobs (baked from the Figma blur layers) */
.mz-stage__blobs {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	/* Soft fade at the bottom of the stage: the blobs no longer stop on a hard
	   line where the stage clips them, they melt into the next section. */
	--mz-blobs-fade: 260px;
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--mz-blobs-fade)), rgba(0, 0, 0, 0.55) calc(100% - var(--mz-blobs-fade) * 0.5), rgba(0, 0, 0, 0.18) calc(100% - var(--mz-blobs-fade) * 0.2), transparent 100%);
	mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - var(--mz-blobs-fade)), rgba(0, 0, 0, 0.55) calc(100% - var(--mz-blobs-fade) * 0.5), rgba(0, 0, 0, 0.18) calc(100% - var(--mz-blobs-fade) * 0.2), transparent 100%);
}
@media (max-width: 767.98px) {
	.mz-stage__blobs {
		--mz-blobs-fade: 180px;
	}
}
.mz-stage__blob {
	position: absolute;
	display: block;
	background: no-repeat center / 100% 100%;
}
.mz-stage__blob--orange {
	left: 0;
	top: calc(461 * var(--u));
	width: calc(1140 * var(--u));
	height: calc(1604 * var(--u));
	background-image: url('../images/home/blob-orange.webp');
}
.mz-stage__blob--blue {
	right: 0;
	top: calc(648 * var(--u));
	width: calc(1171 * var(--u));
	height: calc(1604 * var(--u));
	background-image: url('../images/home/blob-blue.webp');
}

/* ---------- Hero ---------- */
.mz-wrap {
	width: min(1440px, 100% - 128px);
	margin-inline: auto;
}
.mz-hero {
	position: relative;
	height: calc(1320 * var(--u));
	min-height: 720px;
}
.mz-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}
.mz-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}
.mz-hero__overlay,
.mz-hero__fade {
	position: absolute;
	inset: 0;
}
.mz-hero__overlay {
	background: linear-gradient(to left, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 50%);
}
.mz-hero__fade {
	top: auto;
	height: calc(227 * var(--u));
	background: linear-gradient(to bottom, rgba(246, 244, 255, 0) 0%, #f6f4ff 100%);
}
.mz-hero__content {
	position: relative;
	z-index: 2;
	padding-top: max(calc(390 * var(--u)), 150px);
	text-align: right;
}
.mz-hero__brand,
.mz-hero__title {
	margin: 0;
	font-size: 40px;
	font-weight: 700;
	line-height: 68px;
}
.mz-hero__brand {
	color: #eb5523;
}
.mz-hero__title {
	color: #0c0c0c;
}
.mz-hero__lead {
	max-width: 490px;
	margin: 0;
	padding-top: 3px;
	color: #2e2e2e;
	font-size: 26px;
	font-weight: 500;
	line-height: 44px;
}
.mz-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	margin-top: 25px;
	padding: 0 24px;
	border-radius: 20px;
	background: #fc6432;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
}
.mz-hero__cta:hover,
.mz-hero__cta:focus-visible {
	background: var(--brand-color-hover, #e05512);
	color: #fff;
}
.mz-hero__cta img {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* ---------- Why Momzi ---------- */
.mz-why {
	position: relative;
	z-index: 3;
	margin-top: calc(-340 * var(--u));
	padding-bottom: 40px;
	scroll-margin-top: 96px;
}
.mz-why__panel {
	width: min(1520px, 100% - 48px);
	margin-inline: auto;
	padding: 40px;
	border-radius: 40px;
	background: url('../images/home/why-panel-bg.webp') no-repeat center / 100% 100%;
	text-align: right;
}
.mz-why__eyebrow {
	margin: 0;
	padding-top: 2px;
	color: #3833ff;
	font-size: 16px;
	font-weight: 400;
	line-height: var(--mz-lh-section-eyebrow);
}
.mz-why__title {
	margin: 4px 0 0;
	color: #2e2e2e;
	font-size: 22px;
	font-weight: 500;
	line-height: var(--mz-lh-section-title);
}
.mz-why__grid {
	display: grid;
	grid-template-columns: minmax(0, 708fr) repeat(3, minmax(0, 220fr));
	grid-template-rows: minmax(182px, auto) minmax(182px, auto);
	gap: 24px;
	margin-top: 21px;
}
.mz-card {
	position: relative;
	min-width: 0;
	padding: 16px;
	border: 1px solid #fff;
	border-radius: 32px;
	background: rgba(255, 255, 255, 0.6);
	overflow: hidden;
}
.mz-card__title {
	margin: 0;
	color: #353535;
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
}
.mz-card__desc {
	margin: 0;
	color: #767676;
	font-size: 16px;
	font-weight: 400;
	line-height: 28px;
}
.mz-card--research {
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	gap: 16px;
	padding-left: 24px;
}
.mz-card__pic {
	flex: 0 0 calc(220 / 676 * 100%);
	align-self: stretch;
	min-height: 220px;
	border-radius: 24px;
	overflow: hidden;
}
.mz-card__pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 49% center;
}
.mz-card--research .mz-card__title {
	margin-bottom: 8px;
}
.mz-card--forum {
	grid-row: 1 / span 2;
	min-height: 388px;
}
.mz-card--forum .mz-card__text {
	position: relative;
	z-index: 1;
}
.mz-card--forum .mz-card__title {
	margin-bottom: 5px;
}
.mz-card__illus {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	height: min(229px, 100% - 32px);
	overflow: hidden;
}
.mz-card__illus img {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 229px;
	max-width: none;
	height: 229px;
	transform: translateX(-50%);
}
.mz-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 5px;
	border-radius: 50%;
	background: #3833ff;
}
.mz-card__icon img {
	width: 32px;
	height: 32px;
}

/* Stats bar */
.mz-why__stats {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 92px;
	margin-top: 24px;
	padding-block: 12px;
	padding-inline: calc(160 / 1440 * 100%) calc(256 / 1440 * 100%);
	border: 1px solid #3833ff;
	border-radius: 32px;
	background: rgba(56, 51, 255, 0.2);
}
.mz-stat {
	display: flex;
	align-items: center;
	gap: 16px;
}
.mz-stat__icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}
.mz-stat__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin: 0;
	color: #353535;
}
.mz-stat__num {
	font-size: 24px;
	font-weight: 500;
	line-height: 34px;
}
.mz-stat__label {
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

/* ---------- 1200–1599: same composition, slightly tighter type ---------- */
@media (max-width: 1599.98px) {
	.mz-why__grid {
		grid-template-columns: minmax(0, 640fr) repeat(3, minmax(0, 220fr));
	}
	.mz-card--mini .mz-card__title {
		font-size: 16px;
		line-height: 26px;
	}
	.mz-card--mini .mz-card__desc,
	.mz-card--forum .mz-card__desc {
		font-size: 14px;
		line-height: 24px;
	}
	.mz-card--research .mz-card__desc {
		font-size: 15px;
		line-height: 26px;
	}
}

/* ---------- Tablet ---------- */
@media (max-width: 1199.98px) {
	.mz-hero {
		min-height: 640px;
	}
	.mz-hero__content {
		padding-top: 170px;
	}
	.mz-hero__brand,
	.mz-hero__title {
		font-size: 34px;
		line-height: 56px;
	}
	.mz-hero__lead {
		max-width: 420px;
		font-size: 22px;
		line-height: 38px;
	}
	.mz-hero__fade {
		height: 160px;
	}
	.mz-hero__overlay {
		background: linear-gradient(to left, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 40%, rgba(255, 255, 255, 0) 72%);
	}
	.mz-why {
		margin-top: -150px;
	}
	.mz-why__panel {
		padding: 24px;
		border: 1px solid rgba(255, 255, 255, 0.7);
		background: rgba(255, 255, 255, 0.35);
		-webkit-backdrop-filter: blur(40px) saturate(160%);
		backdrop-filter: blur(40px) saturate(160%);
	}
	.mz-why__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-rows: auto;
		gap: 16px;
	}
	.mz-card--research {
		grid-column: 1 / -1;
		grid-row: auto;
	}
	.mz-card__pic {
		flex-basis: 34%;
		min-height: 260px;
	}
	.mz-card--forum {
		grid-row: span 2;
	}
	.mz-stage__blob--orange {
		top: 500px;
		width: 75%;
		height: 1300px;
	}
	.mz-stage__blob--blue {
		top: 600px;
		width: 75%;
		height: 1300px;
	}
	.mz-why__stats {
		padding-inline: 32px;
	}
}

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
	.mz-wrap {
		width: calc(100% - 32px);
	}
	.mz-hero {
		height: 680px;
		min-height: 0;
	}
	.mz-hero__media {
		top: 250px;
	}
	.mz-hero__img {
		object-position: 34% top;
	}
	.mz-hero__overlay {
		background: linear-gradient(to bottom, var(--site-bg, #fff8f6) 0%, rgba(255, 248, 246, 0) 22%);
	}
	.mz-hero__content {
		padding-top: 104px;
	}
	.mz-hero__brand,
	.mz-hero__title {
		font-size: 28px;
		line-height: 44px;
	}
	.mz-hero__lead {
		max-width: 320px;
		padding-top: 4px;
		font-size: 17px;
		line-height: 30px;
	}
	.mz-hero__cta {
		margin-top: 18px;
	}
	.mz-why {
		margin-top: -110px;
	}
	.mz-why__panel {
		width: calc(100% - 2 * var(--mz-gutter));
		padding: 16px;
		border-radius: 28px;
	}
	.mz-why__eyebrow {
		font-size: 14px;
	}
	.mz-why__title {
		margin-top: 2px;
		font-size: 18px;
		line-height: var(--mz-lh-section-title);
	}
	.mz-why__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin-top: 16px;
	}
	.mz-card {
		border-radius: 24px;
		padding: 12px;
	}
	.mz-card--research {
		flex-direction: column;
		align-items: stretch;
		padding: 12px;
	}
	.mz-card__pic {
		flex: none;
		height: 200px;
		min-height: 0;
		border-radius: 16px;
	}
	.mz-card--forum {
		grid-column: 1 / -1;
		grid-row: auto;
		min-height: 0;
		display: flex;
		align-items: flex-end;
		gap: 8px;
	}
	.mz-card--forum .mz-card__text {
		flex: 1 1 auto;
		align-self: center;
	}
	.mz-card__illus {
		position: relative;
		left: auto;
		right: auto;
		bottom: auto;
		flex: 0 0 132px;
		height: 132px;
	}
	.mz-card__illus img {
		width: 140px;
		height: 140px;
	}
	.mz-card__title,
	.mz-card--mini .mz-card__title {
		font-size: 15px;
		line-height: 24px;
	}
	.mz-card__desc,
	.mz-card--mini .mz-card__desc,
	.mz-card--forum .mz-card__desc,
	.mz-card--research .mz-card__desc {
		font-size: 13px;
		line-height: 22px;
	}
	.mz-card__icon {
		width: 44px;
		height: 44px;
		margin-bottom: 8px;
	}
	.mz-card__icon img {
		width: 24px;
		height: 24px;
	}
	.mz-why__stats {
		flex-wrap: wrap;
		justify-content: space-around;
		gap: 12px 8px;
		padding: 14px 12px;
		border-radius: 24px;
	}
	.mz-stat {
		gap: 8px;
	}
	.mz-stat__icon {
		width: 24px;
		height: 24px;
	}
	.mz-stat__num {
		font-size: 18px;
		line-height: 26px;
	}
	.mz-stat__label {
		font-size: 12px;
		line-height: 20px;
	}
	.mz-stage__blob--orange,
	.mz-stage__blob--blue {
		top: 520px;
		width: 110%;
		height: 900px;
	}
	.mz-stage__blob--orange {
		left: -30%;
	}
	.mz-stage__blob--blue {
		right: -30%;
		top: 640px;
	}
}

/* ---------- Story video modal (templates/home/story.php + assets/javascript/home-video.js) ---------- */
.mz-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.home-story__banner--video {
	cursor: pointer;
}
.home-story__play:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 4px;
}
.mz-video-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.mz-video-modal[hidden] {
	display: none;
}
.mz-video-modal.is-open {
	opacity: 1;
}
.mz-video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 12, 12, 0.78);
	cursor: pointer;
}
.mz-video-modal__dialog {
	position: relative;
	width: min(960px, 100%, (100vh - 120px) * 16 / 9);
	transform: scale(0.96);
	transition: transform 0.2s ease;
}
.mz-video-modal.is-open .mz-video-modal__dialog {
	transform: none;
}
.mz-video-modal__frame {
	aspect-ratio: 1280 / 720;
	border-radius: 24px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.mz-video-modal__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}
.mz-video-modal__close {
	position: absolute;
	top: -52px;
	left: 0;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #0c0c0c;
	cursor: pointer;
}
.mz-video-modal__close:hover {
	background: #fc6432;
	color: #fff;
}
.mz-video-modal__close:focus-visible {
	outline: 3px solid #fc6432;
	outline-offset: 3px;
}
html.mz-scroll-lock,
html.mz-scroll-lock body {
	overflow: hidden;
}
@media (max-width: 575.98px) {
	.mz-video-modal {
		padding: 12px;
	}
	.mz-video-modal__frame {
		border-radius: 16px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mz-video-modal,
	.mz-video-modal__dialog {
		transition: none;
		transform: none;
	}
}

/* ==========================================================
   Home courses slider (templates/home/courses.php,
   assets/javascript/home-courses-slider.js): latest courses,
   autoplay + infinite loop. 2 cards per view pulled up over the
   panel, plain chevron arrows on both sides (no dots / pause).
============================================================ */
.home-courses-slider {
	--hcs-per-view: 2;
	--hcs-gap: 1.75rem;
	--hcs-arrow: 40px;
	position: relative;
	max-width: min(560px + 2 * var(--hcs-arrow), 100%);
	margin-inline-start: auto;
	margin-top: -7.5rem;
	margin-bottom: 0.25rem;
	padding-inline: var(--hcs-arrow);
}
.home-courses-slider__viewport {
	/* Room for the card shadow; the side padding plus the shadow blur stay
	   below the gap, so neither the next card nor its shadow peeks in. */
	padding: 1.25rem 0.85rem 1.5rem;
	margin: -1.25rem -0.85rem -1.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	touch-action: pan-y;
}
.home-courses-slider__viewport::-webkit-scrollbar {
	display: none;
}
.home-courses-slider.is-ready .home-courses-slider__viewport {
	overflow: hidden;
}
.home-courses-slider__track {
	display: flex;
	gap: var(--hcs-gap);
	will-change: transform;
}
.home-courses-slider.is-animating .home-courses-slider__track {
	transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.home-courses-slider__slide {
	flex: 0 0 calc((100% - (var(--hcs-per-view) - 1) * var(--hcs-gap)) / var(--hcs-per-view));
	min-width: 0;
	/* Lets the meta row switch to a stacked layout by the card's own width. */
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
}
.home-courses-slider.is-dragging .home-courses-slider__slide {
	user-select: none;
}
.home-courses-slider__slide .home-course-card__media {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	padding: 0.5rem 0.5rem 0;
	background: linear-gradient(180deg, #fcd3bf 0%, #fde9de 55%, #fff 100%);
}
.home-courses-slider__slide .home-course-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
}
.home-course-card__img--empty {
	display: block;
	width: 100%;
	height: 100%;
}
.home-courses-slider__slide .home-course-card__title {
	/* Full title, no line clamp; cards in a row stay equal height (flex stretch)
	   and the meta row is pushed to the bottom with margin-top: auto. */
	overflow-wrap: anywhere;
	padding: 0.85rem 1rem 0.6rem;
	font-size: 1rem;
	line-height: 1.6;
	text-align: start;
}
.home-courses-slider__slide .home-course-card__meta {
	margin-top: auto;
	justify-content: flex-start;
	gap: 0.3rem 0.4rem;
	padding: 0 0.9rem 1rem;
	color: #7a7a7a;
	font-size: 0.7rem;
}
.home-courses-slider__slide .home-course-card__meta-item {
	white-space: nowrap;
}
.home-courses-slider__slide .home-course-card__meta-item svg {
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
}
/* The "·" separator becomes a small brand-coloured dot. */
.home-courses-slider__slide .home-course-card__meta-dot {
	display: inline-block;
	flex: 0 0 auto;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--brand-color);
	opacity: 0.55;
	font-size: 0;
	line-height: 0;
	overflow: hidden;
}
.home-course-card:has(:focus-visible) .home-course-card__media::after,
.home-course-card:has(:focus-visible) .home-course-card__cta {
	opacity: 1;
}
/* Card too narrow for the three meta items on one line (e.g. 992–1199px,
   tablets, phones): stack them, without separators, so nothing wraps mid-row. */
@container (max-width: 259.98px) {
	.home-courses-slider__slide .home-course-card__meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
	}
	.home-courses-slider__slide .home-course-card__meta-dot {
		display: none;
	}
}

/* Arrows: plain chevrons centred on the cards, outside them on both sides
   (RTL: previous on the right in grey, next on the left in brand colour). */
.home-courses-slider__controls[hidden] {
	display: none;
}
.home-courses-slider__controls:not([hidden]) {
	display: contents;
}
.home-courses-slider__btn {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--hcs-arrow);
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: #9e9e9e;
	transform: translateY(-50%);
	transition: color var(--mz-transition);
}
.home-courses-slider__btn--prev {
	inset-inline-start: 0;
}
.home-courses-slider__btn--next {
	inset-inline-end: 0;
	color: var(--brand-color);
}
@media (hover: hover) {
	.home-courses-slider__btn:hover {
		color: var(--brand-color);
	}
	.home-courses-slider__btn--next:hover {
		color: #d94f20;
	}
}
.home-courses-slider__btn:focus-visible {
	outline: 2px solid var(--mz-card-ring);
	outline-offset: 0;
}

@media (max-width: 991px) {
	.home-courses-slider {
		margin-top: 0;
		max-width: min(440px + 2 * var(--hcs-arrow), 100%);
		margin-right: auto;
		margin-left: auto;
	}
}
@media (max-width: 575.98px) {
	.home-courses-slider {
		--hcs-gap: 0.75rem;
		--hcs-arrow: 24px;
	}
	.home-courses-slider__btn svg {
		width: 20px;
		height: 20px;
	}
	.home-courses-slider__slide .home-course-card__title {
		padding: 0.7rem 0.75rem 0.5rem;
		font-size: 0.875rem;
	}
	.home-courses-slider__viewport {
		padding-inline: 0.7rem;
		margin-inline: -0.7rem;
	}
	/* Narrow cards: stack the meta items, no separators. */
	.home-courses-slider__slide .home-course-card__meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
		padding: 0 0.75rem 0.85rem;
		font-size: 0.6875rem;
	}
	.home-courses-slider__slide .home-course-card__meta-dot {
		display: none;
	}
}
@media (min-width: 992px) and (max-width: 1199px) {
	.home-courses-slider {
		margin-top: -6rem;
	}
}
@media (prefers-reduced-motion: reduce) {
	.home-courses-slider.is-animating .home-courses-slider__track,
	.home-courses-slider__btn {
		transition: none;
	}
}
