/* Zenesis v2 — Awards & Recognitions page (zn-awl: feature rows for the awards with a picture, cards for the rest).
   Banner comes from service.css. Content, colours, typography and spacing are set in Elementor / Site Settings.
   This file adds the row rhythm, the picture frames (cropped photos; posters shown whole over a blurred copy of
   themselves), the year tags, the card grid, hover states and the scroll reveal set by awards.js.
   Without JS everything is simply shown; pictures open in Elementor's lightbox. */

:where(.zn-awl) { --zn-ease-out: cubic-bezier(.16, 1, .3, 1); position: relative; }
.zn-awl { overflow-x: clip; } /* clip (not hidden) so the tablet pictures can stay in view */
.zn-awl .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.zn-awl .zn-awl__name .elementor-heading-title { text-wrap: balance; }
/* entries are linked from the Home page (#award-…): land clear of the fixed header */
.zn-awl :is(.zn-awl__item, .zn-awl__card) { scroll-margin-top: 112px; }

/* ════════ Labels ════════ */
.zn-awl .zn-awl__kind .elementor-heading-title {
	display: inline-flex; align-items: center; gap: 14px; letter-spacing: .16em; text-transform: uppercase;
}
.zn-awl .zn-awl__kind .elementor-heading-title::before { /* short gold rule before "Award" / "Recognition" */
	content: ""; flex: 0 0 auto; width: 28px; height: 1px; background: currentColor;
	transition: width .8s var(--zn-ease-out);
}
.zn-awl .zn-awl__label .elementor-heading-title { letter-spacing: .14em; text-transform: uppercase; }
.zn-awl .zn-awl__org .elementor-heading-title { line-height: 1.5; }
.zn-awl .zn-awl__by { padding-left: 16px; box-shadow: inset 1px 0 0 var(--e-global-color-zn_gold_line); }

/* ════════ Feature rows ════════ */
.zn-awl .zn-awl__item { padding-block: 72px; border-top: 1px solid var(--e-global-color-zn_line); }
.zn-awl .zn-awl__item:first-child { padding-top: 0; border-top: 0; }
.zn-awl .zn-awl__item:last-child { padding-bottom: 0; }
.zn-awl .zn-awl__item:hover .zn-awl__kind .elementor-heading-title::before { width: 44px; }

