/* ==========================================================================
   Aghosh Mobile Nav — base layout. Colors/typography come from Elementor.
   GSAP handles the open/close animation; CSS provides resting states.
   ========================================================================== */

.agn {
	display: flex;
	justify-content: flex-end;
	width: 100%;
}

.agn *,
.agn *::before,
.agn *::after {
	box-sizing: border-box;
}

/* --- Trigger (hamburger) ------------------------------------------------- */
.agn__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
}

/* Neutralise theme/Elementor default button hover/focus (e.g. pink accent ring)
   so the trigger, close and chevron keep their configured colors. */
.agn__close,
.agn__sub-toggle {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	outline: 0;
	box-shadow: none;
}

/* Close + chevron are always-transparent buttons in every state. */
.agn__close,
.agn__close:hover,
.agn__close:focus,
.agn__close:focus-visible,
.agn__close:active,
.agn__sub-toggle,
.agn__sub-toggle:hover,
.agn__sub-toggle:focus,
.agn__sub-toggle:focus-visible,
.agn__sub-toggle:active {
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

/* Trigger keeps its own background control, but never the pink focus ring. */
.agn__trigger:hover,
.agn__trigger:focus,
.agn__trigger:focus-visible,
.agn__trigger:active {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.agn__bars {
	position: relative;
	display: block;
	width: 24px;
	height: 16px;
}

.agn__bar {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background-color: #16243F;
	transform-origin: center;
	transition: transform .35s cubic-bezier(.7,0,.2,1), opacity .25s ease;
}

.agn__bar:nth-child(1) { top: 0; }
.agn__bar:nth-child(2) { top: 7px; }
.agn__bar:nth-child(3) { top: 14px; }

/* Hamburger -> X when open */
.agn.is-open .agn__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.agn.is-open .agn__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.agn.is-open .agn__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Overlay panel ------------------------------------------------------- */
.agn__overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: linear-gradient(160deg, #16243F, #1A4E9B);
	visibility: hidden;          /* GSAP toggles this */
	overflow-y: auto;
	overscroll-behavior: contain;
}

.agn.is-open .agn__overlay {
	visibility: visible;
}

/* Curtain preset uses clip-path; JS sets the start state. */
.agn__overlay[data-preset="curtain"] {
	clip-path: circle(0% at calc(100% - 40px) 40px);
}

/* --- Close button -------------------------------------------------------- */
.agn__close {
	position: absolute;
	top: 22px;
	right: 22px;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.agn__close::before,
.agn__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 2px;
	background-color: #fff;
	transform-origin: center;
}

.agn__close::before { transform: translate(-50%,-50%) rotate(45deg); }
.agn__close::after  { transform: translate(-50%,-50%) rotate(-45deg); }

/* --- Nav ----------------------------------------------------------------- */
.agn__nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	width: 100%;
	max-width: 480px;
}

.agn__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.agn__item {
	width: 100%;
}

.agn__row {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	transition: margin-bottom .3s ease;
}

.agn__item--has-sub.is-sub-open .agn__row {
	margin-bottom: 10px;
}

.agn__link {
	display: inline-block;
	text-decoration: none;
	color: #fff;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	/* vertical headroom so ascenders/descenders are never clipped by the mask */
	padding: 0.08em 0.04em;
	transition: color .25s ease;
	will-change: transform, opacity;
}

/* "Rise" reveal masks ONLY the text line (not the whole item, so submenus
   and the chevron are never clipped). Headroom padding above keeps the
   tops of capital letters fully visible. */
.agn--link-rise .agn__link {
	overflow: hidden;
}

.agn__link-inner {
	display: inline-block;
	will-change: transform, opacity;
}

/* --- Submenu / dropdown -------------------------------------------------- */
.agn__sub-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	flex: 0 0 auto;
}

.agn__chevron {
	position: relative;
	display: block;
	width: 14px;
	height: 14px;
	transition: transform .35s cubic-bezier(.7,0,.2,1);
}

.agn__chevron::before,
.agn__chevron::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 9px;
	height: 2px;
	border-radius: 2px;
	background-color: #fff;
}

.agn__chevron::before { left: 0;  transform: translateY(-50%) rotate(45deg); }
.agn__chevron::after  { right: 0; transform: translateY(-50%) rotate(-45deg); }

.agn__item--has-sub.is-sub-open .agn__chevron {
	transform: rotate(180deg);
}

/* Grid 0fr -> 1fr animates to true auto height with zero JS measurement,
   so the submenu is reliably CLOSED by default and toggles purely via CSS. */
.agn__sub {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .45s cubic-bezier(.7,0,.2,1);
	width: 100%;
}

.agn__item--has-sub.is-sub-open .agn__sub {
	grid-template-rows: 1fr;
}

.agn__sub-clip {
	min-height: 0;
	overflow: hidden;          /* clips the panel completely when collapsed */
}

.agn__sub-list {
	list-style: none;
	margin: 0 auto;
	width: -webkit-fit-content;
	width: fit-content;
	min-width: 180px;
	max-width: 92%;
	padding: 12px 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	background: linear-gradient( 180deg, rgba( 255, 255, 255, 0.09 ), rgba( 255, 255, 255, 0.03 ) );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba( 0, 0, 0, 0.22 );
}

.agn__subitem {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .3s ease, transform .3s ease;
}

.agn__item--has-sub.is-sub-open .agn__subitem {
	opacity: 1;
	transform: translateY(0);
}

/* gentle stagger on reveal */
.agn__item--has-sub.is-sub-open .agn__subitem:nth-child(1) { transition-delay: .10s; }
.agn__item--has-sub.is-sub-open .agn__subitem:nth-child(2) { transition-delay: .17s; }
.agn__item--has-sub.is-sub-open .agn__subitem:nth-child(3) { transition-delay: .24s; }
.agn__item--has-sub.is-sub-open .agn__subitem:nth-child(4) { transition-delay: .31s; }
.agn__item--has-sub.is-sub-open .agn__subitem:nth-child(n+5) { transition-delay: .36s; }

.agn__sublink {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 18px;
	border-radius: 10px;
	text-decoration: none;
	color: #C8D6EC;
	font-size: 17px;
	font-weight: 500;
	letter-spacing: .2px;
	line-height: 1.3;
	white-space: nowrap;
	transition: color .2s ease, background-color .25s ease, transform .25s ease;
}

/* leading dot marker that uses the link's own color */
.agn__sublink::before {
	content: "";
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: .55;
	transition: transform .25s ease, opacity .25s ease;
}

.agn__sublink:hover {
	color: #fff;
	background: rgba( 255, 255, 255, 0.10 );
	transform: translateX(4px);
}

.agn__sublink:hover::before {
	opacity: 1;
	transform: scale(1.5);
}

/* --- CTA ----------------------------------------------------------------- */
.agn__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 8px;
	padding: 14px 42px;
	border-radius: 40px;
	background: #fff;
	color: #16243F;
	font-weight: 700;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.agn__cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

/* --- Socials ------------------------------------------------------------- */
.agn__social {
	display: flex;
	gap: 22px;
	margin-top: 6px;
}

.agn__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
	text-decoration: none;
	transition: transform .25s ease, opacity .25s ease;
}

.agn__social a:hover {
	transform: translateY(-3px);
	opacity: .85;
}

/* Lock scroll while menu open (added to <html> by JS). */
html.agn-locked,
html.agn-locked body {
	overflow: hidden;
}
