/* Posters & Stories — page design (posters, description, menu, stories). Colors: Posters & Stories → Settings. */
.ps-sec {
	--ps-s-bg: #000;
	--ps-s-surface: #0e0e0e;
	--ps-s-text: #fff;
	--ps-s-muted: #a6a6a6;
	--ps-s-accent: #fff;
	--ps-s-line: #2b2b2b;
	--ps-s-w: 1120px;
	--ps-font: inherit;
	box-sizing: border-box;
	background: var(--ps-s-bg);
	color: var(--ps-s-text);
	font-family: var(--ps-font);
	line-height: 1.6;
	padding: 0 0 clamp(40px, 6vw, 80px);
}
.ps-sec *, .ps-sec *::before, .ps-sec *::after { box-sizing: border-box; }
.ps-sec.ps-sec-full {
	width: 100vw;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
body:has(.ps-sec-full) { overflow-x: clip; }
.ps-sec a { color: inherit; }
.ps-sec .ps-icon { width: 22px; height: 22px; flex: none; }
.ps-sec h2, .ps-sec h3 { color: var(--ps-s-text); font-family: inherit; margin: 0; }
.ps-sec button { font-family: inherit; }
.ps-sec-empty { padding: 24px; border: 1px dashed var(--ps-s-line); margin: 24px; }

/* Buttons */
.ps-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 14px;
	border: 1px solid var(--ps-s-accent);
	background: transparent;
	color: var(--ps-s-text) !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background .2s ease, color .2s ease;
	white-space: nowrap;
}
.ps-btn .ps-icon { width: 18px; height: 18px; }
.ps-btn small { font-weight: 400; opacity: .7; font-size: 12px; }
.ps-btn-solid { background: var(--ps-s-accent); color: var(--ps-s-bg) !important; }
.ps-btn:hover, .ps-btn:focus-visible { background: var(--ps-s-text); color: var(--ps-s-bg) !important; outline: none; }
.ps-btn-solid:hover, .ps-btn-solid:focus-visible { background: transparent; color: var(--ps-s-text) !important; }

/* ---------- Posters ---------- */
.ps-sec-posters { padding: clamp(36px, 6vw, 72px) 0 12px; position: relative; }
.ps-sec-head { text-align: center; padding: 0 20px 28px; }
.ps-sec-kicker { display: block; width: 52px; height: 3px; margin: 0 auto 18px; background: var(--ps-s-accent); }
.ps-sec-h { font-size: clamp(26px, 3.6vw, 44px); font-weight: 800; line-height: 1.25; }

.ps-pl {
	--pw: min(400px, 70vw);
	position: relative;
	height: calc(var(--pw) * 4 / 3 + 150px);
	overflow: hidden;
	outline: none;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}
.ps-pl:focus-visible { box-shadow: inset 0 0 0 2px var(--ps-s-accent); }
.ps-pl-track { position: absolute; inset: 0; }
.ps-pl-item {
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--pw);
	max-width: none !important;
	/* Centered with transform (set by the script), so theme margins can't move it. */
	margin: 0 !important;
	padding: 0 !important;
	transform: translateX(-50%);
	transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .55s ease, filter .55s ease;
	will-change: transform;
}
.ps-pl-img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	padding: 0;
	margin: 0;
	border: 1px solid var(--ps-s-line);
	background: var(--ps-s-surface);
	cursor: pointer;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.ps-pl-img img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; max-width: none; }
