/* ==========================================================
   LawyerAI (LAI) mega menu header
   Lives in the Divi Theme Builder header layout.
   ========================================================== */

/* Divi wrappers around the header code module */
.et-l--header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 9990;
}

.et-l--header .et_pb_section,
.et-l--header .et_pb_row,
.et-l--header .et_pb_column,
.et-l--header .et_pb_code,
.et-l--header .et_pb_code_inner {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	background: transparent !important;
}

.laih {
	--laih-purple: #7655e9;
	--laih-purple-dark: #6545e7;
	--laih-lavender: #f4f1ff;
	--laih-navy: #171326;
	--laih-text: #251d42;
	--laih-text-2: #58506c;
	--laih-muted: #756d8c;
	--laih-border: #e4dff0;
	--laih-border-purple: #d6ccff;
	--laih-gradient: linear-gradient(135deg, #6545e7 0%, #8358ea 46%, #a96fed 100%);
	--laih-shadow: 0 30px 80px rgba(63, 41, 127, 0.16);
	--laih-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	position: relative;
	width: 100%;
	background: rgba(255, 255, 255, 0.93);
	border-bottom: 1px solid rgba(223, 217, 239, 0.76);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	font-family: var(--laih-font);
	color: var(--laih-text);
	-webkit-font-smoothing: antialiased;
	transition: box-shadow 0.2s ease;
}

.laih.is-scrolled {
	box-shadow: 0 10px 30px rgba(63, 41, 127, 0.08);
}

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

.laih a {
	text-decoration: none;
}

.laih button {
	font: inherit;
}

.laih-inner {
	position: relative;
	display: grid;
	grid-template-columns: 210px minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px;
	width: min(calc(100% - 48px), 1240px);
	min-height: 82px;
	margin: 0 auto;
}

.laih-logo {
	display: inline-flex;
	align-items: center;
	width: fit-content;
}

.laih-logo img {
	display: block;
	width: auto;
	height: 49px;
}

/* ==========================================================
   Desktop nav
   ========================================================== */

.laih-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.laih-item {
	position: static;
}

.laih-trigger,
.laih-plain {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 42px;
	padding: 0 14px;
	border: 0;
	border-radius: 11px;
	background: transparent;
	color: var(--laih-text-2) !important;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	transition: background 0.16s ease, color 0.16s ease;
}

.laih-trigger:hover,
.laih-plain:hover,
.laih-item.is-open .laih-trigger {
	background: var(--laih-lavender);
	color: var(--laih-purple-dark) !important;
}

.laih-chevron {
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 1.8px solid currentColor;
	border-bottom: 1.8px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.18s ease, margin 0.18s ease;
}

.laih-item.is-open .laih-chevron {
	margin-top: 3px;
	transform: rotate(-135deg);
}

/* ==========================================================
   Mega panels
   ========================================================== */

.laih-mega {
	position: absolute;
	top: calc(100% - 6px);
	left: 50%;
	width: min(calc(100vw - 48px), 760px);
	padding: 24px;
	border: 1px solid var(--laih-border);
	border-radius: 24px;
	background: #ffffff;
	box-shadow: var(--laih-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.laih-mega::before {
	content: "";
	position: absolute;
	top: -14px;
	left: 0;
	right: 0;
	height: 14px;
}

.laih-mega--wide {
	width: min(calc(100vw - 48px), 1040px);
}

.laih-mega--narrow {
	width: 400px;
}

.laih-item.is-open .laih-mega {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.laih-mega-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 290px;
	gap: 20px;
}

.laih-mega-grid--two {
	grid-template-columns: 1fr 1fr;
	gap: 28px;
}

.laih-col {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.laih-heading {
	margin: 0 0 8px 12px;
	color: var(--laih-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.laih-link {
	display: flex;
	align-items: flex-start;
	gap: 13px;
	padding: 12px;
	border-radius: 15px;
	color: var(--laih-text) !important;
	transition: background 0.16s ease;
}

.laih-link:hover {
	background: #faf9ff;
}

.laih-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--laih-border-purple);
	border-radius: 12px;
	background: var(--laih-lavender);
	color: var(--laih-purple-dark);
	transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.laih-icon svg {
	width: 20px;
	height: 20px;
}

.laih-link:hover .laih-icon {
	border-color: transparent;
	background: var(--laih-gradient);
	color: #ffffff;
}

.laih-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.laih-copy strong {
	color: var(--laih-navy);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
}

.laih-copy span {
	color: var(--laih-muted);
	font-size: 13px;
	line-height: 1.45;
}

/* Promo card */
.laih-promo {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 9px;
	min-height: 100%;
	padding: 24px;
	border-radius: 20px;
	background:
		radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.28), transparent 45%),
		var(--laih-gradient);
	color: #ffffff !important;
	box-shadow: 0 16px 40px rgba(118, 85, 233, 0.28);
	transition: transform 0.18s ease;
}

.laih-promo:hover {
	transform: translateY(-2px);
}

.laih-promo-badge {
	width: fit-content;
	margin-bottom: auto;
	padding: 6px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.laih-promo strong {
	margin-top: 36px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.laih-promo > span:not(.laih-promo-badge):not(.laih-promo-cta) {
	color: rgba(255, 255, 255, 0.86);
	font-size: 13px;
	line-height: 1.5;
}

.laih-promo-cta {
	margin-top: 6px;
	font-size: 14px;
	font-weight: 700;
}

/* Chips */
.laih-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 4px 0 0 12px;
}

.laih-chip {
	padding: 8px 13px;
	border: 1px solid var(--laih-border);
	border-radius: 999px;
	background: #ffffff;
	color: var(--laih-text-2) !important;
	font-size: 13px;
	font-weight: 600;
	transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.laih-chip:hover {
	border-color: var(--laih-border-purple);
	background: var(--laih-lavender);
	color: var(--laih-purple-dark) !important;
}

.laih-text-link {
	margin: 18px 0 0 12px;
	color: var(--laih-purple-dark) !important;
	font-size: 14px;
	font-weight: 700;
}

/* Mega footer */
.laih-mega-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 20px;
	padding: 16px 18px;
	border-radius: 16px;
	background: #faf9ff;
}

.laih-mega-footer-copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.laih-mega-footer-copy strong {
	color: var(--laih-navy);
	font-size: 14px;
	font-weight: 700;
}

.laih-mega-footer-copy span {
	color: var(--laih-muted);
	font-size: 13px;
}

.laih-mega-footer-link {
	flex: 0 0 auto;
	color: var(--laih-purple-dark) !important;
	font-size: 14px;
	font-weight: 700;
}

/* ==========================================================
   Actions
   ========================================================== */

.laih-actions {
	display: flex;
	align-items: center;
	gap: 9px;
}

.laih-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 48px;
	padding: 0 19px;
	border: 1px solid transparent;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.laih-btn svg {
	width: 17px;
	height: 17px;
}

.laih-btn:hover {
	transform: translateY(-2px);
}

.laih-btn-primary {
	background: var(--laih-gradient);
	color: #ffffff !important;
	box-shadow: 0 11px 26px rgba(118, 85, 233, 0.25);
}

.laih-btn-primary:hover {
	box-shadow: 0 15px 34px rgba(118, 85, 233, 0.32);
}

.laih-btn-secondary {
	background: #ffffff;
	border-color: var(--laih-border);
	color: var(--laih-text) !important;
}

.laih-btn-secondary:hover {
	border-color: var(--laih-border-purple);
}

/* Hamburger */
.laih-toggle {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--laih-border);
	border-radius: 13px;
	background: #ffffff;
	cursor: pointer;
}

.laih-toggle span {
	display: block;
	width: 19px;
	height: 2px;
	border-radius: 2px;
	background: var(--laih-navy);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.laih-toggle.is-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.laih-toggle.is-open span:nth-child(2) {
	opacity: 0;
}

.laih-toggle.is-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   Mobile panel
   ========================================================== */

.laih-mobile {
	display: none;
}

@media (max-width: 1120px) {
	.laih-inner {
		grid-template-columns: 1fr auto;
		min-height: 72px;
	}

	.laih-nav {
		display: none;
	}

	.laih-toggle {
		display: inline-flex;
	}

	.laih-mobile {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: block;
		max-height: calc(100vh - 72px - var(--wp-admin--admin-bar--height, 0px));
		overflow-y: auto;
		border-bottom: 1px solid var(--laih-border);
		background: #ffffff;
		box-shadow: 0 30px 60px rgba(63, 41, 127, 0.14);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	}

	.laih-mobile.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.laih-mobile-inner {
		width: min(calc(100% - 32px), 720px);
		margin: 0 auto;
		padding: 10px 0 22px;
	}

	.laih-msection {
		border-bottom: 1px solid var(--laih-border);
	}

	.laih-mtrigger,
	.laih-mplain {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 18px 4px;
		border: 0;
		background: transparent;
		color: var(--laih-navy) !important;
		cursor: pointer;
		font-size: 17px;
		font-weight: 700;
		text-align: left;
	}

	.laih-mplain {
		border-bottom: 1px solid var(--laih-border);
	}

	.laih-plus {
		position: relative;
		width: 14px;
		height: 14px;
	}

	.laih-plus::before,
	.laih-plus::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 0;
		width: 14px;
		height: 2px;
		margin-top: -1px;
		border-radius: 2px;
		background: var(--laih-purple-dark);
		transition: transform 0.2s ease;
	}

	.laih-plus::after {
		transform: rotate(90deg);
	}

	.laih-msection.is-open .laih-plus::after {
		transform: rotate(0deg);
	}

	.laih-maccordion {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows 0.22s ease;
	}

	.laih-msection.is-open .laih-maccordion {
		grid-template-rows: 1fr;
	}

	.laih-maccordion-inner {
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}

	.laih-mlink {
		padding: 11px 14px;
		border-radius: 12px;
		color: var(--laih-text-2) !important;
		font-size: 15px;
		font-weight: 600;
	}

	.laih-mlink:hover {
		background: var(--laih-lavender);
		color: var(--laih-purple-dark) !important;
	}

	.laih-msection.is-open .laih-maccordion-inner {
		padding-bottom: 12px;
	}

	.laih-mactions {
		display: grid;
		gap: 10px;
		margin-top: 20px;
	}

	.laih-mactions .laih-btn {
		width: 100%;
	}
}

@media (max-width: 768px) {
	.laih-inner {
		width: min(calc(100% - 28px), 1240px);
		min-height: 70px;
	}

	.laih-logo img {
		height: 39px;
	}

	.laih-actions .laih-btn-secondary {
		display: none;
	}

	.laih-actions .laih-btn-primary {
		min-height: 42px;
		padding: 0 14px;
	}
}

@media (max-width: 520px) {
	.laih-actions .laih-btn-primary {
		display: none;
	}
}

.laih a:focus-visible,
.laih button:focus-visible {
	outline: 3px solid rgba(118, 85, 233, 0.45);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.laih *,
	.laih *::before,
	.laih *::after {
		transition-duration: 0.01ms !important;
	}
}
