/* Zenesis v2 — FAQs page (zn-fq: heading, category cards, category panels with questions). Banner comes from
   service.css. Content, colours and typography are set in Elementor / Site Settings. This file adds the card grid,
   the accordion styling and the states set by faqs.js (selected category, open question, search, scroll reveal).
   Without JS (and in the Elementor editor) every category and answer is shown, as on the original page. */

.zn-fq {
	--zn-ease-out: cubic-bezier(.16, 1, .3, 1);
	--zn-fq-pad: 24px;
	--zn-fq-ico-q: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.3 9.3a2.8 2.8 0 0 1 5.5.8c0 1.9-2.8 2.5-2.8 4.2'/%3E%3Ccircle cx='12' cy='17.6' r='.7' fill='%23000' stroke='none'/%3E%3C/svg%3E");
	--zn-fq-ico-s: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E");
	position: relative;
}
.zn-fq .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.zn-fq .zn-fq__intro > .e-con { min-width: 0; }

/* ════════ Category cards ════════ */
.zn-fq .zn-fq__cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.zn-fq .zn-fq__cats > .zn-fq__cat {
	position: relative; isolation: isolate; min-width: 0; width: auto; min-height: 148px;
	box-shadow: inset 0 0 0 1px var(--e-global-color-zn_gold_line);
	-webkit-tap-highlight-color: transparent;
	transition: translate .5s var(--zn-ease-out), box-shadow .5s ease;
}
/* the question-mark icon */
.zn-fq .zn-fq__cats > .zn-fq__cat > .zn-fq__catlabel::before {
	content: ""; display: block; width: 34px; height: 34px; margin-bottom: 18px;
	background: var(--e-global-color-primary); -webkit-mask: var(--zn-fq-ico-q) center / contain no-repeat; mask: var(--zn-fq-ico-q) center / contain no-repeat;
	transition: rotate .7s var(--zn-ease-out), background-color .4s ease;
}
/* fill layer (navy on the selected category) */
.zn-fq .zn-fq__cats > .zn-fq__cat::before {
	content: ""; position: absolute; inset: 0; z-index: -1; display: block; width: auto; height: auto;
	opacity: 1; filter: none; mix-blend-mode: normal; border: 0; border-radius: 0;
	background: var(--e-global-color-secondary); scale: 1 0; transform-origin: 50% 100%;
	transition: scale .6s var(--zn-ease-out);
}
/* pointer from the selected card to its questions */
.zn-fq .zn-fq__cats > .zn-fq__cat::after {
	content: ""; position: absolute; left: 50%; top: 100%; z-index: 1; width: 14px; height: 14px; margin: -7px 0 0 -7px;
	opacity: 0; filter: none; mix-blend-mode: normal; border: 0; rotate: 45deg; scale: 0;
	background: var(--e-global-color-secondary); transition: scale .45s var(--zn-ease-out), opacity .3s ease;
}
.zn-fq .zn-fq__catlabel .elementor-heading-title { transition: color .4s ease; }
.zn-fq .zn-fq__catlabel a { color: inherit; text-decoration: none; outline: none; }
.zn-fq .zn-fq__catlabel a::after { content: ""; position: absolute; inset: 0; z-index: 2; } /* the whole card is the link */
.zn-fq .zn-fq__cats > .zn-fq__cat:has(a:focus-visible) { outline: 2px solid var(--e-global-color-primary); outline-offset: 3px; }

@media (hover: hover) {
	.zn-fq .zn-fq__cats > .zn-fq__cat:hover {
		translate: 0 -4px;
		box-shadow: inset 0 0 0 1px var(--e-global-color-primary), 0 22px 40px -26px rgb(15 19 43 / .45);
	}
	.zn-fq .zn-fq__cats > .zn-fq__cat:hover > .zn-fq__catlabel::before { rotate: 14deg; }
}
.zn-fq .zn-fq__cats > .zn-fq__cat.is-active { box-shadow: inset 0 0 0 1px var(--e-global-color-secondary), 0 22px 40px -26px rgb(15 19 43 / .55); }
.zn-fq .zn-fq__cats > .zn-fq__cat.is-active::before { scale: 1 1; }
.zn-fq .zn-fq__cats > .zn-fq__cat.is-active::after { scale: 1; opacity: 1; }
.zn-fq .zn-fq__cats > .zn-fq__cat.is-active .zn-fq__catlabel .elementor-heading-title { color: var(--e-global-color-zn_white); }

