/**
 * “Hero Section” block — Figma 348:405 (1440 × 731 px).
 * Desktop design tokens:
 * - padding: 50 px on all sides (Spacing/sp-50)
 * - gap between navbar and heading: 160 px (Spacing/sp-160)
 * - gap between menu items: 12 px (Spacing/sp-12)
 * - gap between heading columns: 40 px
 * - right column laid out with space-between (no gap)
 * - overlay: linear-gradient bottom 0 % → 61.89 % rgba(0,0,0,0.3)
 * - Colors/Blue-500 #244fd8 (bullets), Colors/Blue-600 #1e40af (CTA)
 * - text: Colors/White-500 #ffffff
 */
.wp-block-acf-hero {
	display: block;
	width: 100%;
	max-width: none;
	padding-block: 50px;

	--eduplat-hero-accent: var(--ed-color-accent, #244fd8);
	--eduplat-hero-bg: #1a1f2e;
	--eduplat-hero-pad: 50px;
	--eduplat-hero-gap-y: 160px;
	--eduplat-hero-content-max: 1340px;
	--eduplat-hero-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 61.89%);
}

.eduplat-hero {
	box-sizing: border-box;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--eduplat-hero-gap-y);
	width: 100%;
	min-height: max(560px, 50.76vw);
	padding: var(--eduplat-hero-pad);
	margin: 0;
	overflow: hidden;
	color: #ffffff;
	background: var(--eduplat-hero-bg);
	font-family: var(--ed-font-sans, "Figtree", system-ui, sans-serif);
}

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

/* Force white typography in the section so theme rules (h1/p/a) cannot override.
   The CTA uses the same token and stays visually consistent. */
.eduplat-hero,
.eduplat-hero h1,
.eduplat-hero h2,
.eduplat-hero h3,
.eduplat-hero h4,
.eduplat-hero h5,
.eduplat-hero h6,
.eduplat-hero p,
.eduplat-hero li,
.eduplat-hero span,
.eduplat-hero a,
.eduplat-hero a:hover,
.eduplat-hero a:focus,
.eduplat-hero a:visited,
.eduplat-hero button {
	color: #ffffff;
}

/* Background + darkening gradient */
.eduplat-hero__bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.eduplat-hero__bg-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.eduplat-hero__bg-overlay {
	position: absolute;
	inset: 0;
	background: var(--eduplat-hero-overlay);
}

/* Foreground content — width matches the layout content area.
   For viewport ≤ 1440 it fills the space between 50 px padding (= 1340 px,
   per Figma). On wider screens it stays 1340 px wide and centered so the hero
   does not stretch endlessly. */
.eduplat-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: var(--eduplat-hero-gap-y);
	flex: 1;
	width: 100%;
	max-width: var(--eduplat-hero-content-max, 1340px);
	margin-inline: auto;
	padding-block: 50px;
}

/* Navbar */
.eduplat-hero__navbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	color: #ffffff;
	white-space: nowrap;
}

.eduplat-hero__logo {
	margin: 0;
	line-height: 0;
}

a.eduplat-hero__logo {
	display: inline-flex;
	text-decoration: none;
}

a.eduplat-hero__logo:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 4px;
	border-radius: 4px;
}

.eduplat-hero__logo-img {
	display: block;
	height: 32px;
	width: auto;
}

.eduplat-hero__nav {
	display: flex;
}

/* Hamburger: mobile only */
.eduplat-hero__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.eduplat-hero__toggle:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
	border-radius: 4px;
}

.eduplat-hero__toggle-icon {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	justify-content: space-between;
	width: 24px;
	height: 16px;
}

.eduplat-hero__toggle-icon > span {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
	transform-origin: center;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.eduplat-hero__menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 12px;
	text-align: right;
}

.eduplat-hero__menu-item {
	font-size: 18px;
	line-height: 27px;
	font-weight: 400;
	color: inherit;
}

.eduplat-hero__menu-link {
	color: inherit;
	text-decoration: none;
}

.eduplat-hero__menu-item.is-active .eduplat-hero__menu-link,
.eduplat-hero__menu-link:hover,
.eduplat-hero__menu-link:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

/* Two-column heading at the bottom of the section */
.eduplat-hero__heading {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	width: 100%;
	margin-top: auto;
	align-items: stretch;
}

