/**
 * هيدر الصفحات الداخلية لثيم النحالين (template-parts/header/page-header.php). يُحمَّل في كل الصفحات من
 * functions.php.
 *
 * خلفية باللون الأساسي عليها نقش خلايا النحل بخطوط بيضاء خفيفة وتعتيم موحد (بلا وهج)، وخلايا سداسية زخرفية،
 * ومسار التنقل فوق العنوان، وانحناء بلون خلفية الصفحة أسفله عليه خط من الثانوي (كانحناء الإحصائيات).
 * يمتد تحت أسفل الهيدر بقدر انحنائه (56px) فيظهر من خلال انحناء طرفه الأيسر كسلايدر الرئيسية.
 */

.bee-page-hero {
	--bee-page-hero-curve: 56px;
	position: relative;
	overflow: hidden;
	margin-top: -56px;
	padding: calc(56px + 58px) 0 calc(var(--bee-page-hero-curve) + 54px);
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66v34' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1.3'/%3E%3C/svg%3E") 0 0 / 56px 100px,
		linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)),
		var(--theme-primary);
	color: #ffffff;
	text-align: center;
}

/* تدرج مخصص من الاستدعاء (bg_gradient) يحل محل الخلفية */
.bee-page-hero[style*='--bee-page-hero-bg'] {
	background: var(--bee-page-hero-bg);
}

.bee-page-hero__container {
	position: relative;
	z-index: 3;
	max-width: 900px;
}

.bee-page-hero__title {
	margin: 0;
	color: #ffffff;
	font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem);
	font-weight: 800;
	line-height: 1.4;
}

/* خط قصير بالثانوي تحت العنوان */
.bee-page-hero__title::after {
	content: '';
	display: block;
	width: 64px;
	height: 3px;
	margin: 14px auto 0;
	border-radius: 3px;
	background: var(--theme-secondary);
}

.bee-page-hero__desc {
	max-width: 720px;
	margin: 16px auto 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.02rem;
	line-height: 1.8;
}

.bee-page-hero__meta,
.bee-page-hero__meta span {
	color: rgba(255, 255, 255, 0.8);
}

/* تاريخ المقال وكاتبه (page-header.php) */
.bee-page-hero__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 20px;
	margin-block-start: 15px;
	font-size: 14px;
}

.bee-page-hero__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* مسار التنقل: كبسولة شفافة فوق العنوان، والصفحة الحالية بالثانوي */
.bee-page-hero .breadcrumbs {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 10px;
	margin: 0 0 18px;
	padding: 6px 18px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--theme-secondary);
	font-size: 0.86rem;
	font-weight: 700;
}

.bee-page-hero .breadcrumbs a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color 0.2s ease;
}

.bee-page-hero .breadcrumbs a:hover,
.bee-page-hero .breadcrumbs a:focus-visible {
	color: var(--theme-secondary);
}

.bee-page-hero .breadcrumbs .sep {
	color: rgba(255, 255, 255, 0.4);
}

/* الخلايا الزخرفية يساراً، والممتلئة بالثانوي */
.bee-page-hero__hexes {
	position: absolute;
	bottom: calc(var(--bee-page-hero-curve) - 10px);
	inset-inline-end: 3%;
	z-index: 1;
	width: clamp(150px, 18vw, 260px);
	height: auto;
	color: rgba(255, 255, 255, 0.16);
	pointer-events: none;
}

.bee-page-hero__hex-fill {
	fill: var(--theme-secondary);
	opacity: 0.55;
}

/* الانحناء: لون خلفية الصفحة تحت القوس، وخط بالثانوي عليه */
.bee-page-hero::after,
.bee-page-hero::before {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: -1px;
	height: var(--bee-page-hero-curve);
	pointer-events: none;
}

.bee-page-hero::after {
	z-index: 2;
	background: var(--bee-page-bg, #fdfaf3);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 6Q720 86 1440 6V56H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 6Q720 86 1440 6V56H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.bee-page-hero::before {
	z-index: 3;
	background: var(--theme-secondary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 6Q720 86 1440 6' fill='none' stroke='black' stroke-width='4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 6Q720 86 1440 6' fill='none' stroke='black' stroke-width='4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

@media (max-width: 860px) {
	.bee-page-hero {
		--bee-page-hero-curve: 30px;
		padding: calc(56px + 40px) 0 calc(var(--bee-page-hero-curve) + 40px);
	}

	.bee-page-hero__hexes {
		opacity: 0.6;
	}

	.bee-page-hero__desc {
		font-size: 0.95rem;
	}
}