.ps-pl-item:not(.is-active) .ps-pl-img { cursor: pointer; filter: grayscale(.5) brightness(.55); }
.ps-pl-item.is-active .ps-pl-img { cursor: zoom-in; }
.ps-pl-cap {
	padding: 16px 0 0;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease;
}
.ps-pl-item.is-active .ps-pl-cap { opacity: 1; visibility: visible; transition-delay: .15s; }
.ps-pl-title { font-size: 20px; font-weight: 700; margin-bottom: 12px !important; }
.ps-pl-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ps-pl-nav {
	position: absolute;
	top: calc(var(--pw) * 2 / 3);
	z-index: 30;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--ps-s-accent);
	background: color-mix(in srgb, var(--ps-s-bg) 65%, transparent);
	color: var(--ps-s-text);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background .2s ease, color .2s ease;
}
.ps-pl-nav:hover, .ps-pl-nav:focus-visible { background: var(--ps-s-accent); color: var(--ps-s-bg); outline: none; }
/* In Arabic the next poster comes from the left. */
.ps-pl-prev { inset-inline-start: calc(50% - var(--pw) / 2 - 64px); }
.ps-pl-next { inset-inline-end: calc(50% - var(--pw) / 2 - 64px); }
[dir="ltr"] .ps-pl-nav .ps-icon { transform: scaleX(-1); }

.ps-pl-dots { display: flex; justify-content: center; gap: 8px; padding: 18px 0 4px; flex-wrap: wrap; }
.ps-pl-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid var(--ps-s-muted);
	background: transparent;
	cursor: pointer;
	transition: width .3s ease, background .3s ease;
}
.ps-pl-dot.is-active { width: 28px; background: var(--ps-s-accent); border-color: var(--ps-s-accent); }