/* number of matching questions while searching (added by faqs.js) */
.zn-fq .zn-fq__hits {
	position: absolute; right: 16px; top: 16px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px;
	display: grid; place-items: center; font: 600 12px/1 var(--e-global-typography-zn_eyebrow-font-family), sans-serif;
	background: var(--e-global-color-primary); color: var(--e-global-color-secondary);
	opacity: 0; scale: .6; transition: opacity .3s ease, scale .45s var(--zn-ease-out);
}
.zn-fq.is-searching .zn-fq__cat.has-hits .zn-fq__hits { opacity: 1; scale: 1; }
.zn-fq.is-searching .zn-fq__cats > .zn-fq__cat:not(.has-hits) { opacity: .45; }
.zn-fq .zn-fq__cats > .zn-fq__cat { transition: translate .5s var(--zn-ease-out), box-shadow .5s ease, opacity .4s ease; }

/* ════════ Search (added by faqs.js) ════════ */
.zn-fq .zn-fq__search { position: relative; flex: 0 1 380px; min-width: 0; }
.zn-fq .zn-fq__sl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.zn-fq .zn-fq__field { position: relative; display: block; }
.zn-fq .zn-fq__field::before { /* magnifier */
	content: ""; position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; translate: 0 -50%; pointer-events: none;
	background: var(--e-global-color-zn_muted); -webkit-mask: var(--zn-fq-ico-s) center / contain no-repeat; mask: var(--zn-fq-ico-s) center / contain no-repeat;
	transition: background-color .3s ease;
}
.zn-fq .zn-fq__field:focus-within::before { background: var(--e-global-color-primary); }
.zn-fq .zn-fq__search .zn-fq__field input.zn-fq__input {
	display: block; width: 100%; height: 56px; margin: 0; padding: 0 52px 0 50px; border: 0; border-radius: 0;
	background: var(--e-global-color-zn_white); color: var(--e-global-color-text);
	box-shadow: inset 0 0 0 1px var(--e-global-color-zn_line), inset 0 -2px 0 var(--e-global-color-zn_gold_line);
	font-family: var(--e-global-typography-text-font-family), sans-serif; font-size: 16px; line-height: 1.2;
	outline: none; -webkit-appearance: none; appearance: none; transition: box-shadow .4s ease;
}
.zn-fq .zn-fq__search .zn-fq__field input.zn-fq__input::placeholder { color: var(--e-global-color-zn_muted); opacity: 1; }
.zn-fq .zn-fq__search .zn-fq__field input.zn-fq__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.zn-fq .zn-fq__search .zn-fq__field input.zn-fq__input:hover { box-shadow: inset 0 0 0 1px var(--e-global-color-zn_gold_line), inset 0 -2px 0 var(--e-global-color-zn_gold_line); }
.zn-fq .zn-fq__search .zn-fq__field input.zn-fq__input:focus { box-shadow: inset 0 0 0 1px var(--e-global-color-primary), inset 0 -2px 0 var(--e-global-color-primary), 0 18px 36px -28px rgb(15 19 43 / .45); }
.zn-fq button.zn-fq__clear {
	position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 0;
	background: transparent; cursor: pointer; opacity: 0; visibility: hidden; scale: .6;
	transition: opacity .25s ease, scale .35s var(--zn-ease-out), visibility 0s linear .25s;
}
.zn-fq button.zn-fq__clear::before, .zn-fq button.zn-fq__clear::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; translate: -50% -50%;
	background: var(--e-global-color-text); rotate: 45deg;
}
.zn-fq button.zn-fq__clear::after { rotate: -45deg; }
.zn-fq button.zn-fq__clear:hover, .zn-fq button.zn-fq__clear:focus { background: transparent; }
.zn-fq button.zn-fq__clear:focus-visible { outline: 2px solid var(--e-global-color-primary); outline-offset: -4px; }
.zn-fq .zn-fq__search.has-value button.zn-fq__clear { opacity: 1; visibility: visible; scale: 1; transition-delay: 0s; }
.zn-fq .zn-fq__status {
	position: absolute; left: 0; top: calc(100% + 8px); margin: 0; min-height: 1em;
	font-family: var(--e-global-typography-zn_small-font-family), sans-serif; font-size: 13px; line-height: 1.4;
	color: var(--e-global-color-zn_muted);
}

