/* ==========================================================================
   Homepage (front-page.php). Everything is scoped under .pm-hm.
   ========================================================================== */

/* Let the homepage run edge-to-edge inside Astra's container. */
.pm-home .site-content > .ast-container { max-width: none; padding: 0; display: block; }
.pm-home #primary, .pm-home .site-content { margin: 0; padding: 0; }

.pm-hm { color: var(--pm-text); font-family: var(--pm-font); font-size: 17px; line-height: 1.75; overflow-x: clip; }
.pm-hm h1, .pm-hm h2, .pm-hm h3 { color: var(--pm-text); margin: 0; }
.pm-hm p { margin: 0; }
.pm-hm a { text-decoration: none; }

/* ---------- hero ---------- */
.pm-hero {
	position: relative;
	min-height: clamp(640px, 100svh, 980px);
	display: flex;
	align-items: center;
	padding-block: calc(var(--pm-nav-h) + 40px) 80px;
	overflow: hidden;
	isolation: isolate;
}
.pm-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pm-hero-bg::before {
	content: "";
	position: absolute;
	inset: -20%;
	background:
		radial-gradient(40% 45% at 22% 45%, rgba(233, 140, 0, .22), transparent 70%),
		radial-gradient(30% 35% at 10% 80%, rgba(255, 61, 79, .16), transparent 70%),
		radial-gradient(35% 40% at 85% 20%, rgba(237, 177, 24, .08), transparent 70%);
	animation: pm-drift 18s ease-in-out infinite alternate;
	will-change: transform;
}
.pm-hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(var(--pm-line) 1px, transparent 1px), linear-gradient(90deg, var(--pm-line) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
	mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
	opacity: .55;
}
@keyframes pm-drift { to { transform: translate3d(3%, -2%, 0) scale(1.06); } }
.pm-streaks { position: absolute; inset: 0; overflow: hidden; transform: rotate(-8deg) scale(1.2); }
.pm-streaks i {
	position: absolute;
	height: 2px;
	border-radius: 2px;
	opacity: 0;
	background: linear-gradient(90deg, transparent, var(--c, #e98c00), transparent);
	animation: pm-streak var(--t, 3.2s) linear infinite;
	animation-delay: var(--dl, 0s);
	will-change: transform, opacity;
}
@keyframes pm-streak { 0% { transform: translateX(70vw); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateX(-120vw); opacity: 0; } }
.pm-paused .pm-streaks i, .pm-paused .pm-hero-bg::before, .pm-paused .pm-gauge-wrap::before, .pm-paused .pm-chip { animation-play-state: paused; }

.pm-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.pm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px 8px 8px;
	border-radius: 999px;
	border: 1px solid rgba(237, 177, 24, .28);
	background: rgba(237, 177, 24, .06);
	font-size: 14px;
	font-weight: 700;
	color: #f6d47a;
}
.pm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pm-gold); animation: pm-ping 2s infinite; }
@keyframes pm-ping { 0% { box-shadow: 0 0 0 0 rgba(237, 177, 24, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(237, 177, 24, 0); } }
.pm-hm .pm-h1 { font-size: clamp(44px, 7.2vw, 96px); line-height: 1.08; font-weight: 900; margin: 22px 0 18px; letter-spacing: -.01em; }
.pm-shine { background-size: 200% 100%; animation: pm-shine 6s ease-in-out infinite; }
@keyframes pm-shine { 50% { background-position: 100% 0; } }
.pm-split-word { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(3deg); filter: blur(6px); animation: pm-word .9s var(--pm-ease) forwards; animation-delay: var(--d); }
@keyframes pm-word { to { opacity: 1; transform: none; filter: none; } }
.pm-lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--pm-muted); max-width: 34em; margin: 0 0 14px !important; }
.pm-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; padding: 0; list-style: none; }
.pm-tools li { font: 700 15px var(--pm-font-num); letter-spacing: .06em; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--pm-line-2); color: #e7e3da; background: rgba(255, 255, 255, .03); margin: 0; }
.pm-cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* gauge */
.pm-gauge-wrap { position: relative; aspect-ratio: 1; width: min(520px, 100%); margin-inline: auto; }
.pm-gauge-wrap::before {
	content: "";
	position: absolute;
	inset: 6%;
	border-radius: 50%;
	background: conic-gradient(from 0deg, transparent 0 55%, rgba(233, 140, 0, .55) 70%, rgba(255, 61, 79, .7) 78%, transparent 86%);
	filter: blur(22px);
	animation: pm-spin 7s linear infinite;
	opacity: .65;
	will-change: transform;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-gauge { position: relative; width: 100%; height: 100%; display: block; }
.pm-g-face { fill: url(#pmFace); stroke: rgba(255, 255, 255, .07); stroke-width: 1.5; }
.pm-g-glow { opacity: .28; filter: blur(6px); }
.pm-gauge .tick { stroke: #57544f; stroke-width: 2; }
.pm-gauge .tick.major { stroke: #d9d4ca; stroke-width: 3.5; }
.pm-gauge .tick.red { stroke: var(--pm-flame); }
.pm-gauge .lbl { fill: #bdb8ae; font: 700 20px var(--pm-font-num); text-anchor: middle; dominant-baseline: middle; }
.pm-gauge .lbl.red { fill: var(--pm-flame); }
.pm-g-needle { transform-origin: 200px 200px; transform: rotate(-135deg); will-change: transform; }
.pm-g-readout { font: 700 38px var(--pm-font-num); fill: #fff; text-anchor: middle; letter-spacing: .04em; }
.pm-g-unit { font: 600 13px var(--pm-font-num); fill: var(--pm-dim); text-anchor: middle; letter-spacing: .3em; }
.pm-chip {
	position: absolute;
	padding: 8px 14px;
	border-radius: 12px;
	font: 700 14px var(--pm-font-num);
	letter-spacing: .05em;
	color: var(--pm-text);
	background: rgba(17, 17, 23, .85);
	border: 1px solid var(--pm-line-2);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
	animation: pm-float 6s ease-in-out infinite;
	white-space: nowrap;
	direction: ltr;
}
.pm-chip b { color: var(--pm-gold); }
.pm-c1 { top: 8%; inset-inline-start: -2%; }
.pm-c2 { top: 44%; inset-inline-end: -6%; animation-delay: -2s; }
.pm-c3 { bottom: 6%; inset-inline-start: 8%; animation-delay: -4s; }
@keyframes pm-float { 50% { transform: translateY(-12px); } }

.pm-scroll-hint { position: absolute; bottom: 26px; inset-inline: 0; margin-inline: auto; width: 26px; height: 42px; border: 2px solid var(--pm-line-2); border-radius: 14px; }
.pm-scroll-hint::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--pm-gold); animation: pm-wheel 1.8s infinite; }
@keyframes pm-wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- stats ---------- */
.pm-stats { position: relative; margin-top: -30px; z-index: 2; }
.pm-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), var(--pm-bg); overflow: hidden; }
.pm-stat { padding: 28px 24px; text-align: center; position: relative; }
.pm-stat + .pm-stat::before { content: ""; position: absolute; inset-block: 22%; inset-inline-start: 0; width: 1px; background: var(--pm-line); }
.pm-stat .pm-num { display: block; font: 700 clamp(34px, 4vw, 50px)/1 var(--pm-font-num); background: var(--pm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pm-stat span:last-child { display: block; margin-top: 10px; color: var(--pm-muted); font-size: 15px; font-weight: 600; }

/* ---------- marquee ---------- */
.pm-marquee { margin-top: 96px; border-block: 1px solid var(--pm-line); background: var(--pm-bg-2); overflow: hidden; padding-block: 20px; direction: ltr; }
.pm-marquee-track { display: flex; gap: 56px; width: max-content; animation: pm-marquee 38s linear infinite; will-change: transform; }
.pm-marquee:hover .pm-marquee-track { animation-play-state: paused; }
.pm-marquee-item { display: flex; align-items: center; gap: 18px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; white-space: nowrap; color: #e9e5dc; direction: rtl; }
.pm-marquee-item em { font: normal 600 .7em var(--pm-font-num); color: var(--pm-dim); letter-spacing: .08em; }
.pm-sep { width: 10px; height: 10px; transform: rotate(45deg); background: var(--pm-grad); flex: none; }
@keyframes pm-marquee { to { transform: translateX(-50%); } }
[dir="ltr"] .pm-marquee-item { direction: ltr; }
/* English headlines are wider than Arabic ones: slightly tighter sizes. */
[dir="ltr"] .pm-hm .pm-h1 { font-size: clamp(40px, 6.2vw, 84px); letter-spacing: -.02em; }
[dir="ltr"] .pm-hm .pm-h2 { letter-spacing: -.01em; }
[dir="ltr"] .pm-eyebrow { padding: 8px 8px 8px 16px; padding-inline: 8px 16px; }

/* ---------- sections ---------- */
.pm-section { position: relative; padding-block: 120px; }
.pm-pt0 { padding-top: 0; }
.pm-kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; letter-spacing: .06em; color: var(--pm-gold); }
.pm-kicker::before { content: ""; width: 28px; height: 2px; background: var(--pm-grad); border-radius: 2px; }
.pm-hm .pm-h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.2; font-weight: 900; margin: 14px 0 16px; }
.pm-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.pm-section-head p { max-width: 30em; color: var(--pm-muted); }
.pm-center { justify-content: center; text-align: center; }

/* ---------- course cards ---------- */
.pm-courses-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.pm-courses-extra { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 28px; }
.pm-course {
	position: relative;
	border-radius: calc(var(--pm-radius) + 4px);
	background: var(--pm-card);
	border: 1px solid var(--pm-line);
	overflow: hidden;
	transition: transform .5s var(--pm-ease), border-color .4s, box-shadow .5s var(--pm-ease), opacity .9s var(--pm-ease);
	--mx: 50%;
	--my: 50%;
}
.pm-course::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(500px circle at var(--mx) var(--my), rgba(237, 177, 24, .12), transparent 45%); opacity: 0; transition: opacity .4s; }
.pm-course:hover { border-color: rgba(237, 177, 24, .38); box-shadow: 0 30px 70px -25px rgba(233, 140, 0, .35); }
.pm-course:hover::after { opacity: 1; }
.pm-course-media { position: relative; display: block; aspect-ratio: 1600 / 873; overflow: hidden; background: #000; }
.pm-course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--pm-ease); }
.pm-course:hover .pm-course-media img { transform: scale(1.06); }
.pm-badge { position: absolute; top: 16px; inset-inline-start: 16px; padding: 6px 12px; border-radius: 999px; font: 800 13px var(--pm-font); background: var(--pm-grad); color: #120a00; box-shadow: 0 6px 20px rgba(233, 140, 0, .45); }
.pm-badge-free { background: var(--pm-green); color: #002614; box-shadow: 0 6px 20px rgba(30, 209, 138, .35); }
.pm-course-body { padding: 26px 28px 28px; }
.pm-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--pm-muted); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.pm-meta span { display: inline-flex; align-items: center; gap: 7px; }
.pm-meta svg { width: 16px; height: 16px; color: var(--pm-gold); }
.pm-hm .pm-course h3 { font-size: clamp(21px, 2vw, 26px); line-height: 1.35; margin: 0 0 10px; font-weight: 800; }
.pm-theme .pm-hm .pm-course h3 a { color: var(--pm-text); }
.pm-theme .pm-hm .pm-course h3 a:hover { color: var(--pm-gold); }
.pm-course p { margin: 0 0 22px; color: var(--pm-muted); font-size: 15.5px; }
.pm-course-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--pm-line); }
.pm-price { display: flex; align-items: baseline; gap: 10px; }
.pm-now { font: 700 34px/1 var(--pm-font-num); color: #fff; }
.pm-was { font: 600 18px/1 var(--pm-font-num); color: var(--pm-dim); text-decoration-color: var(--pm-flame); }
.pm-free { font: 900 26px/1 var(--pm-font); color: var(--pm-green); }
.pm-course-row { display: grid; grid-template-columns: minmax(0, 260px) 1fr; align-items: stretch; }
.pm-course-row .pm-course-media { aspect-ratio: auto; height: 100%; min-height: 260px; }
.pm-course-row .pm-course-media img { object-position: 0% 50%; }
.pm-course-row .pm-course-body { display: flex; flex-direction: column; justify-content: center; }
.pm-all-courses { display: flex; justify-content: center; margin-top: 48px; }

/* ---------- learn ---------- */
.pm-learn { background: radial-gradient(60% 80% at 50% 0%, rgba(233, 140, 0, .09), transparent 70%), var(--pm-bg-2); border-block: 1px solid var(--pm-line); }
.pm-learn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pm-outcome { padding: 34px 26px; border-radius: var(--pm-radius); background: linear-gradient(180deg, var(--pm-card-2), var(--pm-card)); border: 1px solid var(--pm-line); text-align: center; transition: transform .45s var(--pm-ease), border-color .4s, opacity .9s var(--pm-ease); }
.pm-outcome:hover { transform: translateY(-8px); border-color: rgba(233, 140, 0, .45); }
.pm-ring { width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--pm-orange); color: var(--pm-orange); box-shadow: 0 0 0 6px rgba(233, 140, 0, .07), 0 0 34px rgba(233, 140, 0, .35), inset 0 0 22px rgba(233, 140, 0, .25); transition: box-shadow .45s, transform .6s var(--pm-ease); }
.pm-outcome:hover .pm-ring { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 0 10px rgba(233, 140, 0, .09), 0 0 54px rgba(233, 140, 0, .6), inset 0 0 26px rgba(233, 140, 0, .35); }
.pm-ring svg { width: 44px; height: 44px; }
.pm-hm .pm-outcome h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.pm-outcome small { display: block; font: 600 14px var(--pm-font-num); letter-spacing: .05em; color: var(--pm-dim); }

/* ---------- why ---------- */
.pm-why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.pm-why-visual { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--pm-line); aspect-ratio: 1; background: #000; }
.pm-why-visual img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); will-change: transform; }
.pm-why-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 7, 10, .9) 0%, transparent 55%); }
.pm-why-quote { position: absolute; z-index: 1; inset-inline: 28px; bottom: 28px; font-size: 20px; font-weight: 800; line-height: 1.6; color: var(--pm-text); }
.pm-why-quote span { color: var(--pm-gold); }
.pm-features { display: grid; gap: 18px; }
.pm-feature { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 24px; border-radius: var(--pm-radius); border: 1px solid var(--pm-line); background: rgba(255, 255, 255, .02); transition: background .4s, border-color .4s, transform .45s var(--pm-ease), opacity .9s var(--pm-ease); }
.pm-feature:hover { background: rgba(237, 177, 24, .05); border-color: rgba(237, 177, 24, .3); }
.pm-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(255, 61, 79, .18), rgba(237, 177, 24, .18)); border: 1px solid rgba(237, 177, 24, .25); color: var(--pm-gold); }
.pm-ic svg { width: 26px; height: 26px; }
.pm-hm .pm-feature h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.pm-feature p { color: var(--pm-muted); font-size: 15.5px; }

