/**
 * هدر و فوتر مشترک بگرد — body.begard-site-layout
 */

.begard-site-layout .apus-page-loading,
.begard-site-layout .header-mobile,
.begard-site-layout .apus-header,
.begard-site-layout #apus-header,
.begard-site-layout .mobile-sidebar-btn,
.begard-site-layout .mobile-sidebar-panel-overlay,
.begard-site-layout .offcanvas-menu,
.begard-site-layout #apus-footer {
	display: none !important;
}

.begard-site-layout #apus-main-content {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
}

.begard-site-layout .begard-hp-fluid {
	padding: 0;
	max-width: 100%;
}

.begard-site-layout {
	--bh-brand: #d64d5a;
	--bh-brand-dark: #a02040;
	--bh-brand-light: #f4c4c8;
	--bh-teal: #2a7a7a;
	--bh-teal-light: #b8e0dc;
	--bh-text: #2d2d2d;
	--bh-muted: #6b6b6b;
	--bh-bg: #f5f5f7;
	--bh-radius: 16px;
	--bh-radius-lg: 24px;
	--bh-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	font-family: 'Vazirmatn', var(--bs-font-sans-serif, Tahoma), sans-serif;
	color: var(--bh-text);
	background: var(--bh-bg);
	line-height: 1.7;
}

.begard-site-layout .bh-container {
	width: min(1200px, 92%);
	margin-inline: auto;
}

.begard-site-layout {
	--bh-shell-header-height: 64px;
	--bh-admin-bar-height: 0px;
}

.begard-site-layout .bh-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-bar.begard-site-layout .bh-site-header {
	top: var(--bh-admin-bar-height, 32px);
}

.begard-site-layout .bh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	gap: 16px;
	flex-wrap: wrap;
}

.begard-site-layout .bh-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	color: var(--bh-brand-dark);
}

.begard-site-layout .bh-logo-icon {
	width: 44px;
	height: 44px;
	background: linear-gradient(135deg, var(--bh-brand), var(--bh-brand-dark));
	border-radius: 12px;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 1.2rem;
	flex-shrink: 0;
}

.begard-site-layout .bh-logo-img {
	display: block;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	object-fit: contain;
}

.begard-site-layout .bh-logo-text small {
	display: block;
	font-size: 0.65rem;
	font-weight: 500;
	color: var(--bh-muted);
}

.begard-site-layout .bh-nav-main {
	display: flex;
	gap: 20px;
	font-size: 0.9rem;
	font-weight: 500;
	flex-wrap: wrap;
}

.begard-site-layout .bh-nav-main a {
	text-decoration: none;
	color: inherit;
}

.begard-site-layout .bh-nav-main a:hover {
	color: var(--bh-brand);
}

.bh-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	background: #fff;
	color: var(--bh-brand-dark, #a02040);
	cursor: pointer;
	flex-shrink: 0;
}

.bh-nav-toggle-icon,
.bh-nav-toggle-icon::before,
.bh-nav-toggle-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.bh-nav-toggle-icon {
	position: relative;
}

.bh-nav-toggle-icon::before,
.bh-nav-toggle-icon::after {
	content: '';
	position: absolute;
	left: 0;
}

.bh-nav-toggle-icon::before {
	top: -6px;
}

.bh-nav-toggle-icon::after {
	top: 6px;
}

.bh-site-header.bh-nav-is-open .bh-nav-toggle-icon {
	background: transparent;
}

.bh-site-header.bh-nav-is-open .bh-nav-toggle-icon::before {
	top: 0;
	transform: rotate(45deg);
}

.bh-site-header.bh-nav-is-open .bh-nav-toggle-icon::after {
	top: 0;
	transform: rotate(-45deg);
}

.bh-nav-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999980;
	background: rgba(0, 0, 0, 0.45);
}

body.bh-nav-is-open .bh-nav-overlay {
	display: block;
}

.bh-site-header.bh-nav-is-open {
	z-index: 999995;
}

body.bh-nav-scroll-lock {
	overflow: hidden;
}

.begard-site-layout .bh-header-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.begard-site-layout .bh-header-user {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 180px;
}