/* no matches */
.zn-fq .zn-fq__empty {
	display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 40px var(--zn-fq-pad);
	background: var(--e-global-color-zn_cream); box-shadow: inset 0 2px 0 var(--e-global-color-primary);
	font-family: var(--e-global-typography-text-font-family), sans-serif; color: var(--e-global-color-zn_body);
}
.zn-fq .zn-fq__empty[hidden] { display: none; }
.zn-fq .zn-fq__empty p { margin: 0; }
.zn-fq .zn-fq__empty button {
	padding: 0; border: 0; background: none; cursor: pointer; color: var(--e-global-color-text);
	font-family: var(--e-global-typography-zn_eyebrow-font-family), sans-serif; font-size: var(--e-global-typography-zn_eyebrow-font-size);
	font-weight: var(--e-global-typography-zn_eyebrow-font-weight); letter-spacing: .12em; text-transform: uppercase;
	background: linear-gradient(var(--e-global-color-primary), var(--e-global-color-primary)) 0 100% / 100% 1px no-repeat;
	padding-bottom: 4px;
}
.zn-fq .zn-fq__empty button:hover, .zn-fq .zn-fq__empty button:focus { background-color: transparent; color: var(--e-global-color-text); }

/* ════════ Category panels ════════ */
.zn-fq .zn-fq__panels { counter-reset: zn-fq; }
.zn-fq .zn-fq__panel { counter-increment: zn-fq; scroll-margin-top: 120px; }
.zn-fq.is-live .zn-fq__panel { counter-increment: none; } /* faqs.js numbers each panel (counter-set), hidden or not */
.zn-fq .zn-fq__aside > .zn-fq__ptitle { min-width: 0; flex: 1 1 auto; }
.zn-fq .zn-fq__ptitle .elementor-heading-title::before { /* 01 … 04 */
	content: counter(zn-fq, decimal-leading-zero); display: block; margin-bottom: 10px;
	font-family: var(--e-global-typography-zn_eyebrow-font-family), sans-serif; font-size: 13px; font-weight: 600;
	letter-spacing: .18em; line-height: 1; color: var(--e-global-color-primary);
}
.zn-fq .zn-fq__list { border-top: 1px solid var(--e-global-color-zn_line); }

/* ════════ Questions ════════ */
.zn-fq .zn-fq__item {
	position: relative; isolation: isolate; border-bottom: 1px solid var(--e-global-color-zn_line);
	transition: background-color .5s ease;
}
.zn-fq .zn-fq__item::before { /* gold line on the open question */
	content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; height: auto; z-index: 1;
	opacity: 1; filter: none; mix-blend-mode: normal; border: 0;
	background: var(--e-global-color-primary); scale: 1 0; transform-origin: 50% 0; transition: scale .6s var(--zn-ease-out);
}
.zn-fq .zn-fq__q .elementor-heading-title { margin: 0; padding: 22px var(--zn-fq-pad); }
.zn-fq .zn-fq__a { padding: 0 var(--zn-fq-pad) 24px; }

