/**
 * أنماط دليل الشركات - VeFund
 * كل الأنماط محصورة داخل .vfdir حتى لا تتأثر بقية صفحات الموقع.
 */

.vfdir {
	--vfdir-primary: #102af3;
	--vfdir-primary-dark: #0b1fb8;
	--vfdir-ink: #101828;
	--vfdir-muted: #667085;
	--vfdir-line: #e6e8ef;
	--vfdir-surface: #ffffff;
	--vfdir-surface-2: #f7f8fc;
	--vfdir-radius: 14px;
	--vfdir-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
	--vfdir-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.1);
	color: var(--vfdir-ink);
}

.vfdir *,
.vfdir *::before,
.vfdir *::after {
	box-sizing: border-box;
}

.vfdir a {
	text-decoration: none;
}

.vfdir-i {
	flex: 0 0 auto;
	vertical-align: middle;
}

/* ============ الترويسة ============ */

.vfdir-hero {
	text-align: center;
	max-width: 780px;
	margin: 0 auto 28px;
}

.vfdir-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--vfdir-primary);
	background: rgba(16, 42, 243, 0.08);
	padding: 5px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.vfdir-title {
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
	line-height: 1.3;
	margin: 0 0 10px;
	color: var(--vfdir-ink);
}

.vfdir-intro {
	font-size: 1.02rem;
	line-height: 1.9;
	color: var(--vfdir-muted);
	margin: 0;
}

.vfdir-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--vfdir-muted);
	margin-bottom: 18px;
}

.vfdir-crumbs a {
	color: var(--vfdir-muted);
}

.vfdir-crumbs a:hover {
	color: var(--vfdir-primary);
}

/* ============ تابات النوع ============ */

.vfdir-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 18px;
}

.vfdir-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--vfdir-line);
	border-radius: 999px;
	background: var(--vfdir-surface);
	color: var(--vfdir-ink);
	font-size: 14.5px;
	font-weight: 600;
	transition: all 0.18s ease;
}

.vfdir-tab:hover {
	border-color: var(--vfdir-primary);
	color: var(--vfdir-primary);
}

.vfdir-tab.is-active {
	background: var(--vfdir-primary);
	border-color: var(--vfdir-primary);
	color: #fff;
}

.vfdir-tab-count {
	font-size: 12.5px;
	font-weight: 700;
	background: rgba(16, 24, 40, 0.06);
	color: inherit;
	border-radius: 999px;
	padding: 1px 8px;
}

.vfdir-tab.is-active .vfdir-tab-count {
	background: rgba(255, 255, 255, 0.22);
}

/* ============ الفلاتر ============ */

.vfdir-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	background: var(--vfdir-surface);
	border: 1px solid var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	padding: 12px;
	margin-bottom: 16px;
	box-shadow: var(--vfdir-shadow);
}

.vfdir-filter {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 190px;
	min-width: 0;
}

.vfdir-filter-search {
	flex: 1 1 260px;
	color: var(--vfdir-muted);
}

.vfdir-filter-search .vfdir-i {
	position: absolute;
	inset-inline-start: 12px;
	pointer-events: none;
}

.vfdir-filters input[type="search"],
.vfdir-filters select {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--vfdir-line);
	border-radius: 10px;
	background: #fff;
	color: var(--vfdir-ink);
	font-size: 15px;
	line-height: 1.4;
	margin: 0;
}

.vfdir-filter-search input[type="search"] {
	padding-inline-start: 40px;
}

.vfdir-filters input[type="search"]:focus,
.vfdir-filters select:focus {
	outline: none;
	border-color: var(--vfdir-primary);
	box-shadow: 0 0 0 3px rgba(16, 42, 243, 0.12);
}

.vfdir-filter-actions {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
}

/* ============ الأزرار ============ */

.vfdir-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.vfdir-btn-primary {
	background: var(--vfdir-primary);
	border-color: var(--vfdir-primary);
	color: #fff !important;
}

.vfdir-btn-primary:hover {
	background: var(--vfdir-primary-dark);
	border-color: var(--vfdir-primary-dark);
	color: #fff !important;
}

.vfdir-btn-accent {
	background: #101828;
	border-color: #101828;
	color: #fff !important;
}

.vfdir-btn-accent:hover {
	background: #000;
	color: #fff !important;
}

.vfdir-btn-ghost {
	background: var(--vfdir-surface);
	border-color: var(--vfdir-line);
	color: var(--vfdir-ink);
}

.vfdir-btn-ghost:hover {
	border-color: var(--vfdir-primary);
	color: var(--vfdir-primary);
}

/* ============ شريط النتائج ============ */

.vfdir-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}

.vfdir-count {
	margin: 0;
	font-size: 14.5px;
	color: var(--vfdir-muted);
}

