/**
 * Desktop mega menu (P5-63): same look as the UberMenu setup on expatliving.sg (measured on production, Nov 2026).
 * Phones and tablets up to 1194 px use the mobile menu (css/mobile-menu.css hides .nav-primary there).
 */

/* No list bullets (the theme adds them to some lists) */
.exl-mega li,
.exl-pre-menu li {
	list-style: none;
}

.exl-mega li::before,
.exl-pre-menu li::before {
	content: none;
}

/* Bar */
.exl-mega {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 81.5em;
	margin: 0 auto;
	padding: 0 .75em;
	border-top: 1px solid #56798a;
	border-bottom: 1px solid #56798a;
	font-size: 16px;
}

.exl-mega__bar {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.exl-mega__item {
	position: static;
	margin: 0;
	padding: 0;
	font-size: .875em; /* 14px */
	line-height: 1.3;
}

.exl-mega__item.has-flyout {
	position: relative;
}

.exl-mega__top {
	display: block;
	padding: 16px;
	color: #56798a;
	font-weight: 600;
	font-family: "Josefin Sans", "Josefin Sans Fallback", Roboto, sans-serif;
	text-transform: uppercase;
	text-decoration: none;
	background: #fff;
}

.exl-mega__item.has-mega .exl-mega__top,
.exl-mega__item.has-flyout .exl-mega__top {
	padding-right: 26px;
}

.exl-mega__top:hover,
.exl-mega__top:focus,
.exl-mega__item.is-open .exl-mega__top {
	color: #97ced3;
	background: #fff;
}

/* Arrow (button for keyboard and touch; sits where the UberMenu arrow was: 10 px from the right edge) */
.exl-mega__head {
	position: relative;
}

.exl-mega__toggle {
	position: absolute;
	top: 50%;
	right: 4px;
	width: 24px;
	height: 24px;
	margin: -12px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #56798a;
	font-size: 14px;
	line-height: 24px;
	text-align: center;
	cursor: pointer;
}

.exl-mega__item:hover .exl-mega__toggle,
.exl-mega__item.is-open .exl-mega__toggle,
.exl-mega__toggle:focus-visible {
	color: #97ced3;
}

.exl-mega__toggle:focus-visible,
.exl-mega__top:focus-visible,
.exl-mega__link:focus-visible,
.exl-mega__post:focus-visible,
.exl-mega__all:focus-visible {
	outline: 2px solid #56798a;
	outline-offset: -2px;
}

/* Panels */
.exl-mega__panel {
	position: absolute;
	top: 100%;
	z-index: 20;
	background: #fff;
	box-shadow: 0 0 20px rgba(0, 0, 0, .15);
	opacity: 0;
	transition: opacity .3s ease;
}

.exl-mega__panel.is-visible {
	opacity: 1;
}

.exl-mega__panel--mega {
	left: 0;
	right: 0;
}

.exl-mega__panel--flyout {
	left: 0;
	min-width: 280px;
	padding: 16px .5em 26px;
	box-sizing: border-box;
}

/* Last item (Shop): open towards the left so the flyout stays on screen (it was cut off at the right edge, maya M-07). */
.exl-mega__item.has-flyout:last-child .exl-mega__panel--flyout {
	left: auto;
	right: 0;
}

@media (prefers-reduced-motion: reduce) {
	.exl-mega__panel {
		transition: none;
	}
}

/* Mega layout: links on the left, latest posts on the right */
.exl-mega__row {
	display: flex;
	box-sizing: border-box;
	width: 80em;
	max-width: 100%;
	margin: 0 auto;
	padding: 26px .75em 46px;
	font-size: 16px;
}

.exl-mega__links {
	flex: 0 0 25%;
	box-sizing: border-box;
	margin: 0;
	padding: 0 20px 0 4px;
	list-style: none;
}

.exl-mega__links-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.exl-mega__flyout {
	margin: 0;
	padding: 0;
	list-style: none;
}

.exl-mega__flyout .exl-mega__links-item {
	border-bottom: 0;
}

.exl-mega__link {
	display: block;
	padding: 8px 16px;
	color: #56798a;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	font-family: "Josefin Sans", "Josefin Sans Fallback", Roboto, sans-serif;
	text-transform: uppercase;
	text-decoration: none;
}

.exl-mega__link:hover,
.exl-mega__link:focus {
	color: #97ced3;
}

.exl-mega__posts {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 20px;
	border-left: 1px solid rgba(0, 0, 0, .1);
}

.exl-mega__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.exl-mega__card {
	margin: 0;
	padding: 0;
}

.exl-mega__post {
	display: block;
	padding: 20px 10px;
	color: #56798a;
	text-decoration: none;
}

.exl-mega__thumb {
	display: block;
	aspect-ratio: 220 / 124;
	margin: 0 0 10px;
	overflow: hidden;
	background: #f2f2f2;
}

.exl-mega__img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.exl-mega__post-title {
	display: block;
	margin: 0;
	padding: 0;
	color: #222;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 300;
	letter-spacing: .5px;
	font-family: "Josefin Sans", "Josefin Sans Fallback", Roboto, sans-serif;
	text-transform: uppercase;
}

.exl-mega__post:hover .exl-mega__post-title,
.exl-mega__post:focus .exl-mega__post-title {
	color: #97ced3;
}

.exl-mega__all {
	display: block;
	padding: 5px 20px;
	color: #56798a;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	font-family: "Josefin Sans", "Josefin Sans Fallback", Roboto, sans-serif;
	text-decoration: none;
}

.exl-mega__all:hover,
.exl-mega__all:focus {
	color: #97ced3;
}

/* Top-bar country menu (Hong Kong / Australia / Malaysia) */
.exl-pre-menu__list {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.exl-pre-menu__list > li {
	margin: 0;
	padding: 0 35px 0 0;
}

.exl-pre-menu__list > li:last-child {
	padding-right: 0;
}

.exl-pre-menu__list a {
	display: block;
	color: #56798a;
	line-height: 1.3;
}

.exl-pre-menu__list a:hover,
.exl-pre-menu__list a:focus {
	color: #97ced3;
}

/* No underline on hover or focus anywhere in the menu: the hover colour is enough (owner, 2026-11-27). */
.exl-mega a,
.exl-mega a:hover,
.exl-mega a:focus,
.exl-mega a:active,
.exl-pre-menu a,
.exl-pre-menu a:hover,
.exl-pre-menu a:focus,
.exl-pre-menu a:active {
	text-decoration: none;
}

/* Same for the top bar links and icons (Login, newsletter, social icons). */
.site-pre-header a:hover,
.site-pre-header a:focus {
	text-decoration: none;
}

/* ---------- expatliving.net spacing (measured from the UberMenu setup on .net, maya N3-02 / N3-03) ---------- */
/* 32 px of space under the menu bar, like before. */
.nav-primary .exl-mega {
	margin-bottom: 32px;
}

/* Top-bar country links: 15 px top/bottom and 20 px left/right padding, no extra gap between items. */
.exl-pre-menu__list > li,
.exl-pre-menu__list > li:last-child {
	padding: 0;
}

.exl-pre-menu__list a {
	padding: 15px 20px;
}

/* Mega panels on .net were 3 px taller (maya N3-04). */
.exl-mega__row {
	padding-bottom: 49px;
}
