﻿/* ============================================================
   MAIN MENU CONTAINER
   ============================================================ */
.wpf-menu {
	position: relative;
	width: 100%;
}

.wpf-menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.5rem;
	margin: 0.5rem;
	cursor: pointer;
}

/* ============================================================
   TOP-LEVEL MENU LIST
   ============================================================ */
.wpf-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	line-height: 1;
}

.wpf-menu.vertical .wpf-menu-list {
	flex-direction: column;
}

.wpf-menu-item {
	position: relative;
	margin: 0;
	padding: 0;
}

	/* ============================================================
   TOP-LEVEL LINKS (default)
   ============================================================ */
	.wpf-menu-item > a {
		display: block;
		padding: 0.8rem 1.2rem;
		text-decoration: none;
		color: #155CAC;
		line-height: 1.2;
		font-weight: 600;
		transition: background-color 0.25s ease, color 0.25s ease;
		position: relative;
		font-size:1.1em;
	}

		/* Orange hover block */
		.wpf-menu-item > a:hover,
		.wpf-menu-item.active > a {
			background-color: #155CAC; /* solid orange */
			color: #fff !important;
			border-radius: 2px;
		}

	/* Indicator for children */
	.wpf-menu-item.has-children > a::after {
		font-size: 0.75em;
	}

/* ============================================================
   SUBMENU (dropdown)
   ============================================================ */
.wpf-submenu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: transparent;
	min-width:100%;
	list-style: none;
	margin: 0;
	padding: 0;
	z-index: 10;
}

	/* Default submenu item state */
	.wpf-submenu li a {
		padding: 0.6rem 1rem;
		display: block;
		background: transparent;
		color: #fff;
		font-weight: 400;
		white-space: nowrap;
		transition: background-color 0.25s ease, color 0.25s ease;
		border-top: solid 0px #fff;
	}

/* ============================================================
   TWO-STAGE SUBMENU EFFECT
   ============================================================ */

/* Stage 1: Hovering the parent gives ALL submenu items transparent orange */
.wpf-menu-item:hover > .wpf-submenu li a {
	background: rgba(21, 92, 172, 0.75); /* transparent orange */
	color: #fff;
}

/* Stage 2: Hovering the submenu item makes THAT item solid orange */
	.wpf-menu-item:hover > .wpf-submenu li a:hover {
		background: #155CAC !important;
		color: #fff !important;
	}

/* Show submenu on hover */
.wpf-menu-item:hover > .wpf-submenu {
	display: block;
}

/* Make last menu item look like a button */
.wpf-menu-list > li:last-child > a {
	background: #E27A1D; /* Orange */
	color: #fff !important;
	padding: 10px 24px;
	margin-left:20px;
	margin-top:2px;
	border-radius: 36px;
	font-weight: 500;
	text-decoration: none !important;
	display: inline-block;
	transition: background-color 0.25s ease;
}

	/* Hover → darker */
	.wpf-menu-list > li:last-child > a:hover {
		background: #444 !important;
		color: #fff !important;
	}

/* ============================================================
   MOBILE STYLES
   ============================================================ */
@media (max-width: 768px) {

	.wpf-menu-toggle {
		display: block;
	}

	.wpf-submenu {
		position: static;
		box-shadow: none;
	}

	.wpf-menu-item.has-children > a::after {
		content: " ▸";
	}

	.wpf-menu-item:hover > .wpf-submenu {
		display: block;
	}

	/* Larger touch targets */
	.wpf-menu-item > a {
		padding: 1rem 1.2rem;
	}

	.wpf-menu-drawer .wpf-menu-list {
		display: flex !important;
	}

	.wpf-menu-drawer .wpf-menu-list {
		display: flex !important;
		flex-direction: column;
		padding: 10px 0;
	}

	.wpf-menu-drawer .wpf-menu-item > a {
		padding: 14px 20px;
		font-weight:400;
		border-bottom: 1px solid rgba(0,0,0,0.08);
		background: transparent;
	}

	/* optional: remove “button” styling on last item OR keep it as CTA */
	.wpf-menu-drawer .wpf-menu-list > li:last-child > a {
		margin: 14px 20px;
		display: block;
		text-align: center;
	}

	/* Submenus: keep them indented (still hover-based unless we add tap-to-expand) */
	.wpf-menu-drawer .wpf-submenu {
		position: static;
		display: none; /* keep collapsed by default */
		padding-left: 12px;
	}

	.wpf-menu-drawer .wpf-menu-list {
		display: flex !important;
		flex-direction: column;
	}

	/* Top-level links */
	.wpf-menu-drawer .wpf-menu-item > a {
		color: #fff;
		background: transparent;
		padding: 16px 20px;
		border-bottom: 1px solid rgba(255,255,255,0.15);
	}

		/* Hover / active state */
		.wpf-menu-drawer .wpf-menu-item > a:hover {
			background: rgba(255,255,255,0.1);
			color: #fff !important;
		}

	/* Submenus */
	.wpf-menu-drawer .wpf-submenu {
		position: static;
		background: rgba(0,0,0,0.1);
	}

		.wpf-menu-drawer .wpf-submenu li a {
			color: #fff;
			background: transparent;
			padding-left: 30px;
			border-bottom: 1px solid rgba(255,255,255,0.08);
		}

	/* Remove desktop orange hover inside drawer */
	.wpf-menu-drawer .wpf-menu-item > a:hover,
	.wpf-menu-drawer .wpf-menu-item.active > a {
		background: rgba(255,255,255,0.15);
		color: #fff !important;
	}
}

@media (max-width: 768px) {

	/* Drawer must show the list (menu.css otherwise hides it on mobile) */
	.wpf-menu-drawer .wpf-menu-list {
		display: flex !important;
		flex-direction: column;
	}

	/* Make submenus animate */
	.wpf-menu-drawer .wpf-submenu {
		display: block !important; /* override display:none */
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		background: rgba(0,0,0,0.10); /* optional */
	}

	/* When open, give a large max-height (simple + reliable) */
	.wpf-menu-drawer .wpf-menu-item.submenu-open > .wpf-submenu {
		max-height: 1000px; /* big enough to fit any submenu */
	}

	/* Optional chevron rotation */
	.wpf-menu-drawer .wpf-menu-item.has-children > a::after {
		content: " ▸";
		display: inline-block;
		transition: transform 0.25s ease;
	}

	.wpf-menu-drawer .wpf-menu-item.has-children.submenu-open > a::after {
		transform: rotate(90deg);
	}
}