.vfdir-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vfdir-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	background: var(--vfdir-surface-2);
	border: 1px solid var(--vfdir-line);
	border-radius: 999px;
	padding: 5px 10px;
	color: var(--vfdir-ink);
}

.vfdir-chip:hover {
	border-color: #f04438;
	color: #f04438;
}

/* ============ الشبكة ============ */

.vfdir-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
}

/* ============ الكرت ============ */

.vfdir-card {
	display: flex;
	flex-direction: column;
	background: var(--vfdir-surface);
	border: 1px solid var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	box-shadow: var(--vfdir-shadow);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.vfdir-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--vfdir-shadow-hover);
	border-color: rgba(16, 42, 243, 0.35);
}

.vfdir-card-main {
	display: flex;
	gap: 14px;
	padding: 18px 18px 14px;
	color: inherit;
	flex: 1 1 auto;
}

.vfdir-card-logo {
	flex: 0 0 62px;
	width: 62px;
	height: 62px;
	border-radius: 12px;
	background: var(--vfdir-surface-2);
	border: 1px solid var(--vfdir-line);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.vfdir-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
}

.vfdir-logo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 24px;
	font-weight: 700;
	color: var(--vfdir-primary);
}

.vfdir-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.vfdir-card-title {
	font-size: 1.06rem;
	font-weight: 700;
	line-height: 1.45;
	color: var(--vfdir-ink);
	display: block;
}

.vfdir-card:hover .vfdir-card-title {
	color: var(--vfdir-primary);
}

.vfdir-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.vfdir-badge {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid transparent;
	line-height: 1.6;
}

.vfdir-badge-type {
	background: rgba(16, 42, 243, 0.08);
	color: var(--vfdir-primary);
	border-color: rgba(16, 42, 243, 0.16);
}

.vfdir-badge-sector {
	background: #f2f4f7;
	color: #475467;
	border-color: #e6e8ef;
}

.vfdir-badge-city {
	background: #ecfdf3;
	color: #027a48;
	border-color: #d1fadf;
}

.vfdir-card-desc {
	font-size: 14px;
	line-height: 1.8;
	color: var(--vfdir-muted);
	display: block;
}

.vfdir-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
	color: var(--vfdir-muted);
	margin-top: auto;
}

.vfdir-card-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.vfdir-card-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 14px;
	border-top: 1px solid var(--vfdir-line);
	background: var(--vfdir-surface-2);
}

.vfdir-quick {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--vfdir-muted);
	padding: 6px 10px;
	border-radius: 8px;
	transition: all 0.16s ease;
}

.vfdir-quick:hover {
	background: #fff;
	color: var(--vfdir-primary);
}

.vfdir-quick-profile {
	margin-inline-start: auto;
	color: var(--vfdir-primary);
}

/* ============ الترقيم ============ */

.vfdir-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 28px 0 8px;
}

.vfdir-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--vfdir-line);
	border-radius: 10px;
	background: #fff;
	color: var(--vfdir-ink);
	font-size: 14.5px;
	font-weight: 600;
}

.vfdir-pagination .page-numbers:hover {
	border-color: var(--vfdir-primary);
	color: var(--vfdir-primary);
}

.vfdir-pagination .page-numbers.current {
	background: var(--vfdir-primary);
	border-color: var(--vfdir-primary);
	color: #fff;
}

/* ============ حالة فارغة ============ */

.vfdir-empty {
	text-align: center;
	padding: 60px 20px;
	background: var(--vfdir-surface);
	border: 1px dashed var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	color: var(--vfdir-muted);
}

.vfdir-empty p {
	font-size: 1.05rem;
	margin: 12px 0 18px;
}

/* ============ صفحة الشركة ============ */

.vfdir-profile {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	align-items: flex-start;
	background: var(--vfdir-surface);
	border: 1px solid var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	padding: 24px;
	box-shadow: var(--vfdir-shadow);
	margin-bottom: 26px;
}

.vfdir-profile-logo {
	flex: 0 0 132px;
	width: 132px;
	height: 132px;
	border-radius: 16px;
	background: var(--vfdir-surface-2);
	border: 1px solid var(--vfdir-line);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.vfdir-profile-logo .vfdir-logo-img {
	padding: 12px;
}

.vfdir-profile-logo .vfdir-logo-fallback {
	font-size: 46px;
}

.vfdir-profile-info {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vfdir-profile-name {
	font-size: clamp(1.5rem, 3vw, 2.05rem);
	line-height: 1.35;
	margin: 0;
	color: var(--vfdir-ink);
}

.vfdir-profile-tagline {
	font-size: 1rem;
	line-height: 1.9;
	color: var(--vfdir-muted);
	margin: 0;
	max-width: 74ch;
}

.vfdir-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.vfdir-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 350px;
	gap: 26px;
	align-items: start;
}

.vfdir-layout-full {
	grid-template-columns: minmax(0, 1fr);
}

.vfdir-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.vfdir-section {
	background: var(--vfdir-surface);
	border: 1px solid var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	padding: 22px 24px;
	box-shadow: var(--vfdir-shadow);
}

.vfdir-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.12rem;
	font-weight: 700;
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--vfdir-line);
	color: var(--vfdir-ink);
}