/* the accordion (faqs.js makes each question a button and wraps each answer) */
.zn-fq.is-live .zn-fq__q .elementor-heading-title { padding: 0; }
.zn-fq button.zn-fq__btn {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-height: 72px; margin: 0;
	padding: 20px var(--zn-fq-pad); border: 0; border-radius: 0; background: transparent; box-shadow: none;
	font: inherit; letter-spacing: inherit; text-transform: none; text-align: left; color: inherit; white-space: normal;
	cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.zn-fq button.zn-fq__btn:hover, .zn-fq button.zn-fq__btn:focus { background: transparent; color: inherit; }
.zn-fq button.zn-fq__btn:focus-visible { outline: 2px solid var(--e-global-color-primary); outline-offset: -2px; }
.zn-fq .zn-fq__qt { min-width: 0; transition: translate .5s var(--zn-ease-out); }
.zn-fq .zn-fq__ic { /* + that turns into − */
	position: relative; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
	box-shadow: inset 0 0 0 1px var(--e-global-color-zn_gold_line);
	transition: background-color .4s ease, box-shadow .4s ease, rotate .6s var(--zn-ease-out);
}
.zn-fq .zn-fq__ic::before, .zn-fq .zn-fq__ic::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; translate: -50% -50%;
	background: var(--e-global-color-text); transition: rotate .5s var(--zn-ease-out), background-color .4s ease;
}
.zn-fq .zn-fq__ic::after { rotate: 90deg; }

.zn-fq.is-live .zn-fq__a {
	display: grid; grid-template-rows: 0fr; padding: 0; transition: grid-template-rows .55s var(--zn-ease-out);
}
.zn-fq .zn-fq__inner { min-height: 0; overflow: hidden; }
.zn-fq .zn-fq__body {
	max-width: 760px; padding: 0 calc(var(--zn-fq-pad) + 60px) 26px var(--zn-fq-pad);
	opacity: 0; translate: 0 -6px; transition: opacity .3s ease, translate .5s var(--zn-ease-out);
}

@media (hover: hover) {
	.zn-fq .zn-fq__item:hover { background-color: rgb(200 164 93 / .06); }
	.zn-fq .zn-fq__item:hover .zn-fq__qt { translate: 4px 0; }
	.zn-fq .zn-fq__item:hover .zn-fq__ic { box-shadow: inset 0 0 0 1px var(--e-global-color-primary); }
}
.zn-fq .zn-fq__item.is-open { background-color: var(--e-global-color-zn_cream); }
.zn-fq .zn-fq__item.is-open::before { scale: 1 1; }
.zn-fq .zn-fq__item.is-open .zn-fq__qt { translate: 0 0; }
.zn-fq .zn-fq__item.is-open .zn-fq__ic { background-color: var(--e-global-color-primary); box-shadow: inset 0 0 0 1px var(--e-global-color-primary); rotate: 180deg; }
.zn-fq .zn-fq__item.is-open .zn-fq__ic::before, .zn-fq .zn-fq__item.is-open .zn-fq__ic::after { background: var(--e-global-color-secondary); }
.zn-fq .zn-fq__item.is-open .zn-fq__ic::after { rotate: 0deg; }
.zn-fq.is-live .zn-fq__item.is-open .zn-fq__a { grid-template-rows: 1fr; }
.zn-fq .zn-fq__item.is-open .zn-fq__body { opacity: 1; translate: 0 0; transition: opacity .5s ease .12s, translate .6s var(--zn-ease-out) .08s; }

/* search highlight */
.zn-fq mark.zn-fq__hl {
	padding: 0 1px; color: inherit; background: rgb(200 164 93 / .3);
	box-shadow: inset 0 -2px 0 var(--e-global-color-primary);
}

