/**
 * BABE Bali — Max Mega Menu (mega_services) premium styling.
 * Desktop: 769px+. HTML structure unchanged; targets existing .pchi-* classes.
 */

@media (min-width: 769px) {

	/* ---------- Design tokens ---------- */
	#mega-menu-wrap-mega_services {
		--babe-black: #0b0b0d;
		--babe-charcoal: #151518;
		--babe-white: #f5f2eb;
		--babe-silver: #c9c2b8;
		--babe-muted: #8f8a83;
		--babe-line: rgba(11, 11, 13, 0.08);
		--babe-line-strong: rgba(11, 11, 13, 0.14);
		--babe-panel-w: min(1240px, calc(100vw - 64px));
		--babe-rail-w: clamp(272px, 22vw, 320px);
		--babe-panel-max-h: min(76vh, 720px);
		--babe-radius-panel: 24px;
		--babe-radius-pill: 999px;
		--babe-shadow-panel:
			0 28px 80px rgba(11, 11, 13, 0.22),
			0 10px 28px rgba(11, 11, 13, 0.08);
		--babe-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	}

	.pchi-mega-menu,
	#mega-menu-wrap-mega_services,
	#mega-menu-wrap-mega_services #mega-menu-mega_services {
		overflow: visible !important;
		z-index: 99999 !important;
	}

	/* ---------- Dropdown panel shell ---------- */
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu {
		position: absolute !important;
		top: 100% !important;
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%) !important;

		width: var(--babe-panel-w) !important;
		max-width: var(--babe-panel-w) !important;
		max-height: var(--babe-panel-max-h) !important;

		margin: 0 !important;
		padding: 0 !important;

		background: var(--babe-white) !important;
		border: 1px solid var(--babe-line-strong) !important;
		border-top: 2px solid var(--babe-black) !important;
		border-radius: 0 0 var(--babe-radius-panel) var(--babe-radius-panel) !important;
		box-shadow: var(--babe-shadow-panel) !important;

		overflow: hidden !important;
		isolation: isolate !important;
	}

	/* Subtle divider between rail and content (no yellow band) */
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu::before {
		content: "" !important;
		display: block !important;
		position: absolute !important;
		top: 0 !important;
		bottom: 0 !important;
		left: var(--babe-rail-w) !important;
		width: 1px !important;
		background: var(--babe-line) !important;
		z-index: 2 !important;
		pointer-events: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu::after {
		display: none !important;
		content: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-logo-wrap,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-logo-img,
	#mega-menu-wrap-mega_services #mega-menu-mega_services img[src*="/wp-content/uploads/2026/03/2.png"] {
		display: none !important;
	}

	/* ---------- Row / columns layout ---------- */
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row,
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		min-height: 0 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu {
		display: flex !important;
		align-items: stretch !important;
		gap: 0 !important;
		min-height: 0 !important;
		max-height: var(--babe-panel-max-h) !important;
		position: relative !important;
		z-index: 1 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column {
		float: none !important;
		clear: none !important;
		width: auto !important;
		max-width: none !important;
		min-width: 0 !important;
		margin: 0 !important;
		box-sizing: border-box !important;
		min-height: 0 !important;
	}

	/* Column 1 — dark rail with internal scroll only */
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:first-child {
		flex: 0 0 var(--babe-rail-w) !important;
		align-self: stretch !important;
		max-height: var(--babe-panel-max-h) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding: 26px 22px 28px 24px !important;
		color: var(--babe-white) !important;
		background:
			linear-gradient(180deg, var(--babe-black) 0%, var(--babe-charcoal) 100%) !important;
		scrollbar-width: thin;
		scrollbar-color: var(--babe-silver) rgba(245, 242, 235, 0.06);
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:first-child::-webkit-scrollbar {
		width: 5px;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:first-child::-webkit-scrollbar-track {
		background: rgba(245, 242, 235, 0.04);
		border-radius: var(--babe-radius-pill);
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:first-child::-webkit-scrollbar-thumb {
		background: rgba(201, 194, 184, 0.55);
		border-radius: var(--babe-radius-pill);
		border: 1px solid rgba(11, 11, 13, 0.35);
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:first-child::-webkit-scrollbar-thumb:hover {
		background: rgba(201, 194, 184, 0.78);
	}

	/* Columns 2 & 3 — warm ivory content */
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row > ul.mega-sub-menu > li.mega-menu-column:not(:first-child) {
		flex: 1 1 0 !important;
		padding: 32px 30px 30px 30px !important;
		border-left: 1px solid var(--babe-line) !important;
		background: var(--babe-white) !important;
		overflow: visible !important;
		position: relative !important;
		z-index: 3 !important;
	}

	/* Widget reset */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .mega-menu-column > ul.mega-sub-menu,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .mega-menu-column > ul.mega-sub-menu > li,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .mega-menu-item-type-widget,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget_text,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget_custom_html,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .textwidget,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .custom-html-widget {
		margin: 0 !important;
		padding: 0 !important;
		list-style: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget_custom_html .custom-html-widget br {
		display: none !important;
	}

	/* ---------- Left rail typography ---------- */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-mega-title {
		display: block !important;
		margin: 0 0 22px 0 !important;
		padding: 0 0 18px 0 !important;
		border-bottom: 1px solid rgba(245, 242, 235, 0.12) !important;
		color: var(--babe-white) !important;
		font-family: var(--babe-font) !important;
		font-size: clamp(28px, 2.1vw, 38px) !important;
		line-height: 1.02 !important;
		font-weight: 600 !important;
		letter-spacing: -0.03em !important;
		text-transform: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-section {
		margin: 0 0 20px 0 !important;
		padding: 0 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-section:last-child {
		margin-bottom: 0 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-section-title {
		display: block !important;
		margin: 0 0 10px 0 !important;
		padding: 0 !important;
		color: var(--babe-silver) !important;
		background: transparent !important;
		font-family: var(--babe-font) !important;
		font-size: 10px !important;
		line-height: 1.3 !important;
		font-weight: 600 !important;
		letter-spacing: 0.18em !important;
		text-transform: uppercase !important;
		border: 0 !important;
		box-shadow: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-section-title::before,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-section-title::after {
		display: none !important;
		content: none !important;
	}

	/* Sidebar pills (pchi-yellow-link = rail actions) */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link:visited {
		display: block !important;
		width: 100% !important;
		margin: 0 0 8px 0 !important;
		padding: 11px 14px !important;
		color: var(--babe-white) !important;
		background: rgba(245, 242, 235, 0.08) !important;
		border: 1px solid rgba(201, 194, 184, 0.22) !important;
		border-radius: 14px !important;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
		text-decoration: none !important;
		font-family: var(--babe-font) !important;
		font-size: 13px !important;
		line-height: 1.25 !important;
		font-weight: 500 !important;
		letter-spacing: 0.01em !important;
		transition:
			background 180ms ease,
			color 180ms ease,
			transform 180ms ease,
			border-color 180ms ease,
			box-shadow 180ms ease !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link::before,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link::after {
		display: none !important;
		content: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link:hover,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link:focus {
		background: rgba(245, 242, 235, 0.14) !important;
		border-color: rgba(201, 194, 184, 0.4) !important;
		color: var(--babe-white) !important;
		transform: translateY(-1px) !important;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16) !important;
	}

	/* Primary CTA — Book A Visit */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link[href*="/book"],
	#mega-menu-wrap-mega_services #mega-menu-mega_services a.pchi-yellow-link[href*="/book"] {
		margin-top: 6px !important;
		padding: 13px 16px !important;
		color: var(--babe-black) !important;
		background: var(--babe-white) !important;
		border-color: var(--babe-white) !important;
		font-weight: 600 !important;
		letter-spacing: 0.06em !important;
		text-transform: uppercase !important;
		font-size: 11px !important;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2) !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link[href*="/book"]:hover,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link[href*="/book"]:focus {
		background: var(--babe-silver) !important;
		border-color: var(--babe-silver) !important;
		color: var(--babe-black) !important;
		transform: translateY(-2px) !important;
	}

	/* Legacy quote URLs — treat as secondary */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link[href="/instant-online-quote/"],
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-yellow-link[href="/request-quote/"] {
		background: rgba(245, 242, 235, 0.1) !important;
		border-color: rgba(201, 194, 184, 0.28) !important;
		color: var(--babe-white) !important;
	}

	/* ---------- Content columns typography ---------- */
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-heading,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-subheading {
		display: block !important;
		margin: 0 0 14px 0 !important;
		padding: 0 0 10px 0 !important;
		color: var(--babe-black) !important;
		font-family: var(--babe-font) !important;
		font-size: 11px !important;
		line-height: 1.35 !important;
		font-weight: 600 !important;
		letter-spacing: 0.16em !important;
		text-transform: uppercase !important;
		border-bottom: 1px solid var(--babe-line) !important;
		position: relative !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-heading::before,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-subheading::before {
		content: "" !important;
		display: inline-block !important;
		width: 4px !important;
		height: 4px !important;
		margin-right: 8px !important;
		border-radius: 50% !important;
		background: var(--babe-silver) !important;
		vertical-align: 0.2em !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-heading::after,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-subheading::after {
		display: none !important;
		content: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .custom-html-widget > .pchi-grey-heading:first-child,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .custom-html-widget > .pchi-grey-subheading:first-child,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .custom-html-widget > br:first-child + .pchi-grey-heading,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .custom-html-widget > br:first-child + .pchi-grey-subheading {
		margin-top: 0 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget_custom_html br + br + .pchi-grey-heading,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .widget_custom_html br + br + .pchi-grey-subheading {
		margin-top: 26px !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link:visited {
		display: block !important;
		width: fit-content !important;
		max-width: 100% !important;
		margin: 0 0 6px 0 !important;
		padding: 6px 0 6px 0 !important;
		color: var(--babe-charcoal) !important;
		background: transparent !important;
		font-family: var(--babe-font) !important;
		font-size: 14px !important;
		line-height: 1.45 !important;
		font-weight: 400 !important;
		letter-spacing: 0.01em !important;
		text-decoration: none !important;
		border: 0 !important;
		list-style: none !important;
		position: relative !important;
		transition:
			color 160ms ease,
			padding-left 160ms ease !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link::before {
		content: "" !important;
		display: block !important;
		position: absolute !important;
		left: 0 !important;
		top: 50% !important;
		width: 0 !important;
		height: 1px !important;
		background: var(--babe-black) !important;
		transform: translateY(-50%) !important;
		transition: width 160ms ease !important;
		opacity: 0.7 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link::after {
		display: none !important;
		content: none !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link:hover,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link:focus {
		color: var(--babe-black) !important;
		padding-left: 14px !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link:hover::before,
	#mega-menu-wrap-mega_services #mega-menu-mega_services .pchi-grey-link:focus::before {
		width: 10px !important;
	}

}

/* Top category tabs — BABE rail (pairs with style.css shell update) */
@media (min-width: 769px) {
	.pchi-mega-menu {
		background: linear-gradient(180deg, #0b0b0d 0%, #151518 100%) !important;
		border-top: 1px solid rgba(245, 242, 235, 0.08) !important;
		border-bottom: 1px solid rgba(245, 242, 235, 0.08) !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-item > a.mega-menu-link {
		height: 52px !important;
		color: #f5f2eb !important;
		font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
		font-size: 12px !important;
		font-weight: 500 !important;
		letter-spacing: 0.08em !important;
		text-transform: uppercase !important;
		transition:
			color 180ms ease,
			background 180ms ease,
			opacity 180ms ease !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-item > a.mega-menu-link::after {
		color: #c9c2b8 !important;
	}

	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-item > a.mega-menu-link:hover,
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-item.mega-toggle-on > a.mega-menu-link,
	#mega-menu-wrap-mega_services #mega-menu-mega_services > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link {
		background: rgba(245, 242, 235, 0.1) !important;
		color: #ffffff !important;
		opacity: 1 !important;
		box-shadow: inset 0 -2px 0 #c9c2b8 !important;
	}
}