/* ---------- steps ---------- */
.pm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.pm-steps::before { content: ""; position: absolute; top: 34px; inset-inline: 12%; height: 2px; background: linear-gradient(90deg, transparent, var(--pm-line-2) 15%, var(--pm-line-2) 85%, transparent); }
.pm-step { position: relative; text-align: center; padding: 0 10px; }
.pm-n { position: relative; width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; font: 700 26px var(--pm-font-num); background: var(--pm-bg); border: 2px solid var(--pm-line-2); color: var(--pm-text); transition: border-color .6s, box-shadow .6s, color .6s; transition-delay: calc(var(--d, 0s) + .3s); }
.pm-step.is-in .pm-n { border-color: var(--pm-orange); color: var(--pm-gold); box-shadow: 0 0 30px rgba(233, 140, 0, .35); }
.pm-hm .pm-step h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.pm-step p { color: var(--pm-muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.pm-cta-band { position: relative; margin-block: 40px 120px; border-radius: 32px; overflow: hidden; padding: clamp(40px, 6vw, 80px); background: #0f0b06; border: 1px solid rgba(237, 177, 24, .25); isolation: isolate; }
.pm-cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 100% 0%, rgba(255, 61, 79, .35), transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(237, 177, 24, .3), transparent 60%); }
.pm-cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 18px); }
.pm-hm .pm-cta-band .pm-h2 { max-width: 18em; margin-top: 0; }
.pm-cta-band p { color: #d6cfc2; max-width: 34em; margin: 0 0 30px; font-size: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
	.pm-hero-grid { grid-template-columns: 1fr; text-align: center; }
	.pm-hero-copy { display: flex; flex-direction: column; align-items: center; }
	.pm-lead { margin-inline: auto !important; }
	.pm-tools, .pm-cta-row { justify-content: center; }
	.pm-gauge-wrap { width: min(420px, 88%); }
	.pm-learn-grid { grid-template-columns: repeat(2, 1fr); }
	.pm-why-grid { grid-template-columns: 1fr; gap: 48px; }
	.pm-why-visual { aspect-ratio: 16 / 10; }
	.pm-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
	.pm-steps::before { display: none; }
	.pm-courses-extra { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.pm-courses-grid { grid-template-columns: 1fr; }
	.pm-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.pm-stat:nth-child(3)::before { display: none; }
	.pm-section { padding-block: 88px; }
}
@media (max-width: 560px) {
	.pm-course-row { grid-template-columns: 1fr; }
	.pm-course-row .pm-course-media { min-height: 0; aspect-ratio: 16 / 10; }
	.pm-learn-grid, .pm-steps { grid-template-columns: 1fr; }
	.pm-c2 { inset-inline-end: 0; }
	.pm-course-body { padding: 22px; }
	.pm-hero { padding-top: calc(var(--pm-nav-h) + 24px); }
}

/* Phones & touch screens: keep motion, drop the expensive effects. */
@media (max-width: 760px), (hover: none) {
	.pm-gauge-wrap::before { animation: none; filter: blur(16px); opacity: .5; }
	.pm-hero-bg::before { animation-duration: 30s; }
	.pm-g-glow { filter: none; opacity: .18; }
	.pm-course::after { display: none; }
	.pm-chip { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pm-split-word { opacity: 1; transform: none; filter: none; }
	.pm-streaks { display: none; }
}