/* ════════ States set by faqs.js: one category at a time, or the search results ════════ */
.zn-fq.is-live .zn-fq__panel:not(.is-current) { display: none; }
.zn-fq.is-live.is-searching .zn-fq__panel { display: none; }
.zn-fq.is-live.is-searching .zn-fq__panel.has-hits { display: flex; }
.zn-fq.is-searching .zn-fq__item.is-out { display: none; }
.zn-fq .zn-fq__panels.is-sizing { overflow: hidden; }
.zn-fq .zn-fq__panel { transition: opacity .2s ease, translate .25s ease; }
.zn-fq .zn-fq__panel.is-leaving { opacity: 0; translate: 0 10px; }
.zn-fq .zn-fq__panel.is-entering .zn-fq__aside { animation: zn-fq-in .7s var(--zn-ease-out) both; }
.zn-fq .zn-fq__panel.is-entering .zn-fq__item { animation: zn-fq-in .7s var(--zn-ease-out) both; animation-delay: calc(.08s + var(--i, 0) * .06s); }
.zn-fq .zn-fq__panel.is-entering .zn-fq__panel__accent { animation: zn-fq-grow .8s var(--zn-ease-out) both; }
@keyframes zn-fq-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes zn-fq-grow { from { transform: scaleY(0); transform-origin: 50% 0; } }

/* ════════ Responsive ════════ */
@media (max-width: 1024px) {
	.zn-fq .zn-fq__cats > .zn-fq__cat { min-height: 132px; }
	.zn-fq .zn-fq__search { flex-basis: 100%; }
}
@media (max-width: 767px) {
	.zn-fq { --zn-fq-pad: 16px; }
	.zn-fq .zn-fq__cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.zn-fq .zn-fq__cats > .zn-fq__cat { min-height: 112px; }
	.zn-fq .zn-fq__cats > .zn-fq__cat > .zn-fq__catlabel::before { width: 28px; height: 28px; margin-bottom: 12px; }
	.zn-fq .zn-fq__cats > .zn-fq__cat::after { display: none; }
	.zn-fq .zn-fq__hits { right: 10px; top: 10px; min-width: 24px; height: 24px; }
	.zn-fq button.zn-fq__btn { gap: 16px; min-height: 64px; padding-block: 18px; }
	.zn-fq .zn-fq__ic { width: 32px; height: 32px; }
	.zn-fq .zn-fq__body { padding-right: var(--zn-fq-pad); padding-bottom: 22px; }
	.zn-fq .zn-fq__panel { scroll-margin-top: 96px; }
}

/* ════════ Scroll reveal (armed by faqs.js) ════════ */
.zn-fq.is-armed .zn-fq__accent { scale: 1 0; transform-origin: 50% 0; }
.zn-fq.is-armed .zn-fq-rv { opacity: 0; translate: 0 28px; }
.zn-fq.is-armed:not(.is-in) .zn-fq__cats > .zn-fq__cat { opacity: 0; transform: translateY(26px); }
.zn-fq.is-armed:not(.is-in) .zn-fq__search { opacity: 0; transform: translateY(20px); }
.zn-fq.is-armed:not(.is-in) .zn-fq__panel.is-current :is(.zn-fq__aside, .zn-fq__item) { opacity: 0; transform: translateY(22px); }

.zn-fq.is-in .zn-fq__accent { scale: 1 1; transition: scale 1s var(--zn-ease-out) .3s; }
.zn-fq.is-in .zn-fq-rv { opacity: 1; translate: 0 0; transition: opacity 1s ease, translate 1.2s var(--zn-ease-out); transition-delay: var(--zn-d, .2s); }
.zn-fq.is-in:not(.is-settled) :is(.zn-fq__cats > .zn-fq__cat, .zn-fq__search, .zn-fq__panel.is-current .zn-fq__aside, .zn-fq__panel.is-current .zn-fq__item) {
	transition: opacity 1s ease var(--zn-d, 0s), transform 1.2s var(--zn-ease-out) var(--zn-d, 0s),
		translate .5s var(--zn-ease-out), box-shadow .5s ease, background-color .5s ease;
}

@media (prefers-reduced-motion: reduce) {
	.zn-fq *, .zn-fq *::before, .zn-fq *::after { transition: none !important; animation: none !important; }
}
