/* ==========================================================================
   Header Mega Menu  (rendered by inc/mega-menu.php)
   ========================================================================== */


/* --------------------------------------------------------------------------
   Desktop – top-level tabs
   -------------------------------------------------------------------------- */
.header .navbar { position: static; } /* panel positions against the fixed header */
.navbar .pb-nav > li { position: static; }
.navbar .pb-nav > li > a,
.navbar .pb-nav > li > a:focus {
	position: relative;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	display: flex;
	align-items: center; /* "+" / "×" icon centred on the label */
	line-height: 1;
	gap: 3px;           /* text ↔ "+" icon */
	font-size: 13px;    /* theme default is 14px */
	padding-left: 22px; /* theme default is 30px – tighter tab spacing */
}
@media (max-width: 1366px) {
	.navbar .pb-nav > li > a,
	.navbar .pb-nav > li > a:focus { padding-left: 16px; }
}

/* "+" after every tab that opens a panel */
.pb-mega__plus {
	display: inline-block;
	width: 9px;
	height: 9px;
	position: relative;
	top: -1px;          /* optical centre against the uppercase label */
	flex: 0 0 auto;
	align-self: center;
	transform-origin: 50% 50%;
	transition: transform 0.25s ease;
}
.pb-mega__plus::before,
.pb-mega__plus::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 9px;
	height: 2px;
	margin-top: -1px;
	border-radius: 2px;
	background: #6B3FE1;
	transition: background 0.2s ease;
}
.pb-mega__plus::after { transform: rotate(90deg); }

/* Active / open tab turns purple (as in the design) */
.navbar .pb-nav > li.has-mega:hover > a,
.navbar .pb-nav > li.has-mega.is-open > a,
.navbar .pb-nav > li.has-mega:focus-within > a,
ul#menu-main-menu.pb-nav > li.has-mega:hover > a,
ul#menu-main-menu.pb-nav > li.has-mega.is-open > a,
ul#menu-main-menu.pb-nav > li.has-mega:focus-within > a {
	background: none;
	-webkit-text-fill-color: #A855F7;
	color: #A855F7;
}
.navbar .pb-nav > li.has-mega:hover > a .pb-mega__plus::before,
.navbar .pb-nav > li.has-mega:hover > a .pb-mega__plus::after,
.navbar .pb-nav > li.has-mega.is-open > a .pb-mega__plus::before,
.navbar .pb-nav > li.has-mega.is-open > a .pb-mega__plus::after,
.navbar .pb-nav > li.has-mega:focus-within > a .pb-mega__plus::before,
.navbar .pb-nav > li.has-mega:focus-within > a .pb-mega__plus::after { background: #A855F7; }
.navbar .pb-nav > li.has-mega:hover > a .pb-mega__plus,
.navbar .pb-nav > li.has-mega.is-open > a .pb-mega__plus,
.navbar .pb-nav > li.has-mega:focus-within > a .pb-mega__plus { transform: rotate(45deg); }

/* --------------------------------------------------------------------------
   Desktop – panel (full-bleed white extension of the header, no box)
   -------------------------------------------------------------------------- */
.pb-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 1000;
	background: #fff;
	box-shadow: 0 14px 28px rgba(1, 41, 112, 0.06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	pointer-events: none;
}
.pb-mega::before { /* hover bridge covering the header's bottom padding */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 32px; /* tab link padding + header padding */
}
.navbar .pb-nav > li.has-mega:hover > .pb-mega,
.navbar .pb-nav > li.has-mega.is-open > .pb-mega,
.navbar .pb-nav > li.has-mega:focus-within > .pb-mega {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
	pointer-events: auto;
}
.pb-mega > .container { max-height: calc(100vh - 110px); overflow-y: auto; }
.pb-mega__inner {
	display: grid;
	grid-template-columns: 25% minmax(0, 1fr); /* intro 25% | sections 75% (gap taken from the right) */
	gap: 0 32px;
	padding: 52px 0 70px;
}

/* Intro column: "Explore our" (purple > blue) + "products" (cyan) */
.pb-mega__intro .pb-mega__heading {
	margin: 0 0 14px;
	font-family: "Poppins", "Poppins Fallback", sans-serif;
	font-size: 28px;
	line-height: 1.12;
	font-weight: 700;
	/* same gradient as the site's .gradient_title headings */
	background: linear-gradient(90deg, #d946ef 0%, #8b5cf6 40%, #4f7cff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #8b5cf6;
}
.pb-mega__accent {
	/* no own background: the heading's gradient flows through this word too */
	display: block;
	background: none;
	-webkit-text-fill-color: transparent;
}
.pb-mega__intro p {
	margin: 0;
	max-width: 320px;
	font-size: 13px;
	line-height: 1.55;
	color: #3b3f4e;
}

/* Section columns: equal widths across the remaining space */
.pb-mega__cols {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 36px;
	align-items: start;
}
.pb-mega__inner--cols-1 .pb-mega__cols { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr)); }
.pb-mega__inner--cols-1 .pb-mega__cols .pb-mega__col--two { grid-column: 1 / -1; }
.pb-mega__inner--cols-2 .pb-mega__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb-mega__inner--cols-3 .pb-mega__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Reset the generic .navbar link/list rules inside the panel */
.navbar .pb-mega ul { display: block; margin: 0; padding: 0; list-style: none; }
.navbar .pb-mega li { margin: 0; position: static; }
.navbar .pb-mega a,
.navbar .pb-mega a:focus {
	display: inline-block;
	padding: 0;
	white-space: normal;
	text-decoration: none;
	font-weight: 700;
	color: #0b1326;
	transition: color 0.2s ease;
}

