/* ===========================
   FIMBank Navigation Menu Styles - Single Menu for Desktop & Mobile
========================== */

/* Skip Link for Accessibility */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.sr-only-focusable:focus {
	position: static;
	width: auto;
	height: auto;
	padding: 10px 20px;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background-color: var(--fim-navy);
	color: white;
	text-decoration: none;
	z-index: 100000;
	display: block;
}

:root {
	--fim-navy: #0b1f42;
	--fim-text: #333333;
	--fim-text-light: #666666;
	--fim-border: #e0e0e0;
	--fim-bg-light: #f9f9f9;
}

/* Reset and Base Styles */
* {
	box-sizing: border-box;
}

/* Main Navbar Container */
.fimbank-navbar {
	background-color: white;
	border-bottom: 1px solid var(--fim-border);
	position: sticky;
	top: 0;
	z-index: 1000;
	width: 100%;
}

.navbar-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
}

/* Logo */
.navbar-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.navbar-logo img {
	height: 40px;
	width: auto;
}

a.navbar-logo img {
	max-width: 110px;
}

/* Main Menu - Desktop and Mobile Combined */
.navbar-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	justify-content: center;
	gap: 5px;
}

/* Hide navbar-actions inside menu by default (desktop) */
.navbar-menu > .navbar-actions {
	display: none !important;
}

/* Desktop Menu Item */
.menu-item {
	position: relative;
}

