/* هدر و فوتر سراسری وکیلم — موبایل‌اول، RTL، سبک Trust & Authority */

/* پرش به محتوا */
.vk-skip-link {
	position: absolute; inset-inline-start: -9999px; top: 0; z-index: 1000;
	background: var(--vk-color-primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.vk-skip-link:focus { inset-inline-start: 0; }

/* ---------- هدر ---------- */
.vk-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff; border-bottom: 1px solid var(--vk-color-border);
	box-shadow: 0 1px 8px rgba(15, 23, 42, .05);
}
.vk-header__inner {
	max-width: 1440px; margin-inline: auto;
	display: flex; align-items: center; justify-content: flex-start;
	gap: 28px; padding: 12px 16px;
}
/* منو بلافاصله بعد از لوگو (راست‌چین)؛ فضای خالی سمت چپ */
.vk-header .vk-nav { margin-inline-end: 0; }

.vk-brand__text { text-decoration: none; display: flex; flex-direction: column; line-height: 1.3; }
.vk-brand__name { font-size: 1.5rem; font-weight: 800; color: var(--vk-color-primary); }
.vk-brand__tagline { font-size: .72rem; color: var(--vk-color-muted); }
.vk-brand .custom-logo-link img { max-height: 56px; width: auto; }

/* منو */
.vk-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.vk-menu li { position: relative; }
.vk-menu a {
	display: block; padding: 10px 14px; border-radius: 8px;
	color: var(--vk-color-fg); text-decoration: none; font-weight: 600; font-size: .95rem;
	transition: background-color .12s ease, color .12s ease;
}
.vk-menu a:hover, .vk-menu .current-menu-item > a { background: var(--vk-color-bg); color: var(--vk-color-primary-700); }

/* زیرمنو */
.vk-menu .sub-menu {
	list-style: none; margin: 0; padding: 6px; position: absolute; top: 100%; inset-inline-start: 0;
	min-width: 200px; background: #fff; border: 1px solid var(--vk-color-border);
	border-radius: 10px; box-shadow: 0 8px 28px rgba(15,23,42,.12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; z-index: 50;
}
.vk-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* زیرمنوی سطح‌سوم و بالاتر: کنارِ آیتمِ والد باز شود (flyout) نه زیرِ آن */
.vk-menu .sub-menu .sub-menu { top: -7px; inset-inline-start: 100%; inset-inline-end: auto; transform: translateX(0); }
.vk-menu .sub-menu li:hover > .sub-menu { transform: translateX(0); }
/* فلش جهتِ آیتم دارای زیرمنوی تودرتو */
.vk-menu .sub-menu .menu-item-has-children > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vk-menu .sub-menu .menu-item-has-children > a::after { content: "‹"; font-size: 1rem; line-height: 1; opacity: .6; }

/* زیرمنوی بزرگ (بیش از ۱۰ آیتم): چندستونه با خطِ جداکننده */
.vk-menu .sub-menu.vk-submenu--mega {
	column-count: var(--vk-sub-cols, 2);
	column-gap: 22px;
	column-rule: 1px solid var(--vk-color-border);
	min-width: calc( var(--vk-sub-cols, 2) * 188px );
	padding: 12px 16px;
}
.vk-menu .sub-menu.vk-submenu--mega > li { break-inside: avoid; }
.vk-menu .sub-menu.vk-submenu--mega > li > a { white-space: nowrap; padding: 8px 10px; }
.vk-menu .sub-menu.vk-submenu--mega > li > a:hover { background: var(--vk-color-bg); border-radius: 6px; }

/* دکمهٔ منوی موبایل */
.vk-nav-toggle {
	display: none; flex-direction: column; gap: 5px; justify-content: center;
	width: 44px; height: 44px; background: none; border: 1px solid var(--vk-color-border);
	border-radius: 10px; cursor: pointer; padding: 0 11px;
}
.vk-nav-toggle__bar { display: block; height: 2px; width: 100%; background: var(--vk-color-fg); border-radius: 2px; transition: .2s ease; }
.vk-nav-toggle[aria-expanded="true"] .vk-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.vk-nav-toggle[aria-expanded="true"] .vk-nav-toggle__bar:nth-child(2) { opacity: 0; }
.vk-nav-toggle[aria-expanded="true"] .vk-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* اکشن‌های هدر: جستجو + ورود/پنل */
.vk-header__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.vk-search-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
	background: none; border: 1px solid var(--vk-color-border); border-radius: 10px; cursor: pointer;
	color: var(--vk-color-fg); transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.vk-search-toggle svg { width: 24px; height: 24px; }
.vk-search-toggle:hover { border-color: var(--vk-color-primary); color: var(--vk-color-primary-700); }
.vk-header__auth {
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
	padding: 9px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .9rem;
	background: var(--vk-color-primary); color: #fff; transition: background-color .12s ease;
}
.vk-header__auth:hover { background: var(--vk-color-primary-700); color: #fff; }
.vk-header__auth-icon { font-size: .95rem; line-height: 1; }

/* جعبهٔ جستجوی کشویی */
.vk-search-panel { border-top: 1px solid var(--vk-color-border); background: var(--vk-color-bg); }
.vk-search-panel__inner { max-width: var(--vk-container); margin-inline: auto; padding: 14px 16px; }
.vk-search-panel form, .vk-search-panel .search-form { display: flex; gap: 8px; }
.vk-search-panel input[type="search"], .vk-search-panel input.search-field, .vk-search-panel input[type="text"] {
	flex: 1; min-height: 46px; padding: 0 14px; border: 1px solid var(--vk-color-border); border-radius: 10px;
	font-family: inherit; font-size: .95rem; background: #fff;
}
.vk-search-panel input[type="submit"], .vk-search-panel button[type="submit"], .vk-search-panel .search-submit {
	min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--vk-color-primary);
	color: #fff; font-weight: 700; cursor: pointer; font-family: inherit;
}

@media (max-width: 860px) {
	/* موبایل: منوی دسکتاپ مخفی، همبرگری دیده می‌شود، درآور جای منو را می‌گیرد */
	.vk-nav-toggle { display: flex; order: 3; }
	.vk-nav { display: none; }
	.vk-header__inner { gap: 12px; }
	.vk-brand { margin-inline-end: auto; }
	.vk-header__actions { margin-inline-start: 0; }
	.vk-header__auth { padding: 8px 12px; font-size: .82rem; } /* در هدر هم نمایش داده می‌شود (مثل قبل) */
}

/* ---------- منوی کشوییِ موبایل (off-canvas) ---------- */
.vk-drawer { position: fixed; inset: 0; z-index: 1000; }
.vk-drawer[hidden] { display: none; }
.vk-drawer__overlay { position: absolute; inset: 0; background: rgba(15,23,42,.5); opacity: 0; transition: opacity .28s ease; }
.vk-drawer.is-open .vk-drawer__overlay { opacity: 1; }
.vk-drawer__panel {
	position: absolute; inset-block: 0; inset-inline-end: 0; width: min(86vw, 340px);
	background: #fff; box-shadow: -8px 0 30px rgba(15,23,42,.18);
	display: flex; flex-direction: column; transform: translateX(100%);
	transition: transform .28s ease; overflow-y: auto;
}
[dir="ltr"] .vk-drawer__panel { transform: translateX(-100%); }
.vk-drawer.is-open .vk-drawer__panel { transform: translateX(0); }
.vk-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--vk-color-border); }
.vk-drawer__title { font-weight: 800; font-size: 1.15rem; color: var(--vk-color-primary); }
.vk-drawer__close { width: 38px; height: 38px; border: 0; background: var(--vk-color-bg); border-radius: 10px; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--vk-color-fg); }
.vk-drawer__nav { padding: 8px 10px; flex: 1; }
.vk-drawer__actions { padding: 16px 18px; border-top: 1px solid var(--vk-color-border); }
.vk-drawer__actions .vk-header__auth { display: flex; width: 100%; justify-content: center; }
body.vk-drawer-open { overflow: hidden; }

