/* Zenesis v2 — Home: Awards & Recognitions (zn-haw). A selection of entries from the Awards & Recognitions page;
   each card links to its entry there. Content, colours, typography and spacing are set in Elementor / Site Settings.
   This file turns the card row into a slider (3 cards at a time on desktop, 2 on tablet, 1 on phones; native
   scroll-snap for touch / trackpad, with arrows and pagination dots added by awards-home.js), styles the picture
   frames (as on the awards page), hover states and the scroll reveal. Without JS the row simply scrolls sideways. */

:where(.zn-haw) { --zn-ease-out: cubic-bezier(.16, 1, .3, 1); position: relative; }
.zn-haw .zn-haw__rule { flex: 1 1 0; }

/* ════════ Cards ════════ */
.zn-haw .zn-haw__grid {
	--zn-per: 3; --zn-gap: 32px;
	display: flex; flex-wrap: nowrap; gap: var(--zn-gap); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: none;
	padding: 8px 1px 32px; margin-block: -8px -32px; /* room for the hover lift, shadow and the card outline */
}
.zn-haw .zn-haw__grid::-webkit-scrollbar { display: none; }
/* the grid > card path outranks Elementor's own `.e-con.e-flex { flex: … }` */
.zn-haw .zn-haw__grid > .zn-haw__card {
	flex: 0 0 calc((100% - (var(--zn-per) - 1) * var(--zn-gap)) / var(--zn-per)); scroll-snap-align: start;
}
.zn-haw .zn-haw__grid.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.zn-haw .zn-haw__grid.is-dragging * { pointer-events: none; user-select: none; }
.zn-haw .zn-haw__img img { -webkit-user-drag: none; }
.zn-haw .zn-haw__card {
	position: relative; isolation: isolate; min-width: 0; width: auto; color: inherit; text-decoration: none;
	background: var(--e-global-color-zn_white); -webkit-tap-highlight-color: transparent;
	box-shadow: 0 0 0 1px var(--e-global-color-zn_line);
	transition: box-shadow .6s ease, translate .8s var(--zn-ease-out);
}
/* picture and text sit flush (no container gap between them) */
.zn-haw .zn-haw__grid > .zn-haw__card { --row-gap: 0px; --column-gap: 0px; gap: 0; }
.zn-haw .zn-haw__card::after { /* gold line along the bottom edge */
	content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; z-index: 3;
	background: var(--e-global-color-primary); scale: 0 1; transform-origin: 0 50%; transition: scale .8s var(--zn-ease-out);
}
.zn-haw .zn-haw__card:focus-visible { outline: 2px solid var(--e-global-color-primary); outline-offset: 3px; }

/* picture frame (same treatment as the awards page) */
.zn-haw .zn-haw__frame { position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden; background: var(--e-global-color-secondary); }
.zn-haw .zn-haw__frame > .zn-haw__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; }
.zn-haw .zn-haw__img .elementor-widget-container { width: 100%; height: 100%; }
.zn-haw .zn-haw__img img {
	display: block; width: 100%; height: 100%; max-width: none; object-fit: cover;
	transition: scale 1.4s var(--zn-ease-out);
}
.zn-haw .zn-haw__card--contain .zn-haw__img img { object-fit: contain; }
.zn-haw .zn-haw__frame > .zn-haw__backdrop {
	position: absolute; inset: -32px; z-index: 0; min-height: 0; filter: blur(24px) saturate(.85) brightness(.5); scale: 1.08;
}
.zn-haw .zn-haw__frame > .zn-haw__year {
	position: absolute; left: 0; bottom: 0; z-index: 2; width: auto; margin: 0; padding: 10px 16px; pointer-events: none;
	background: var(--e-global-color-secondary);
}
.zn-haw .zn-haw__year .elementor-heading-title { line-height: 1; letter-spacing: .12em; }