.menu-link {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 10px 16px;
	color: var(--fim-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
	transition: color 0.3s;
}

.menu-link:hover {
	color: var(--fim-navy);
}

.menu-link i {
	font-size: 10px;
	transition: transform 0.3s;
}

.menu-item.active .menu-link i {
	transform: rotate(180deg);
}

/* Desktop Mega Menu */
.mega-menu {
	position: fixed;
	top: 70px;
	left: 0;
	right: 0;
	width: 100%;
	background: white;
	border-top: 1px solid var(--fim-border);
	border-bottom: 1px solid var(--fim-border);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
	z-index: 999;
}

.mega-menu-two-column {
	/* Full width for all mega menus */
}

.menu-item:hover .mega-menu,
.menu-item.active .mega-menu {
	opacity: 1;
	visibility: visible;
}

.mega-menu-content {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	padding: 40px;
	max-width: 1400px;
	margin: 0 auto;
}

.mega-menu-two-column .mega-menu-content {
	grid-template-columns: repeat(2, 1fr);
	max-width: 900px;
}

.mega-menu-column h4 {
	color: var(--fim-navy);
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 8px 0;
}

.menu-description {
	color: var(--fim-text-light);
	font-size: 13px;
	line-height: 1.4;
	margin: 0 0 16px 0;
}

.mega-menu-column ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mega-menu-column ul li {
	margin-bottom: 8px;
}

.mega-menu-column ul li a {
	color: var(--fim-text);
	font-size: 14px;
	text-decoration: none;
	transition: color 0.2s;
	display: block;
}

.mega-menu-column ul li a:hover {
	color: var(--fim-navy);
	text-decoration: underline;
}

/* Search and Actions */
.navbar-actions {
	display: none;
	align-items: center;
	gap: 20px;
}

.search-box {
	display: flex;
	align-items: center;
	border: 1px solid var(--fim-border);
	border-radius: 4px;
	overflow: hidden;
	background: white;
}

.search-input {
	border: none;
	padding: 8px 12px;
	font-size: 14px;
	outline: none;
	width: 180px;
}

.search-button {
	background: transparent;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	color: var(--fim-text);
	transition: color 0.3s;
}

.search-button:hover {
	color: var(--fim-navy);
}

.btn-login {
	background-color: var(--fim-navy);
	color: white;
	padding: 10px 24px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	transition: background-color 0.3s;
	white-space: nowrap;
}

.btn-login:hover {
	background-color: #1a3b70;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 24px;
	height: 18px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
}

.hamburger-icon {
	width: 100%;
	height: 2px;
	background-color: var(--fim-navy);
	transition: all 0.3s;
	border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-icon:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-icon:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon:nth-child(3) {
	transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
	display: none;
	position: fixed;
	top: 70px;
	left: 0;
	width: 100%;
	height: calc(100vh - 70px);
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 998;
	opacity: 0;
	transition: opacity 0.3s;
}

.mobile-overlay.active {
	display: block;
	opacity: 1;
}

/* Desktop Breakpoint */
@media (min-width: 992px) {
	.navbar-menu {
		display: flex;
	}

	.navbar-actions {
		display: flex;
	}

	.mobile-menu-toggle {
		display: none;
	}
}

/* Mobile Styles */
@media (max-width: 991px) {
	/* Fix horizontal scrolling */
	html,
	body {
		overflow-x: hidden !important;
		max-width: 100vw !important;
	}

	.navbar-content {
		height: 60px;
		padding: 0 15px;
	}

	.navbar-logo img {
		height: 32px;
	}

	/* Hide desktop actions on mobile */
	.navbar-content > .navbar-actions {
		display: none !important;
	}

	/* Transform Main Menu for Mobile */
	.navbar-menu {
		display: flex;
		position: fixed;
		top: 60px;
		left: -100%;
		width: 350px;
		max-width: 85vw;
		height: calc(100vh - 60px);
		background-color: white;
		flex-direction: column;
		justify-content: flex-start;
		gap: 0;
		overflow-y: auto;
		overflow-x: hidden;
		transition: left 0.3s ease-in-out;
		z-index: 999;
		padding: 0;
		box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
	}

	.navbar-menu.active {
		left: 0;
	}

	/* Show navbar-actions inside mobile menu */
	.navbar-menu > .navbar-actions {
		display: flex !important;
		flex-direction: column;
		gap: 15px;
		padding: 20px;
		border-bottom: 1px solid var(--fim-border);
		order: -1; /* Place at top */
		width: 100%;
	}

	.navbar-menu .search-box {
		width: 100%;
	}

	.navbar-menu .search-input {
		width: 100%;
		flex: 1;
	}

	.navbar-menu .btn-login {
		width: 100%;
		text-align: center;
	}

	/* Mobile Menu Items */
	.menu-item {
		width: 100%;
		border-bottom: 1px solid var(--fim-border);
	}

	.menu-link {
		width: 100%;
		padding: 18px 20px;
		justify-content: space-between;
		font-size: 16px;
		font-weight: 500;
	}

	.menu-link i {
		font-size: 12px;
		margin-left: auto;
	}

	/* Mobile Mega Menu Transform */
	.mega-menu {
		position: static;
		display: none;
		width: 100%;
		background-color: var(--fim-bg-light);
		border: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		padding: 15px 20px;
	}

	.menu-item.active .mega-menu {
		display: block;
	}

	.mega-menu-content {
		display: flex;
		flex-direction: column;
		gap: 20px;
		padding: 0;
	}

	.mega-menu-column h4 {
		font-size: 14px;
		margin-bottom: 10px;
	}

	.menu-description {
		display: none;
	}

	.mega-menu-column ul li {
		margin-bottom: 8px;
	}

	.mega-menu-column ul li a {
		font-size: 13px;
		padding: 4px 0;
	}
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 991px) {
	.navbar-content {
		padding: 0 15px;
	}
}

/* Smooth scrolling for mobile menu */
@media (max-width: 991px) {
	body.menu-open {
		overflow: hidden;
	}
}

/* Accessibility */
.menu-link:focus,
.btn-login:focus,
.search-button:focus {
	outline: 2px solid var(--fim-navy);
	outline-offset: 2px;
}

/* Print styles */
@media print {
	.fimbank-navbar {
		display: none;
	}
}

img[src*="cdn.cybersift.io/pixel/fimbank.com-1664441265"] {
	display: block; /* so width/height rules apply cleanly */
	width: 0;
	height: 0;
	overflow: hidden;
}