/* P15 News single: resolved Hero controls and a restrained reading column. */
:root {
	--iwut-news-navy-1: #2a4789;
	--iwut-news-navy-2: #1e3672;
	--iwut-news-navy-3: #16295a;
	--iwut-news-navy-4: #101f45;
	--iwut-news-navy-5: #0b1530;
	--iwut-news-turquoise-1: #3fc3ba;
	--iwut-news-turquoise-2: #17a9a1;
	--iwut-news-turquoise-3: #12938c;
	--iwut-news-turquoise-4: #0e7c77;
	--iwut-news-turquoise-5: #0a6a66;
	--iwut-news-gold-1: #eadfc4;
	--iwut-news-gold-2: #d4bc8b;
	--iwut-news-gold-3: #c0a165;
	--iwut-news-gold-4: #a98a4a;
	--iwut-news-gold-5: #6f5826;
}

body.single-iwut_news .iwut-news-single {
	box-sizing: border-box;
	width: min(calc(100% - clamp(24px, 6vw, 112px)), 1760px);
	margin-inline: auto;
	padding-block: 132px clamp(64px, 8vw, 112px);
}

body.single-iwut_course .iwut-course-single {
	box-sizing: border-box;
	width: min(calc(100% - clamp(24px, 6vw, 112px)), 1760px);
	margin-inline: auto;
	padding-block: 132px clamp(64px, 8vw, 112px);
}

body.single-iwut_research .iwut-cpt-single,
body.single-iwut_studlife .iwut-cpt-single,
body.single-iwut_cooperation .iwut-cpt-single {
	box-sizing: border-box;
	width: min(calc(100% - clamp(24px, 6vw, 112px)), 1760px);
	margin-inline: auto;
	padding-block: 132px clamp(64px, 8vw, 112px);
}

.iwut-news-hero {
	--iwut-news-hero-bg: var(--iwut-news-navy-5);
	--iwut-news-hero-fg: #fff;
	--iwut-news-svg-color: var(--iwut-news-turquoise-1);
	position: relative;
	display: grid;
	width: min(var(--iwut-news-hero-width), 100%);
	height: clamp(220px, var(--iwut-news-hero-height), min(720px, 72vh));
	margin-inline: auto;
	overflow: hidden;
	isolation: isolate;
	background: var(--iwut-news-hero-bg);
	color: var(--iwut-news-hero-fg);
}

.iwut-news-hero__template,
.iwut-news-hero__pattern {
	position: absolute;
	inset: -30%;
	z-index: 1;
	display: block;
	background-color: currentColor;
	-webkit-mask-position: center;
	mask-position: center;
	pointer-events: none;
}

.iwut-news-hero__template {
	color: var(--iwut-news-svg-color);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: min(72%, 760px) min(82%, 560px);
	mask-size: min(72%, 760px) min(82%, 560px);
	opacity: calc(var(--iwut-news-svg-opacity, .18) * .55);
}

.iwut-news-hero__pattern {
	mask-position: calc(50% + var(--iwut-news-svg-offset-x, 0%)) calc(50% + var(--iwut-news-svg-offset-y, 0px));
	-webkit-mask-position: calc(50% + var(--iwut-news-svg-offset-x, 0%)) calc(50% + var(--iwut-news-svg-offset-y, 0px));
	color: var(--iwut-news-svg-color);
	-webkit-mask-repeat: repeat;
	mask-repeat: repeat;
	-webkit-mask-size: var(--iwut-news-svg-cell) var(--iwut-news-svg-cell);
	mask-size: var(--iwut-news-svg-cell) var(--iwut-news-svg-cell);
	opacity: var(--iwut-news-svg-opacity, .18);
	transform: rotate(var(--iwut-news-svg-rotation));
}