.begard-site-layout .bh-header-user-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.begard-site-layout .bh-header-user-name {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--bh-brand-dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.begard-site-layout .bh-btn-text {
	font-weight: 600;
	padding: 8px 12px;
	text-decoration: none;
	color: inherit;
}

.begard-site-layout .bh-btn-primary {
	background: linear-gradient(135deg, var(--bh-brand), #c93d4a);
	color: #fff !important;
	padding: 10px 20px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
}

.begard-site-layout .bh-site-footer {
	--bh-footer-bg: #1a1a1f;
	--bh-footer-bg-deep: #121216;
	--bh-footer-text: rgba(255, 255, 255, 0.72);
	--bh-footer-muted: rgba(255, 255, 255, 0.48);
	background: linear-gradient(180deg, var(--bh-footer-bg) 0%, var(--bh-footer-bg-deep) 100%);
	color: var(--bh-footer-text);
	position: relative;
	margin-top: 0;
}

.begard-site-layout .bh-site-footer::before {
	content: '';
	display: block;
	height: 3px;
	background: linear-gradient(90deg, var(--bh-brand), var(--bh-teal), var(--bh-brand));
}

.begard-site-layout .bh-footer-inner {
	padding: 48px 0 24px;
}

.begard-site-layout .bh-footer-main {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px 40px;
	align-items: start;
}

.begard-site-layout .bh-footer-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.begard-site-layout .bh-footer-logo-link {
	display: inline-block;
	line-height: 0;
}

.begard-site-layout .bh-footer-logo-link img,
.begard-site-layout .bh-footer-brand img {
	max-height: 48px;
	width: auto;
	display: block;
	filter: brightness(1.08);
}

.begard-site-layout .bh-footer-tagline {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bh-footer-muted);
	line-height: 1.6;
}

.begard-site-layout .bh-footer-heading {
	font-size: 0.92rem;
	font-weight: 800;
	color: #fff;
	margin: 0 0 16px;
	padding-bottom: 10px;
	position: relative;
	line-height: 1.4;
}

.begard-site-layout .bh-footer-heading::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	width: 32px;
	height: 3px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--bh-brand), var(--bh-teal));
}

.begard-site-layout .bh-footer-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.begard-site-layout .bh-footer-contact-list li {
	margin: 0;
}

.begard-site-layout .bh-footer-contact-label {
	display: block;
	margin: 0 0 4px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--bh-footer-muted);
}

.begard-site-layout .bh-footer-contact-value {
	display: inline-block;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	line-height: 1.5;
	transition: color 0.2s ease;
}

.begard-site-layout .bh-footer-contact-value:hover {
	color: var(--bh-brand-light);
}

.begard-site-layout .bh-footer-phone {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	unicode-bidi: isolate;
}

.begard-site-layout .bh-footer-menu,
.begard-site-layout .bh-footer-social {
	list-style: none;
	margin: 0;
	padding: 0;
}

.begard-site-layout .bh-footer-menu li {
	margin: 0 0 10px;
}

.begard-site-layout .bh-footer-menu a {
	color: var(--bh-footer-text);
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}

.begard-site-layout .bh-footer-menu a:hover {
	color: var(--bh-brand-light);
}

.begard-site-layout .bh-footer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.begard-site-layout .bh-footer-social a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 1.05rem;
	text-decoration: none;
	transition: background 0.25s ease, transform 0.2s ease;
}

.begard-site-layout .bh-footer-social a:hover {
	background: linear-gradient(135deg, var(--bh-brand), #a02040);
	border-color: transparent;
	transform: translateY(-2px);
	color: #fff;
}

.begard-site-layout .bh-footer-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 24px;
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	text-align: center;
}

.begard-site-layout .bh-footer-copy {
	margin: 0;
	font-size: 0.82rem;
	color: var(--bh-footer-muted);
	line-height: 1.7;
}

.begard-site-layout .bh-footer-legal .bh-footer-menu,
.begard-site-layout .bh-footer-legal .menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 18px;
}

.begard-site-layout .bh-footer-legal .bh-footer-menu li,
.begard-site-layout .bh-footer-legal .menu li {
	margin: 0;
}

.begard-site-layout .bh-footer-legal .bh-footer-menu a,
.begard-site-layout .bh-footer-legal .menu a {
	font-size: 0.8rem;
	color: var(--bh-footer-muted);
	text-decoration: none;
}