/* text */
.zn-haw .zn-haw__kind .elementor-heading-title {
	display: inline-flex; align-items: center; gap: 12px; letter-spacing: .16em; text-transform: uppercase;
}
.zn-haw .zn-haw__kind .elementor-heading-title::before {
	content: ""; flex: 0 0 auto; width: 24px; height: 1px; background: currentColor; transition: width .8s var(--zn-ease-out);
}
.zn-haw .zn-haw__name .elementor-heading-title { text-wrap: balance; transition: color .4s ease; }
.zn-haw .zn-haw__org { margin-top: auto; }
.zn-haw .zn-haw__org .elementor-heading-title { line-height: 1.55; }

@media (hover: hover) {
	.zn-haw .zn-haw__grid > .zn-haw__card:hover { translate: 0 -6px; box-shadow: 0 0 0 1px var(--e-global-color-zn_gold_line), 0 32px 56px -32px rgb(15 19 43 / .4); }
	.zn-haw .zn-haw__card:hover::after { scale: 1 1; }
	.zn-haw .zn-haw__card:hover .zn-haw__img img { scale: 1.05; }
	.zn-haw .zn-haw__card--contain:hover .zn-haw__img img { scale: 1.025; }
	.zn-haw .zn-haw__card:hover .zn-haw__kind .elementor-heading-title::before { width: 40px; }
}
.zn-haw .zn-haw__card:focus-visible::after { scale: 1 1; }

/* ════════ Slider controls (rendered by awards-home.js): dots left, prev / next right ════════ */
.zn-haw .zn-haw__controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: -24px; }
.zn-haw .zn-haw__controls[hidden] { display: none; }
.zn-haw .zn-haw__dots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: -4px; }
.zn-haw .zn-haw__arrows { display: flex; gap: 12px; margin-left: auto; }
/* the theme's global button:hover / :focus styles (square corners, fills) are locked out for every state */
.zn-haw .zn-haw__controls button,
.zn-haw .zn-haw__controls button:is(:hover, :focus, :active) {
	position: relative; flex: 0 0 auto; padding: 0; margin: 0; border-radius: 50%; box-shadow: none; outline: 0;
	cursor: pointer; background-color: transparent; color: var(--e-global-color-text);
	display: inline-flex; align-items: center; justify-content: center;
}
/* dots: 24px targets around a small mark; the current page widens into a gold dash */
.zn-haw .zn-haw__controls .zn-haw__dot,
.zn-haw .zn-haw__controls .zn-haw__dot:is(:hover, :focus, :active) { width: 24px; height: 24px; border: 0; border-radius: 0; }
.zn-haw .zn-haw__dot::before {
	content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--e-global-color-zn_line);
	transition: width .5s var(--zn-ease-out), background-color .4s ease;
}
.zn-haw .zn-haw__controls .zn-haw__dot[aria-current="true"] { width: 40px; }
.zn-haw .zn-haw__dot[aria-current="true"]::before { width: 32px; background: var(--e-global-color-primary); }
.zn-haw .zn-haw__controls .zn-haw__dot:focus-visible::before { box-shadow: 0 0 0 2px var(--e-global-color-zn_white), 0 0 0 4px var(--e-global-color-primary); }
@media (hover: hover) { .zn-haw .zn-haw__dot:not([aria-current="true"]):hover::before { background: var(--e-global-color-primary); } }
/* prev / next: circled arrows like the site's .zn-link and the Team slider (circle fills gold, arrow nudges) */
.zn-haw .zn-haw__controls .zn-haw__nav,
.zn-haw .zn-haw__controls .zn-haw__nav:is(:hover, :focus, :active) {
	width: 48px; height: 48px; border: 1px solid var(--e-global-color-zn_line);
	transition: border-color .4s ease, background-color .4s ease, color .4s ease, opacity .4s ease;
}
.zn-haw .zn-haw__nav svg { width: 14px; height: 14px; fill: currentColor; transition: translate .5s var(--zn-ease-out); }
.zn-haw .zn-haw__nav--prev svg { rotate: 180deg; }
.zn-haw .zn-haw__controls .zn-haw__nav:not(:disabled):focus-visible {
	background-color: var(--e-global-color-primary); border-color: var(--e-global-color-primary); color: var(--e-global-color-zn_white);
}
@media (hover: hover) {
	.zn-haw .zn-haw__controls .zn-haw__nav:not(:disabled):hover {
		background-color: var(--e-global-color-primary); border-color: var(--e-global-color-primary); color: var(--e-global-color-zn_white);
	}
	.zn-haw .zn-haw__nav--next:not(:disabled):hover svg { translate: 3px 0; }
	.zn-haw .zn-haw__nav--prev:not(:disabled):hover svg { translate: -3px 0; }
}
.zn-haw .zn-haw__controls .zn-haw__nav:disabled { opacity: .35; cursor: default; }

