/* ==========================================================================
   Sleek Minimal Header Menu - V2
   ========================================================================== */

/* Header Outer - Clean & Minimal */
.site-header-outer {
	background: rgb(32, 28, 39);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
	transform: translate3d(0, 0, 0);
	-webkit-transform: translate3d(0, 0, 0);
}

/* Add padding to body to prevent content from being hidden under fixed header */
body {
	padding-top: var(--header-height);
}

@media (min-width: 768px) {
	.site-header-outer {
		background: rgba(32, 28, 39, 0.95);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		position: sticky;
	}
	
	body {
		padding-top: 0;
	}
}

/* Subtle bottom line */
.site-header-outer::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: var(--container-width);
	height: 1px;
	background: linear-gradient(90deg, 
		transparent 0%, 
		rgba(255, 255, 255, 0.1) 20%, 
		rgba(255, 255, 255, 0.1) 80%, 
		transparent 100%
	);
}

/* Header Container */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
}

/* Logo */
.site-header-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.5px;
}

.site-header-logo img {
	height: 36px;
	width: auto;
}

@media (min-width: 768px) {
	.site-header-logo img {
		height: 44px;
	}
}

/* ==========================================================================
   Desktop Menu
   ========================================================================== */
.site-header-menu {
	display: none;
}

@media (min-width: 768px) {
	.site-header-menu {
		display: block;
	}
	
	.site-header-menu > ul {
		display: flex;
		align-items: center;
		gap: 0;
		margin: 0;
		padding: 0;
		list-style: none;
	}
	
	/* Menu Items - Underline Style */
	.site-header-menu > ul > li {
		position: relative;
	}
	
	.site-header-menu > ul > li > a,
	.site-header-menu > ul > li > button {
		position: relative;
		display: flex;
		align-items: center;
		gap: 4px;
		padding: 8px 16px;
		font-size: 0.875rem;
		font-weight: 500;
		color: rgba(255, 255, 255, 0.7);
		text-decoration: none;
		background: transparent;
		border: none;
		cursor: pointer;
		transition: color 0.2s ease;
		white-space: nowrap;
	}
	
	/* Underline effect */
	.site-header-menu > ul > li > a::after,
	.site-header-menu > ul > li > button::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 16px;
		right: 16px;
		height: 2px;
		background: hsl(var(--color-pink-200));
		transform: scaleX(0);
		transform-origin: right;
		transition: transform 0.3s ease;
	}
	
	.site-header-menu > ul > li > a:hover,
	.site-header-menu > ul > li > button:hover,
	.site-header-menu > ul > li.show > a,
	.site-header-menu > ul > li.show > button {
		color: #fff;
	}
	
	.site-header-menu > ul > li > a:hover::after,
	.site-header-menu > ul > li > button:hover::after,
	.site-header-menu > ul > li.show > a::after,
	.site-header-menu > ul > li.show > button::after {
		transform: scaleX(1);
		transform-origin: left;
	}
	
	/* Active menu item */
	.site-header-menu > ul > li.current-menu-item > a,
	.site-header-menu > ul > li.current-menu-parent > a,
	.site-header-menu > ul > li.current-menu-ancestor > a {
		color: #fff;
	}
	
	.site-header-menu > ul > li.current-menu-item > a::after,
	.site-header-menu > ul > li.current-menu-parent > a::after,
	.site-header-menu > ul > li.current-menu-ancestor > a::after {
		transform: scaleX(1);
	}
	
	/* Chevron icon - minimal - ONLY for top level menu */
	.site-header-menu > ul > li > a > .ic-chevron,
	.site-header-menu > ul > li > button > .ic-chevron {
		width: 14px;
		height: 14px;
		opacity: 0.5;
		transition: all 0.2s ease;
	}
	
	.site-header-menu > ul > li.show > a > .ic-chevron,
	.site-header-menu > ul > li.show > button > .ic-chevron,
	.site-header-menu > ul > li:hover > a > .ic-chevron,
	.site-header-menu > ul > li:hover > button > .ic-chevron {
		opacity: 1;
		transform: rotate(180deg);
	}
	
	.site-header-menu li:not(.menu-item-has-children) .ic-chevron {
		display: none;
	}
	
	/* ==========================================================================
	   Dropdown Menu - Level 1 - Glass Effect
	   ========================================================================== */
	.site-header-menu .dropdown-menu {
		position: absolute;
		top: 100%;
		right: 0;
		left: auto;
		min-width: 220px;
		margin-top: 0;
		padding: 8px;
		background: rgba(24, 20, 30, 0.98);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 12px;
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
		z-index: 1000;
		list-style: none;
	}
	
	/* Add invisible padding area to prevent menu from closing */
	.site-header-menu > ul > li > .dropdown-menu::before {
		content: '';
		position: absolute;
		top: -15px;
		left: 0;
		right: 0;
		height: 15px;
	}
	
	.site-header-menu li.show > .dropdown-menu,
	.site-header-menu li:hover > .dropdown-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0s;
	}
	
	/* Dropdown items - Clean - Same style for ALL levels */
	.site-header-menu .dropdown-menu li {
		position: relative;
	}
	
	.site-header-menu .dropdown-menu li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 11px 14px;
		font-size: 0.875rem;
		font-weight: 500;
		color: rgba(255, 255, 255, 0.8);
		text-decoration: none;
		border-radius: 8px;
		transition: all 0.15s ease;
	}
	
	.site-header-menu .dropdown-menu li > a:hover {
		color: #fff;
		background: rgba(255, 0, 115, 0.18);
	}
	
	.site-header-menu .dropdown-menu li.current-menu-item > a {
		color: hsl(var(--color-pink-100));
		background: rgba(255, 0, 115, 0.08);
	}
	
	/* Chevron icons in dropdown - rotate on hover */
	.site-header-menu .dropdown-menu .ic-chevron {
		width: 14px;
		height: 14px;
		opacity: 0.5;
		transition: all 0.25s ease;
		transform: rotate(-90deg);
		flex-shrink: 0;
	}
	
	.site-header-menu .dropdown-menu li:hover > a > .ic-chevron,
	.site-header-menu .dropdown-menu li.show > a > .ic-chevron {
		opacity: 1;
		transform: rotate(-90deg) translateX(-3px);
	}
	
	/* Hide chevron for items without children */
	.site-header-menu .dropdown-menu li:not(.menu-item-has-children) .ic-chevron {
		display: none;
	}
	
	/* ==========================================================================
	   Dropdown Menu - Level 2 & 3 - Same style as Level 1
	   ========================================================================== */
	.site-header-menu .dropdown-menu .dropdown-menu {
		position: absolute;
		top: -8px;
		right: calc(100% + 8px);
		left: auto;
		margin-top: 0;
		min-width: 220px;
		padding: 8px;
		background: rgba(24, 20, 30, 0.98);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 12px;
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	}
	
	/* Invisible bridge to submenu */
	.site-header-menu .dropdown-menu .dropdown-menu::before {
		content: '';
		position: absolute;
		top: 0;
		left: 100%;
		width: 15px;
		height: 100%;
	}
	
	/* Level 3 - Same as Level 2 */
	.site-header-menu .dropdown-menu .dropdown-menu .dropdown-menu {
		right: calc(100% + 8px);
	}
}

