
/* Global Typography Setup */

/* Apply Open Sans to body and general content */
body, body *, p, span, div, li, td, th {
	font-family: "Open Sans", sans-serif;
}

/* Apply Montserrat to all headings */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .heading-text, [class*="heading-"] {
	font-family: "Montserrat", sans-serif !important;
}

/* Apply Montserrat to Navigation */
.menu-primary, .menu-primary *, .menu-container, .menu-container *, .mega-menu-inner, .mega-menu-inner *, .drop-menu, .drop-menu *, nav ul li a, nav.menu-primary ul li a, .navbar-nav > li > a, .navbar-brand, .mega-menu-four li a, .menu-card > a {
	font-family: "Montserrat", sans-serif !important;
}

/* Top level navigation items */
.menu-primary > li > a, .navbar-nav > li > a {
	font-weight: 600;
	letter-spacing: .5px;
}

/* Dropdown and mega menu items */
.drop-menu li a, .mega-menu-inner li a {
	font-weight: 600;
}

/* Mega menu column headers */
.mega-menu-inner > li > a[data-type="title"], .mega-menu-four > li > a:first-child {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Featured post titles - Montserrat */
.mega-post-title, .featured-post-title {
	font-family: "Montserrat", sans-serif !important;
	font-weight: 600;
}

/* Featured post excerpts - Open Sans */
.mega-post-excerpt, .featured-post-excerpt {
	font-family: "Open Sans", sans-serif !important;
	font-weight: 400;
}

/* Read more links - Open Sans */
.featured-post-readmore {
	font-family: "Open Sans", sans-serif !important;
	font-weight: 600;
	letter-spacing: .5px;
}

/* Mega Menu Thumbnails - Scope to Uncode header/mega menu containers */
.menu-container .menu-card {
	display: block;
}

.menu-container .menu-thumb-wrap {
	display: block;
	margin-bottom: .6rem;
	overflow: hidden;
	border-radius: 12px;
	width: 240px;
	height: 135px;
	position: relative;
}

.menu-container .menu-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .3s ease;
}

.menu-container .menu-card > a {
	display: block;
	line-height: 1.35;
	font-weight: 600;
}

/* Hover effects for menu thumbnails */
.menu-container .menu-card:hover .menu-thumb-img {
	transform: scale(1.05);
}

.menu-container .menu-card:hover .menu-thumb-wrap {
	box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* Hide dropdown title - Add class "hide-dropdown-title" to menu item */
.hide-dropdown-title > a[data-type="title"], .menu-container .hide-dropdown-title > a[data-type="title"] {
	display: none !important;
}

/* Featured Image Menu Items */
.mega-menu-featured-post {
	position: relative;
}

/* Featured image container inside menu link */
.mega-menu-featured-post .menu-featured-image {
	display: block;
	margin-bottom: 8px;
	overflow: hidden;
	border-radius: 6px;
	transition: all .3s ease;
}

.mega-menu-featured-post .menu-featured-image img {
	width: 240px;
	height: 135px;
	object-fit: cover;
	object-position: center;
	border-radius: 4px;
	transition: transform .3s ease;
}

.mega-menu-featured-post:hover .menu-featured-image img {
	transform: scale(1.05);
}

/* Alternative: Featured image as tooltip on hover */
.mega-menu-featured-post .menu-featured-image.tooltip {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-10px);
	z-index: 1000;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
	padding: 15px;
	opacity: 0;
	visibility: hidden;
	transition: all .3s ease;
	pointer-events: none;
	min-width: 250px;
}

.mega-menu-featured-post:hover .menu-featured-image.tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.mega-menu-featured-post .menu-featured-image.tooltip img {
	width: 320px;
	height: 180px;
	object-fit: cover;
	object-position: center;
}

/* Base Mega Menu Structure */
.custom-mega-grid, .mega-menu-inner.has-featured-grid {
	display: flex !important;
	width: 100%;
	padding: 30px 15px;
}

/* Reset Uncode's default mega menu column styles */
.mega-menu-inner.custom-mega-grid > li {
	float: none !important;
	display: flex;
	flex-direction: column;
}

/* Regular columns in mega menu */
.mega-menu-inner.custom-mega-grid > li:not(.mega-featured-column) {
	flex: 1;
	padding: 0 15px;
}

/* Featured Column (spans 2 grid spaces) */
.mega-featured-column {
	flex: 2 !important;
	max-width: 50%;
	padding-left: 30px !important;
	border-left: 1px solid rgba(0, 0, 0, .1);
}

/* Hide the "Featured" heading */
.mega-featured-column > a:first-child {
	display: none !important;
}

/* Featured Posts Grid Container */
.featured-posts-grid {
	display: block !important;
	padding: 0;
}

/* Featured Post Content Styling */
.featured-post-content {
	margin-bottom: 30px;
}

.featured-post-content:last-child {
	margin-bottom: 0;
}