/* فهرست منوی موبایل + آکاردئون */
.vk-mobile-menu, .vk-drawer__nav .vk-menu { list-style: none; margin: 0; padding: 0; }
.vk-mobile-menu li, .vk-drawer__nav .vk-menu li { position: relative; border-bottom: 1px solid var(--vk-color-border); }
.vk-mobile-menu a, .vk-drawer__nav .vk-menu a { display: block; padding: 14px 12px; color: var(--vk-color-fg); text-decoration: none; font-weight: 600; font-size: .98rem; }
.vk-mobile-menu a:hover, .vk-mobile-menu .current-menu-item > a { color: var(--vk-color-primary-700); }
.vk-submenu-toggle {
	position: absolute; inset-inline-end: 4px; top: 4px; width: 40px; height: 40px;
	border: 0; background: none; cursor: pointer; color: var(--vk-color-muted); font-size: 1rem;
	display: flex; align-items: center; justify-content: center; transition: transform .2s ease;
}
.vk-mobile-menu .menu-item-has-children > a { padding-inline-end: 48px; }
.vk-mobile-menu .menu-item-has-children.is-open > .vk-submenu-toggle { transform: rotate(180deg); }
/* باز/بستن با display (پایدار برای هر تعداد آیتم و هر عمق تودرتو). */
.vk-mobile-menu .sub-menu { list-style: none; margin: 0; padding: 0; display: none; background: var(--vk-color-bg); }
.vk-mobile-menu .menu-item-has-children.is-open > .sub-menu { display: block; animation: vk-acc-in .18s ease; }
@keyframes vk-acc-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.vk-mobile-menu .sub-menu a { padding-inline-start: 26px; font-weight: 500; font-size: .92rem; }
.vk-mobile-menu .sub-menu .sub-menu a { padding-inline-start: 42px; } /* سطح سوم */
.vk-mobile-menu .sub-menu .sub-menu .sub-menu a { padding-inline-start: 58px; } /* سطح چهارم */
.vk-mobile-menu .sub-menu li:last-child { border-bottom: 0; }