/* ==========================================================================
   Hamburger Button - Minimal
   ========================================================================== */
.site-header-hamburger {
	position: relative;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.site-header-hamburger .ic-hamburger {
	display: none; /* Hide SVG, use ::before and ::after instead */
}

.site-header-hamburger::before,
.site-header-hamburger::after {
	content: '';
	position: absolute;
	left: 50%;
	width: 22px;
	height: 2px;
	background-color: #ffffff;
	border-radius: 999px;
	transform-origin: center center;
	transition: transform 0.3s ease, opacity 0.3s ease;
	transform: translateX(-50%);
}

.site-header-hamburger::before {
	transform: translateX(-50%) translateY(-6px);
	box-shadow: 0 6px 0 #ffffff; /* יוצר קו אמצעי נוסף – סה"כ 3 פסים */
}

.site-header-hamburger::after {
	transform: translateX(-50%) translateY(6px);
}

/* When menu is open - transform to X */

.site-header-hamburger.menu-open::before {
	transform: translateX(-50%) translateY(0) rotate(45deg);
	box-shadow: none;
}

.site-header-hamburger.menu-open::after {
	transform: translateX(-50%) translateY(0) rotate(-45deg);
}

@media (min-width: 768px) {
	.site-header-hamburger {
		display: none;
	}
}

/* ==========================================================================
   Mobile Menu - Sleek Design
   ========================================================================== */

/* Menu List */
.site-modal-menu > ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
}

/* ==================== Main Items - Glass Cards ==================== */
.site-modal-menu > ul > li > a,
.site-modal-menu > ul > li > button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 52px;
	padding: 0 16px;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background: linear-gradient(135deg, 
		rgba(52, 45, 62, 0.9) 0%, 
		rgba(74, 55, 98, 0.6) 100%
	);
	border: 1px solid rgba(246, 210, 254, 0.2);
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.25s ease;
}