/* Lightbox */
.ps-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 56px 16px 20px;
	background: rgba(0, 0, 0, .94);
}
.ps-lb[hidden] { display: none; }
.ps-lb-img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; display: block; }
.ps-lb-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ps-lb-close {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #fff;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
html.ps-lock, html.ps-lock body { overflow: hidden; }

/* ---------- Description (the page text) ---------- */
.ps-sec-about {
	position: relative;
	max-width: 860px;
	margin: clamp(28px, 5vw, 56px) auto 0;
	padding: clamp(28px, 4vw, 44px) 20px;
}
.ps-sec-brush {
	position: absolute;
	inset: 0 -12%;
	z-index: 0;
	pointer-events: none;
	background:
		linear-gradient(172deg, transparent 18%, color-mix(in srgb, var(--ps-s-text) 4%, transparent) 19%, color-mix(in srgb, var(--ps-s-text) 2%, transparent) 30%, transparent 31%),
		linear-gradient(176deg, transparent 58%, color-mix(in srgb, var(--ps-s-text) 3.5%, transparent) 59%, color-mix(in srgb, var(--ps-s-text) 1.5%, transparent) 72%, transparent 73%);
}
.ps-sec-text { position: relative; z-index: 1; font-size: 18px; line-height: 1.9; }
.ps-sec-text > * { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.ps-sec-text > * + * { margin-top: 1em; }
.ps-sec-text > :first-child { margin-top: 0; }
.ps-sec-text h1, .ps-sec-text h2, .ps-sec-text h3, .ps-sec-text h4 { color: var(--ps-s-text); line-height: 1.3; font-weight: 800; margin-top: 1.4em; }
.ps-sec-text h2 { font-size: clamp(26px, 3vw, 38px); }
.ps-sec-text a { color: var(--ps-s-accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ps-sec-text blockquote { margin-inline: 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--ps-s-accent); }
.ps-sec-text .wp-block-footnotes { font-size: 14px; color: var(--ps-s-muted); border-top: 1px solid var(--ps-s-line); padding-top: 1em; margin-top: 2em; }
.ps-sec-text img { max-width: 100%; height: auto; }

/* ---------- Menu bar ---------- */
.ps-sec-menu {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	max-width: var(--ps-s-w);
	margin: clamp(28px, 5vw, 56px) auto 0;
	background: var(--ps-s-surface);
	border-block: 1px solid var(--ps-s-line);
}
.ps-sec-menu ul {
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.ps-sec-menu ul::-webkit-scrollbar { display: none; }
.ps-sec-menu li { margin: 0; flex: 1 1 0; min-width: 96px; }
.ps-sec-menu a {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 10px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	text-align: center;
	text-decoration: none;
	color: var(--ps-s-text);
	transition: background .2s ease;
}
.ps-sec-menu a .ps-icon { width: 28px; height: 28px; }
.ps-sec-menu a:hover, .ps-sec-menu a:focus-visible { background: color-mix(in srgb, var(--ps-s-text) 8%, transparent); outline: none; }
.ps-sec-menu a.is-current::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -1px;
	width: 14px;
	height: 3px;
	margin-left: -7px;
	background: var(--ps-s-accent);
}

/* ---------- Stories ---------- */
.ps-sec-stories { max-width: var(--ps-s-w); margin: 0 auto; padding: clamp(36px, 6vw, 72px) 20px 0; scroll-margin-top: 90px; }
.ps-sec-posters, .ps-sec-about { scroll-margin-top: 90px; }
.ps-feat { display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; }
.ps-feat.has-img { grid-template-columns: 1.15fr 1fr; }
.ps-feat-kicker { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--ps-s-muted); }
.ps-feat-title { position: relative; isolation: isolate; font-size: clamp(30px, 4.4vw, 54px); font-weight: 800; line-height: 1.15; margin: 0 0 18px !important; }
.ps-feat-title a { text-decoration: none; color: var(--ps-s-text); }
.ps-feat-title a > * { vertical-align: baseline; }
.ps-feat-mark {
	position: absolute;
	top: -.25em;
	inset-inline-start: -.3em;
	width: 1.35em;
	height: 1.35em;
	background: var(--ps-s-accent);
	z-index: -1;
}
@supports (mix-blend-mode: difference) {
	.ps-feat-title { color: #fff; }
	.ps-feat-title a { color: #fff; mix-blend-mode: difference; }
}
.ps-feat-ex { color: var(--ps-s-muted); font-size: 17px; line-height: 1.85; margin: 0 0 24px; }
.ps-feat-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--ps-s-line); background: var(--ps-s-surface); }
.ps-feat-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.ps-feat-img:hover img { transform: scale(1.04); }

.ps-more {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--ps-s-line);
	text-decoration: none !important;
	color: var(--ps-s-text) !important;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
}
.ps-more span { display: flex; align-items: center; padding: 12px 26px; }
.ps-more i { display: flex; align-items: center; justify-content: center; width: 46px; background: var(--ps-s-accent); color: var(--ps-s-bg); font-style: normal; transition: width .25s ease; }
[dir="ltr"] .ps-more i .ps-icon { transform: scaleX(-1); }
.ps-more:hover i, .ps-more:focus-visible i { width: 58px; }

.ps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; margin-top: clamp(36px, 5vw, 60px); }
.ps-scard { display: flex; flex-direction: column; background: var(--ps-s-surface); border: 1px solid var(--ps-s-line); transition: border-color .25s ease, transform .25s ease; }
.ps-scard:hover { border-color: var(--ps-s-muted); transform: translateY(-2px); }
.ps-scard-img { display: block; aspect-ratio: 16 / 7; overflow: hidden; }
.ps-scard-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.15); transition: transform .6s ease, filter .6s ease; }
.ps-scard:hover .ps-scard-img img { transform: scale(1.04); filter: none; }
.ps-scard-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 14px; flex: 1; }
.ps-scard-title { font-size: 19px; font-weight: 800; line-height: 1.35; }
.ps-scard-title a { text-decoration: none; }
.ps-scard-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ps-scard-ex { margin: 0; color: var(--ps-s-muted); font-size: 15px; line-height: 1.75; }
.ps-scard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.ps-scard-read { font-size: 13px; font-weight: 700; text-decoration: underline !important; text-underline-offset: 4px; }
.ps-share {
	position: relative;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--ps-s-line);
	background: transparent;
	color: var(--ps-s-text);
	cursor: pointer;
}
.ps-share .ps-icon { width: 18px; height: 18px; }
.ps-share:hover, .ps-share:focus-visible { border-color: var(--ps-s-accent); outline: none; }
.ps-share[data-done]::after {
	content: attr(data-done);
	position: absolute;
	bottom: calc(100% + 6px);
	inset-inline-end: 0;
	padding: 4px 8px;
	font-size: 12px;
	white-space: nowrap;
	background: var(--ps-s-accent);
	color: var(--ps-s-bg);
}