.eduplat-hero__title {
	margin: 0;
	min-width: 0;
	font-weight: 600;
	font-size: clamp(40px, 4.45vw, 64px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: #ffffff;
}

/* Right heading column: subtitle / CTA / features via space-between;
   no intrinsic gap — spacing comes from the column height
   (matches left title height with align-items: stretch). */
.eduplat-hero__aside {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.eduplat-hero__subtitle {
	margin: 0;
	font-size: 22px;
	line-height: 1.1;
	font-weight: 400;
	color: #ffffff;
}

/* CTA — same look as .eduplat-events__cta. Covers both render paths:
   <a href> when ACF has a URL and <button> when URL is empty and opens Community modal. */
.eduplat-hero__cta {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 56px;
	padding: 16.5px 30px;
	background: var(--ed-color-cta);
	color: var(--ed-color-inverse);
	border: 0;
	border-radius: 999px;
	text-decoration: none;
	font-family: inherit;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.eduplat-hero__cta:hover,
.eduplat-hero__cta:focus-visible {
	background: var(--ed-color-cta-hover);
	color: var(--ed-color-inverse);
	text-decoration: none;
	outline: none;
}

.eduplat-hero__cta:focus-visible {
	box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.35);
}

.eduplat-hero__cta-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Features */
.eduplat-hero__features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.eduplat-hero__feature {
	display: inline-flex;
	align-items: flex-end;
	gap: 4px;
	white-space: nowrap;
}

.eduplat-hero__feature-bullet {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-bottom: 4px;
	background: var(--eduplat-hero-accent);
	flex-shrink: 0;
}

.eduplat-hero__feature-text {
	font-size: 18px;
	line-height: 27px;
	font-weight: 600;
	color: #ffffff;
}

/* Title animation: each word enters from its corner/edge.
   blocks/hero/hero.js wraps words in spans and toggles is-pending → is-animated with:
     --word-tx / --word-ty   — start offset (vw / vh, from that corner);
     --word-rot               — start rotation (deg);
     --word-delay             — stagger per word.
   .eduplat-hero has overflow: hidden so off-canvas words clip cleanly without horizontal page scroll. */
.eduplat-hero__word {
	display: inline-block;
	white-space: nowrap;
	transform-origin: 50% 50%;
	will-change: transform, opacity, filter;
}

.eduplat-hero__title.is-pending .eduplat-hero__word {
	opacity: 0;
	transform:
		translate3d(var(--word-tx, 0), var(--word-ty, 0), 0)
		rotate(var(--word-rot, 0deg))
		scale(0.6);
	filter: blur(10px);
}

.eduplat-hero__title.is-animated .eduplat-hero__word {
	opacity: 1;
	transform: translate3d(0, 0, 0) rotate(0) scale(1);
	filter: blur(0);
	transition:
		transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--word-delay, 0ms),
		opacity   900ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--word-delay, 0ms),
		filter    700ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--word-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
	.eduplat-hero__title.is-pending .eduplat-hero__word,
	.eduplat-hero__title.is-animated .eduplat-hero__word {
		opacity: 1;
		transform: none;
		filter: none;
		transition: none;
	}
}

/* Responsive */
@media (max-width: 1100px) {
	.wp-block-acf-hero {
		--eduplat-hero-pad: 32px;
		--eduplat-hero-gap-y: 80px;
	}

	.eduplat-hero {
		min-height: auto;
	}

	.eduplat-hero__heading {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.eduplat-hero__menu {
		gap: 8px;
	}

	.eduplat-hero__feature {
		white-space: normal;
	}
}

/* Mobile menu: hamburger + full-screen overlay — Figma 348:666–348:667 */
@media (max-width: 600px) {
	.wp-block-acf-hero {
		padding-block: 0;
		--eduplat-hero-pad: 16px;
		/* Between navbar and hero content per layout spacing/sp-182 */
		--eduplat-hero-gap-y: 182px;
	}

	.eduplat-hero {
		padding: 24px var(--eduplat-hero-pad) 40px;
		gap: var(--eduplat-hero-gap-y);
		/* Layout: lighter gradient than desktop */
		--eduplat-hero-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 63.37%);
	}

	.eduplat-hero__inner {
		padding-block: 24px 32px;
		padding-inline: 16px;
	}

	.eduplat-hero__navbar {
		align-items: center;
		gap: 16px;
		white-space: normal;
		margin-bottom: 182px;
	}

	.eduplat-hero__cta {
		margin-bottom: 24px;
	}

	.eduplat-hero__logo-img {
		height: 28px;
		max-width: 302px;
		width: auto;
	}

	.eduplat-hero__toggle {
		display: inline-flex;
		position: relative;
		z-index: 30;
	}

	.eduplat-hero__nav {
		position: fixed;
		inset: 0;
		z-index: 20;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: stretch;
		padding: 88px 24px 40px;
		background: rgba(26, 31, 46, 0.96);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-12px);
		transition:
			opacity 0.25s ease,
			transform 0.25s ease,
			visibility 0s linear 0.25s;
	}

	.eduplat-hero.is-menu-open .eduplat-hero__nav {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		transition:
			opacity 0.25s ease,
			transform 0.25s ease,
			visibility 0s linear 0s;
	}

	.eduplat-hero__menu {
		align-items: flex-end;
		text-align: right;
		gap: 20px;
	}

	.eduplat-hero__menu-item {
		font-size: 22px;
		line-height: 1.3;
		font-weight: 500;
	}

	/* Hamburger → close (X) */
	.eduplat-hero.is-menu-open .eduplat-hero__toggle-icon > span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.eduplat-hero.is-menu-open .eduplat-hero__toggle-icon > span:nth-child(2) {
		opacity: 0;
	}

	.eduplat-hero.is-menu-open .eduplat-hero__toggle-icon > span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.eduplat-hero__title {
		font-size: 40px;
		line-height: 1.2;
		letter-spacing: -0.025em;
	}

	.eduplat-hero__subtitle {
		font-size: 20px;
		margin-bottom: 24px;
	}

	.eduplat-hero__features {
		gap: 8px;
	}

	.eduplat-hero__feature-text {
		font-size: 16px;
		line-height: 1.3;
	}
}

/* Lock page scroll while the menu is open */
body.eduplat-hero-menu-open {
	overflow: hidden;
}
