/* =========================================================
   KAUST Academy — page sections (Design A "Pathways")
   Ported from design-a-pathways/styles.css ("Sections" to "Help band").
   Sections are built from blocks by ka-core's inc/sections.php: Group
   blocks carry the design's class names, so the rules below match the
   prototype; where the prototype styled a bare element (span, p) the
   block version has a class instead (e.g. .persona-text, .stair-text).
   ========================================================= */

/* Design A sections (outer block class .ka-da) space their own content:
   switch off WordPress's automatic block gap inside them. This must come
   before the section rules below so their margins win. */
.ka-da > *,
.ka-da :where(.is-layout-flow, .is-layout-constrained) > * { margin-block-start: 0; }
.wp-block-post-content > .ka-da { margin-block: 0; }
.ka-da :where(ul, ol):not(.wp-block-list) { list-style: none; margin: 0; padding: 0; }
.ka-da .wp-block-image { margin: 0; }
.ka-da .wp-block-buttons { gap: 8px; }

/* Cards that are one big link: the heading's link covers the card. */
:where(.persona, .help-card) { position: relative; }
:where(.persona, .help-card) h3 a { color: inherit; }
:where(.persona, .help-card) h3 a::after { content: ""; inset: 0; position: absolute; z-index: 1; }
:where(.persona, .help-card) h3 a:hover { text-decoration: none; }
:where(.persona, .help-card) h3 a:focus-visible { outline: none; }
:where(.persona, .help-card):focus-within { border-radius: var(--radius); box-shadow: 0 0 0 3px var(--orange); }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section-alt { background: var(--surface); }
.section-head { align-items: flex-end; display: flex; gap: 32px; justify-content: space-between; margin-block-end: 44px; }
.section-head .lede { margin-block-start: 14px; max-inline-size: 640px; }
@media (max-width: 768px) {
	.section { padding-block: 64px; }
	.section-head { align-items: flex-start; flex-direction: column; gap: 18px; margin-block-end: 32px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #fff; isolation: isolate; overflow: hidden; position: relative; }
.hero > .hero-bg { inset: 0; margin: 0; position: absolute; z-index: -2; }
.hero-bg img { block-size: 100%; inline-size: 100%; object-fit: cover; object-position: 72% 38%; }
/* Silent loop over the photo; site.js starts it on large screens and fades it in. */
/* On large screens the loop replaces the photo from the start: its poster is
   the loop's first frame, so the page opens on the video. Phones and reduced
   motion keep the photo (site.js doesn't start the video for them). */
.hero > .hero-video { display: none; inset: 0; margin: 0; position: absolute; z-index: -2; }
.hero-video video { block-size: 100%; display: block; inline-size: 100%; object-fit: cover; }
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
	.hero > .hero-video { display: block; }
	.hero:has(> .hero-video) > .hero-bg,
	.hero:has(> .hero-video) .hero-caption { display: none; }
}
[dir="rtl"] .hero-bg img { object-position: 28% 38%; }
.hero::before {
	background:
		linear-gradient(90deg, rgba(0, 26, 54, .97) 0%, rgba(0, 38, 76, .92) 34%, rgba(0, 38, 76, .55) 60%, rgba(0, 38, 76, .18) 100%),
		linear-gradient(0deg, rgba(0, 26, 54, .6), rgba(0, 26, 54, 0) 45%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}
[dir="rtl"] .hero::before {
	background:
		linear-gradient(270deg, rgba(0, 26, 54, .97) 0%, rgba(0, 38, 76, .92) 34%, rgba(0, 38, 76, .55) 60%, rgba(0, 38, 76, .18) 100%),
		linear-gradient(0deg, rgba(0, 26, 54, .6), rgba(0, 26, 54, 0) 45%);
}
.hero-inner { padding-block: 52px 148px; }
.hero-copy { max-inline-size: 700px; }
.hero-kicker { color: var(--yellow); font-size: 13px; font-weight: 800; letter-spacing: .12em; margin-block-end: 18px; text-transform: uppercase; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 1.3rem + 2.6vw, 3.3rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.04; }
:lang(ar) .hero h1 { line-height: 1.3; }
.hero .lead { color: rgba(255, 255, 255, .88); font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); line-height: 1.55; margin-block-start: 16px; max-inline-size: 620px; }
.hero-search {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 48px rgba(0, 10, 25, .35);
	display: flex;
	gap: 6px;
	margin-block-start: 26px;
	max-inline-size: 640px;
	padding: 6px;
}
.hero-search:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.hero-search select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--surface) var(--chev) no-repeat right 12px center / 16px;
	border: 0;
	border-radius: 8px;
	color: var(--navy);
	font-size: 14.5px;
	font-weight: 800;
	padding-block: 0;
	padding-inline: 14px 38px;
}
[dir="rtl"] .hero-search select { background-position: left 12px center; }
.hero-search select:focus { box-shadow: inset 0 0 0 2px var(--navy); outline: none; }
.hero-search .field { align-items: center; color: var(--muted); display: flex; flex: 1; gap: 10px; min-inline-size: 0; padding-inline-start: 12px; }
.hero-search input { background: transparent; block-size: 50px; border: 0; color: var(--ink); flex: 1; font-size: 16.5px; min-inline-size: 0; }
.hero-search input::placeholder { color: #7A8798; }
.hero-search input:focus { outline: none; }
.hero-search .btn { block-size: 50px; padding: 0 24px; }
.hero-popular { align-items: center; display: flex; flex-wrap: wrap; font-size: 14px; gap: 8px; margin-block-start: 16px; }
.hero-popular-label { color: rgba(255, 255, 255, .72); font-weight: 700; margin-inline-end: 4px; }
.hero-popular .hero-chips { display: contents; }
.hero-chips .wp-block-button__link {
	backdrop-filter: blur(2px);
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .32);
	border-radius: 999px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	min-block-size: 0;
	padding: 6px 13px;
}
.hero-chips .wp-block-button__link:hover { background: #fff; color: var(--navy); }
.hero-caption {
	align-items: center;
	color: rgba(255, 255, 255, .7);
	display: flex;
	font-size: 12.5px;
	gap: 8px;
	inset-block-end: 132px;
	inset-inline-end: var(--gutter);
	position: absolute;
}
.hero-caption .ic { block-size: 14px; inline-size: 14px; }
@media (max-width: 1120px) { .hero-caption { display: none; } }
@media (max-width: 640px) {
	.hero-inner { padding-block: 36px 132px; }
	.hero-bg img, [dir="rtl"] .hero-bg img { object-position: 62% 50%; }
	.hero::before, [dir="rtl"] .hero::before { background: linear-gradient(180deg, rgba(0, 26, 54, .88), rgba(0, 38, 76, .92)); }
	.hero-search { flex-wrap: wrap; }
	.hero-search select { block-size: 44px; inline-size: 100%; }
	.hero-search .field { flex-basis: 100%; padding-inline-start: 10px; }
	.hero-search .btn { flex: 1; }
}

/* ---------- Persona panel ---------- */
.persona-section { position: relative; z-index: 2; }
/* The panel overlaps the hero's last 112px; the extra class outranks WordPress's
   "first child has no top margin" rule, which otherwise cancels the overlap. */
.persona-section .finder-panel { margin-block-start: -112px; }
.finder-panel {
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 28px 32px 30px;
	position: relative;
}
.finder-panel-head { align-items: center; border-block-end: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; margin-block-end: 22px; padding-block-end: 20px; }
.finder-panel-head h2 { font-size: 22px; letter-spacing: -.01em; }
.finder-panel-head p:not(.link-arrow) { color: var(--muted); font-size: 15px; margin-block-start: 2px; }
.persona-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.persona { border-inline-start: 1px solid var(--line); color: inherit; display: flex; flex-direction: column; gap: 6px; padding: 4px 28px; }
.persona:first-child { border-inline-start: 0; padding-inline-start: 0; }
.persona:last-child { padding-inline-end: 0; }
.persona-icon { background: var(--blue-50); block-size: 46px; border-radius: 10px; color: var(--blue); display: grid; inline-size: 46px; margin-block-end: 10px; place-items: center; transition: background .2s, color .2s; }
.persona-icon .ic { block-size: 24px; inline-size: 24px; }
.persona:hover .persona-icon { background: var(--navy); color: #fff; }
.persona .persona-k { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.persona h3 { font-size: 20px; }
.persona:hover h3 { color: var(--blue); }
.persona .persona-text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.persona .persona-link { align-items: center; color: var(--navy); display: inline-flex; font-size: 15px; font-weight: 800; gap: 6px; margin-block-start: auto; padding-block-start: 14px; }
.persona-link .ic { block-size: 18px; inline-size: 18px; transition: transform .2s; }
.persona:hover .persona-link .ic { transform: translateX(3px); }
[dir="rtl"] .persona:hover .persona-link .ic { transform: scaleX(-1) translateX(3px); }
@media (max-width: 1000px) {
	.persona-grid { gap: 28px 0; grid-template-columns: 1fr 1fr; }
	.persona { padding: 0 24px; }
	.persona:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
	.persona:nth-child(even) { padding-inline-end: 0; }
}
@media (max-width: 640px) {
	.persona-section .finder-panel { margin-block-start: -96px; }
	.finder-panel { padding: 22px 20px; }
	.finder-panel-head { align-items: flex-start; flex-direction: column; }
	.persona-grid { gap: 0; grid-template-columns: 1fr; }
	.persona, .persona:nth-child(even) { border-block-start: 1px solid var(--line-2); border-inline-start: 0; column-gap: 16px; display: grid; grid-template-columns: 46px 1fr; padding: 18px 0; row-gap: 2px; }
	.persona:first-child { border-block-start: 0; padding-block-start: 0; }
	.persona-icon { grid-row: span 4; margin: 0; }
	.persona .persona-link { padding-block-start: 6px; }
}

/* ---------- Areas of interest ---------- */
.field-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-tile {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: inherit;
	display: flex;
	gap: 16px;
	min-block-size: 96px;
	padding: 20px;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.field-tile:hover { border-color: var(--navy); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-2px); }
.field-icon { background: var(--bg); block-size: 54px; border-radius: 12px; color: var(--c); display: grid; flex: none; inline-size: 54px; place-items: center; }
.field-icon .ic { block-size: 27px; inline-size: 27px; }
.field-name { color: var(--ink); display: block; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.field-count { color: var(--muted); display: block; font-size: 14px; margin-block-start: 3px; }
.field-tile .go { block-size: 18px; color: var(--muted); inline-size: 18px; margin-inline-start: auto; transition: transform .2s, color .2s; }
.field-tile:hover .go { color: var(--navy); transform: translateX(3px); }
[dir="rtl"] .field-tile:hover .go { transform: scaleX(-1) translateX(3px); }
@media (max-width: 1100px) { .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .field-grid { gap: 10px; grid-template-columns: 1fr; } .field-tile { min-block-size: 0; padding: 16px; } }

/* ---------- Program cards ---------- */
.pcard {
	background: #fff;
	block-size: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	transition: box-shadow .22s, transform .22s, border-color .22s;
}
.pcard:hover { border-color: #CFD8E3; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pcard:focus-within { box-shadow: 0 0 0 3px var(--orange); }
.pcard-media { aspect-ratio: 16 / 9; background: var(--navy); flex: none; overflow: hidden; position: relative; }
.pcard-media img { block-size: 100%; inline-size: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-media .status { box-shadow: 0 2px 6px rgba(0, 0, 0, .12); inset-block-start: 12px; inset-inline-start: 12px; position: absolute; }
.pcard-cover {
	background: radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%), var(--c, var(--navy));
	block-size: 100%;
	display: grid;
	inline-size: 100%;
	overflow: hidden;
	place-items: center;
	position: relative;
}
.pcard-cover::after {
	background: url(../images/beacon.png) no-repeat center / contain;
	block-size: 160%;
	content: "";
	inline-size: 55%;
	inset-block-start: -20%;
	inset-inline-end: -10%;
	opacity: .2;
	position: absolute;
}
.pcard-cover .ic { block-size: 52px; color: #fff; inline-size: 52px; position: relative; z-index: 1; }
.pcard-main { display: flex; flex: 1; flex-direction: column; min-inline-size: 0; }
.pcard-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 0; }
.pcard-stage { color: var(--blue); font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pcard-title { font-size: 18px; letter-spacing: -.01em; line-height: 1.3; }
.pcard-title a { color: var(--ink); }
.pcard-title a::after { content: ""; inset: 0; position: absolute; z-index: 1; }
.pcard-title a:hover { text-decoration: none; }
.pcard-title a:focus-visible { outline: none; }
.pcard-desc { -webkit-box-orient: vertical; color: var(--muted); display: -webkit-box; font-size: 14.5px; -webkit-line-clamp: 3; line-height: 1.55; overflow: hidden; }
.pcard-meta { color: var(--text); display: flex; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; gap: 6px 16px; list-style: none; margin: 4px 0 0; padding: 0; }
.pcard-meta li { align-items: center; display: inline-flex; gap: 6px; }
.pcard-meta .ic { block-size: 16px; color: var(--muted); inline-size: 16px; }
.pcard-foot {
	align-items: center;
	border-block-start: 1px solid var(--line-2);
	display: flex;
	font-size: 13.5px;
	gap: 12px;
	justify-content: space-between;
	margin-block-start: 18px;
	padding: 14px 20px;
}
.pcard-date { align-items: center; color: var(--muted); display: inline-flex; gap: 7px; }
.pcard-date .ic { block-size: 16px; inline-size: 16px; }
.pcard-date strong { color: var(--ink); font-weight: 800; }
.pcard-cta { align-items: center; color: var(--navy); display: inline-flex; font-weight: 800; gap: 4px; margin-inline-start: auto; }
.pcard-cta .ic { block-size: 16px; inline-size: 16px; transition: transform .2s; }
.pcard:hover .pcard-cta .ic { transform: translateX(3px); }
[dir="rtl"] .pcard:hover .pcard-cta .ic { transform: scaleX(-1) translateX(3px); }

/* ---------- Carousel ---------- */
.carousel {
	display: grid;
	gap: 24px;
	grid-auto-columns: calc((100% - 3 * 24px) / 4);
	grid-auto-flow: column;
	margin: -6px -6px 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding: 6px 6px 28px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.carousel:focus-visible { border-radius: var(--radius); outline-offset: -2px; }
.carousel-nav { align-items: center; display: flex; gap: 8px; }
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrows .icon-btn:disabled { border-color: var(--line); cursor: default; opacity: .4; }
.carousel-progress { background: var(--line); block-size: 3px; border-radius: 3px; margin-block-start: 4px; overflow: hidden; }
.carousel-progress span { background: var(--navy); block-size: 100%; border-radius: 3px; display: block; inline-size: 25%; transition: transform .2s, width .2s; }
@media (max-width: 1100px) { .carousel { grid-auto-columns: calc((100% - 2 * 24px) / 3); } }
@media (max-width: 820px) { .carousel { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 560px) { .carousel { gap: 16px; grid-auto-columns: 86%; } }

/* ---------- Stackable pathway ---------- */
.pathway-top { align-items: end; display: grid; gap: 56px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.pathway-top .lede { margin-block-start: 16px; }
.pathway-aside { display: grid; gap: 12px; }
.pathway-point { align-items: flex-start; color: var(--text); display: flex; font-size: 15px; gap: 14px; }
.pathway-point .pp-ic { background: var(--blue-50); block-size: 38px; border-radius: 10px; color: var(--blue); display: grid; flex: none; inline-size: 38px; place-items: center; }
.pathway-point .pp-ic .ic { block-size: 20px; inline-size: 20px; }
.pathway-point strong { color: var(--ink); display: block; font-weight: 800; }
.stairs { counter-reset: stair; display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block-start: 56px; position: relative; }
.stair {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	counter-increment: stair;
	display: flex;
	flex-direction: column;
	padding: 26px 24px 22px;
	position: relative;
}
.stair::before { background: var(--c); block-size: 6px; border-radius: var(--radius) var(--radius) 0 0; content: ""; inset-block-start: -1px; inset-inline: -1px; position: absolute; }
.stair:nth-child(4n + 1) { --c: var(--orange); }
.stair:nth-child(4n + 2) { --c: var(--yellow); }
.stair:nth-child(4n + 3) { --c: var(--lime); }
.stair:nth-child(4n + 4) { --c: var(--teal); }
.stair:nth-child(1) { margin-block-start: 108px; }
.stair:nth-child(2) { margin-block-start: 72px; }
.stair:nth-child(3) { margin-block-start: 36px; }
.stair-n { align-items: center; color: var(--muted); display: flex; font-size: 12.5px; font-weight: 800; justify-content: space-between; letter-spacing: .08em; text-transform: uppercase; }
.stair-n::after { color: var(--line); content: counter(stair, decimal-leading-zero); font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.stair h3 { font-size: 19px; line-height: 1.25; margin-block-start: 6px; }
.stair-facts { color: var(--text); display: flex; flex-direction: column; font-size: 14px; font-weight: 700; gap: 6px; margin-block: 14px 12px; }
.stair-facts p { align-items: center; display: flex; gap: 8px; }
.stair-facts .ic { block-size: 16px; color: var(--muted); inline-size: 16px; }
.stair .stair-text { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.stair .stair-cert { align-items: center; border-block-start: 1px dashed var(--line); color: var(--teal-700); display: flex; font-size: 13.5px; font-weight: 800; gap: 8px; margin-block-start: auto; padding-block-start: 14px; }
.stair-cert .ic { block-size: 18px; inline-size: 18px; }
.stair .stair-text + .stair-cert { margin-block-start: 16px; }
.stairs-foot { align-items: center; background: var(--blue-50); border-radius: var(--radius); color: var(--navy); display: flex; font-size: 15px; font-weight: 700; gap: 14px; margin-block-start: 22px; padding: 16px 20px; }
.stairs-foot > .ka-icon-tile { color: var(--blue); display: inline-grid; }
.stairs-foot .link-arrow { margin-inline-start: auto; }
@media (max-width: 1000px) {
	.pathway-top { gap: 28px; grid-template-columns: 1fr; }
	.stairs { grid-template-columns: 1fr 1fr; }
	.stair:nth-child(n) { margin-block-start: 0; }
}
@media (max-width: 560px) {
	.stairs { gap: 14px; grid-template-columns: 1fr; margin-block-start: 36px; }
	.stairs-foot { align-items: flex-start; flex-direction: column; }
	.stairs-foot .link-arrow { margin-inline-start: 0; }
}

/* ---------- Impact band ---------- */
.impact { background: var(--navy); color: #fff; isolation: isolate; overflow: hidden; position: relative; }
.impact::after {
	background: url(../images/beacon.png) no-repeat center / contain;
	block-size: 680px;
	content: "";
	inline-size: 440px;
	inset-block-start: -60px;
	inset-inline-end: -40px;
	opacity: .07;
	pointer-events: none;
	position: absolute;
	z-index: -1;
}
.impact-grid { align-items: center; display: grid; gap: 72px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.impact h2 { color: #fff; }
.impact .lede { color: rgba(255, 255, 255, .8); margin-block-start: 16px; }
.impact .link-arrow { margin-block-start: 28px; }
.impact .link-arrow a, .impact a.link-arrow { color: #fff; }
.impact .link-arrow a:hover { color: var(--yellow); }
.impact :focus-visible { outline-color: var(--yellow); }
.stat-grid { column-gap: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.stat { border-block-start: 1px solid rgba(255, 255, 255, .16); padding: 26px 0; }
.stat::before { background: var(--c, var(--orange)); block-size: 4px; border-radius: 2px; content: ""; display: block; inline-size: 28px; margin-block-end: 18px; }
.stat:nth-child(4n + 2) { --c: var(--yellow); }
.stat:nth-child(4n + 3) { --c: var(--lime); }
.stat:nth-child(4n + 4) { --c: var(--teal); }
.stat-num { color: #fff; font-size: clamp(2.1rem, 1.5rem + 1.8vw, 3rem); font-variant-numeric: tabular-nums; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
[dir="rtl"] .stat-num { direction: ltr; text-align: end; unicode-bidi: isolate; }
.stat-label { color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.45; margin-block-start: 10px; }
.stat-sub { color: var(--yellow); font-size: 13px; font-weight: 800; margin-block-start: 6px; }
.impact-source { color: rgba(255, 255, 255, .6); font-size: 13px; margin-block-start: 18px; }
@media (max-width: 1000px) { .impact-grid { gap: 32px; grid-template-columns: 1fr; } }
@media (max-width: 640px) { .stat-grid { column-gap: 20px; grid-template-columns: 1fr 1fr; } .stat { padding: 20px 0; } }

/* ---------- Events ---------- */
.events-grid { align-items: start; display: grid; gap: 48px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.event { align-items: center; border-block-end: 1px solid var(--line); display: grid; gap: 22px; grid-template-columns: 76px minmax(0, 1fr) auto; padding: 20px 0; }
.event:first-child { border-block-start: 1px solid var(--line); }
.date-block { background: #fff; border: 1px solid var(--line); border-radius: 8px; inline-size: 76px; line-height: 1; overflow: hidden; text-align: center; }
.date-block .m { background: var(--navy); color: #fff; display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 6px 0 5px; text-transform: uppercase; }
.date-block .d { color: var(--ink); display: block; font-size: 28px; font-weight: 900; letter-spacing: -.02em; padding: 9px 0 4px; }
.date-block .y { color: var(--muted); display: block; font-size: 12px; font-weight: 700; padding-block-end: 8px; }
.date-block.is-deadline .m { background: var(--orange); color: var(--navy); }
.event-type { color: var(--blue); font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.event-type.is-due { color: var(--orange-ink); }
.event h3 { font-size: 17.5px; line-height: 1.35; margin-block: 4px 6px; }
.event-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 14px; gap: 4px 18px; }
.event-meta p { align-items: center; display: inline-flex; gap: 6px; }
.event-meta .ic { block-size: 15px; inline-size: 15px; }
.feature-event { background: var(--navy); border-radius: var(--radius-lg); color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.feature-event .fe-media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.feature-event .fe-media .wp-block-image { block-size: 100%; }
.feature-event .fe-media img { block-size: 100%; inline-size: 100%; object-fit: cover; }
/* The prototype's crop of the KMC photo (class on the Image block). */
.kmc-crop img { object-position: 40% 60%; object-view-box: inset(20% 44% 0% 0%); }
.feature-event .fe-date {
	background: var(--orange);
	border-radius: 8px;
	color: var(--navy);
	font-size: 14px;
	font-weight: 900;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	line-height: 1.2;
	padding: 8px 12px;
	position: absolute;
}
.feature-event .fe-body { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 30px; }
.feature-event .fe-body .eyebrow { margin: 0; }
.feature-event h3 { color: #fff; font-size: 22px; }
.feature-event p { color: rgba(255, 255, 255, .84); font-size: 15px; }
.fe-facts { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-block: 6px 8px; }
.fe-facts > div { border-block-start: 1px solid rgba(255, 255, 255, .18); padding-block-start: 10px; }
.fe-facts .fe-k { color: rgba(255, 255, 255, .65); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fe-facts .fe-v { color: #fff; font-size: 15px; font-weight: 800; margin-block-start: 2px; }
.feature-event .wp-block-buttons { margin-block-start: 4px; }
.feature-event :focus-visible { outline-color: var(--yellow); }
@media (max-width: 1000px) { .events-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
	.event { align-items: start; gap: 16px; grid-template-columns: 64px minmax(0, 1fr); }
	.event > .wp-block-buttons { grid-column: 2; justify-self: start; }
	.date-block { inline-size: 64px; }
	.date-block .d { font-size: 24px; }
}

/* ---------- Stories ---------- */
.story-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.story-media { aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; position: relative; }
.story-media img { block-size: 100%; inline-size: 100%; object-fit: cover; object-position: 50% 22%; }
.story-media .tag { background: #fff; color: var(--navy); inset-block-end: 14px; inset-inline-start: 14px; position: absolute; }
.story-body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 24px; }
.story .q-ic { block-size: 30px; color: var(--orange); inline-size: 30px; }
[dir="rtl"] .story .q-ic { transform: scaleX(-1); }
.story blockquote { color: var(--ink); font-size: 16px; line-height: 1.6; margin: 0; }
.story-who { border-block-start: 1px solid var(--line-2); margin-block-start: auto; padding-block-start: 16px; }
.story-name { color: var(--ink); display: block; font-weight: 800; }
.story-prog { color: var(--blue); font-size: 14px; font-weight: 700; }
@media (max-width: 1000px) { .story-grid { grid-template-columns: 1fr 1fr; } .story-grid > :nth-child(3) { display: none; } }
@media (max-width: 640px) {
	.story-grid { grid-auto-columns: 84%; grid-auto-flow: column; grid-template-columns: none; gap: 14px; margin-inline: calc(-1 * var(--gutter)); overflow-x: auto; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scroll-snap-type: x mandatory; scrollbar-width: none; }
	.story-grid::-webkit-scrollbar { display: none; }
	.story-grid > * { scroll-snap-align: start; }
	.story-grid > :nth-child(3) { display: flex; }
	.story-body { padding: 20px; }
	.story blockquote { font-size: 15px; }
}

/* ---------- Partners ---------- */
.partners { border-block-start: 1px solid var(--line); padding-block: 56px; }
.partner-row { align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(6, minmax(0, 1fr)); overflow: hidden; }
.partner-intro { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 22px 24px; }
.partner-intro-title { color: var(--ink); font-size: 17px; line-height: 1.3; }
.partner-intro-text { color: var(--muted); font-size: 13.5px; margin-block-start: 4px; }
.partner { border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; justify-content: center; padding: 22px 16px; text-align: center; }
.partner-pre { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.partner-name { color: var(--navy); font-size: 15.5px; font-weight: 900; letter-spacing: -.01em; line-height: 1.2; margin-block-start: -2px; }
.partner-role { color: var(--muted); font-size: 12.5px; }
.partner:has(.partner-logo) { align-items: center; background: #fff; padding: 18px 14px; }
.partner .partner-logo { align-items: center; block-size: 64px; display: flex; justify-content: center; margin: 0; }
.partner .partner-logo img { block-size: auto; inline-size: auto; max-block-size: 64px; max-inline-size: 100%; object-fit: contain; }
@media (max-width: 1100px) {
	.partner-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.partner-intro { grid-column: 1 / -1; }
	.partner { border-block-start: 1px solid var(--line); }
	.partner:nth-child(3n + 2) { border-inline-start: 0; }
}
@media (max-width: 560px) {
	.partner-row { grid-template-columns: 1fr 1fr; }
	.partner:nth-child(n) { border-inline-start: 1px solid var(--line); }
	.partner:nth-child(2n) { border-inline-start: 0; }
}

/* ---------- Help band ---------- */
.help { background: var(--orange-50); border-block-start: 1px solid #F6DDBF; }
.help.section { padding-block: 72px; }
.help-grid { align-items: stretch; display: grid; gap: 20px; grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); }
.help-intro { align-self: center; padding-inline-end: 16px; }
.help-intro h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.help-intro p { color: var(--text); margin-block-start: 10px; }
.help-card {
	background: #fff;
	border: 1px solid #F3DCC0;
	border-radius: var(--radius);
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
	transition: box-shadow .2s, transform .2s;
}
.help-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.help-card .hc-ic { background: var(--orange-50); block-size: 44px; border-radius: 10px; color: var(--orange-ink); display: grid; inline-size: 44px; margin-block-end: 6px; place-items: center; }
.help-card h3 { font-size: 18px; }
.help-card .help-text { color: var(--muted); font-size: 14.5px; }
.help-card .link-arrow { align-items: center; color: var(--navy); display: inline-flex; font-size: 15px; gap: 6px; margin-block-start: auto; padding-block-start: 8px; }
.help-card:hover .link-arrow .ic { transform: translateX(3px); }
[dir="rtl"] .help-card:hover .link-arrow .ic { transform: scaleX(-1) translateX(3px); }
@media (max-width: 1000px) { .help-grid { grid-template-columns: 1fr 1fr 1fr; } .help-intro { grid-column: 1 / -1; padding: 0; } }
@media (max-width: 640px) {
	.help-grid { gap: 12px; grid-template-columns: 1fr; }
	.help-card { column-gap: 14px; display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 18px; row-gap: 2px; }
	.help-card .hc-ic { grid-row: span 3; margin: 0; }
	.help-card .link-arrow { padding-block-start: 6px; }
}

/* ---------- List block styles: Topics (two columns with ticks), Skills (pills) ---------- */
.wp-block-list.is-style-topics { display: grid; gap: 12px 32px; grid-template-columns: 1fr 1fr; list-style: none; margin-block-start: 8px; padding: 0; }
.wp-block-list.is-style-topics li { color: var(--ink); display: flex; font-size: 15.5px; font-weight: 700; gap: 12px; line-height: 1.45; }
.wp-block-list.is-style-topics li + li { margin-block-start: 0; }
.wp-block-list.is-style-topics li::before {
	background: var(--teal-700);
	block-size: 20px;
	content: "";
	flex: none;
	inline-size: 20px;
	margin-block-start: 1px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.2 2.8 2.8L16.2 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.2 2.8 2.8L16.2 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-list.is-style-skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.wp-block-list.is-style-skills li { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); font-size: 14px; font-weight: 700; line-height: 1.4; margin: 0; padding: 8px 14px; }
@media (max-width: 760px) { .wp-block-list.is-style-topics { grid-template-columns: 1fr; } }