.iwut-news-hero .iwut-pat-girih-khatim-8star { -webkit-mask-image: url("patterns/girih/girih-khatim-8star.svg"); mask-image: url("patterns/girih/girih-khatim-8star.svg"); }
.iwut-news-hero .iwut-pat-girih-octagon-star-tiling { -webkit-mask-image: url("patterns/girih/girih-octagon-star-tiling.svg"); mask-image: url("patterns/girih/girih-octagon-star-tiling.svg"); }
.iwut-news-hero .iwut-pat-girih-star-cross-tiling { -webkit-mask-image: url("patterns/girih/girih-star-cross-tiling.svg"); mask-image: url("patterns/girih/girih-star-cross-tiling.svg"); }
.iwut-news-hero .iwut-pat-girih-hexagon-rosette { -webkit-mask-image: url("patterns/girih/girih-hexagon-rosette.svg"); mask-image: url("patterns/girih/girih-hexagon-rosette.svg"); }
.iwut-news-hero .iwut-pat-girih-strap-interlace { -webkit-mask-image: url("patterns/girih/girih-strap-interlace.svg"); mask-image: url("patterns/girih/girih-strap-interlace.svg"); }
.iwut-news-hero .iwut-pat-arch-mihrab-pointed { -webkit-mask-image: url("patterns/arch/arch-mihrab-pointed.svg"); mask-image: url("patterns/arch/arch-mihrab-pointed.svg"); }
.iwut-news-hero .iwut-pat-arch-mihrab-ogee { -webkit-mask-image: url("patterns/arch/arch-mihrab-ogee.svg"); mask-image: url("patterns/arch/arch-mihrab-ogee.svg"); }
.iwut-news-hero .iwut-pat-arch-horseshoe { -webkit-mask-image: url("patterns/arch/arch-horseshoe.svg"); mask-image: url("patterns/arch/arch-horseshoe.svg"); }
.iwut-news-hero .iwut-pat-arch-panel-girih-window { -webkit-mask-image: url("patterns/arch/arch-panel-girih-window.svg"); mask-image: url("patterns/arch/arch-panel-girih-window.svg"); }
.iwut-news-hero .iwut-pat-arch-muqarnas-crest { -webkit-mask-image: url("patterns/arch/arch-muqarnas-crest.svg"); mask-image: url("patterns/arch/arch-muqarnas-crest.svg"); }
.iwut-news-hero .iwut-pat-medallion-shamse-16 { -webkit-mask-image: url("patterns/medallion/medallion-shamse-16.svg"); mask-image: url("patterns/medallion/medallion-shamse-16.svg"); }
.iwut-news-hero .iwut-pat-medallion-toranj-8lobe { -webkit-mask-image: url("patterns/medallion/medallion-toranj-8lobe.svg"); mask-image: url("patterns/medallion/medallion-toranj-8lobe.svg"); }
.iwut-news-hero .iwut-pat-medallion-star-rosette { -webkit-mask-image: url("patterns/medallion/medallion-star-rosette.svg"); mask-image: url("patterns/medallion/medallion-star-rosette.svg"); }
.iwut-news-hero .iwut-pat-medallion-lobed-cartouche { -webkit-mask-image: url("patterns/medallion/medallion-lobed-cartouche.svg"); mask-image: url("patterns/medallion/medallion-lobed-cartouche.svg"); }
.iwut-news-hero .iwut-pat-frame-tazhib-rect { -webkit-mask-image: url("patterns/frame/frame-tazhib-rect.svg"); mask-image: url("patterns/frame/frame-tazhib-rect.svg"); }
.iwut-news-hero .iwut-pat-frame-lobed-label { -webkit-mask-image: url("patterns/frame/frame-lobed-label.svg"); mask-image: url("patterns/frame/frame-lobed-label.svg"); }
.iwut-news-hero .iwut-pat-frame-arch-panel { -webkit-mask-image: url("patterns/frame/frame-arch-panel.svg"); mask-image: url("patterns/frame/frame-arch-panel.svg"); }
.iwut-news-hero .iwut-pat-frame-cartouche-scroll { -webkit-mask-image: url("patterns/frame/frame-cartouche-scroll.svg"); mask-image: url("patterns/frame/frame-cartouche-scroll.svg"); }
.iwut-news-hero .iwut-pat-frame-banner-plate { -webkit-mask-image: url("patterns/frame/frame-banner-plate.svg"); mask-image: url("patterns/frame/frame-banner-plate.svg"); }
.iwut-news-hero .iwut-pat-border-rosette-chain { -webkit-mask-image: url("patterns/border/border-rosette-chain.svg"); mask-image: url("patterns/border/border-rosette-chain.svg"); }
.iwut-news-hero .iwut-pat-border-khatai-vine { -webkit-mask-image: url("patterns/border/border-khatai-vine.svg"); mask-image: url("patterns/border/border-khatai-vine.svg"); }
.iwut-news-hero .iwut-pat-border-star-cross-band { -webkit-mask-image: url("patterns/border/border-star-cross-band.svg"); mask-image: url("patterns/border/border-star-cross-band.svg"); }
.iwut-news-hero .iwut-pat-border-palmette-pair { -webkit-mask-image: url("patterns/border/border-palmette-pair.svg"); mask-image: url("patterns/border/border-palmette-pair.svg"); }
.iwut-news-hero .iwut-pat-border-chevron-x { -webkit-mask-image: url("patterns/border/border-chevron-x.svg"); mask-image: url("patterns/border/border-chevron-x.svg"); }
.iwut-news-hero .iwut-pat-border-diamond-star { -webkit-mask-image: url("patterns/border/border-diamond-star.svg"); mask-image: url("patterns/border/border-diamond-star.svg"); }
.iwut-news-hero .iwut-pat-motif-star-8 { -webkit-mask-image: url("patterns/motif/motif-star-8.svg"); mask-image: url("patterns/motif/motif-star-8.svg"); }
.iwut-news-hero .iwut-pat-motif-khatai-leaf { -webkit-mask-image: url("patterns/motif/motif-khatai-leaf.svg"); mask-image: url("patterns/motif/motif-khatai-leaf.svg"); }
.iwut-news-hero .iwut-pat-motif-eslimi-scroll { -webkit-mask-image: url("patterns/motif/motif-eslimi-scroll.svg"); mask-image: url("patterns/motif/motif-eslimi-scroll.svg"); }
.iwut-news-hero .iwut-pat-motif-palmette { -webkit-mask-image: url("patterns/motif/motif-palmette.svg"); mask-image: url("patterns/motif/motif-palmette.svg"); }
.iwut-news-hero .iwut-pat-motif-rosette-small { -webkit-mask-image: url("patterns/motif/motif-rosette-small.svg"); mask-image: url("patterns/motif/motif-rosette-small.svg"); }