.site-modal-menu > ul > li > a:hover,
.site-modal-menu > ul > li > button:hover {
	background: linear-gradient(135deg, 
		rgba(255, 0, 115, 0.2) 0%, 
		rgba(255, 158, 253, 0.15) 100%
	);
	border-color: hsl(var(--color-pink-100));
	transform: translateY(-1px);
}

.site-modal-menu > ul > li.show > a,
.site-modal-menu > ul > li.show > button {
	background: linear-gradient(135deg, 
		rgba(255, 0, 115, 0.25) 0%, 
		rgba(255, 158, 253, 0.2) 100%
	);
	border-color: hsl(var(--color-pink-100));
	color: hsl(var(--color-pink-100));
}

/* ==================== Chevron ==================== */
.site-modal-menu .ic-chevron {
	width: 20px;
	height: 20px;
	opacity: 0.6;
	transition: all 0.25s ease;
}

.site-modal-menu li:hover .ic-chevron,
.site-modal-menu li.show .ic-chevron {
	opacity: 1;
}

.site-modal-menu li.show .ic-chevron {
	transform: rotate(180deg);
}

.site-modal-menu li:not(.menu-item-has-children) .ic-chevron {
	display: none;
}

/* ==================== Dropdown Level 1 ==================== */
.site-modal-menu .dropdown-menu {
	display: none;
	width: 100%;
	min-width: auto;
	margin: 6px 0 0 0;
	padding: 6px;
	background: rgba(32, 28, 39, 0.95);
	border: 1px solid rgba(246, 210, 254, 0.1);
	border-radius: 12px;
	list-style: none;
	position: relative !important;
	transform: none !important;
}

.site-modal-menu li.show > .dropdown-menu {
	display: block;
}

/* Dropdown Items */
.site-modal-menu .dropdown-menu > li > a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 14px;
	font-size: 0.9375rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.site-modal-menu .dropdown-menu > li > a:hover {
	color: #fff;
	background: rgba(255, 0, 115, 0.18);
}

.site-modal-menu .dropdown-menu > li.show > a {
	color: hsl(var(--color-pink-100));
	background: rgba(255, 0, 115, 0.12);
}

.site-modal-menu .dropdown-menu .ic-chevron {
	width: 16px;
	height: 16px;
}

/* ==================== Dropdown Level 2 ==================== */
.site-modal-menu .dropdown-menu .dropdown-menu {
	margin: 4px 0 0 0;
	padding: 4px;
	background: rgba(24, 20, 30, 0.95);
	border-color: rgba(246, 210, 254, 0.08);
	border-radius: 10px;
}

.site-modal-menu .dropdown-menu .dropdown-menu > li > a {
	padding: 10px 12px;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.75);
	border-radius: 6px;
}

.site-modal-menu .dropdown-menu .dropdown-menu > li > a:hover {
	color: #fff;
	background: rgba(255, 0, 115, 0.15);
}

/* ==================== Dropdown Level 3 ==================== */
.site-modal-menu .dropdown-menu .dropdown-menu .dropdown-menu {
	margin: 4px 0 0 0;
	padding: 4px;
	background: rgba(20, 17, 26, 0.95);
	border-radius: 8px;
}

.site-modal-menu .dropdown-menu .dropdown-menu .dropdown-menu > li > a {
	padding: 8px 10px;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.65);
}

.site-modal-menu .dropdown-menu .dropdown-menu .dropdown-menu > li > a:hover {
	color: #fff;
	background: rgba(255, 0, 115, 0.12);
}

/* ==================== Active ==================== */
.site-modal-menu .current-menu-item > a {
	color: hsl(var(--color-pink-100));
}

/* ==========================================================================
   Fix personal-content sticky position under header
   ========================================================================== */
@media (min-width: 1024px) {
	.personal-content {
		top: calc(var(--header-height) + 20px) !important;
	}
}

/* ==========================================================================
   Card Modal - Fix background color
   ========================================================================== */
.modal-card .modal-content,
.modal.modal-card .modal-content,
#personalCard .modal-content,
#personalCard.modal-card .modal-content {
	background: #282230 !important;
	background-color: #282230 !important;
}

/* ==========================================================================
   Accent Menu
   ========================================================================== */
.site-header-accent-menu {
	display: none;
}

@media (min-width: 768px) {
	.site-header-accent-menu {
		display: flex;
		align-items: center;
		margin-right: 10px;
	}
	
	.site-header-accent-menu a {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 8px 20px;
		font-size: 0.8125rem;
		font-weight: 600;
		color: #fff;
		text-decoration: none;
		background: hsl(var(--color-pink-200));
		border-radius: 6px;
		transition: all 0.2s ease;
	}
	
	.site-header-accent-menu a:hover {
		background: hsl(var(--color-pink-100));
		color: hsl(var(--color-black-100));
	}
}