.featured-post-content a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.featured-post-image {
	margin-bottom: 15px;
	overflow: hidden;
	border-radius: 4px;
	background: #f5f5f5;
	aspect-ratio: 16/9;
	position: relative;
}

.featured-post-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .3s ease;
}

.featured-post-content:hover .featured-post-image img {
	transform: scale(1.05);
}

.featured-post-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 10px 0;
	color: #333;
	line-height: 1.3;
}

.featured-post-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin: 0 0 10px 0;
}

.featured-post-readmore {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--color-primary, #007cba);
	display: inline-block;
	transition: all .3s ease;
}

.featured-post-content:hover .featured-post-readmore {
	transform: translateX(5px);
}

/* Hide dropdown arrows in featured column */
.mega-featured-column .fa-dropdown, .mega-featured-column .fa-angle-down, .mega-featured-column .fa-angle-right {
	display: none !important;
}

/* Ensure proper width for full-width mega menus */
.menu-container.full-width .mega-menu-inner.custom-mega-grid {
	width: 100%;
	max-width: 100%;
}

/* Fix for Uncode's mega menu positioning */
.mega-menu-inner.custom-mega-grid {
	left: 0;
	right: 0;
}

/* Featured Post Item Styling */
.featured-post-item {
	padding: 0 !important;
	margin: 0 !important;
}

.featured-post-item > .featured-post-content {
	padding: 15px 0;
}

.featured-post-item .fa-angle-right {
	display: none !important;
}

/* Responsive Design */
@media (max-width: 991px) {
	.custom-mega-grid, .mega-menu-inner.has-featured-grid {
		flex-direction: column;
	}
	
	.mega-menu-inner.custom-mega-grid > li, .mega-featured-column {
		flex: 1 1 100% !important;
		max-width: 100% !important;
		margin-bottom: 20px;
	}
	
	.mega-featured-column {
		border-left: none;
		border-top: 1px solid rgba(0, 0, 0, .1);
		padding-top: 20px;
		padding-left: 15px !important;
	}
	
	.featured-post-content {
		display: flex;
		gap: 20px;
		align-items: flex-start;
	}
	
	.featured-post-content .featured-post-image {
		flex: 0 0 100px;
		width: 100px;
		height: 100px;
		margin-bottom: 0;
	}
	
	.featured-post-content > a {
		display: flex;
		gap: 20px;
	}
}

/* Dark theme support */
.style-dark-original .mega-featured-column {
	border-left-color: rgba(255, 255, 255, .1);
}

.style-dark-original .featured-post-title {
	color: #fff;
}

.style-dark-original .featured-post-excerpt {
	color: rgba(255, 255, 255, .7);
}

.style-dark-original .mega-featured-column {
	border-top-color: rgba(255, 255, 255, .1);
}

/* Animation for mega menu reveal */
.mega-menu-inner {
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all .3s ease;
}

.mega-menu.open .mega-menu-inner, .mega-menu:hover .mega-menu-inner {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* 4-Grid Mega Menu Layout */

/* Ensure the mega menu dropdown uses full width */
.menu-container.full-width .mega-menu-inner {
	width: 100%;
}

/* 4-column layout: 2 menu columns (25% each) + 2 featured posts (25% each) */
.mega-menu-four li {
	width: 25%;
	/* All 4 columns get equal width */
	padding: 0 15px;
	box-sizing: border-box;
	float: left;
	vertical-align: top;
}

/* Menu columns styling (first 2 columns) */
.mega-menu-four li:not(.mega-featured-post) {}

/* Featured post columns styling */
.mega-menu-four .mega-featured-post {}

/* Style the featured post content */
.mega-post-featured {
	padding: 0;
	transition: all .3s ease;
	height: 100%;
}

.mega-post-featured a {
	text-decoration: none;
	color: inherit;
	display: block;
	height: 100%;
}

.mega-post-featured:hover {
	transform: translateY(-2px);
}

.mega-post-thumb {
	margin-bottom: 15px;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 16/9;
	background: #f5f5f5;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
	transition: all .3s ease;
}

.mega-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .3s ease;
}