/* ════════ Tablet / mobile ════════ */
@media (max-width: 1024px) {
	.zn-haw .zn-haw__grid { --zn-per: 2; --zn-gap: 24px; }
	.zn-haw .zn-haw__head { flex-wrap: wrap; } /* the link moves under the title when the row is too narrow */
	.zn-haw .zn-haw__controls { margin-top: -16px; }
}
@media (max-width: 767px) {
	/* one card, with the edge of the next one showing */
	.zn-haw .zn-haw__grid { --zn-gap: 16px; }
	.zn-haw .zn-haw__grid > .zn-haw__card { flex-basis: 86%; }
	.zn-haw .zn-haw__head .zn-haw__rule { display: none; }
	.zn-haw .zn-haw__controls { margin-top: -8px; }
	.zn-haw .zn-haw__controls .zn-haw__nav,
	.zn-haw .zn-haw__controls .zn-haw__nav:is(:hover, :focus, :active) { width: 40px; height: 40px; }
}

/* ════════ Scroll reveal (armed by awards-home.js) ════════ */
.zn-haw.is-armed .zn-haw__accent { scale: 1 0; transform-origin: 50% 0; }
.zn-haw.is-armed .zn-haw__rule { scale: 0 1; transform-origin: 0 50%; }
.zn-haw.is-armed .zn-haw-rv { opacity: 0; translate: 0 28px; }
.zn-haw.is-armed .zn-haw__card { opacity: 0; translate: 0 40px; }
.zn-haw.is-armed .zn-haw__frame { clip-path: inset(0 0 100% 0); }
.zn-haw.is-armed .zn-haw__img img { scale: 1.12; }
.zn-haw.is-armed .zn-haw__controls { opacity: 0; }

.zn-haw.is-in .zn-haw__accent { scale: 1 1; transition: scale 1s var(--zn-ease-out) .3s; }
.zn-haw.is-in .zn-haw__rule { scale: 1 1; transition: scale 1.6s var(--zn-ease-out) .4s; }
.zn-haw.is-in .zn-haw-rv { opacity: 1; translate: 0 0; transition: opacity 1s ease, translate 1.2s var(--zn-ease-out); transition-delay: var(--zn-d, .2s); }
.zn-haw.is-in .zn-haw__card {
	opacity: 1; translate: 0 0;
	transition: opacity 1s ease var(--zn-d, 0s), translate 1.2s var(--zn-ease-out) var(--zn-d, 0s), box-shadow .6s ease;
}
.zn-haw.is-in .zn-haw__frame { clip-path: inset(0 0 0 0); transition: clip-path 1.2s cubic-bezier(.65, 0, .35, 1) var(--zn-d, 0s); }
.zn-haw.is-in .zn-haw__img img { scale: 1; transition: scale 1.8s var(--zn-ease-out) var(--zn-d, 0s); }
.zn-haw.is-in .zn-haw__controls { opacity: 1; transition: opacity 1s ease .8s; }
/* after the reveal, hover uses its own timing */
.zn-haw.is-settled .zn-haw__card { transition: box-shadow .6s ease, translate .8s var(--zn-ease-out); }
.zn-haw.is-settled .zn-haw__frame { clip-path: none; }
.zn-haw.is-settled .zn-haw__img img { transition: scale 1.4s var(--zn-ease-out); }

@media (prefers-reduced-motion: reduce) {
	:where(.zn-haw) *, :where(.zn-haw) *::before, :where(.zn-haw) *::after { transition: none !important; animation: none !important; }
	.zn-haw .zn-haw__grid > .zn-haw__card:hover { translate: none; }
	.zn-haw .zn-haw__card:hover .zn-haw__img img { scale: 1; }
}
