/* Neto UI — page masthead
 * Same width as floating menu (.neto-header__shell)
 */

.neto-page-head {
	--neto-ph-shell-w: min(100% - 1.75rem, var(--neto-content-max, 1300px));
	position: relative;
	isolation: isolate;
	margin: 0;
	padding: 0.35rem 0 0.75rem;
	background: transparent;
	color: var(--neto-ink);
	font-family: var(--neto-font);
	direction: rtl;
	text-align: right;
}

body:has(.neto-header) .neto-page-head {
	padding-top: calc(var(--neto-header-clear, 6.2rem) - 0.35rem);
}

@media (max-width: 1180px) {
	body:has(.neto-header) .neto-page-head {
		padding-top: calc(var(--neto-header-clear, 4.7rem) - 0.25rem);
	}
}

@media (max-width: 640px) {
	.neto-page-head {
		--neto-ph-shell-w: min(100% - 1.25rem, var(--neto-content-max, 1300px));
	}

	body:has(.neto-header) .neto-page-head {
		padding-top: calc(var(--neto-header-clear, 4.3rem) - 0.2rem);
	}
}

.neto-page-head__shell {
	position: relative;
	z-index: 1;
	display: block;
	width: var(--neto-ph-shell-w);
	margin-inline: auto;
	padding: 0.75rem 1.4rem;
	overflow: hidden;
	border-radius: 0.95rem;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.neto-page-head__edge {
	position: absolute;
	top: 20%;
	bottom: 20%;
	inset-inline-start: 0.65rem;
	z-index: 2;
	width: 2px;
	border-radius: 999px;
	background: linear-gradient(
		180deg,
		transparent,
		color-mix(in srgb, var(--neto-brand) 70%, transparent) 30%,
		color-mix(in srgb, var(--neto-accent, var(--neto-brand)) 55%, transparent) 70%,
		transparent
	);
	pointer-events: none;
}

html[data-neto-ui-theme="dark"] .neto-page-head__edge {
	background: linear-gradient(
		180deg,
		transparent,
		rgba(0, 215, 255, 0.55) 35%,
		rgba(0, 215, 255, 0.2) 75%,
		transparent
	);
}

.neto-page-head__wash {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	border-radius: inherit;
	background: linear-gradient(
		to left,
		color-mix(in srgb, #fff 68%, transparent) 0%,
		color-mix(in srgb, #fff 32%, transparent) 42%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(to left, #000 0%, #000 28%, transparent 88%);
	mask-image: linear-gradient(to left, #000 0%, #000 28%, transparent 88%);
}

html[data-neto-ui-theme="dark"] .neto-page-head__wash {
	background: linear-gradient(
		to left,
		rgba(25, 25, 25, 0.82) 0%,
		rgba(25, 25, 25, 0.35) 42%,
		transparent 100%
	);
}

/* Title + breadcrumb on one row, right-aligned */
.neto-page-head__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.45rem 1rem;
	width: 100%;
	text-align: right;
}

.neto-page-head__title {
	flex: 0 1 auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	/* کمی بزرگ‌تر از نسخهٔ خیلی فشرده */
	font-size: clamp(0.72rem, 1.05vw, 0.88rem);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.45;
	color: var(--neto-ink);
	text-align: right;
	white-space: nowrap;
}

html[data-neto-ui-theme="dark"] .neto-page-head__title {
	color: #fafafa;
}

.neto-page-head__nav {
	flex: 0 0 auto;
	margin: 0;
	text-align: right;
}

.neto-page-head__crumbs {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.28rem 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.72rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--neto-muted);
	text-align: right;
}

.neto-page-head__crumb {
	margin: 0;
}

.neto-page-head__crumb a {
	color: var(--neto-muted) !important;
	text-decoration: none !important;
	font-weight: 400;
}

.neto-page-head__crumb a:hover,
.neto-page-head__crumb a:focus-visible {
	color: var(--neto-brand) !important;
	outline: none;
}

html[data-neto-ui-theme="dark"] .neto-page-head__crumb a:hover,
html[data-neto-ui-theme="dark"] .neto-page-head__crumb a:focus-visible {
	color: #00d7ff !important;
}

.neto-page-head__crumb--current span {
	color: var(--neto-ink);
	font-weight: 500;
	opacity: 0.85;
}

html[data-neto-ui-theme="dark"] .neto-page-head__crumb--current span {
	color: #fafafa;
}

.neto-page-head__sep {
	opacity: 0.35;
	user-select: none;
}

@media (max-width: 900px) {
	.neto-page-head__shell {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.neto-page-head__shell::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		background: transparent;
	}

	.neto-page-head__inner {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		width: max-content;
		min-width: 100%;
		max-width: none;
		overflow: visible;
	}

	.neto-page-head__title {
		flex: 0 0 auto;
		max-width: none;
		white-space: nowrap !important;
		word-break: normal;
		overflow-wrap: normal;
		hyphens: none;
	}

	.neto-page-head__nav {
		flex: 0 0 auto;
		max-width: none;
	}

	.neto-page-head__crumbs {
		display: inline-flex;
		flex-wrap: nowrap;
		white-space: nowrap;
	}

	.neto-page-head__crumb,
	.neto-page-head__crumb a,
	.neto-page-head__crumb span,
	.neto-page-head__crumb--current span,
	.neto-page-head__sep {
		white-space: nowrap !important;
	}
}
