/* ==========================================================
   NOVA DIGITAL - CLEAN GLASS CAPSULE HEADER & THEME ENGINE
   ========================================================== */

/* إخفاء رابط التخطي */
.nv-skip-link {
	position: absolute;
	top: -999px;
	left: 20px;
	background: #38bdf8;
	color: #030712;
	padding: 6px 14px;
	border-radius: 8px;
	z-index: 9999;
	font-weight: 700;
	text-decoration: none;
}
.nv-skip-link:focus {
	top: 15px;
}

/* الحاوية الخارجية للهيدر: طافية في أعلى الشاشة */
.nv-header {
	position: fixed;
	top: 20px;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
	pointer-events: none;
	padding: 0 16px;
	transition: all 0.3s ease;
}

.admin-bar .nv-header {
	top: 52px;
}

/* الكبسولة الزجاجية الملمومة */
.nv-header__inner {
	pointer-events: auto;
	max-width: 960px;
	margin: 0 auto;
	padding: 6px 16px 6px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background: rgba(10, 15, 30, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	-webkit-backdrop-filter: blur(24px) saturate(190%);
	backdrop-filter: blur(24px) saturate(190%);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
	transition: all 0.3s ease;
}

/* تأثير التمرير الزجاجي عند النزول */
.nv-header.is-scrolled .nv-header__inner {
	background: rgba(8, 12, 24, 0.88);
	border-color: rgba(56, 189, 248, 0.25);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* =========================================
   الشعار والاسم الأصلي
   ========================================= */
.nv-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.nv-brand__img {
	height: 34px;
	width: auto;
	object-fit: contain;
}

.nv-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.nv-brand__text strong {
	color: #ffffff;
	font-family: 'Tajawal', sans-serif;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.nv-brand__text small {
	margin-top: 2px;
	background: linear-gradient(135deg, #38bdf8, #3b82f6);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.25em;
	font-family: system-ui, sans-serif;
}

.nv-brand:hover .nv-brand__text strong {
	color: #38bdf8;
}

/* =========================================
   القائمة في المنتصف
   ========================================= */
.nv-nav {
	display: flex;
	align-items: center;
}

.nv-menu {
	display: flex;
	align-items: center;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nv-menu li a {
	color: #cbd5e1;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 999px;
	transition: all 0.2s ease;
}

.nv-menu li a:hover,
.nv-menu li.current-menu-item > a {
	color: #38bdf8;
	background: rgba(255, 255, 255, 0.06);
}

/* =========================================
   الأزرار يسار الهيدر
   ========================================= */
.nv-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* زر التحويل الداكن / الفاتح */
.nv-theme-toggle {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #38bdf8;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: all 0.2s ease;
}

.nv-theme-toggle:hover {
	background: rgba(56, 189, 248, 0.15);
	border-color: #38bdf8;
	transform: scale(1.05);
}

/* إظهار وإخفاء الأيقونة */
.nv-icon-moon { display: none; }
.nv-icon-sun { display: block; }

body.nv-light-mode .nv-icon-sun { display: none !important; }
body.nv-light-mode .nv-icon-moon { display: block !important; color: #0284c7 !important; }

/* زر CTA الكبسولي */
.nv-btn-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #ffffff !important;
	font-size: 0.85rem;
	font-weight: 700;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
	transition: all 0.2s ease;
}

.nv-btn-cta:hover {
	box-shadow: 0 0 24px rgba(37, 99, 235, 0.7);
	transform: translateY(-1px);
}

.nv-btn-cta--mobile {
	display: none;
}

/* ==========================================================
   زر القائمة بالجوال (3 خطوط تتحول إلى ✕)
   ========================================================== */
.nv-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 34px;
	height: 34px;
	background: transparent !important;
	border: none !important;
	outline: none !important;
	cursor: pointer;
	padding: 4px;
	-webkit-tap-highlight-color: transparent;
	z-index: 1002;
}

.nv-burger span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: #ffffff;
	border-radius: 2px;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
}

.nv-burger.is-active .bar-top {
	transform: translateY(7px) rotate(45deg);
	background-color: #38bdf8 !important;
}

.nv-burger.is-active .bar-mid {
	opacity: 0;
	transform: scale(0);
}

.nv-burger.is-active .bar-bot {
	transform: translateY(-7px) rotate(-45deg);
	background-color: #38bdf8 !important;
}

/* ==========================================================
   محرك الوضع الفاتح الكامل (Light Theme Rules)
   ========================================================== */
body.nv-light-mode {
	background-color: #f8fafc !important;
	color: #0f172a !important;
}

body.nv-light-mode #page,
body.nv-light-mode .site-content,
body.nv-light-mode .nv-hero,
body.nv-light-mode .nv-portfolio-page,
body.nv-light-mode .nv-blog-page,
body.nv-light-mode .nv-single-post {
	background-color: #f8fafc !important;
}

body.nv-light-mode .nv-header__inner {
	background: rgba(255, 255, 255, 0.8) !important;
	border: 1px solid rgba(226, 232, 240, 0.9) !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

body.nv-light-mode .nv-brand__text strong,
body.nv-light-mode h1,
body.nv-light-mode h2,
body.nv-light-mode h3,
body.nv-light-mode h4,
body.nv-light-mode strong,
body.nv-light-mode .nv-title {
	color: #0f172a !important;
}

body.nv-light-mode p,
body.nv-light-mode .nv-sub {
	color: #475569 !important;
}

body.nv-light-mode .nv-menu li a {
	color: #334155 !important;
}

body.nv-light-mode .nv-menu li a:hover,
body.nv-light-mode .nv-menu li.current-menu-item > a {
	color: #0284c7 !important;
	background: rgba(15, 23, 42, 0.05) !important;
}

body.nv-light-mode .nv-card,
body.nv-light-mode .nv-service-card,
body.nv-light-mode .nv-project-card,
body.nv-light-mode .nv-blog-card,
body.nv-light-mode .nv-content-card {
	background: rgba(255, 255, 255, 0.9) !important;
	border: 1px solid rgba(226, 232, 240, 0.9) !important;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04) !important;
}

body.nv-light-mode .nv-burger span {
	background-color: #0f172a !important;
}

body.nv-light-mode .nv-theme-toggle {
	background: rgba(15, 23, 42, 0.04) !important;
	border-color: rgba(15, 23, 42, 0.1) !important;
}

/* =========================================
   تجاوب شاشات الجوال
   ========================================= */
@media (max-width: 900px) {
	.nv-header {
		top: 14px;
		padding: 0 12px;
	}

	.nv-header__inner {
		padding: 6px 12px;
		border-radius: 999px;
	}

	.nv-burger {
		display: flex;
	}

	.nv-btn-cta {
		display: none;
	}

	.nv-brand__text small {
		display: none;
	}

	.nv-nav {
		position: fixed;
		top: 75px;
		left: 14px;
		right: 14px;
		background: rgba(10, 16, 31, 0.98);
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 20px;
		-webkit-backdrop-filter: blur(25px);
		backdrop-filter: blur(25px);
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
		padding: 24px 20px;
		display: none;
		flex-direction: column;
		align-items: stretch;
		z-index: 1001;
	}

	.nv-nav.is-open {
		display: flex !important;
	}

	body.nv-light-mode .nv-nav {
		background: rgba(255, 255, 255, 0.98) !important;
		border: 1px solid rgba(15, 23, 42, 0.08) !important;
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
	}

	.nv-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		width: 100%;
	}

	.nv-menu li {
		width: 100%;
	}

	.nv-menu li a {
		font-size: 1.05rem;
		padding: 12px 16px;
		display: block;
		width: 100%;
		border-radius: 12px;
		background: rgba(255, 255, 255, 0.03);
	}

	body.nv-light-mode .nv-menu li a {
		background: rgba(15, 23, 42, 0.03) !important;
	}

	.nv-btn-cta--mobile {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 100%;
		margin-top: 16px;
		padding: 12px 20px;
		background: linear-gradient(135deg, #2563eb, #1d4ed8);
		color: #ffffff !important;
		font-size: 0.95rem;
		font-weight: 700;
		border-radius: 12px;
		text-decoration: none;
	}
}