/*
 * Frame & Plaque hero shapes: 9-slice the chosen plaque so its ornaments frame
 * the rectangular hero instead of being stretched or shrunk into a watermark.
 * Browsers without mask-box-image keep the restrained centred watermark.
 */
@supports ( -webkit-mask-box-image: url("patterns/frame/frame-tazhib-rect.svg") 30% 22% stretch ) {
	.iwut-news-hero .iwut-news-hero__template.iwut-pat-frame-tazhib-rect {
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
		-webkit-mask-box-image: url("patterns/frame/frame-tazhib-rect.svg") 30% 22% stretch;
		mask-border: url("patterns/frame/frame-tazhib-rect.svg") 30% 22% stretch;
		opacity: .9;
	}

	.iwut-news-hero .iwut-news-hero__template.iwut-pat-frame-arch-panel {
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
		-webkit-mask-box-image: url("patterns/frame/frame-arch-panel.svg") 60% 48% stretch;
		mask-border: url("patterns/frame/frame-arch-panel.svg") 60% 48% stretch;
		opacity: .9;
	}

	.iwut-news-hero .iwut-news-hero__template.iwut-pat-frame-lobed-label {
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
		-webkit-mask-box-image: url("patterns/frame/frame-lobed-label.svg") 24% 10% stretch;
		mask-border: url("patterns/frame/frame-lobed-label.svg") 24% 10% stretch;
		opacity: .9;
	}

	.iwut-news-hero .iwut-news-hero__template.iwut-pat-frame-cartouche-scroll {
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
		-webkit-mask-box-image: url("patterns/frame/frame-cartouche-scroll.svg") 24% 12% stretch;
		mask-border: url("patterns/frame/frame-cartouche-scroll.svg") 24% 12% stretch;
		opacity: .9;
	}

	.iwut-news-hero .iwut-news-hero__template.iwut-pat-frame-banner-plate {
		inset: 0;
		-webkit-mask-image: none;
		mask-image: none;
		-webkit-mask-box-image: url("patterns/frame/frame-banner-plate.svg") 30% 12% stretch;
		mask-border: url("patterns/frame/frame-banner-plate.svg") 30% 12% stretch;
		opacity: .9;
	}
}

.iwut-news-hero__image {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .48;
}

.iwut-news-hero--source-image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(11, 21, 48, .24);
	pointer-events: none;
}

.iwut-news-hero__content {
	position: absolute;
	left: clamp(24px, var(--iwut-news-title-x), calc(100% - 24px));
	right: auto;
	top: clamp(20px, var(--iwut-news-title-y), calc(100% - 20px));
	z-index: 2;
	width: max-content;
	max-width: min(80%, 1120px);
	direction: ltr;
	transform: translate(calc(-1 * var(--iwut-news-title-x)), calc(-1 * var(--iwut-news-title-y)));
}

