/**
 * Mega Menu Styles
 *
 * Styles for the [eddwp_mega_menu] shortcode navigation and dropdown panels.
 */

/* =============================================
   Navigation Container
   ============================================= */

.eddwp-mega-menu {
	position: relative;
}

.eddwp-mega-menu__list {
	display: flex;
	align-items: center;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* =============================================
   Top-Level Nav Links
   ============================================= */

.eddwp-mega-menu__item {
	position: static;
}

.eddwp-mega-menu__top-link {
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #292929;
	text-decoration: none;
	padding: 8px 0;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.eddwp-mega-menu__top-link:hover,
.eddwp-mega-menu__top-link:focus {
	color: #00a3e4;
	text-decoration: none;
}

.eddwp-mega-menu__item.is-open > .eddwp-mega-menu__top-link {
	color: #00a3e4;
}

/* =============================================
   Chevron Icon
   ============================================= */

.eddwp-mega-menu__chevron {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.eddwp-mega-menu__item.is-open > .eddwp-mega-menu__top-link .eddwp-mega-menu__chevron {
	transform: rotate(180deg);
}

/* =============================================
   Dropdown Panels
   ============================================= */

.eddwp-mega-menu__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	background: #fff;
	border: 1px solid #171717;
	border-radius: 12px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 1000;
}

.eddwp-mega-menu__item.is-open .eddwp-mega-menu__panel {
	opacity: 1;
	visibility: visible;
}

/* Panel size variants. */
.eddwp-mega-menu__panel--features {
	width: 1007px;
}

.eddwp-mega-menu__panel--solutions {
	width: 1007px;
}

.eddwp-mega-menu__panel--compare {
	width: 280px;
}

/* =============================================
   Link Columns Inside Panels
   ============================================= */

.eddwp-mega-menu__links {
	display: flex;
	padding: 39px;
	gap: 40px;
	flex: 1;
	min-width: 0;
}

.eddwp-mega-menu__column {
	width: 208px;
	flex-shrink: 0;
}

/* Compare panel: single column, no fixed width. */
.eddwp-mega-menu__panel--compare .eddwp-mega-menu__links {
	flex-direction: column;
	gap: 0;
}

.eddwp-mega-menu__panel--compare .eddwp-mega-menu__column {
	width: auto;
}

/* =============================================
   Column Headers
   ============================================= */

.eddwp-mega-menu__column-header {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 16px;
	color: #737373;
	margin: 0 0 16px;
	padding: 0;
}

/* =============================================
   Sub-Links
   ============================================= */

.eddwp-mega-menu__link {
	display: block;
	padding: 8px 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #292929;
	text-decoration: none;
	line-height: 24px;
	transition: color 0.15s ease;
}

.eddwp-mega-menu__link:hover,
.eddwp-mega-menu__link:focus {
	color: #00a3e4;
	text-decoration: none;
}

/* =============================================
   Featured Panel (Right Side)
   ============================================= */

.eddwp-mega-menu__featured {
	background: #fffcf2;
	border-radius: 0 12px 12px 0;
	padding: 40px;
	width: 474px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
}

.eddwp-mega-menu__featured-heading {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #737373;
	margin: 0 0 16px;
	padding: 0;
	line-height: 16px;
}

/* =============================================
   Featured Posts (Features Panel)
   ============================================= */

.eddwp-mega-menu__featured-posts {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.eddwp-mega-menu__featured-post {
	display: flex;
	gap: 16px;
	align-items: center;
}

.eddwp-mega-menu__featured-post-image {
	overflow: hidden;
	flex-shrink: 0;
	width: 200px;
	height: 100px;
	border: 1px solid #171717;
}

.eddwp-mega-menu__featured-post-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.eddwp-mega-menu__featured-post-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eddwp-mega-menu__featured-post-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 178px;
	flex-shrink: 0;
}

.eddwp-mega-menu__featured-post-title {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #292929;
	line-height: 24px;
	text-decoration: none;
}

.eddwp-mega-menu__featured-post-title:hover {
	color: #00a3e4;
	text-decoration: none;
}

.eddwp-mega-menu__featured-post-viewall {
	display: inline-flex;
	align-items: center;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #0a0a0a;
	text-decoration: none;
	letter-spacing: -0.25px;
	line-height: 20px;
}

.eddwp-mega-menu__featured-post-viewall svg {
	flex-shrink: 0;
}

.eddwp-mega-menu__featured-post-viewall:hover {
	text-decoration: none;
	color: #0a0a0a;
}

/* =============================================
   Featured Story (Solutions Panel)
   ============================================= */

.eddwp-mega-menu__featured-story {
	display: block;
	text-decoration: none;
	flex: 1;
}

.eddwp-mega-menu__featured-story:hover {
	text-decoration: none;
}

.eddwp-mega-menu__featured-story-image {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 12px;
}

.eddwp-mega-menu__featured-story-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.eddwp-mega-menu__featured-story-title {
	display: block;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #292929;
	margin-bottom: 6px;
	line-height: 1.4;
}

.eddwp-mega-menu__featured-story-excerpt {
	display: block;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #737373;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =============================================
   Featured Link ("See all...")
   ============================================= */

.eddwp-mega-menu__featured-link {
	display: inline-flex;
	align-items: center;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #0a0a0a;
	text-decoration: none;
	margin-top: 16px;
	letter-spacing: -0.25px;
	line-height: 20px;
}

.eddwp-mega-menu__featured-link:hover {
	text-decoration: none;
	color: #0a0a0a;
}

.eddwp-mega-menu__featured-link svg {
	flex-shrink: 0;
}

/* =============================================
   Mobile / Responsive (max-width: 991px)
   ============================================= */

@media (max-width: 991px) {
	.eddwp-mega-menu__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.eddwp-mega-menu__top-link {
		justify-content: space-between;
		padding: 12px 0;
		border-bottom: 1px solid #f0f0f0;
	}

	.eddwp-mega-menu__panel {
		position: static;
		transform: none;
		flex-direction: column;
		width: 100% !important;
		border: none;
		border-radius: 0;
		box-shadow: none;
		background: #fafafa;
	}

	.eddwp-mega-menu__links {
		flex-direction: column;
		padding: 16px 0 16px 16px;
		gap: 16px;
	}

	.eddwp-mega-menu__column {
		width: auto;
	}

	.eddwp-mega-menu__featured {
		width: auto;
		border-radius: 0;
		padding: 20px 16px;
	}
}
