/*
 * EmiratesX sitewide polish (exg-*), loaded on every public page after emiratesx.css.
 * Quiet details that make the whole site feel more premium: a gold reading progress line, a glass header once the
 * page scrolls, a refined footer, a back to top button, gold selection, thin scrollbar, smooth anchors.
 * Safe on every template (pages, blog articles, 404): it only touches the header and footer chrome and adds its own
 * elements. Motion is switched off for prefers-reduced-motion. No external request.
 */

html {
	scrollbar-width: thin;
	scrollbar-color: #8D7A52 #101B18;
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
::selection { background: #C3AA78; color: #101B18; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #101B18; }
::-webkit-scrollbar-thumb { background: #6E6040; border: 2px solid #101B18; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #C3AA78; }

/* ------------------------------------------------------------------ reading progress */
.exg-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, #8D7A52, #C3AA78 60%, #E4D5AF);
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
	will-change: transform;
}

/* ------------------------------------------------------------------ header: glass once the page scrolls */
body #masthead.is-scrolled,
body.ehf-header #masthead.is-scrolled {
	background: rgba(16, 27, 24, .94);
	-webkit-backdrop-filter: blur(16px) saturate(1.25);
	backdrop-filter: blur(16px) saturate(1.25);
	box-shadow: inset 0 -1px 0 rgba(195, 170, 120, .28), 0 18px 40px -28px rgba(0, 0, 0, .6);
}
body #masthead.is-menu-open { background: #101B18; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ex-header .ex-header__cta .elementor-button {
	transition: background-color .3s, color .3s, transform .3s, letter-spacing .3s;
}
.ex-header .ex-header__cta .elementor-button:hover { transform: translateY(-1px); }

/* ------------------------------------------------------------------ footer */
.e-con.ex-footer {
	position: relative;
	overflow: hidden;
	border-block-start: 0;
	background:
		radial-gradient(ellipse 70% 90% at 100% 0%, rgba(195, 170, 120, .08), transparent 60%),
		#182620;
}
.e-con.ex-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(195, 170, 120, .6) 25%, rgba(195, 170, 120, .6) 75%, transparent);
	pointer-events: none;
}
.e-con.ex-footer > * { position: relative; z-index: 1; }
.ex-footer__tagline,
.ex-footer__tagline p {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 400;
	letter-spacing: -.025em;
	font-size: clamp(22px, 1vw + 14px, 30px);
	line-height: 1.3;
}
.ex-footer__tagline p + p { color: #C3AA78; }
.ex-menu__link { position: relative; transition: color .25s, transform .3s; }
.ex-footer__links .ex-menu__link:hover { transform: translateX(6px); }
.ex-footer__contact a {
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	transition: color .25s, background-size .4s;
}
.ex-footer__contact a:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ------------------------------------------------------------------ links and focus */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, summary:focus-visible {
	outline: 2px solid #C3AA78;
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ back to top */
.exg-top {
	position: fixed;
	right: clamp(16px, 2.2vw, 32px);
	bottom: clamp(16px, 2.2vw, 32px);
	z-index: 999;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(195, 170, 120, .7);
	border-radius: 50%;
	background: rgba(16, 27, 24, .86);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #C3AA78;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity .35s, transform .45s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .45s, background-color .3s, color .3s;
}
.exg-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.exg-top::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V5M5 11.5l7-7 7 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V5M5 11.5l7-7 7 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}
.exg-top:hover { background: #C3AA78; color: #101B18; }

@media print {
	.exg-progress, .exg-top { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.exg-top, .ex-menu__link, .ex-footer__contact a { transition: none; }
	.ex-footer__links .ex-menu__link:hover { transform: none; }
}

/* ------------------------------------------------------------------ 404 page (library template 2488) in the modern style */
section.ex-section.ex-404 {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	min-height: min(72vh, 760px);
	display: flex;
	align-items: center;
}
section.ex-section.ex-404::before,
section.ex-section.ex-404::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	pointer-events: none;
}
section.ex-section.ex-404::before {
	top: 0;
	bottom: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse 60% 80% at 88% -10%, rgba(195, 170, 120, .16), transparent 60%),
		radial-gradient(ellipse 50% 60% at 0% 110%, rgba(195, 170, 120, .07), transparent 60%);
}
section.ex-section.ex-404::after {
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(195, 170, 120, .55) 20%, rgba(195, 170, 120, .55) 80%, transparent);
}
section.ex-section.ex-404 .elementor-heading-title {
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(46px, 6.4vw, 100px);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -.048em;
}
section.ex-section.ex-404 .elementor-widget-text-editor,
section.ex-section.ex-404 .elementor-widget-text-editor p {
	font-family: Arial, Helvetica, sans-serif;
	color: #BCC6BE;
}
