/**
 * DRK Modern Homepage — header & footer layout
 */

body.drk-custom-layout {
	margin: 0;
	padding: 0;
	background: #fff;
	font-family: 'Vazirmatn', 'IRANSans', Tahoma, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.drk-custom-layout #page,
body.drk-custom-layout .site,
body.drk-custom-layout .wrapper {
	margin: 0;
	padding: 0;
	max-width: none;
}

.drk-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.drk-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 92px;
}

.drk-header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	padding: 6px 0;
	min-width: 0;
}

.drk-header__logo-img,
.drk-header__logo img {
	display: block !important;
	width: auto !important;
	height: 76px !important;
	max-height: 76px !important;
	min-height: 56px !important;
	max-width: min(220px, 42vw) !important;
	object-fit: contain !important;
	object-position: right center;
}

.drk-header__logo-text {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
}

.drk-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.drk-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.drk-menu > .drk-menu__item,
.drk-menu > .menu-item {
	position: relative;
}

.drk-menu > .drk-menu__item > a,
.drk-menu > .menu-item > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	text-decoration: none;
	border-radius: 10px;
	transition: color 0.2s ease, background 0.2s ease;
	white-space: nowrap;
}

.drk-menu > .drk-menu__item > a:hover,
.drk-menu > .menu-item > a:hover,
.drk-menu > .drk-menu__item.is-active > a,
.drk-menu > .menu-item.current-menu-item > a,
.drk-menu > .menu-item.current_page_item > a {
	color: var(--drk-primary, #0060ff);
	background: rgba(0, 96, 255, 0.06);
}

.drk-menu__caret {
	flex-shrink: 0;
	opacity: 0.6;
}

.drk-submenu,
.drk-menu .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 240px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 20;
}

.drk-menu__item--has-child:hover > .drk-submenu,
.drk-menu .menu-item-has-children:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.drk-submenu li a,
.drk-menu .sub-menu li a {
	display: block;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease;
}

.drk-submenu li a:hover,
.drk-menu .sub-menu li a:hover {
	background: rgba(0, 96, 255, 0.06);
	color: var(--drk-primary, #0060ff);
}

.drk-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.drk-header__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.drk-header__btn--primary {
	background: linear-gradient(135deg, var(--drk-primary, #0060ff), #0050d4);
	color: #fff;
	box-shadow: 0 8px 20px rgba(0, 96, 255, 0.25);
}

.drk-header__btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(0, 96, 255, 0.3);
	color: #fff;
}

.drk-header__btn--profile {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px 8px 10px;
	background: #f1f5f9;
	color: #0f172a;
	border: 1px solid rgba(15, 23, 42, 0.08);
	max-width: 180px;
}

.drk-header__btn--profile:hover {
	background: #e2e8f0;
	color: #0f172a;
	border-color: rgba(0, 96, 255, 0.15);
}

.drk-header__btn-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.drk-header__avatar,
.drk-header__btn-avatar img {
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
}

.drk-header__btn-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.drk-header__icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	background: #fff;
	color: #334155;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.drk-header__icon-btn:hover {
	border-color: rgba(0, 96, 255, 0.2);
	color: var(--drk-primary, #0060ff);
}

.drk-header__badge {
	position: absolute;
	top: -6px;
	left: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.drk-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
}

.drk-header__toggle span {
	display: block;
	width: 20px;
	height: 2px;
	margin: 0 auto;
	background: #334155;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.drk-header__toggle.is-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.drk-header__toggle.is-open span:nth-child(2) {
	opacity: 0;
}

.drk-header__toggle.is-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.drk-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	z-index: 998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.drk-nav-overlay.is-visible {
	opacity: 1;
}

.admin-bar .drk-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .drk-header {
		top: 46px;
	}
}

/* Footer */
.drk-footer {
	background: #2e3e77;
	color: rgba(255, 255, 255, 0.88);
	padding: 56px 0 0;
	margin-top: 0;
}

.drk-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 40px;
}

.drk-footer__brand strong {
	display: block;
	font-size: 18px;
	font-weight: 800;
	color: #fff;
	margin-bottom: 12px;
}

.drk-footer__logo {
	display: inline-block;
	margin-bottom: 16px;
	text-decoration: none;
}

.drk-footer__logo-img,
.drk-footer__logo img {
	display: block !important;
	width: auto !important;
	height: 88px !important;
	max-height: 88px !important;
	max-width: 200px !important;
	object-fit: contain !important;
	object-position: right center;
}

.drk-footer__brand p {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.75);
	max-width: 360px;
}

.drk-footer__enamad {
	margin-top: 8px;
}

.drk-footer__enamad a {
	display: inline-block;
	line-height: 0;
}

.drk-footer__enamad img {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: 120px !important;
}

.drk-footer__links h4 {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 800;
	color: #fff;
}

.drk-footer__links ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.drk-footer__links li + li {
	margin-top: 10px;
}

.drk-footer__links a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s ease;
}

.drk-footer__links a:hover {
	color: #fff;
}

.drk-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 20px 0 24px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
	text-align: center;
}

/* Mobile */
@media (max-width: 1100px) {
	.drk-header__btn--primary {
		display: none;
	}

	.drk-header__btn--profile {
		display: inline-flex;
		max-width: 140px;
		padding: 6px 10px 6px 8px;
		font-size: 13px;
	}

	.drk-menu > .drk-menu__item > a,
	.drk-menu > .menu-item > a {
		font-size: 13px;
		padding: 8px 10px;
	}
}

@media (max-width: 960px) {
	.drk-header__toggle {
		display: flex;
	}

	.drk-header__nav {
		position: fixed;
		top: 0;
		right: 0;
		width: min(320px, 88vw);
		height: 100vh;
		height: 100dvh;
		background: #fff;
		flex-direction: column;
		justify-content: flex-start;
		align-items: stretch;
		padding: 88px 20px 24px;
		box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		z-index: 999;
		overflow-y: auto;
	}

	.drk-header__nav.is-open {
		transform: translateX(0);
	}

	.drk-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.drk-menu > .drk-menu__item > a,
	.drk-menu > .menu-item > a {
		width: 100%;
		justify-content: space-between;
		padding: 14px 12px;
		font-size: 15px;
	}

	.drk-submenu,
	.drk-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		padding: 0 0 8px 12px;
		min-width: 0;
		display: none;
		background: transparent;
	}

	.drk-menu__item--has-child.is-open > .drk-submenu,
	.drk-menu .menu-item-has-children.is-open > .sub-menu {
		display: block;
	}

	.drk-footer__grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

@media (max-width: 768px) {
	.drk-header__inner {
		min-height: 80px;
	}

	.drk-header__logo-img,
	.drk-header__logo img {
		height: 64px !important;
		max-height: 64px !important;
		max-width: min(180px, 48vw) !important;
	}

	.drk-footer__logo-img,
	.drk-footer__logo img {
		height: 72px !important;
		max-height: 72px !important;
	}
}
