/**
 * Exam mega menu v2 — white theme, viewport-centered. Scoped to .exam-mega-v2 only.
 */

@media (min-width: 992px) {

	.exam-mega-nav {
		position: static;
	}

	/* Exam toggle must receive hover (global style sets pointer-events: none) */
	.exam-mega-nav > .nav-link.dropdown-toggle {
		pointer-events: auto !important;
	}

	/* Hidden until hover or JS .exam-mega-open (fixed menu breaks :hover gap) */
	.exam-mega-nav > ul.dropdown-menu.megamenu.exam-mega-v2 {
		display: none !important;
	}

	/* Beat style.css / header inline left:-396px on .megamenu */
	li.dropdown:hover > ul.dropdown-menu.megamenu.exam-mega-v2,
	li.dropend:hover > ul.dropdown-menu.megamenu.exam-mega-v2,
	li.nav-item.dropdown.exam-mega-nav:hover > ul.dropdown-menu.megamenu.exam-mega-v2,
	li.nav-item.dropdown.exam-mega-nav:focus-within > ul.dropdown-menu.megamenu.exam-mega-v2,
	li.nav-item.dropdown.exam-mega-nav.exam-mega-open > ul.dropdown-menu.megamenu.exam-mega-v2,
	li.nav-item.dropdown.exam-mega-nav > ul.dropdown-menu.megamenu.exam-mega-v2.show {
		display: block !important;
		position: fixed !important;
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%) !important;
		top: var(--exam-mega-top, 72px) !important;
		width: min(1140px, calc(100vw - 32px)) !important;
		max-width: calc(100vw - 32px) !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 1px solid #e2e8f0;
		border-radius: 14px;
		background: #ffffff;
		/* box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06); */
		z-index: 1060;
		overflow: visible;
		pointer-events: auto;
	}

	/* Invisible bridge so cursor can travel from nav link to fixed panel */
	.exam-mega-nav > ul.dropdown-menu.megamenu.exam-mega-v2::before {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		top: -28px;
		height: 28px;
		background: transparent;
		pointer-events: auto;
	}

	.exam-mega-v2__holder {
		list-style: none;
		margin: 0;
		padding: 0;
		width: 100%;
	}

	.exam-mega-v2__inner {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		min-height: 300px;
		max-height: 420px;
	}

	.exam-mega__col {
		display: flex;
		flex-direction: column;
		min-width: 0;
		padding: 18px 14px;
		overflow-y: auto;
		overflow-x: hidden;
		background: #ffffff;
	}

	.exam-mega__col--1 {
		background: #fafbfc;
		border-radius: 14px 0 0 14px;
	}

	.exam-mega__col + .exam-mega__col {
		border-left: 1px solid #e8edf2;
	}

	.exam-mega__heading {
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.08em;
		color: #94a3b8;
		margin: 0 8px 14px;
		text-transform: uppercase;
	}

	.exam-mega__list {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.exam-mega__list-item {
		margin: 0 0 6px;
		padding: 0;
		list-style: none;
	}

	.exam-mega__list-item .exam-mega__item {
		display: flex;
	}

	.exam-mega__panel {
		display: block;
	}

	.exam-mega__panel[hidden] {
		display: none !important;
	}

	.exam-mega__item {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		margin: 0;
		padding: 10px 14px;
		border: none;
		border-radius: 100px;
		background: #f1f5f9;
		color: #1e293b;
		font-size: 14px;
		font-weight: 600;
		font-family: 'Raleway', sans-serif;
		text-align: left;
		text-decoration: none;
		cursor: pointer;
		transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
		box-sizing: border-box;
		margin-top: 6px !important;
	}

	.exam-mega__col--2 .exam-mega__item,
	.exam-mega__col--3 .exam-mega__item,
	.exam-mega__col--4 .exam-mega__item {
		border-radius: 8px !important;
		background: transparent;
	}

	.exam-mega__col--2 .exam-mega__item:hover,
	.exam-mega__col--3 .exam-mega__item:hover,
	.exam-mega__col--4 .exam-mega__item:hover,
	.exam-mega__col--2 .exam-mega__item.is-active,
	.exam-mega__col--3 .exam-mega__item.is-active,
	.exam-mega__col--4 .exam-mega__item.is-active {
		background: linear-gradient(151deg, #4fb5cc, #93d35f);
		color: #ffffff;
	}

	.exam-mega__col--1 .exam-mega__item:hover,
	.exam-mega__col--1 .exam-mega__item.is-active {
		background: linear-gradient(151deg, #4fb5cc, #93d35f);
		color: #ffffff;
		box-shadow: 0 2px 8px rgba(79, 181, 204, 0.25);
	}

	.exam-mega__col--2,
	.exam-mega__col--3,
	.exam-mega__col--4 {
		background: #f0f9ff;
	}

	.exam-mega__col--4 {
		border-radius: 0 14px 14px 0;
	}

	.exam-mega__icon {
		flex: 0 0 22px;
		width: 22px;
		height: 22px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.exam-mega__icon img {
		max-width: 20px;
		max-height: 20px;
		object-fit: contain;
		filter: none;
	}

	.exam-mega__item.is-active .exam-mega__icon img,
	.exam-mega__item:hover .exam-mega__icon img {
		filter: brightness(0) invert(1);
	}

	.exam-mega__icon--dot::before {
		content: '';
		display: block;
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: #94a3b8;
	}

	.exam-mega__item.is-active .exam-mega__icon--dot::before,
	.exam-mega__item:hover .exam-mega__icon--dot::before {
		background: rgba(255, 255, 255, 0.85);
	}

	.exam-mega__label {
		flex: 1 1 auto;
		min-width: 0;
		line-height: 1.35;
	}

	.exam-mega__chevron {
		flex: 0 0 auto;
		width: 8px;
		height: 8px;
		border-top: 2px solid currentColor;
		border-right: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: 0.7;
	}

	.exam-mega__chevron--external {
		width: 14px;
		height: 14px;
		border: none;
		transform: none;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2364748b' stroke-width='1.5'%3E%3Cpath d='M3 11h8V3M6 8l5-5M9 3h4v4'/%3E%3C/svg%3E") center/contain no-repeat;
		opacity: 0.85;
	}

	.exam-mega__item.is-active .exam-mega__chevron--external,
	.exam-mega__item:hover .exam-mega__chevron--external {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23ffffff' stroke-width='1.5'%3E%3Cpath d='M3 11h8V3M6 8l5-5M9 3h4v4'/%3E%3C/svg%3E");
	}

	/* Override legacy tab styles inside exam mega only */
	.exam-mega-v2 .tab,
	.exam-mega-v2 .tabcontent,
	.exam-mega-v2 .tablinks {
		all: unset;
	}

	/* Prevent navbar clipping the fixed panel */
	.navbar,
	.navbar-collapse,
	#navbar-content {
		overflow: visible;
	}
}

@media (max-width: 991.98px) {
	.exam-mega-v2 {
		display: none !important;
	}
}
