/* ----------------------------------------------------------------
	Charity page hero slider (charity.php)
-----------------------------------------------------------------*/

.hs { --hs-time: 5500ms; --hs-bar: 50px; position: relative; overflow: hidden; background: #04200f; color: #fff; }

/* all slides share one cell, so the slider is as tall as the tallest slide */
.hs-track { display: grid; touch-action: pan-y; }
.hs-slide {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	min-width: 0;
	min-height: clamp(400px, 56vh, 540px);
	visibility: hidden;
	z-index: 0;
	overflow: hidden;
	background: #04200f;
}
.hs-slide.is-prev { visibility: visible; z-index: 1; }
.hs-slide.is-active { visibility: visible; z-index: 2; }
.hs.is-moving .hs-slide.is-active { animation: hs-wipe-next 1s cubic-bezier(.76, 0, .18, 1) both; }
.hs.is-moving.is-back .hs-slide.is-active { animation-name: hs-wipe-prev; }
@keyframes hs-wipe-next { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes hs-wipe-prev { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* picture with a slow zoom */
.hs-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.hs-slide.is-active .hs-bg { animation: hs-zoom calc(var(--hs-time) + 1600ms) ease-out both; }
.hs-slide.is-prev .hs-bg { transform: scale(1.12); }
@keyframes hs-zoom { from { transform: scale(1.18); } to { transform: scale(1.02); } }
.hs-slide::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(3, 30, 15, .94) 0%, rgba(3, 30, 15, .82) 34%, rgba(3, 30, 15, .3) 66%, rgba(3, 30, 15, .08) 100%),
		linear-gradient(0deg, rgba(2, 20, 10, .85) 0%, transparent 34%);
}

.hs-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	padding-top: 28px;
	padding-bottom: calc(var(--hs-bar) + 14px);
}
.hs-copy { min-width: 0; max-width: 820px; }

.hs-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	padding: 7px 16px;
	border: 1px solid rgba(205, 155, 41, .65);
	border-radius: 999px;
	background: rgba(205, 155, 41, .16);
	font-family: var(--ch-en);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #f4d487;
}
.hs-kicker svg { width: 18px; height: 18px; }

.charity.ch-compact .hs .hs-title {
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--ch-head);
	font-size: clamp(1.5rem, 2.4vw, 2.5rem) !important;
	font-weight: 700;
	line-height: 1.32;
	color: #fff;
	text-align: left;
	text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.charity.ch-compact .hs .hs-title::before, .charity.ch-compact .hs .hs-title::after { display: none; }