.begard-site-layout .bh-footer-legal .bh-footer-menu a:hover,
.begard-site-layout .bh-footer-legal .menu a:hover {
	color: var(--bh-brand-light);
}

@media (max-width: 992px) {
	.bh-nav-toggle {
		display: inline-flex;
		order: 2;
	}

	.begard-site-layout .bh-header-inner {
		flex-wrap: nowrap;
	}

	.begard-home-page .begard-home .bh-header-inner {
		flex-wrap: nowrap;
	}

	.begard-site-layout .bh-logo {
		order: 1;
		min-width: 0;
		margin-inline-end: auto;
	}

	.begard-site-layout .bh-header-actions {
		order: 3;
		flex-wrap: nowrap;
		gap: 6px;
	}

	.begard-site-layout .bh-header-user-name {
		display: none;
	}

	.begard-site-layout .bh-btn-text {
		padding: 8px 10px;
		font-size: 0.82rem;
	}

	.bh-nav-main {
		position: fixed;
		top: calc(var(--bh-shell-header-height, 64px) + var(--bh-admin-bar-height, 0px));
		right: 0;
		bottom: 0;
		left: auto;
		z-index: 999990;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: min(320px, 88vw);
		margin: 0;
		padding: 12px 0 24px;
		background: #fff;
		border-inline-start: 1px solid rgba(0, 0, 0, 0.06);
		box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateX(100%);
		visibility: hidden;
		pointer-events: none;
		transition: transform 0.25s ease, visibility 0.25s ease;
	}

	.bh-nav-main a {
		display: block;
		padding: 14px 20px;
		font-size: 0.95rem;
		border-bottom: 1px solid rgba(0, 0, 0, 0.05);
		text-decoration: none;
		color: inherit;
	}

	.bh-nav-main a:last-child {
		border-bottom: none;
	}

	body.bh-nav-is-open .bh-nav-main {
		transform: translateX(0);
		visibility: visible;
		pointer-events: auto;
	}

	.begard-site-layout .bh-footer-main {
		grid-template-columns: 1fr 1fr;
		gap: 28px 24px;
	}

	.begard-site-layout .bh-footer-brand {
		grid-column: 1 / -1;
		align-items: center;
		text-align: center;
	}
}

@media (max-width: 576px) {
	.begard-site-layout .bh-footer-main {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.begard-site-layout .bh-footer-bar {
		flex-direction: column;
		align-items: center;
	}
}

/* صفحات داخلی — هدر جمع‌وجورتر */
.begard-site-layout.begard-internal-page .bh-header-inner {
	padding: 10px 0;
	gap: 12px;
}

.begard-site-layout.begard-internal-page .bh-logo-icon {
	width: 38px;
	height: 38px;
	font-size: 1.05rem;
	border-radius: 10px;
}

.begard-site-layout.begard-internal-page .bh-logo-img {
	width: 38px;
	height: 38px;
}

.begard-site-layout.begard-internal-page .bh-logo-text small {
	font-size: 0.6rem;
}

.begard-site-layout.begard-internal-page .bh-header-user-avatar {
	width: 32px;
	height: 32px;
}

.begard-site-layout.begard-internal-page .bh-btn-primary {
	padding: 8px 16px;
	font-size: 0.85rem;
}

.begard-site-layout.begard-internal-page .bh-btn-text {
	padding: 6px 10px;
	font-size: 0.85rem;
}

.begard-site-layout.begard-internal-page .bh-nav-main {
	gap: 14px;
	font-size: 0.85rem;
}


/* پنل کاربری — سایدبار زیر هدر چسبان بگرد */
@media (min-width: 992px) {
	.begard-site-layout.page-template-page-dashboard .inner-dashboard.container-fluid .first-row > .sidebar-wrapper {
		top: calc(var(--bh-shell-header-height, 64px) + var(--bh-admin-bar-height, 0px)) !important;
		height: calc(100vh - var(--bh-shell-header-height, 64px) - var(--bh-admin-bar-height, 0px)) !important;
		z-index: 90;
	}
}

.begard-site-layout.page-template-page-dashboard #apus-main-content {
	padding-top: 0 !important;
}