.vfdir-prose {
	font-size: 1rem;
	line-height: 2;
	color: #344054;
}

.vfdir-prose > *:first-child {
	margin-top: 0;
}

.vfdir-prose > *:last-child {
	margin-bottom: 0;
}

.vfdir-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.vfdir-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px;
}

.vfdir-list li {
	position: relative;
	padding-inline-start: 26px;
	font-size: 14.5px;
	line-height: 1.85;
	color: #344054;
}

.vfdir-list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 6px;
	top: 0.7em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--vfdir-primary);
	opacity: 0.75;
}

.vfdir-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
}

.vfdir-gallery img {
	width: 100%;
	height: 130px;
	object-fit: cover;
	border-radius: 10px;
}

/* العمود الجانبي */

.vfdir-aside {
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	top: 20px;
}

.vfdir-card-box {
	background: var(--vfdir-surface);
	border: 1px solid var(--vfdir-line);
	border-radius: var(--vfdir-radius);
	box-shadow: var(--vfdir-shadow);
	overflow: hidden;
}

.vfdir-box-title {
	font-size: 0.98rem;
	font-weight: 700;
	margin: 0;
	padding: 14px 18px;
	background: var(--vfdir-surface-2);
	border-bottom: 1px solid var(--vfdir-line);
	color: var(--vfdir-ink);
}

.vfdir-box-body {
	padding: 8px 18px 14px;
}

.vfdir-row {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	align-items: baseline;
	padding: 9px 0;
	border-bottom: 1px dashed var(--vfdir-line);
	font-size: 14px;
}

.vfdir-row:last-child {
	border-bottom: 0;
}

.vfdir-row-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--vfdir-muted);
	font-weight: 600;
	flex: 0 0 auto;
	max-width: 55%;
}

.vfdir-row-value {
	text-align: end;
	color: var(--vfdir-ink);
	font-weight: 600;
	word-break: break-word;
	min-width: 0;
}

.vfdir-row-value a {
	color: var(--vfdir-primary);
}

.vfdir-row-value a:hover {
	text-decoration: underline;
}

.vfdir-socials {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vfdir-social {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--vfdir-ink);
	border-bottom: 1px dashed var(--vfdir-line);
}

.vfdir-social:last-child {
	border-bottom: 0;
}

.vfdir-social:hover {
	color: var(--vfdir-primary);
}

.vfdir-related {
	margin-top: 26px;
}

.vfdir-back {
	margin: 26px 0 0;
}

/* ============ الوضع الليلي في القالب ============ */

.pix-dark .vfdir {
	--vfdir-ink: #f2f4f7;
	--vfdir-muted: #98a2b3;
	--vfdir-line: #2a2f3a;
	--vfdir-surface: #171a21;
	--vfdir-surface-2: #1e222b;
	--vfdir-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	--vfdir-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.45);
	color: var(--vfdir-ink);
}

.pix-dark .vfdir-filters input[type="search"],
.pix-dark .vfdir-filters select,
.pix-dark .vfdir-pagination .page-numbers {
	background: #1e222b;
	color: var(--vfdir-ink);
}

.pix-dark .vfdir-prose,
.pix-dark .vfdir-list li {
	color: #d0d5dd;
}

.pix-dark .vfdir-badge-sector {
	background: #232833;
	color: #d0d5dd;
	border-color: #2a2f3a;
}

.pix-dark .vfdir-quick:hover {
	background: #232833;
}

/* ============ الجوال ============ */

@media (max-width: 1024px) {
	.vfdir-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.vfdir-aside {
		position: static;
	}
}

@media (max-width: 767px) {
	.vfdir-profile {
		padding: 18px;
		gap: 16px;
	}

	.vfdir-profile-logo {
		flex: 0 0 92px;
		width: 92px;
		height: 92px;
	}

	.vfdir-profile-logo .vfdir-logo-fallback {
		font-size: 32px;
	}

	.vfdir-section {
		padding: 18px;
	}

	.vfdir-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.vfdir-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.vfdir-filter-actions {
		width: 100%;
	}

	.vfdir-filter-actions .vfdir-btn {
		flex: 1 1 auto;
	}

	.vfdir-tabs {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
	}

	.vfdir-tab {
		flex: 0 0 auto;
	}

	.vfdir-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.vfdir-row-label {
		max-width: 100%;
	}

	.vfdir-row-value {
		text-align: start;
	}

	.vfdir-card-main {
		padding: 16px 16px 12px;
	}
}