.mega-post-featured:hover .mega-post-thumb {
	box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.mega-post-featured:hover .mega-post-thumb img {
	transform: scale(1.02);
}

.mega-post-title {
	font-size: 1.1em;
	font-weight: 700;
	margin: 0 0 8px 0;
	line-height: 1.3;
	color: #333;
}

.mega-post-excerpt {
	font-size: .85em;
	color: #666;
	margin: 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Menu items styling to match screenshot */
.mega-menu-four li:not(.mega-featured-post) .drop-menu li {
	width: 100% !important;
	float: none !important;
	padding: 8px 0;
}

.mega-menu-four li:not(.mega-featured-post) .drop-menu li a {
	display: flex;
	align-items: center;
	padding: 8px 0;
	color: #333;
	text-decoration: none;
	transition: color .3s ease;
}

.mega-menu li:not(.mega-featured-post) .drop-menu li .menu-icon {
	margin-right: 12px;
	font-size: 21px;
	color: #9ca3ae !important;
	transition: color .3s ease;
}

.mega-menu-four li:not(.mega-featured-post) .drop-menu li a:hover .menu-icon {
	color: var(--color-primary, #007cba);
}

/* Hide arrows on mega menu columns */
.mega-menu-inner .fa-dropdown {
	display: none;
}

/* Responsive behavior */
@media (max-width: 991px) {
	.mega-menu-four li {
		width: 100% !important;
		float: none !important;
		margin-bottom: 20px;
	}
	
	.mega-post-featured {
		display: flex;
		gap: 15px;
		align-items: flex-start;
	}
	
	.mega-post-thumb {
		flex: 0 0 160px;
		width: 160px;
		height: 90px;
		margin-bottom: 0;
	}
	
	.menu-container .menu-thumb-wrap {
		width: 160px;
		height: 90px;
	}
	
	.mega-post-content {
		flex: 1;
	}
}

/* FontAwesome Icon support for menu items */
.menu-container .fa, .menu-container .fas, .menu-container .far, .menu-container .fab, .mega-menu-inner .fa, .mega-menu-inner .fas, .mega-menu-inner .far, .mega-menu-inner .fab, .drop-menu .fa, .drop-menu .fas, .drop-menu .far, .drop-menu .fab {
	margin-right: 8px;
	display: inline-block;
	font-size: 16px;
	vertical-align: middle;
	width: 1.25em;
	text-align: center;
}

/* Ensure FontAwesome icons render properly */
.menu-container [class*="fa-"]:before, .mega-menu-inner [class*="fa-"]:before, .drop-menu [class*="fa-"]:before {
	font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
	font-weight: 900;
	font-style: normal;
}

/* Top level menu icons */
.menu-primary > li > a .fa, .menu-primary > li > a [class*="fa-"] {
	font-size: 18px;
	margin-right: 10px;
}

/* Dropdown and mega menu icons */
.drop-menu .fa, .drop-menu [class*="fa-"], .mega-menu-inner .fa, .mega-menu-inner [class*="fa-"] {
	font-size: 14px;
	margin-right: 8px;
}

/* Fix for specific FontAwesome 6 classes */
.fa-solid, .fas {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
}

.fa-regular, .far {
	font-family: "Font Awesome 6 Free";
	font-weight: 400;
}

.fa-brands, .fab {
	font-family: "Font Awesome 6 Brands";
	font-weight: 400;
}

/* Ensure clearfix for mega menu */
.mega-menu-inner:after {
	content: "";
	display: table;
	clear: both;
}

/* Custom Navigation Styles */
li a.dropdown-toggle {
	font-weight: 500 !important;
}

.mega-menu-title a {
	color: #6b7280 !important;
}

.menu-item a {
	color: #11181d !important;
}

.login-btn {
	display: inline-flex;
	justify-content: center;
	font-size: .9rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	padding: 7px 25px 8px;
	border-radius: 3rem;
	border: 1px solid #a0ffc2;
	background-color: #a0ffc2;
	color: #11181d !important;
	text-decoration: none;
}

.demo-btn {
	display: inline-flex;
	justify-content: center;
	font-size: .9rem !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	padding: 7px 25px 8px;
	border-radius: 3rem;
	border: 1px solid #997bef;
	background-color: #997bef;
	color: white !important;
	text-decoration: none;
}

.menu-container .menu-item-excerpt {
	margin-top: .5rem;
	width: 240px;
	/* Match thumbnail width */
	max-width: 100%;
	box-sizing: border-box;
}

/* Menu Item Excerpts Styling */
.menu-item-excerpt {
	font-family: "Open Sans", sans-serif !important;
	font-size: 13px;
	line-height: 1.5;
	color: #666;
	margin-top: 8px;
	display: block;
	font-weight: 400;
}

/* For menu cards with thumbnails */
.menu-card .menu-item-excerpt {
	padding: 0 5px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Dark theme support for excerpts */
.style-dark-original .menu-item-excerpt {
	color: rgba(255, 255, 255, .7);
}

/* Hover effect for better readability */
.menu-card:hover .menu-item-excerpt {
	color: #333;
}

.style-dark-original .menu-card:hover .menu-item-excerpt {
	color: rgba(255, 255, 255, .9);
}

/* Adjust spacing in menu card content */
.menu-card-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Ensure proper layout with thumbnail + link + excerpt */
.menu-card-content > a {
	order: 2;
}

.menu-card-content .menu-thumb-wrap {
	order: 1;
}

.menu-card-content .menu-item-excerpt {
	order: 3;
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
	.menu-item-excerpt {
		font-size: 12px;
		margin-top: 6px;
	}
	
	.menu-card .menu-item-excerpt {
		-webkit-line-clamp: 1;
	}
}