.hs-title span { display: inline-block; font-size: .72em; color: var(--ch-gold); }
.hs-lead { max-width: 700px; margin: 0 0 10px; font-size: .96rem; line-height: 1.65; color: rgba(255, 255, 255, .9); }
.hs-goal { max-width: 700px; margin: 0 0 14px; padding: 6px 14px; border-left: 4px solid var(--ch-gold); border-radius: 0 12px 12px 0; background: rgba(255, 255, 255, .09); font-size: .95rem; line-height: 1.75; }
.hs-goal strong { color: #f4d487; }

.hs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.hs-goal + .hs-actions { margin-top: 0; }
.charity .hs .ch-btn--ghost { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.charity .hs .ch-btn--ghost:hover { background: #fff; color: var(--ch-green-dark); }
.charity .hs .hs-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding-bottom: 3px; border-bottom: 1px solid rgba(255, 255, 255, .4); font-weight: 600; color: #fff; }
.charity .hs .hs-link:hover { border-color: var(--ch-gold); color: var(--ch-gold); }
.hs-link svg { width: 16px; height: 16px; }

/* glass cards on the right */
.hs-badge, .hs-project {
	align-self: flex-end;
	flex: none;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 22px;
	border: 1px solid rgba(255, 255, 255, .24);
	border-radius: 18px;
	background: rgba(4, 36, 18, .55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.hs-badge svg, .hs-project svg { flex: none; width: 30px; height: 30px; color: var(--ch-gold); }
.hs-badge strong { display: block; font-family: var(--ch-en); font-size: 1rem; }
.hs-badge span { display: block; font-family: var(--ch-en); font-size: .82rem; color: rgba(255, 255, 255, .78); }
.hs-project { font-family: var(--ch-en); font-size: .95rem; font-weight: 600; }
.hs-project svg { width: 22px; height: 22px; }

/* words rise in one after another */
.hs.is-moving .hs-slide.is-active .hs-copy > *,
.hs.is-moving .hs-slide.is-active .hs-badge,
.hs.is-moving .hs-slide.is-active .hs-project { animation: hs-rise .8s cubic-bezier(.22, .61, .36, 1) both; animation-delay: .45s; }
.hs.is-moving .hs-slide.is-active .hs-copy > :nth-child(2) { animation-delay: .55s; }
.hs.is-moving .hs-slide.is-active .hs-copy > :nth-child(3) { animation-delay: .65s; }
.hs.is-moving .hs-slide.is-active .hs-copy > :nth-child(4) { animation-delay: .75s; }
.hs.is-moving .hs-slide.is-active .hs-copy > :nth-child(5) { animation-delay: .85s; }
.hs.is-moving .hs-slide.is-active .hs-badge,
.hs.is-moving .hs-slide.is-active .hs-project { animation-delay: .95s; }
@keyframes hs-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Arrows ---------- */
.hs-arrow {
	position: absolute;
	top: calc(50% - var(--hs-bar) / 2);
	z-index: 4;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(4, 36, 18, .45);
	color: #fff;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}
.hs-arrow svg { width: 20px; height: 20px; }
.hs-arrow--prev { left: 10px; }
.hs-arrow--prev svg { transform: rotate(180deg); }
.hs-arrow--next { right: 10px; }
.hs-arrow:hover { background: var(--ch-gold); border-color: var(--ch-gold); color: var(--ch-green-dark); }

/* ---------- Dots with a timer fill, and the pause button ---------- */
.hs-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 0 8px; }
.hs-bar__inner { display: flex; align-items: center; justify-content: center; gap: 16px; }
.hs-dots { display: flex; align-items: center; gap: 4px; }
/* the button is bigger than the dot, so it is easy to press */
.hs-dot { display: grid; place-items: center; height: 28px; padding: 0 3px; border: 0; background: none; cursor: pointer; }
.hs-dot i { position: relative; display: block; width: 10px; height: 10px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .45); transition: width .35s, background .25s; }
.hs-dot:hover i { background: rgba(255, 255, 255, .85); }
.hs-dot.is-active i { width: 40px; background: rgba(255, 255, 255, .35); }
.hs-dot.is-active i::after { content: ""; position: absolute; inset: 0; background: var(--ch-gold); transform-origin: left; }
.hs.is-playing .hs-dot.is-active i::after { animation: hs-timer var(--hs-time) linear both; }
.hs.is-playing.is-held .hs-dot.is-active i::after { animation-play-state: paused; }
@keyframes hs-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hs-play { display: grid; flex: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(4, 36, 18, .55); color: #fff; cursor: pointer; }
.hs-play:hover { border-color: var(--ch-gold); color: var(--ch-gold); }
.hs-play svg { width: 18px; height: 18px; }
.hs-play .hs-play__go, .hs-play[aria-pressed="true"] .hs-play__pause { display: none; }
.hs-play[aria-pressed="true"] .hs-play__go { display: block; }

.hs-dot:focus-visible, .hs-play:focus-visible, .hs-arrow:focus-visible { outline: 3px solid var(--ch-gold); outline-offset: 2px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 960px) {
	.hs-badge, .hs-project { display: none; }
	.hs-arrow { display: none; }
}
@media (max-width: 640px) {
	.hs-slide { min-height: 540px; }
	.hs-slide::after { background: linear-gradient(0deg, rgba(3, 30, 15, .97) 0%, rgba(3, 30, 15, .84) 50%, rgba(3, 30, 15, .15) 100%); }
	.hs-inner { align-items: flex-end; padding-top: 90px; }
	.hs-kicker { margin-bottom: 12px; padding: 6px 12px; font-size: .64rem; letter-spacing: .1em; }
	.charity.ch-compact .hs .hs-title { margin-bottom: 10px; font-size: 1.6rem !important; }
	.hs-lead { margin-bottom: 12px; font-size: .88rem; line-height: 1.7; }
	.hs-goal { display: none; }
	.hs-actions, .hs-goal + .hs-actions { gap: 10px; margin-top: 14px; }
	.hs-actions .ch-btn { flex: 1 1 0; justify-content: center; padding-left: .5em; padding-right: .5em; font-size: .86rem; }
	.charity .hs .hs-link { margin-top: 14px; font-size: .86rem; }
	.hs-bar { padding-bottom: 10px; }
	.hs-bar__inner { gap: 8px; }
	.hs-dot { padding: 0 2px; }
	.hs-dot i { width: 8px; height: 8px; }
	.hs-dot.is-active i { width: 28px; }
	.hs-play { width: 32px; height: 32px; }
	.hs-play svg { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.hs *, .hs.is-moving .hs-slide.is-active { animation: none !important; }
	.hs-dot i { transition: none; }
}

@media (min-width: 961px) { .hs-inner.ch-container { padding-left: max(var(--ch-side), 76px); padding-right: max(var(--ch-side), 76px); } }

/* a lower slider */
.hs-inner { padding-top: 18px; padding-bottom: calc(var(--hs-bar) + 4px); }
.hs-kicker { margin-bottom: 10px; padding: 5px 14px; font-size: .7rem; }
.charity.ch-compact .hs .hs-title { margin-bottom: 8px; }
.hs .ch-btn { padding-top: .6em; padding-bottom: .6em; font-size: .9rem; }
.hs-play { width: 34px; height: 34px; }
.hs-play svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
	.hs-slide { min-height: 400px; }
	.hs-inner { padding-top: 20px; }
	.charity.ch-compact .hs .hs-title { font-size: 1.4rem !important; }
	.hs-lead { font-size: .84rem; line-height: 1.6; }
}