@media (min-width: 861px) {
	.vk-drawer { display: none !important; }
}

/* ---------- فوتر ---------- */
.vk-footer { background: #0F172A; color: #cbd5e1; margin-top: 48px; }
.vk-footer__inner {
	max-width: var(--vk-container); margin-inline: auto; padding: 40px 16px 24px;
	display: grid; grid-template-columns: 1fr; gap: 28px;
}
.vk-footer__title { font-size: 1.3rem; font-weight: 800; color: #fff; display: block; margin-bottom: 8px; }
.vk-footer__heading { font-size: 1rem; color: #fff; margin: 0 0 12px; }
.vk-footer__desc { font-size: .88rem; line-height: 1.9; margin: 0; color: #94a3b8; }
.vk-footer__menu { list-style: none; margin: 0; padding: 0; }
.vk-footer__menu li { margin-bottom: 8px; }
.vk-footer__menu a { color: #cbd5e1; text-decoration: none; font-size: .9rem; transition: color .12s ease; }
.vk-footer__menu a:hover { color: var(--vk-color-accent); }
.vk-footer__hint { font-size: .8rem; color: #64748b; line-height: 1.8; }
.vk-footer__bottom {
	max-width: var(--vk-container); margin-inline: auto; padding: 16px;
	border-top: 1px solid rgba(255,255,255,.08); text-align: center; font-size: .82rem; color: #94a3b8;
}

/* فوتر چهارستونه — واکنش‌گرا */
@media (min-width: 560px) {
	.vk-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
}
@media (min-width: 900px) {
	.vk-footer__inner { grid-template-columns: 1.8fr 1fr 1fr 1.6fr; gap: 40px; }
}