/* Section with a link and no sub-links: the whole box is the link */
.pb-mega__box { position: relative; cursor: pointer; }
.pb-mega__box > a.pb-mega__title::after { content: ""; position: absolute; inset: 0; }
.pb-mega__box > a.pb-mega__title:focus-visible::after { outline: 2px solid #A855F7; outline-offset: 4px; border-radius: 4px; }

/* Section title – purple with a thin magenta underline only while its column is hovered / focused */
.navbar .pb-mega a.pb-mega__title,
.pb-mobile a.pb-mega__title {
	display: inline-block;
	margin-bottom: 10px;
	padding-bottom: 3px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #0b1326;
	border-bottom: 1.5px solid transparent;
}
.navbar .pb-mega .pb-mega__col:hover a.pb-mega__title,
.navbar .pb-mega .pb-mega__col:focus-within a.pb-mega__title {
	color: #A855F7;
	border-bottom-color: #D946EF;
}
.pb-mega__desc {
	margin: 0 0 12px;
	font-size: 11.5px;
	line-height: 1.5;
	color: #3b3f4e;
}

.pb-mega__links li + li { margin-top: 13px; }
.navbar .pb-mega .pb-mega__links a {
	font-size: 12.5px;
	line-height: 1.35;
}
.navbar .pb-mega .pb-mega__links a:hover,
.navbar .pb-mega .pb-mega__links a:focus,
.navbar .pb-mega .pb-mega__links a[aria-current="page"] { color: #A855F7; }
.pb-mega__links--nested {
	margin: 5px 0 4px 6px !important;
	padding-left: 14px !important;
	border-left: 2px solid #e5e2f5;
}
.pb-mega__links--nested li + li { margin-top: 9px; }
.pb-mega__links--nested a { line-height: 1.4; }
.navbar .pb-mega .pb-mega__links--nested a,
.pb-mobile .pb-mega__links--nested a { font-size: 12px; font-weight: 500; color: #3b3f4e; }

/* Sections with the 'pb-inline-links' menu class: links on one line, "APAC | NA" */
.navbar .pb-mega .pb-mega__links--inline,
.pb-mobile .pb-mega__links--inline { display: flex; flex-wrap: wrap; align-items: center; }
.pb-mega__links--inline li + li { margin-top: 0; }
.pb-mega__links--inline li + li::before {
	content: "|";
	margin: 0 10px;
	color: #c9c6de;
	font-weight: 400;
}
.pb-mobile .pb-mega__links--inline a { display: inline; }

/* Tabs without sub-sections: plain link list, two columns when long */
/* Long plain lists span the panel and flow across all 4 columns, row by row */
.navbar .pb-mega .pb-mega__col--two .pb-mega__links {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 36px;
	align-items: start;
}
.pb-mega__col--two .pb-mega__links li + li { margin-top: 0; }

/* Header CTA, as in the design: magenta > blue, square corners, chevron */
.header .getstarted .primary_btn {
	background: linear-gradient(90deg, #F03FEA 0%, #7A4DFF 55%, #3D5CFF 100%);
	border-radius: 0;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 11px 16px;
	box-shadow: none;
}
.header .getstarted .primary_btn:hover {
	background: linear-gradient(90deg, #3D5CFF 0%, #7A4DFF 45%, #F03FEA 100%);
	box-shadow: 0 8px 18px rgba(122, 77, 255, 0.3);
}

@media (max-width: 1500px) {
	.pb-mega__inner { grid-template-columns: 25% minmax(0, 1fr); padding: 40px 0 54px; }
	.pb-mega__intro .pb-mega__heading { font-size: 24px; }
	.pb-mega__cols { gap: 28px 24px; }
}

/* --------------------------------------------------------------------------
   Mobile toggle (hamburger)
   -------------------------------------------------------------------------- */
.pb-burger {
	display: none;
	width: 44px;
	height: 38px;
	padding: 9px 11px;
	margin-left: 10px;
	border: 0;
	border-radius: 4px;
	background: #002855;
	cursor: pointer;
	flex-direction: column;
	justify-content: space-between;
}
.pb-burger span {
	display: block;
	height: 2px;
	width: 100%;
	border-radius: 2px;
	background: #fff;
	transition: transform 0.25s ease, opacity 0.2s ease;
}
.pb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.pb-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pb-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Hide the WP Responsive Menu plugin trigger where the theme menu is active */
body.pb-has-mega #rmp_menu_trigger,
body.pb-has-mega .rmp-container { display: none !important; }

/* --------------------------------------------------------------------------
   Mobile drawer
   -------------------------------------------------------------------------- */
.pb-mobile {
	position: fixed;
	left: 0;
	right: 0;
	top: var(--pb-header-h, 70px);
	bottom: 0;
	z-index: 996;
	background: #fff;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.pb-mobile.is-open {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
body.pb-mobile-open { overflow: hidden; }
.pb-mobile__scroll {
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px 20px 30px;
}
.pb-mobile ul { list-style: none; margin: 0; padding: 0; }
.pb-mobile li { margin: 0; }
.pb-mobile__tab { border-bottom: 1px solid #ececf3; }
.pb-mobile__tab-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 0;
	border: 0;
	background: none;
	text-align: left;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: #002855;
	text-decoration: none;
	cursor: pointer;
}
.pb-mobile__tab-link .pb-mega__plus { width: 11px; height: 11px; }
.pb-mobile__tab-link .pb-mega__plus::before,
.pb-mobile__tab-link .pb-mega__plus::after { width: 11px; }
.pb-mobile__tab-link[aria-expanded="true"] { color: #A855F7; }
.pb-mobile__tab-link[aria-expanded="true"] .pb-mega__plus { transform: rotate(45deg); }
.pb-mobile__tab-link[aria-expanded="true"] .pb-mega__plus::before,
.pb-mobile__tab-link[aria-expanded="true"] .pb-mega__plus::after { background: #A855F7; }

.pb-mobile__panel { padding: 0 0 18px; }
.pb-mobile__intro {
	margin: -4px 0 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #4b5063;
}
.pb-mobile__section { padding: 12px 0 4px; }
.pb-mobile__section + .pb-mobile__section { border-top: 1px dashed #ececf3; margin-top: 8px; padding-top: 16px; }
.pb-mobile a { text-decoration: none; color: #0b1326; }
.pb-mobile .pb-mega__desc { margin-bottom: 12px; font-size: 12px; }
.pb-mobile .pb-mega__links a { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.pb-mobile .pb-mega__links li + li { margin-top: 10px; }
/* Inline links ("APAC | NA") stay on one line in the drawer too */
.pb-mobile .pb-mega__links.pb-mega__links--inline li { display: flex; align-items: center; }
.pb-mobile .pb-mega__links.pb-mega__links--inline li + li { margin-top: 0; }
.pb-mobile .pb-mega__links.pb-mega__links--inline a { display: inline-block; }
.pb-mobile .pb-mega__links--nested { margin: 5px 0 4px 6px !important; padding-left: 14px !important; }
.pb-mobile__cta { padding: 22px 0 0; }
.pb-mobile__cta .primary_btn { width: 100%; justify-content: center; font-size: 13px; padding: 13px 16px; }

@media (max-width: 1240px) {
	.pb-mega { display: none; }
	.pb-burger { display: flex; }
	.header .menu-part { width: auto; }
	.header .menu-part .navbar { order: 2; }
	.navbar .pb-nav { display: none; }
}
@media (min-width: 1241px) {
	.pb-mobile { display: none; }
}
@media (max-width: 767px) {
	.pb-burger { width: 40px; height: 36px; padding: 8px 10px; margin-left: 8px; }
	.pb-mobile__scroll { padding: 2px 16px 24px; }
	.pb-mobile__tab-link { font-size: 13px; padding: 14px 0; }
}