.iwut-news-hero__title {
	max-width: min(24ch, 100%);
	margin: 0;
	color: inherit;
	font: 700 clamp(30px, 3.2vw, var(--iwut-news-title-size))/1.06 "IWUT Source Serif", "Source Serif 4", Georgia, serif;
	letter-spacing: -.025em;
	text-align: left;
	text-wrap: balance;
}

.iwut-news-hero--source-none {
	min-height: auto;
	height: auto;
	padding-block: clamp(38px, 5vw, 64px) clamp(22px, 3vw, 38px);
	background: transparent;
	color: var(--iwut-news-navy-5);
	border-block-end: 1px solid rgba(192, 161, 101, .48);
}
.iwut-news-hero--source-none .iwut-news-hero__content { position: relative; inset: auto; width: 100%; transform: none; }

.iwut-news-hero--bg-navy-1 { --iwut-news-hero-bg: var(--iwut-news-navy-1); }
.iwut-news-hero--bg-navy-2 { --iwut-news-hero-bg: var(--iwut-news-navy-2); }
.iwut-news-hero--bg-navy-3 { --iwut-news-hero-bg: var(--iwut-news-navy-3); }
.iwut-news-hero--bg-navy-4 { --iwut-news-hero-bg: var(--iwut-news-navy-4); }
.iwut-news-hero--bg-navy-5 { --iwut-news-hero-bg: var(--iwut-news-navy-5); }
.iwut-news-hero--bg-turquoise-1 { --iwut-news-hero-bg: var(--iwut-news-turquoise-1); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-turquoise-2 { --iwut-news-hero-bg: var(--iwut-news-turquoise-2); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-turquoise-3 { --iwut-news-hero-bg: var(--iwut-news-turquoise-3); }
.iwut-news-hero--bg-turquoise-4 { --iwut-news-hero-bg: var(--iwut-news-turquoise-4); }
.iwut-news-hero--bg-turquoise-5 { --iwut-news-hero-bg: var(--iwut-news-turquoise-5); }
.iwut-news-hero--bg-gold-1 { --iwut-news-hero-bg: var(--iwut-news-gold-1); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-gold-2 { --iwut-news-hero-bg: var(--iwut-news-gold-2); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-gold-3 { --iwut-news-hero-bg: var(--iwut-news-gold-3); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-gold-4 { --iwut-news-hero-bg: var(--iwut-news-gold-4); --iwut-news-hero-fg: #000; }
.iwut-news-hero--bg-gold-5 { --iwut-news-hero-bg: var(--iwut-news-gold-5); }


.iwut-news-hero--bg-white-1,
.iwut-news-hero--bg-white-2,
.iwut-news-hero--bg-white-3,
.iwut-news-hero--bg-white-4,
.iwut-news-hero--bg-white-5 { --iwut-news-hero-bg: #ffffff; --iwut-news-hero-fg: #000; }

.iwut-news-hero--fg-black { --iwut-news-hero-fg: #000; }
.iwut-news-hero--fg-white { --iwut-news-hero-fg: #fff; }

/* SVG weight: repeat the masked shape with a tight halo instead of editing the SVG files. */
.iwut-news-hero--svg-weight-medium .iwut-news-hero__pattern,
.iwut-news-hero--svg-weight-medium .iwut-news-hero__template {
	filter: drop-shadow(0.5px 0 0 currentColor) drop-shadow(-0.5px 0 0 currentColor) drop-shadow(0 0.5px 0 currentColor) drop-shadow(0 -0.5px 0 currentColor);
}

.iwut-news-hero--svg-weight-bold .iwut-news-hero__pattern,
.iwut-news-hero--svg-weight-bold .iwut-news-hero__template {
	filter: drop-shadow(0.9px 0 0 currentColor) drop-shadow(-0.9px 0 0 currentColor) drop-shadow(0 0.9px 0 currentColor) drop-shadow(0 -0.9px 0 currentColor) drop-shadow(0.6px 0.6px 0 currentColor) drop-shadow(-0.6px -0.6px 0 currentColor);
}

/* Continuous title: run to the hero edges and wrap naturally with generous leading. */
.iwut-news-hero--title-continuous .iwut-news-hero__content {
	max-width: min(calc(100% - 48px), 1120px);
}

.iwut-news-hero--title-continuous .iwut-news-hero__title {
	max-width: 100%;
	line-height: 1.18;
	text-wrap: pretty;
	overflow-wrap: anywhere;
}

.iwut-news-hero--svg-navy-1 { --iwut-news-svg-color: var(--iwut-news-navy-1); }
.iwut-news-hero--svg-navy-2 { --iwut-news-svg-color: var(--iwut-news-navy-2); }
.iwut-news-hero--svg-navy-3 { --iwut-news-svg-color: var(--iwut-news-navy-3); }
.iwut-news-hero--svg-navy-4 { --iwut-news-svg-color: var(--iwut-news-navy-4); }
.iwut-news-hero--svg-navy-5 { --iwut-news-svg-color: var(--iwut-news-navy-5); }
.iwut-news-hero--svg-turquoise-1 { --iwut-news-svg-color: var(--iwut-news-turquoise-1); }
.iwut-news-hero--svg-turquoise-2 { --iwut-news-svg-color: var(--iwut-news-turquoise-2); }
.iwut-news-hero--svg-turquoise-3 { --iwut-news-svg-color: var(--iwut-news-turquoise-3); }
.iwut-news-hero--svg-turquoise-4 { --iwut-news-svg-color: var(--iwut-news-turquoise-4); }
.iwut-news-hero--svg-turquoise-5 { --iwut-news-svg-color: var(--iwut-news-turquoise-5); }
.iwut-news-hero--svg-gold-1 { --iwut-news-svg-color: var(--iwut-news-gold-1); }
.iwut-news-hero--svg-gold-2 { --iwut-news-svg-color: var(--iwut-news-gold-2); }
.iwut-news-hero--svg-gold-3 { --iwut-news-svg-color: var(--iwut-news-gold-3); }
.iwut-news-hero--svg-gold-4 { --iwut-news-svg-color: var(--iwut-news-gold-4); }
.iwut-news-hero--svg-gold-5 { --iwut-news-svg-color: var(--iwut-news-gold-5); }

body.wp-singular.single-iwut_news.iwut-page-hero-system .iwut-news-single .news-post-meta,
body.wp-singular.single-iwut_news.iwut-page-hero-system .iwut-news-single .iwut-news-single__content {
	width: min(100%, 1080px);
	margin-inline: auto;
}

body.wp-singular.single-iwut_news.iwut-page-hero-system .iwut-news-single .news-post-meta {
	gap: 10px 24px;
	margin-block: clamp(20px, 3vw, 34px);
	padding-block-end: 14px;
	border-block-end: 1px solid rgba(192, 161, 101, .42);
}

/* Courses & Events reuse the shared Hero, so the legacy post-title meta offset must not overlap it. */
body.wp-singular.single-iwut_course.iwut-page-hero-system .iwut-course-single .news-post-meta {
	gap: 10px 24px;
	margin-block: clamp(20px, 3vw, 34px);
	padding-block: 0 14px;
	border-block-end: 1px solid rgba(192, 161, 101, .42);
}

body.wp-singular.single-iwut_research.iwut-page-hero-system .iwut-cpt-single .news-post-meta,
body.wp-singular.single-iwut_studlife.iwut-page-hero-system .iwut-cpt-single .news-post-meta,
body.wp-singular.single-iwut_cooperation.iwut-page-hero-system .iwut-cpt-single .news-post-meta {
	gap: 10px 24px;
	margin-block: clamp(20px, 3vw, 34px);
	padding-block: 0 14px;
	border-block-end: 1px solid rgba(192, 161, 101, .42);
}

body.single-iwut_news .news-post-meta a { color: var(--iwut-news-turquoise-dark); }
body.single-iwut_news .iwut-news-single__content { max-width: 72ch; font-size: clamp(17px, 1.2vw, 19px); line-height: 1.8; }
body.single-iwut_news .iwut-news-single__content > :first-child { margin-block-start: 0; }

@media (max-width: 700px) {
	body.single-iwut_news .iwut-news-single { width: min(100% - 24px, 1760px); padding-block: 112px 64px; }
	body.single-iwut_course .iwut-course-single,
	body.single-iwut_research .iwut-cpt-single,
	body.single-iwut_studlife .iwut-cpt-single,
	body.single-iwut_cooperation .iwut-cpt-single { width: min(100% - 24px, 1760px); padding-block: 112px 64px; }
	.iwut-news-hero { width: 100%; height: clamp(220px, var(--iwut-news-hero-height), 70vh); }
	.iwut-news-hero__content { max-width: min(88%, 1120px); }
	.iwut-news-hero__title { font-size: clamp(28px, 8.2vw, min(var(--iwut-news-title-size), 48px)); }
}

@media (prefers-reduced-motion: reduce) {
	.iwut-news-hero *,
	.iwut-news-hero::before { transition: none; }
}
