/* =========================================================
   KAUST Academy — Programs area (Design A "Pathways")
   Ported from design-a-pathways/styles.css ("Program Finder page" and
   "Program detail page") and styles-programs.css (pg-*), with logical
   properties for Arabic. Loaded on the Programs page, the level and
   area-of-interest archives and program pages (see functions.php).
   ========================================================= */

/* The page's own blocks sit flush; spacing comes from the rules below. */
:where(.ka-finder-page, .ka-program, .p-layout, .p-main, .p-aside) > * { margin-block-start: 0; }

/* =========================================================
   Page head (Programs page and archives)
   ========================================================= */
.page-head { background: var(--navy); color: #fff; isolation: isolate; overflow: hidden; position: relative; }
.page-head::after {
	background: url(../images/beacon.png) no-repeat center / contain;
	block-size: 460px;
	content: "";
	inline-size: 300px;
	inset-block-start: -30px;
	inset-inline-end: 4%;
	opacity: .08;
	position: absolute;
	z-index: -1;
}
.page-head .container { padding-block: 34px 44px; }
.breadcrumb ol { color: rgba(255, 255, 255, .72); display: flex; flex-wrap: wrap; font-size: 14px; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; opacity: .5; }
.breadcrumb a { color: #fff; font-weight: 600; }
.page-head h1 { color: #fff; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); letter-spacing: -.025em; margin-block-start: 18px; }
.page-head .lede { color: rgba(255, 255, 255, .84); font-size: 17.5px; margin-block-start: 12px; max-inline-size: 660px; }
.finder-search {
	align-items: center;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 36px rgba(0, 10, 25, .3);
	color: var(--muted);
	display: flex;
	gap: 10px;
	margin-block-start: 28px;
	max-inline-size: 760px;
	padding-block: 6px;
	padding-inline: 18px 6px;
}
.finder-search:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.finder-search input { block-size: 50px; border: 0; color: var(--ink); flex: 1; font-size: 16.5px; min-inline-size: 0; }
.finder-search input:focus { outline: none; }
.finder-search input::placeholder { color: #7A8798; }
.quick-stage { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 18px; }
.qs-btn {
	align-items: center;
	background: rgba(255, 255, 255, .06);
	block-size: 38px;
	border: 1px solid rgba(255, 255, 255, .32);
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 14.5px;
	font-weight: 700;
	gap: 8px;
	padding: 0 16px;
}
.qs-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; }
.qs-btn[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--navy); }
.qs-btn .n { background: rgba(255, 255, 255, .16); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 1px 7px; }
.qs-btn[aria-pressed="true"] .n { background: var(--blue-50); }
.page-head :focus-visible { outline-color: var(--yellow); }

/* =========================================================
   Finder: filters + results
   ========================================================= */
.finder { align-items: start; display: grid; gap: 44px; grid-template-columns: 276px minmax(0, 1fr); padding-block: 40px 96px; }
.filters { inset-block-start: calc(var(--masthead-h) + 24px); max-block-size: calc(100vh - var(--masthead-h) - 40px); overflow: auto; overscroll-behavior: contain; padding-inline-end: 6px; position: sticky; scrollbar-width: thin; }
.admin-bar .filters { inset-block-start: calc(var(--masthead-h) + 24px + var(--wp-admin--admin-bar--height, 32px)); }
.filters-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; padding-block-end: 14px; }
.filters-head h2 { align-items: center; display: flex; font-size: 18px; gap: 8px; }
.filters-head h2 .ic { color: var(--blue); }
.filters-head .link-btn[aria-disabled="true"] { color: var(--muted); opacity: .6; pointer-events: none; text-decoration: none; }
.filters .drawer-close { display: none; }
.fgroup { border: 0; border-block-start: 1px solid var(--line); margin: 0; min-inline-size: 0; padding: 18px 0 12px; }
.fgroup legend { color: var(--ink); float: left; font-size: 15px; font-weight: 800; margin-block-end: 8px; padding: 0; width: 100%; }
.fgroup legend + * { clear: both; }
.check { align-items: center; color: var(--text); cursor: pointer; display: flex; font-size: 15px; gap: 11px; line-height: 1.35; padding: 6px 0; }
.check input { accent-color: var(--navy); block-size: 18px; cursor: pointer; flex: none; inline-size: 18px; margin: 0; }
.check .count { background: var(--surface); border-radius: 999px; color: var(--muted); font-size: 12.5px; font-weight: 800; margin-inline-start: auto; min-inline-size: 26px; padding: 1px 8px; text-align: center; }
.check.is-zero { color: #8A97A8; }
.check.is-zero .count { opacity: .7; }
.check:hover { color: var(--ink); }
.filters-foot { padding-block: 16px 4px; }
.js .filters-foot { display: none; }
.filters-scrim { background: rgba(0, 20, 40, .5); inset: 0; opacity: 0; position: fixed; transition: opacity .2s, visibility .2s; visibility: hidden; z-index: 84; }

.results-bar { align-items: center; border-block-end: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; padding-block-end: 16px; }
.results-count { color: var(--muted); font-size: 16px; }
.results-count strong { color: var(--ink); font-weight: 900; }
.results-tools { align-items: center; display: flex; gap: 12px; margin-inline-start: auto; }
.results-tools label { align-items: center; color: var(--muted); display: flex; font-size: 14px; font-weight: 700; gap: 8px; }
.select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff var(--chev) no-repeat right 10px center / 16px;
	block-size: 40px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-size: 14.5px;
	font-weight: 700;
	padding-block: 0;
	padding-inline: 12px 36px;
}
[dir="rtl"] .select { background-position: left 10px center; }
.view-toggle { border: 1px solid var(--line); border-radius: var(--radius-sm); display: inline-flex; overflow: hidden; }
.view-toggle button { background: #fff; block-size: 38px; border: 0; color: var(--muted); display: grid; inline-size: 42px; padding: 0; place-items: center; }
.view-toggle button + button { border-inline-start: 1px solid var(--line); }
.view-toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.view-toggle .ic { block-size: 18px; inline-size: 18px; }
.filter-toggle { display: none; }
.filter-toggle .badge { background: var(--orange); border-radius: 999px; color: var(--navy); font-size: 12px; font-weight: 900; padding: 1px 7px; }
.active-chips { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; padding-block-start: 16px; }
.active-chips:empty { display: none; }
.fchip {
	align-items: center;
	background: var(--blue-50);
	border: 1px solid #D6E3F2;
	border-radius: 999px;
	color: var(--navy);
	display: inline-flex;
	font-size: 13.5px;
	font-weight: 700;
	gap: 6px;
	padding-block: 6px;
	padding-inline: 12px 8px;
}
.fchip .ic { block-size: 15px; inline-size: 15px; }
.fchip:hover { background: var(--navy); border-color: var(--navy); color: #fff; text-decoration: none; }
.fchip .k { color: var(--muted); font-weight: 600; }
.fchip:hover .k { color: rgba(255, 255, 255, .7); }
.results-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block-start: 24px; }
.results-grid > [hidden] { display: none; }
.results-grid.is-list { gap: 16px; grid-template-columns: 1fr; }
.is-list .pcard { flex-direction: row; }
.is-list .pcard-media { aspect-ratio: auto; inline-size: 300px; min-block-size: 196px; }
.is-list .pcard-desc { -webkit-line-clamp: 2; }
.is-list .pcard-foot { margin-block-start: 14px; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius-lg); margin-block-start: 24px; padding: 64px 24px; text-align: center; }
.empty[hidden] { display: none; }
.empty .e-ic { background: var(--surface); block-size: 60px; border-radius: 50%; color: var(--muted); display: grid; inline-size: 60px; margin: 0 auto 16px; place-items: center; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); margin: 8px auto 20px; max-inline-size: 420px; }
@media (max-width: 1240px) { .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
	.finder { grid-template-columns: minmax(0, 1fr); padding-block-start: 24px; }
	/* Without JavaScript the filters stay on the page, above the results. */
	.filters { max-block-size: none; position: static; }
	.js .filters {
		background: #fff;
		block-size: 100dvh;
		box-shadow: var(--shadow-lg);
		display: flex;
		flex-direction: column;
		inline-size: min(380px, 92vw);
		inset-block: 0;
		inset-inline-start: 0;
		max-block-size: none;
		padding: 0 20px;
		position: fixed;
		transform: translateX(-100%);
		transition: transform .28s ease, visibility .28s;
		visibility: hidden;
		z-index: 85;
	}
	[dir="rtl"].js .filters, .js [dir="rtl"] .filters { transform: translateX(100%); }
	.js.filters-open .filters, .filters-open .filters { transform: none; visibility: visible; }
	.filters-open .filters-scrim { opacity: 1; visibility: visible; }
	.js .filters-head { background: #fff; border-block-end: 1px solid var(--line); inset-block-start: 0; padding: 16px 0 14px; position: sticky; z-index: 1; }
	.js .filters .drawer-close { block-size: 40px; display: inline-grid; inline-size: 40px; }
	.filters-head .link-btn { margin-inline-start: auto; }
	.filters-body { flex: 1; }
	.js .fgroup:first-child { border-block-start: 0; }
	.js .filters-foot { background: #fff; border-block-start: 1px solid var(--line); display: block; inset-block-end: 0; padding: 14px 0 18px; position: sticky; }
	.js .filter-toggle { display: inline-flex; }
	.results-bar { gap: 12px; }
}
@media (max-width: 640px) {
	.results-grid { grid-template-columns: 1fr; }
	.results-tools { inline-size: 100%; justify-content: space-between; margin-inline-start: 0; }
	.results-count { inline-size: 100%; order: 3; }
	.is-list .pcard { flex-direction: column; }
	.is-list .pcard-media { aspect-ratio: 16 / 9; inline-size: 100%; min-block-size: 0; }
	.finder-search { padding-inline-start: 14px; }
	.finder-search .btn { padding: 0 16px; }
}

/* =========================================================
   Program page
   ========================================================= */
.p-hero { background: var(--navy); color: #fff; isolation: isolate; overflow: hidden; position: relative; }
.p-hero-art { inline-size: 58%; inset-block: 0; inset-inline-end: 0; position: absolute; z-index: -1; }
.p-hero-art img { block-size: 100%; inline-size: 100%; object-fit: cover; object-position: 30% 50%; }
[dir="rtl"] .p-hero-art img { object-position: 70% 50%; }
.p-hero-art::before { background: linear-gradient(90deg, var(--navy) 0%, rgba(0, 38, 76, .78) 30%, rgba(0, 38, 76, .1) 75%); content: ""; inset: 0; position: absolute; }
[dir="rtl"] .p-hero-art::before { background: linear-gradient(270deg, var(--navy) 0%, rgba(0, 38, 76, .78) 30%, rgba(0, 38, 76, .1) 75%); }
.p-hero .container { padding-block: 30px 128px; }
.p-hero.no-facts .container { padding-block-end: 64px; }
.p-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 30px; }
.p-hero-tags .tag { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.p-hero-tags a.tag:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.p-hero h1 { color: #fff; font-size: clamp(2.3rem, 1.4rem + 3vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.04; margin-block-start: 18px; max-inline-size: 680px; }
:lang(ar) .p-hero h1 { line-height: 1.3; }
.p-hero .lede { color: rgba(255, 255, 255, .86); font-size: 18px; margin-block-start: 18px; max-inline-size: 620px; }
.p-hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 30px; }
.p-hero :focus-visible { outline-color: var(--yellow); }
.share { align-items: center; color: rgba(255, 255, 255, .75); display: flex; font-size: 14px; font-weight: 700; gap: 8px; margin-inline-start: 10px; }
.share button, .share a {
	background: transparent;
	block-size: 40px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	color: #fff;
	display: grid;
	inline-size: 40px;
	padding: 0;
	place-items: center;
}
.share button[hidden] { display: none; }
.share button:hover, .share a:hover { background: #fff; color: var(--navy); }
.share button.is-copied { background: var(--teal); border-color: var(--teal); color: #fff; }
.share svg { block-size: 17px; inline-size: 17px; }

.facts {
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	display: grid;
	grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
	list-style: none;
	margin: -80px 0 0;
	padding: 0;
	position: relative;
	z-index: 2;
}
.fact { border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; padding: 22px; }
.fact:first-child { border-inline-start: 0; }
.fact .ic { block-size: 24px; color: var(--blue); inline-size: 24px; margin-block-end: 8px; }
.fact-k { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fact-v { color: var(--ink); font-size: 15.5px; font-weight: 800; line-height: 1.35; }
@media (max-width: 1100px) {
	.facts { grid-template-columns: repeat(min(var(--n, 6), 3), minmax(0, 1fr)); }
	.fact:nth-child(3n + 1) { border-inline-start: 0; }
	.fact:nth-child(n + 4) { border-block-start: 1px solid var(--line); }
}
@media (max-width: 560px) {
	.facts { grid-template-columns: 1fr 1fr; margin-block-start: -64px; }
	.fact { padding: 16px; }
	.fact:nth-child(n) { border-block-start: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
	.fact:nth-child(odd) { border-inline-start: 0; }
	.fact:nth-child(-n + 2) { border-block-start: 0; }
}

.tabs { background: rgba(255, 255, 255, .97); border-block-end: 1px solid var(--line); inset-block-start: var(--masthead-h); margin-block-start: 40px; position: sticky; z-index: 40; }
.admin-bar .tabs { inset-block-start: calc(var(--masthead-h) + var(--wp-admin--admin-bar--height, 32px)); }
@media (max-width: 600px) { .admin-bar .tabs { inset-block-start: var(--masthead-h); } }
.tabs ul { display: flex; gap: 6px; list-style: none; margin: 0; overflow-x: auto; padding: 0; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { border-block-end: 3px solid transparent; color: var(--muted); display: block; font-size: 15px; font-weight: 800; padding: 17px 14px 15px; white-space: nowrap; }
.tabs a:hover { color: var(--navy); text-decoration: none; }
.tabs a.active, .tabs a[aria-current] { border-color: var(--orange); color: var(--navy); }
.ka-program :where(h2, h3)[id], .ka-program [id].p-section, #overview, #stories { scroll-margin-block-start: calc(var(--masthead-h) + 72px); }

.p-layout { align-items: start; display: grid; gap: 64px; grid-template-columns: minmax(0, 1fr) 360px; padding-block: 52px 96px; }
.p-aside { align-self: stretch; } /* the full row's height, so the apply card can stick */
.p-section { border-block-end: 1px solid var(--line); margin-block-end: 56px; padding-block-end: 56px; }
.p-section:last-child { border-block-end: 0; margin-block-end: 0; padding-block-end: 0; }
.p-section > h2, .p-section-head h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); letter-spacing: -.02em; margin-block-end: 18px; }
.p-section > .eyebrow, .p-section-head .eyebrow { margin-block-end: 10px; }
.p-section > .lede { margin-block-end: 8px; }
.p-section-head { align-items: flex-end; display: flex; gap: 16px; justify-content: space-between; }
.p-main > .p-stories { border-block-start: 1px solid var(--line); border-block-end: 0; margin-block: 56px 0; padding-block: 56px 0; }

/* ---------- The program's own text (imported or written in the editor) ----------
   Main headings become sections with a rule above, like the design's
   .p-section; lists, tables, FAQs and quotes take the design's look. */
.p-content { color: var(--text); font-size: 17px; line-height: 1.75; }
.p-content > h2 {
	border-block-start: 1px solid var(--line);
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
	letter-spacing: -.02em;
	line-height: 1.2;
	margin-block-start: 56px;
	padding-block-start: 56px;
}
.p-content > h2:first-child { border: 0; margin-block-start: 0; padding-block-start: 0; }
.p-content > h3 { font-size: 19px; line-height: 1.3; margin-block-start: 32px; }
.p-content > h2 + *, .p-content > h3 + * { margin-block-start: 14px; }
.p-content :where(p, li) a:not(.wp-element-button) { text-decoration: underline; text-underline-offset: 3px; }
.p-content > .wp-block-list { padding-inline-start: 1.3em; }
.p-content > .wp-block-list li { padding-inline-start: .25em; }
.p-content > .wp-block-list li + li { margin-block-start: 6px; }
.p-content > ul.wp-block-list li::marker { color: var(--orange); }
.p-content > ol.wp-block-list li::marker { color: var(--navy); font-weight: 800; }
.p-content .wp-block-image img, .p-content .wp-block-video video { border-radius: var(--radius); }
/* Tall pictures (portraits) don't take over the page. */
.p-content > .wp-block-image { text-align: center; }
.p-content > .wp-block-image img { display: inline-block; max-block-size: 560px; object-fit: contain; width: auto; }
.p-content > h2 + .wp-block-details { margin-block-start: 22px; }

/* List block styles "Topics" and "Skills" (sections.css) inside program text. */
.p-content .wp-block-list.is-style-topics, .p-content .wp-block-list.is-style-skills { padding: 0; }
.p-content .wp-block-list.is-style-topics li { padding: 0; }

.p-content .wp-block-image.is-style-soft img { border-radius: var(--radius); }
.p-content .wp-block-video video { background: #000; inline-size: 100%; }
.p-content .wp-block-gallery img { border-radius: var(--radius-sm); }
.p-content .wp-block-buttons { margin-block-start: 20px; }

/* Cards (the old site's "Requirements / Announcement" boxes) as highlights. */
.p-content .ka-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.p-content .ka-cards .is-style-card,
.p-content .wp-block-group.is-style-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; font-size: 15px; line-height: 1.6; padding: 20px; }
.p-content .is-style-card h3 { font-size: 16.5px; line-height: 1.3; margin-block: 10px 6px; }
.p-content .is-style-card .ka-card-icon img { block-size: 32px; inline-size: auto; }
.p-content .is-style-card :where(ol, ul) { margin-block: 8px 0; padding-inline-start: 1.2em; }

/* Tables: the design's agenda table. */
.p-content .wp-block-table, .agenda-wrap { overflow-x: auto; }
.p-content .wp-block-table table, .agenda {
	border: 1px solid var(--line);
	border-collapse: separate;
	border-radius: var(--radius);
	border-spacing: 0;
	font-size: 14.5px;
	overflow: hidden;
	width: 100%;
}
.p-content .wp-block-table :where(th, td), .agenda :where(th, td) { border: 0; border-block-end: 1px solid var(--line); padding: 13px 16px; text-align: start; vertical-align: top; }
.p-content .wp-block-table thead :where(th, td), .agenda thead th { background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.p-content .wp-block-table tbody td:first-child, .agenda tbody th { color: var(--navy); font-weight: 900; white-space: nowrap; }
.p-content .wp-block-table tr:last-child :where(th, td), .agenda tr:last-child :where(th, td) { border-block-end: 0; }
.p-content .wp-block-table td { color: var(--ink); font-weight: 600; }

/* FAQs: Details blocks. */
.p-content .wp-block-details { border: 0; border-block-end: 1px solid var(--line); margin: 0; padding: 0; }
.p-content :not(.wp-block-details) + .wp-block-details, .p-content > .wp-block-details:first-child { border-block-start: 1px solid var(--line); }
.p-content .wp-block-details summary {
	align-items: center;
	color: var(--ink);
	cursor: pointer;
	display: flex;
	font-family: inherit;
	font-size: 17px;
	font-weight: 800;
	gap: 16px;
	justify-content: space-between;
	line-height: 1.4;
	list-style: none;
	padding: 20px 0;
	padding-inline-end: 0;
}
.p-content .wp-block-details summary::-webkit-details-marker { display: none; }
.p-content .wp-block-details summary:hover { color: var(--blue); }
.p-content .wp-block-details summary::after {
	background: var(--chev) no-repeat center / 16px;
	block-size: 32px;
	border: 1px solid var(--line);
	border-radius: 50%;
	content: "";
	flex: none;
	inline-size: 32px;
	inset: auto;
	position: static;
	transition: transform .2s, background-color .2s;
	translate: none;
}
.p-content .wp-block-details[open] summary::after { background-color: var(--blue-50); border-color: var(--navy); transform: rotate(180deg); }
.p-content .wp-block-details > :not(summary) { color: var(--text); font-size: 15.5px; line-height: 1.7; margin-block: 0 22px; padding-inline-end: 48px; }

/* Quotes: the design's navy quote block. */
.p-content .wp-block-quote, .quote-block {
	background: var(--navy);
	border: 0;
	border-radius: var(--radius-lg);
	color: #fff;
	isolation: isolate;
	margin-inline: 0;
	overflow: hidden;
	padding: 40px 44px;
	position: relative;
}
.p-content .wp-block-quote::before {
	background: var(--orange);
	block-size: 40px;
	content: "";
	display: block;
	inline-size: 40px;
	margin-block-end: 18px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%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'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.p-content .wp-block-quote::after, .quote-block::after { background: url(../images/beacon.png) no-repeat center / contain; block-size: 380px; content: ""; inline-size: 260px; inset-block-end: -80px; inset-inline-end: -40px; opacity: .08; position: absolute; z-index: -1; }
.p-content .wp-block-quote p { color: #fff; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); font-weight: 600; line-height: 1.55; }
.p-content .wp-block-quote cite { color: rgba(255, 255, 255, .75); display: block; font-size: 14.5px; font-style: normal; margin-block-start: 22px; }
.p-content .wp-block-quote cite strong, .p-content .wp-block-quote cite b { color: #fff; display: block; font-weight: 800; }
@media (max-width: 760px) { .p-content .wp-block-quote, .quote-block { padding: 30px 24px; } }
/* A quote with the speaker's portrait: the same navy card, on the wrapper. */
.p-content .quote-person { background: var(--navy); border-radius: var(--radius-lg); color: #fff; isolation: isolate; margin-block: 28px; overflow: hidden; padding: 40px 44px; position: relative; }
.p-content .quote-person > .wp-block-quote::before { grid-column: 1 / -1; order: 0; }
.p-content .quote-person .wp-block-quote cite { margin-block-start: 0; }
.p-content .quote-person .quote-person__photo img { border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
@media (max-width: 760px) { .p-content .quote-person { padding: 30px 24px; } }

/* ---------- Sections editors add from the "Program:" patterns ---------- */
.highlights { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-start: 28px; }
.hl { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hl:nth-child(3n + 1) { --c: #11589E; --bg: #E6EEF8; }
.hl:nth-child(3n + 2) { --c: #05696C; --bg: #E3F5F5; }
.hl:nth-child(3n + 3) { --c: #8A4B00; --bg: #FEF5EA; }
.hl .hl-ic { background: var(--bg); block-size: 42px; border-radius: 10px; color: var(--c); display: grid; inline-size: 42px; margin-block-end: 14px; place-items: center; }
.hl h3 { font-size: 16.5px; line-height: 1.3; }
.hl p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-block-start: 6px; }
/* Four cards, two by two; a card's figure, a small label and a list of rows. */
.highlights.hl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hl .hl-n { color: var(--c); font-size: 30px; font-weight: 800; line-height: 1.1; margin-block: 4px 2px; }
.hl .hl-k { color: var(--c); font-size: 12px; font-weight: 800; letter-spacing: .06em; margin-block-start: 16px; text-transform: uppercase; }
.hl .hl-row { border-block-start: 1px solid var(--line-2); color: var(--text); font-size: 14px; margin-block-start: 0; padding-block: 8px; }
.hl .hl-k + .hl-row { border-block-start: 0; }
.prose p { color: var(--text); font-size: 17px; line-height: 1.75; }
.prose p + p { margin-block-start: 16px; }

.timeline { counter-reset: tl; margin-block-start: 28px; }
.tl-item { counter-increment: tl; display: grid; gap: 22px; grid-template-columns: 56px minmax(0, 1fr); padding-block-end: 22px; position: relative; }
.tl-item::before { background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 11px); content: ""; inline-size: 2px; inset-block: 60px 4px; inset-inline-start: 27px; position: absolute; }
.tl-item:last-child { padding-block-end: 0; }
.tl-item:last-child::before { display: none; }
.tl-item:nth-child(4n + 1) { --c: var(--orange); }
.tl-item:nth-child(4n + 2) { --c: var(--yellow); }
.tl-item:nth-child(4n + 3) { --c: var(--lime); }
.tl-item:nth-child(4n + 4) { --c: var(--teal); }
.tl-item::after {
	background: #fff;
	block-size: 56px;
	border: 3px solid var(--c);
	border-radius: 50%;
	box-shadow: 0 0 0 5px #fff;
	color: var(--navy);
	content: counter(tl);
	display: grid;
	font-size: 20px;
	font-weight: 900;
	grid-column: 1;
	grid-row: 1;
	inline-size: 56px;
	place-items: center;
}
.tl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); grid-column: 2; grid-row: 1; padding: 22px 24px; }
.tl-card .stage-k { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tl-card h3 { font-size: 20px; margin-block-start: 4px; }
.tl-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px; }
.tl-card > p:not([class]) { color: var(--text); font-size: 15.5px; line-height: 1.65; }
.tl-card .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: 16px; padding-block-start: 14px; }
.callout { background: var(--blue-50); border-inline-start: 4px solid var(--blue); border-radius: var(--radius); color: var(--ink); font-size: 15px; line-height: 1.6; margin-block-start: 24px; padding: 18px 20px; }
/* The icon sits beside the text, which may hold links and bold words. */
.callout > p { padding-inline-start: 34px; position: relative; }
.callout > p > .ic:first-child { inset-block-start: 2px; inset-inline-start: 0; position: absolute; }
.callout .ic { color: var(--blue); margin-block-start: 2px; }
.callout.warm { background: var(--orange-50); border-color: var(--orange); }
.callout.warm .ic { color: var(--orange-ink); }

.topics { display: grid; gap: 12px 32px; grid-template-columns: 1fr 1fr; list-style: none; margin-block-start: 8px; padding: 0; }
.topics li { color: var(--ink); display: flex; font-size: 15.5px; font-weight: 700; gap: 12px; line-height: 1.45; }
.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;
}
.sub-h { font-size: 17px; margin-block: 32px 14px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); font-size: 14px; font-weight: 700; padding: 8px 14px; }

.req-list > .req { align-items: start; border-block-end: 1px solid var(--line-2); display: grid; gap: 16px; grid-template-columns: 44px minmax(0, 1fr); padding: 18px 0; }
.req-list > .req:first-child { padding-block-start: 4px; }
.req-ic { background: var(--teal-50); block-size: 44px; border-radius: 10px; color: var(--teal-700); display: grid; inline-size: 44px; place-items: center; }
.req p strong { color: var(--ink); display: block; font-size: 16px; font-weight: 800; }
.req p { color: var(--muted); font-size: 15px; }

.steps-list { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block-start: 8px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; padding-inline-start: 76px; position: relative; }
.step::before {
	background: var(--navy);
	block-size: 38px;
	border-radius: 50%;
	color: #fff;
	content: counter(s);
	counter-increment: s;
	display: grid;
	font-size: 16px;
	font-weight: 900;
	inline-size: 38px;
	inset-block-start: 22px;
	inset-inline-start: 22px;
	place-items: center;
	position: absolute;
}
.step h3 { font-size: 16.5px; }
.step p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-block-start: 6px; }

.pg-stats { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block-start: 28px; overflow: hidden; }
.pg-stat { border-inline-start: 1px solid var(--line); padding: 20px 20px 18px; }
.pg-stat:first-child { border-inline-start: 0; }
.pg-stat::before { background: var(--c, var(--orange)); block-size: 3px; border-radius: 2px; content: ""; display: block; inline-size: 22px; margin-block-end: 14px; }
.pg-stat .pg-stat-n { color: var(--navy); font-size: 32px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.pg-stat .pg-stat-k { color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.45; margin-block-start: 8px; }

/* Curriculum (ka_psec_curriculum): credit hours, then a card per term with
   its courses as rows (code, name, type badge); the summer term spans both columns. */
.pg-stats.cur-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-start: 22px; }
.cur-terms { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block-start: 16px; }
.cur-term { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 8px; }
.cur-term:has(.is-summer) { background: var(--teal-50); border-color: transparent; grid-column: 1 / -1; }
.cur-term .cur-term-k { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.cur-term h3 { font-size: 19px; margin-block: 4px 0; }
.cur-term .cur-term-meta { color: var(--muted); font-size: 14px; font-weight: 600; margin-block: 2px 0; }
.cur-courses { border-block-start: 1px solid var(--line); margin-block-start: 12px; }
.cur-term:has(.is-summer) .cur-courses { border-color: rgba(0, 0, 0, .08); }
/* Code | name (wraps) | badge; rows without a code: name | badge. */
.cur-courses > .cur-course { align-items: baseline; border-block-end: 1px solid var(--line-2); color: var(--ink); column-gap: 10px; display: grid; font-size: 15px; font-weight: 600; grid-template-columns: minmax(0, 1fr) auto; line-height: 1.4; margin: 0; padding-block: 10px; }
.cur-courses > .cur-course.has-code { grid-template-columns: auto minmax(0, 1fr) auto; }
.cur-courses > .cur-course:last-child { border-block-end: 0; }
.cur-course code { background: var(--surface); border-radius: 6px; color: var(--navy); direction: ltr; font-family: inherit; font-size: 12.5px; font-weight: 800; padding: 2px 7px; unicode-bidi: isolate; white-space: nowrap; }
.cur-course em { background: var(--blue-50); border-radius: 999px; color: var(--navy); font-size: 12px; font-style: normal; font-weight: 800; padding: 2px 10px; white-space: nowrap; }
.cur-course.is-elective em { background: var(--surface); color: var(--muted); }
.cur-course.is-capstone em { background: var(--orange-50); color: var(--orange-ink); }
.cur-course.is-summer em { background: #fff; color: var(--teal-700); }
.p-section .cur-terms + .sub-h { margin-block-start: 40px; }
.p-section > .callout { margin-block-start: 24px; }

/* Films in a program's text (ka_psec_media): the column is narrow, so the
   list goes under the player as one row that scrolls sideways. */
.p-media { margin-block-start: 22px; }
.p-media .md-films { grid-template-columns: minmax(0, 1fr); }
.p-media .md-films-aside { contain: none; }
.p-media .md-films-aside .md-playlist { grid-auto-columns: minmax(200px, 40%); grid-auto-flow: column; grid-template-columns: none; overflow: auto hidden; padding: 0 0 10px; scroll-snap-type: x mandatory; }
.p-media .md-playlist > li { scroll-snap-align: start; }
.p-media .md-film { align-content: start; block-size: 100%; grid-template-columns: minmax(0, 1fr); }
.p-media .p-media-caption { color: var(--muted); font-size: 14px; margin-block-start: 12px; }
.p-section .p-media a.md-film, .p-section .p-media a.md-film:hover { text-decoration: none; }

@media (max-width: 760px) {
	.highlights, .highlights.hl-2, .topics, .steps-list, .cur-terms { grid-template-columns: 1fr; }
	.pg-stats.cur-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pg-stats.cur-stats .pg-stat { border-block-start: 0; border-inline-start: 1px solid var(--line); padding: 16px 12px 14px; }
	.pg-stats.cur-stats .pg-stat:first-child { border-inline-start: 0; }
	.cur-stats .pg-stat-n { font-size: 26px; }
	.pg-stats { grid-template-columns: 1fr 1fr; }
	.pg-stat:nth-child(3) { border-inline-start: 0; }
	.pg-stat:nth-child(n + 3) { border-block-start: 1px solid var(--line); }
}
@media (max-width: 640px) {
	.tl-item { gap: 14px; grid-template-columns: 40px minmax(0, 1fr); }
	.tl-item::after { block-size: 40px; border-width: 2px; font-size: 16px; inline-size: 40px; }
	.tl-item::before { inset-block-start: 46px; inset-inline-start: 19px; }
	.tl-card { padding: 18px; }
	.hl { column-gap: 14px; display: grid; grid-template-columns: 42px minmax(0, 1fr); padding: 16px; }
	.hl .hl-ic { grid-row: span 2; margin: 0; }
	.hl > :not(.hl-ic) { grid-column: 2; }
	.hl p { margin-block-start: 2px; }
	.p-content .wp-block-details > :not(summary) { padding-inline-end: 0; }
}

/* ---------- Learner stories on a program page ---------- */
.mini-stories.carousel { gap: 16px; grid-auto-columns: calc((100% - 2 * 16px) / 3); margin-block-start: 24px; }
.mini-story { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px; }
.mini-story blockquote { margin: 0; }
.mini-story p { color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.mini-who { align-items: center; border-block-start: 1px solid var(--line-2); display: flex; gap: 12px; margin-block-start: auto; padding-block-start: 14px; }
.mini-who img { block-size: 44px; border-radius: 50%; flex: none; inline-size: 44px; object-fit: cover; object-position: 50% 25%; }
.mini-who strong { color: var(--ink); display: block; font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.mini-who span span { color: var(--muted); font-size: 13px; }
.avatar { background: var(--orange); block-size: 52px; border-radius: 50%; color: var(--navy); display: grid; flex: none; font-size: 17px; font-weight: 900; inline-size: 52px; place-items: center; }
.avatar-sm { block-size: 44px; font-size: 14px; inline-size: 44px; }
@media (max-width: 1100px) { .mini-stories.carousel { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 560px) { .mini-stories.carousel { grid-auto-columns: 86%; } }

/* ---------- Apply card ---------- */
.apply-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); inset-block-start: calc(var(--masthead-h) + 76px); overflow: hidden; position: sticky; }
.admin-bar .apply-card { inset-block-start: calc(var(--masthead-h) + 76px + var(--wp-admin--admin-bar--height, 32px)); }
.apply-head { background: linear-gradient(180deg, var(--surface), #fff); border-block-end: 1px solid var(--line); padding: 22px 24px 20px; }
.apply-head .k { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; margin-block-start: 16px; text-transform: uppercase; }
.deadline { color: var(--ink); font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.deadline.deadline-sm { font-size: 20px; }
.days-left { align-items: center; color: var(--orange-ink); display: flex; font-size: 14px; font-weight: 800; gap: 8px; margin-block-start: 12px; }
.days-left .ic { block-size: 16px; inline-size: 16px; }
.apply-body { padding: 20px 24px 24px; }
.apply-body h3 { color: var(--muted); font-size: 13px; letter-spacing: .08em; margin-block-end: 6px; text-transform: uppercase; }
.keydates { list-style: none; margin: 0; padding: 0; }
.keydates li { border-block-end: 1px dashed var(--line); display: flex; font-size: 14.5px; gap: 12px; justify-content: space-between; padding: 10px 0; }
.keydates li:last-child { border-block-end: 0; }
.keydates span { color: var(--muted); }
.keydates strong { color: var(--ink); font-weight: 800; text-align: end; }
.apply-actions { display: grid; gap: 10px; margin-block-start: 18px; }
.apply-body > .apply-actions:first-child { margin-block-start: 0; }
.apply-help { align-items: center; background: var(--surface); border-block-start: 1px solid var(--line); color: var(--muted); display: flex; font-size: 14px; gap: 12px; padding: 16px 24px; }
.apply-help .ic { color: var(--blue); }
.apply-help a { font-weight: 800; }
.apply-card > .apply-help:first-child { border: 0; }

.related { background: var(--surface); }
.related-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mobile-apply { display: none; }
@media (max-width: 1024px) {
	.p-layout { gap: 40px; grid-template-columns: minmax(0, 1fr); }
	.apply-card { position: static; }
	.mobile-apply {
		align-items: center;
		background: #fff;
		border-block-start: 1px solid var(--line);
		box-shadow: 0 -8px 24px rgba(0, 38, 76, .1);
		display: flex;
		gap: 12px;
		inset-block-end: 0;
		inset-inline: 0;
		justify-content: space-between;
		padding: 12px var(--gutter);
		position: fixed;
		z-index: 70;
	}
	.mobile-apply .ma-k { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
	.mobile-apply .ma-v { color: var(--ink); font-size: 16px; font-weight: 900; line-height: 1.2; }
	.has-apply-bar .site-footer { padding-block-end: 76px; }
	.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.related-grid > :nth-child(3) { display: none; }
}
@media (max-width: 760px) {
	.p-hero-art { inline-size: 100%; opacity: .5; }
	.p-hero-art::before, [dir="rtl"] .p-hero-art::before { background: linear-gradient(180deg, rgba(0, 38, 76, .7), var(--navy) 85%); }
	.share { inline-size: 100%; margin-inline-start: 0; }
}
@media (max-width: 640px) {
	.related-grid { grid-template-columns: minmax(0, 1fr); }
	.related-grid > :nth-child(3) { display: flex; }
	.p-hero .container { padding-block-end: 104px; }
	.p-hero.no-facts .container { padding-block-end: 48px; }
	.p-hero-actions .btn { flex: 1 1 100%; }
	.p-content { font-size: 16px; }
}
:lang(ar) :is(.fact-k, .stage-k, .apply-head .k, .apply-body h3, .mobile-apply .ma-k) { font-size: 13px; letter-spacing: 0; }
