/* Chapno Navbar — base structural styles.
   Colors, typography, spacing, shadows and radii are driven by the
   Elementor Style tab controls (see class-chapno-navbar-widget.php). */

.chapno-header,
.chapno-header *,
.chapno-header *::before,
.chapno-header *::after {
	box-sizing: border-box;
}

.chapno-header {
	font-family: 'Vazirmatn', sans-serif;
	position: relative;
	width: 100%;
	background: rgba(24, 19, 40, 0.72);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: box-shadow 0.25s ease, background 0.25s ease;
	direction: rtl;
	z-index: 100;
}

.chapno-header--sticky {
	position: sticky;
	top: 0;
}

.chapno-header.chapno-is-scrolled {
	box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.55);
}

.chapno-header-inner {
	max-width: 1240px;
	margin: 0 auto;
	height: 74px;
	padding: 0 28px;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: nowrap !important;
	flex-direction: row !important;
	gap: 16px;
}

/* ---- logo ---- */
.chapno-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 1;
	min-width: 0;
	text-decoration: none;
}
.chapno-logo-mark {
	width: 38px;
	height: 38px;
	display: block;
	object-fit: contain;
	flex-shrink: 0;
}
.chapno-logo-image {
	width: 38px;
	height: auto;
	display: block;
	object-fit: contain;
	max-width: none;
	flex-shrink: 0;
}
.chapno-logo-text-wrap {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
	min-width: 0;
}
.chapno-logo-text {
	font-size: 19px;
	font-weight: 800;
	letter-spacing: 0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chapno-logo-subtitle {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---- menu ---- */
.chapno-menu {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.chapno-menu li {
	position: relative;
}
.chapno-menu a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	font-size: 14.5px;
	font-weight: 500;
	border-radius: 9px;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.18s ease, background 0.18s ease;
}
.chapno-menu a:hover {
	background: rgba(255, 255, 255, 0.05);
}
.chapno-menu a .underline {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 6px;
	height: 2px;
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.22s ease;
}
.chapno-menu a:hover .underline,
.chapno-menu a.is-active .underline {
	transform: scaleX(1);
}

/* ---- actions / phone / button ---- */
.chapno-actions {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	gap: 14px;
	flex-shrink: 0;
}
.chapno-actions-links {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	gap: 14px;
}

.chapno-support {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 10px;
	padding: 6px 14px 6px 8px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	text-decoration: none;
	flex-shrink: 0;
	transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.chapno-support:hover,
.chapno-mobile-support:hover {
	transform: translateY(-1px);
	border-color: rgba(138, 92, 246, 0.5);
	background: rgba(138, 92, 246, 0.1);
	box-shadow: 0 6px 16px -10px rgba(138, 92, 246, 0.6);
}
.chapno-support:hover .chapno-support-icon,
.chapno-mobile-support:hover .chapno-support-icon {
	border-color: rgba(138, 92, 246, 0.6);
}
.chapno-support-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
	transition: border-color 0.2s ease;
}
.chapno-support-icon svg {
	width: 16px;
	height: 16px;
}
.chapno-support-text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}
.chapno-support-text span {
	font-size: 10.5px;
	font-weight: 500;
}
.chapno-support-text b,
.chapno-support-text a {
	font-size: 13.5px;
	font-weight: 700;
	direction: ltr;
	unicode-bidi: plaintext;
	letter-spacing: 0.2px;
	text-decoration: none;
}

.chapno-cta {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 8px;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.chapno-cta:hover {
	transform: translateY(-1px);
	filter: brightness(1.06);
}
.chapno-cta:active {
	transform: translateY(0) scale(0.98);
}
.chapno-cta svg {
	width: 15px;
	height: 15px;
}

/* ---- hamburger ---- */
.chapno-hamburger {
	width: 40px;
	height: 40px;
	border-radius: 9px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	flex-shrink: 0;
	cursor: pointer;
}
.chapno-hamburger span {
	position: relative;
	height: 2px;
	border-radius: 2px;
	display: block;
	transition: transform 0.2s ease, background-color 0.2s ease;
}
.chapno-hamburger span::before,
.chapno-hamburger span::after {
	content: '';
	position: absolute;
	height: 2px;
	border-radius: 2px;
	left: 0;
	transition: transform 0.2s ease, top 0.2s ease, background-color 0.2s ease;
}
.chapno-hamburger span::before {
	top: -6px;
}
.chapno-hamburger span::after {
	top: 6px;
}
.chapno-header.chapno-menu-open .chapno-hamburger span {
	background: transparent;
	background-color: transparent !important;
	opacity: 0 !important;
}
.chapno-header.chapno-menu-open .chapno-hamburger span::before {
	top: 0;
	transform: rotate(45deg);
}
.chapno-header.chapno-menu-open .chapno-hamburger span::after {
	top: 0;
	transform: rotate(-45deg);
}

/* ---- mobile dropdown panel ---- */
.chapno-mobile-panel {
	max-height: 0;
	overflow: hidden;
	background: rgba(20, 16, 34, 0.98);
	transition: max-height 0.32s ease;
}
.chapno-header.chapno-menu-open .chapno-mobile-panel {
	max-height: 640px;
}
.chapno-mobile-panel-inner {
	padding: 10px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.chapno-mobile-panel-inner a {
	padding: 14px 6px;
	font-size: 15px;
	font-weight: 500;
	color: #b6afd0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 10px;
}
.chapno-mobile-panel-inner a.is-active {
	color: #ffffff;
}
.chapno-mobile-actions-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin-top: 14px;
	flex-wrap: nowrap;
}
.chapno-mobile-support {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px 10px 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	color: #b6afd0;
	font-size: 13px;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}
.chapno-mobile-support .chapno-support-icon {
	width: 30px;
	height: 30px;
}
.chapno-mobile-support .chapno-support-icon svg {
	width: 14px;
	height: 14px;
}
.chapno-mobile-support b {
	direction: ltr;
	unicode-bidi: plaintext;
	font-weight: 700;
}
.chapno-mobile-cta {
	justify-content: center;
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
}
.chapno-mobile-actions-row .chapno-mobile-support,
.chapno-mobile-actions-row .chapno-cta {
	min-height: 46px;
}

/* ==========================================================
 * ریسپانسیو — کوچک‌سازی تدریجی برای موبایل
 * ========================================================== */

/* تبلت کوچک و موبایل بزرگ */
@media (max-width: 600px) {
	.chapno-header-inner {
		height: auto;
		min-height: 58px;
		padding: 10px 18px !important;
		gap: 10px;
	}
	.chapno-logo-subtitle {
		display: none;
	}
	.chapno-logo-mark {
		width: 30px;
	}
	.chapno-logo-text {
		font-size: 16px;
	}
	.chapno-support-text span {
		display: none;
	}
	.chapno-support {
		padding: 5px 10px 5px 5px;
		gap: 6px;
	}
	.chapno-support-icon {
		width: 28px;
		height: 28px;
	}
	.chapno-support-icon svg {
		width: 13px;
		height: 13px;
	}
	.chapno-support-text b,
	.chapno-support-text a {
		font-size: 12px;
	}
	.chapno-cta {
		padding: 9px 14px !important;
	}
	.chapno-actions,
	.chapno-actions-links {
		gap: 8px;
	}
	.chapno-hamburger {
		width: 34px;
		height: 34px;
	}
}

/* موبایل متوسط: متن دکمه سفارش مخفی می‌شود و فقط آیکون می‌ماند */
@media (max-width: 480px) {
	.chapno-actions-links > .chapno-cta span {
		font-size: 12.5px;
	}
	.chapno-actions-links > .chapno-cta {
		padding: 9px 12px !important;
		gap: 5px;
	}
	.chapno-actions-links > .chapno-cta svg {
		width: 12px;
		height: 12px;
	}
	.chapno-header-inner {
		padding: 10px 14px !important;
	}
}

/* موبایل خیلی کوچک: برای اینکه همه‌چیز در یک ردیف (بدون رفتن روی هم) جا شود،
   ابتدا فاصله‌ها فشرده‌تر و در صورت نیاز فقط آیکون تلفن نمایش داده می‌شود */
@media (max-width: 400px) {
	.chapno-header-inner {
		padding: 10px 12px !important;
		gap: 6px;
	}
	.chapno-actions,
	.chapno-actions-links {
		gap: 6px;
	}
	.chapno-support-text b,
	.chapno-support-text a {
		font-size: 10.5px;
	}
	.chapno-support {
		padding: 5px 8px 5px 5px !important;
		gap: 5px;
	}
	.chapno-support-icon {
		width: 24px;
		height: 24px;
	}
	.chapno-support-icon svg {
		width: 12px;
		height: 12px;
	}
}

.chapno-header a:focus-visible,
.chapno-header button:focus-visible {
	outline: 2px solid #8a5cf6;
	outline-offset: 2px;
}