/* ---------- From other sections ---------- */
.ps-sec-more {
	max-width: var(--ps-s-w);
	margin: clamp(40px, 6vw, 72px) auto 0;
	padding: clamp(24px, 4vw, 40px);
	background: var(--ps-s-surface);
	border: 1px solid var(--ps-s-line);
	color: var(--ps-s-text);
}
.ps-sec-page .ps-sec-more { margin-inline: max(20px, calc((100% - var(--ps-s-w)) / 2)); }
.ps-more-h { font-size: 14px !important; font-weight: 800; letter-spacing: .2em; color: var(--ps-s-text); padding-bottom: 12px; margin-bottom: 18px !important; position: relative; }
.ps-more-h::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 52px; height: 3px; background: var(--ps-s-accent); }
.ps-sec-more ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 28px; }
.ps-sec-more li { margin: 0; }
.ps-sec-more a { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 10px 0; text-decoration: none; }
.ps-sec-more a i { grid-row: span 2; color: var(--ps-s-accent); font-style: normal; }
.ps-sec-more a span { font-size: 17px; font-weight: 700; line-height: 1.4; }
.ps-sec-more a small { color: var(--ps-s-muted); font-size: 13px; }
.ps-sec-more a:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Previous / next section ---------- */
.ps-sec-pager { max-width: var(--ps-s-w); margin: clamp(28px, 4vw, 44px) auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ps-sec-pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--ps-s-line); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.ps-sec-pager a:hover { border-color: var(--ps-s-accent); background: var(--ps-s-surface); }
.ps-sec-pager small { color: var(--ps-s-muted); font-size: 13px; }
.ps-sec-pager b { font-size: 17px; }
.ps-pager-next { text-align: end; }

/* ---------- A story's own page ---------- */
.ps-sec-story { padding: clamp(32px, 5vw, 64px) 20px clamp(48px, 7vw, 96px); }
.ps-story-in { max-width: 780px; margin: 0 auto; }
.ps-story-back { margin: 0 0 2em; }
.ps-story-back a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border: 1px solid var(--ps-s-line); font-size: 14px; font-weight: 700; text-decoration: none; }
.ps-story-back a:hover { border-color: var(--ps-s-accent); }
.ps-story-back .ps-icon { width: 18px; height: 18px; }
[dir="ltr"] .ps-story-back .ps-icon { transform: scaleX(-1); }
.ps-story-posters { margin-top: 3em; }
.ps-story-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ps-story-pgrid figure { margin: 0; background: var(--ps-s-surface); border: 1px solid var(--ps-s-line); }
.ps-story-pgrid img { width: 100%; height: auto; display: block; }
.ps-story-pgrid figcaption { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ps-story-pgrid figcaption > span { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-story-pgrid .ps-btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.ps-sec-story .ps-sec-more { margin: 3em 0 0; }

/* ---------- Phones ---------- */
@media (max-width: 900px) {
	.ps-feat.has-img { grid-template-columns: 1fr; }
	.ps-feat-img { aspect-ratio: 16 / 10; order: -1; }
}
@media (max-width: 700px) {
	.ps-pl { --pw: min(300px, 72vw); height: calc(var(--pw) * 4 / 3 + 170px); }
	.ps-pl-nav { width: 40px; height: 40px; }
	.ps-pl-prev { inset-inline-start: 6px; }
	.ps-pl-next { inset-inline-end: 6px; }
	.ps-pl-title { font-size: 18px; }
	.ps-btn { min-height: 40px; padding: 7px 11px; font-size: 13px; }
	.ps-sec-menu ul { justify-content: flex-start; }
	.ps-sec-menu li { flex: 0 0 auto; min-width: 84px; }
	.ps-sec-menu a { padding: 12px 8px 10px; font-size: 11px; }
	.ps-sec-menu a .ps-icon { width: 24px; height: 24px; }
	.ps-sec-text { font-size: 17px; }
	.ps-sec-pager { grid-template-columns: 1fr; }
	.ps-pager-next { text-align: start; }
}

@media (prefers-reduced-motion: reduce) {
	.ps-pl-item, .ps-feat-img img, .ps-scard, .ps-scard-img img { transition: none; }
}
