/**
 * Primary navigation: Products / Services dropdowns.
 *
 * The theme's Tailwind bundle is pre-compiled, so the classes used by the new
 * menu markup are written here rather than assumed to exist in style.css.
 */

/* ---------- Desktop bar ---------- */
.cispp-nav {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cispp-nav__item {
	position: relative;
}

.cispp-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.55rem 0;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #334155;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color 0.2s, border-color 0.2s;
}

.cispp-nav__link:hover,
.cispp-nav__link:focus-visible,
.cispp-nav__item--has-sub:hover > .cispp-nav__link {
	color: #ea580c;
	border-bottom-color: #ea580c;
}

.cispp-nav__link.is-active {
	color: #ea580c;
	border-bottom-color: #ea580c;
}

.cispp-nav__caret {
	width: 0.85rem;
	height: 0.85rem;
	margin-top: 1px;
	transition: transform 0.2s;
}

.cispp-nav__item--has-sub:hover .cispp-nav__caret,
.cispp-nav__item--has-sub:focus-within .cispp-nav__caret {
	transform: rotate(180deg);
}

/* ---------- Dropdown ---------- */
.cispp-subnav {
	position: absolute;
	top: calc(100% + 0.1rem);
	left: -0.9rem;
	z-index: 60;
	width: 21rem;
	margin: 0;
	padding: 0.45rem;
	list-style: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.9rem;
	box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

/* Small invisible bridge so the pointer can travel from link to panel. */
.cispp-nav__item--has-sub::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 0.75rem;
}

.cispp-nav__item--has-sub:hover > .cispp-subnav,
.cispp-nav__item--has-sub:focus-within > .cispp-subnav {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cispp-subnav__link {
	display: block;
	padding: 0.6rem 0.75rem;
	border-radius: 0.55rem;
	text-decoration: none;
	transition: background 0.16s, color 0.16s;
}

.cispp-subnav__link:hover,
.cispp-subnav__link:focus-visible {
	background: #fff7ed;
}

.cispp-subnav__title {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.35;
}

.cispp-subnav__link:hover .cispp-subnav__title,
.cispp-subnav__link.is-active .cispp-subnav__title {
	color: #c2410c;
}

.cispp-subnav__desc {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #64748b;
}

.cispp-subnav__link.is-active {
	background: #fff7ed;
}

/* ---------- Mobile ---------- */
.cispp-mnav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cispp-mnav__item {
	list-style: none;
}

.cispp-mnav__link {
	display: block;
	padding: 0.65rem 0.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
	border-bottom: 1px solid #f1f5f9;
}

.cispp-mnav__link.is-active {
	color: #ea580c;
}

.cispp-mnav__sub {
	margin: 0 0 0.35rem;
	padding: 0.15rem 0 0.15rem 0.85rem;
	list-style: none;
	border-left: 2px solid #fed7aa;
}

.cispp-mnav__subitem {
	list-style: none;
}

.cispp-mnav__sublink {
	display: block;
	padding: 0.5rem 0.5rem;
	font-size: 0.875rem;
	color: #475569;
	text-decoration: none;
	border-radius: 0.4rem;
}

.cispp-mnav__sublink:hover,
.cispp-mnav__sublink.is-active {
	background: #fff7ed;
	color: #c2410c;
}

/* The mobile menu stack is a plain list in the theme; keep spacing consistent. */
#mobile-menu .cispp-mnav__item + .cispp-mnav__item {
	margin-top: 0.1rem;
}

@media (max-width: 1023px) {
	.cispp-subnav {
		display: none;
	}
}