/* picture frame: one shape for every picture */
.zn-awl .zn-awl__frame {
	position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden;
	background: var(--e-global-color-secondary);
	box-shadow: 0 30px 60px -36px rgb(15 19 43 / .45);
}
.zn-awl .zn-awl__frame > .zn-awl__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; }
.zn-awl .zn-awl__img :is(.elementor-widget-container, a) { display: block; width: 100%; height: 100%; }
.zn-awl .zn-awl__img a { position: relative; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.zn-awl .zn-awl__img img {
	display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%;
	transition: scale 1.4s var(--zn-ease-out), filter .8s ease;
}
.zn-awl .zn-awl__media--contain .zn-awl__img img { object-fit: contain; }
.zn-awl .zn-awl__frame > .zn-awl__backdrop { /* blurred copy behind a poster */
	position: absolute; inset: -32px; z-index: 0; min-height: 0;
	filter: blur(24px) saturate(.85) brightness(.5); scale: 1.08;
}
/* fine gold inner frame + "view" icon on hover / keyboard focus */
.zn-awl .zn-awl__frame::after {
	content: ""; position: absolute; inset: 18px; z-index: 2; pointer-events: none;
	border: 1px solid rgb(200 164 93 / 0); transition: inset .8s var(--zn-ease-out), border-color .6s ease;
}
.zn-awl .zn-awl__img a::after {
	content: ""; position: absolute; right: 22px; top: 22px; width: 44px; height: 44px; border-radius: 50%;
	background: var(--e-global-color-zn_white) no-repeat center / 16px 16px
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230F132B' stroke-width='1.5'%3E%3Cpath d='M10 1.5h4.5V6M6 14.5H1.5V10M14.5 1.5 9.5 6.5M1.5 14.5l5-5'/%3E%3C/svg%3E");
	box-shadow: 0 10px 24px -12px rgb(15 19 43 / .5);
	opacity: 0; scale: .7; transition: opacity .4s ease, scale .6s var(--zn-ease-out);
}
.zn-awl .zn-awl__img a:focus-visible { outline: none; }
@media (hover: hover) {
	.zn-awl .zn-awl__frame:hover .zn-awl__img img { scale: 1.045; }
	.zn-awl .zn-awl__media--contain .zn-awl__frame:hover .zn-awl__img img { scale: 1.025; }
	.zn-awl .zn-awl__frame:hover::after { inset: 12px; border-color: rgb(200 164 93 / .85); }
	.zn-awl .zn-awl__frame:hover .zn-awl__img a::after { opacity: 1; scale: 1; }
}
.zn-awl .zn-awl__frame:has(a:focus-visible)::after { inset: 12px; border-color: var(--e-global-color-primary); }
.zn-awl .zn-awl__frame:has(a:focus-visible) .zn-awl__img a::after { opacity: 1; scale: 1; }

/* year tag on the outer bottom corner of the picture */
.zn-awl .zn-awl__frame > .zn-awl__year {
	position: absolute; left: 0; bottom: 0; z-index: 3; width: auto; margin: 0; padding: 12px 20px; pointer-events: none;
	background: var(--e-global-color-secondary);
}
.zn-awl .zn-awl__item--flip .zn-awl__frame > .zn-awl__year { left: auto; right: 0; }
.zn-awl .zn-awl__year .elementor-heading-title { line-height: 1; letter-spacing: .12em; }

/* ════════ Cards: the awards without a picture ════════ */
.zn-awl .zn-awl__grid {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
	background: var(--e-global-color-zn_line); border: 1px solid var(--e-global-color-zn_line);
}
.zn-awl .zn-awl__card {
	position: relative; isolation: isolate; min-width: 0; width: auto;
	background: var(--e-global-color-zn_white); transition: background-color .5s ease;
}
.zn-awl .zn-awl__card::after { /* gold line along the top edge */
	content: ""; position: absolute; left: -1px; top: -1px; width: calc(100% + 2px); height: 2px; z-index: 1;
	background: var(--e-global-color-primary); scale: 0 1; transform-origin: 0 50%; transition: scale .8s var(--zn-ease-out);
}
.zn-awl .zn-awl__cardyear .elementor-heading-title { /* outline numerals, as in the service pages */
	/* fill via text-fill-color: Elementor's own heading colour rule would win over `color` */
	line-height: 1; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px var(--e-global-color-primary);
	transition: -webkit-text-fill-color .6s ease, translate .8s var(--zn-ease-out);
}
@media (hover: hover) {
	.zn-awl .zn-awl__card:hover { background-color: var(--e-global-color-zn_cream); }
	.zn-awl .zn-awl__card:hover::after { scale: 1 1; }
	.zn-awl .zn-awl__card:hover .zn-awl__kind .elementor-heading-title::before { width: 44px; }
	.zn-awl .zn-awl__card:hover .zn-awl__cardyear .elementor-heading-title { -webkit-text-fill-color: rgb(200 164 93 / .14); translate: 4px 0; }
}

/* ════════ Tablet / mobile ════════ */
@media (min-width: 768px) and (max-width: 1024px) {
	/* text runs longer than the picture: the picture stays in view beside it */
	.zn-awl .zn-awl__media { position: sticky; top: calc(var(--zn-hdr-hc, 70px) + 24px); }
}
@media (max-width: 1024px) {
	.zn-awl .zn-awl__item { padding-block: 56px; }
	.zn-awl .zn-awl__frame::after { inset: 14px; }
	.zn-awl .zn-awl__img a::after { right: 16px; top: 16px; width: 40px; height: 40px; }
	.zn-awl .zn-awl__frame > .zn-awl__year { padding: 10px 16px; }
	.zn-awl .zn-awl__cardyear .elementor-heading-title { font-size: 64px; }
}
@media (max-width: 767px) {
	.zn-awl .zn-awl__item { padding-block: 44px; }
	/* on phones every tag sits on the left, under the picture's natural reading start */
	.zn-awl .zn-awl__item--flip .zn-awl__frame > .zn-awl__year { left: 0; right: auto; }
	.zn-awl .zn-awl__img a::after { opacity: 1; scale: 1; width: 36px; height: 36px; right: 12px; top: 12px; background-size: 14px 14px; }
	.zn-awl .zn-awl__grid { grid-template-columns: minmax(0, 1fr); }
	.zn-awl .zn-awl__cardyear .elementor-heading-title { font-size: 52px; }
}

/* ════════ Scroll reveal (armed by awards.js) ════════ */
.is-armed .zn-awl__accent { scale: 1 0; transform-origin: 50% 0; }
.is-armed .zn-awl__rule { scale: 0 1; transform-origin: 0 50%; }
.is-armed .zn-awl-rv { opacity: 0; translate: 0 28px; }
.zn-awl__item.is-armed .zn-awl__frame { clip-path: inset(0 100% 0 0); }
.zn-awl__item--flip.is-armed .zn-awl__frame { clip-path: inset(0 0 0 100%); }
.zn-awl__item.is-armed .zn-awl__img img { scale: 1.12; }
.zn-awl__item.is-armed .zn-awl__year { opacity: 0; translate: 0 100%; }
:is(.zn-awl__item, .zn-awl__grid).is-armed :is(.zn-awl__body, .zn-awl__card) > * { opacity: 0; translate: 0 22px; }

.is-in .zn-awl__accent { scale: 1 1; transition: scale 1s var(--zn-ease-out) .3s; }
.is-in .zn-awl__rule { scale: 1 1; transition: scale 1.6s var(--zn-ease-out) .4s; }
.is-in .zn-awl-rv { opacity: 1; translate: 0 0; transition: opacity 1s ease, translate 1.2s var(--zn-ease-out); transition-delay: var(--zn-d, .2s); }
.zn-awl__item.is-in .zn-awl__frame { clip-path: inset(0 0 0 0); transition: clip-path 1.3s cubic-bezier(.65, 0, .35, 1); }
.zn-awl__item.is-in .zn-awl__img img { scale: 1; transition: scale 1.8s var(--zn-ease-out), filter .8s ease; }
.zn-awl__item.is-in .zn-awl__year { opacity: 1; translate: 0 0; transition: opacity .6s ease 1s, translate .9s var(--zn-ease-out) 1s; }
:is(.zn-awl__item, .zn-awl__grid).is-in :is(.zn-awl__body, .zn-awl__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);
}
/* once revealed, hover uses its own (quicker) timing */
.zn-awl__item.is-settled .zn-awl__img img { transition: scale 1.4s var(--zn-ease-out), filter .8s ease; }
.zn-awl__item.is-settled .zn-awl__frame { clip-path: none; }

@media (prefers-reduced-motion: reduce) {
	:where(.zn-awl) *, :where(.zn-awl) *::before, :where(.zn-awl) *::after { transition: none !important; animation: none !important; }
	.zn-awl .zn-awl__frame:hover .zn-awl__img img { scale: 1; }
}
