/**
 * أنماط الواجهة الأمامية للإضافة (الصفحة الرئيسية + الصفحة المفردة).
 * لوحة الألوان مستوحاة من منصّة رواد الأعمال: أخضر نخيل + رملي دافئ.
 * كل الأصناف مسبوقة بـ xp- لتفادي التعارض، وتستخدم خصائص منطقية لدعم RTL.
 */

:root {
	--xp-primary: #0f6b53;
	--xp-primary-dark: #0c5643;
	--xp-accent: #c9a15a;
	--xp-text: #1f2937;
	--xp-muted: #6b7280;
	--xp-border: #e5e7eb;
	--xp-bg-soft: #f8f9f7;
	--xp-radius: 14px;
	--xp-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	--xp-shadow-lg: 0 12px 32px rgba(15, 107, 83, 0.14);
	--xp-maxw: 1120px;
}

/* أساسيات الصفحة */
.xp-page {
	margin: 0;
	color: var(--xp-text);
	font-family: var(--xp-font, system-ui, -apple-system, "Segoe UI", Tahoma, "Helvetica Neue", Arial, sans-serif);
	line-height: 1.7;
	background: #fff;
}
.xp-home-embed { font-family: var(--xp-font, inherit); }

.xp-main { display: block; }

.xp-container {
	max-width: var(--xp-maxw);
	margin-inline: auto;
	padding-inline: 20px;
}

.xp-section {
	padding-block: 64px;
}

.xp-section__title {
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 800;
	margin: 0 0 32px;
	padding-inline-start: 14px;
	border-inline-start: 5px solid var(--xp-primary);
}

.xp-section__title--center {
	text-align: center;
	padding-inline-start: 0;
	border-inline-start: 0;
}

.xp-section__title--center::after {
	content: "";
	display: block;
	width: 60px;
	height: 4px;
	border-radius: 4px;
	margin: 14px auto 0;
	background: var(--xp-accent);
}

/* ── الأزرار ─────────────────────────────── */
.xp-btn {
	display: inline-block;
	padding: 13px 30px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	cursor: pointer;
}

.xp-btn--primary {
	background: var(--xp-accent);
	color: #1f2937;
	box-shadow: 0 6px 18px rgba(201, 161, 90, 0.4);
}

.xp-btn--primary:hover {
	transform: translateY(-2px);
	background: #d8b06a;
}

.xp-btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.7);
}

.xp-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: translateY(-2px);
}

/* ── قسم الهيرو ──────────────────────────── */
.xp-hero {
	position: relative;
	padding: 96px 20px;
	text-align: center;
	color: #fff;
	background:
		radial-gradient(1200px 400px at 50% -10%, rgba(201, 161, 90, 0.25), transparent 60%),
		linear-gradient(160deg, var(--xp-primary) 0%, var(--xp-primary-dark) 100%);
	overflow: hidden;
}

.xp-hero__overlay {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.08) 0, transparent 25%),
		radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.06) 0, transparent 25%);
	pointer-events: none;
}

.xp-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 760px;
	margin-inline: auto;
}

.xp-hero__title {
	font-size: clamp(30px, 5vw, 52px);
	font-weight: 900;
	margin: 0 0 16px;
	letter-spacing: -0.5px;
}

.xp-hero__subtitle {
	font-size: clamp(16px, 2.2vw, 20px);
	opacity: 0.95;
	margin: 0 auto 34px;
	max-width: 620px;
}

.xp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
}

/* ── بطاقات القيمة ───────────────────────── */
.xp-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.xp-card {
	background: #fff;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius);
	padding: 30px 26px;
	box-shadow: var(--xp-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.xp-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--xp-shadow-lg);
	border-color: rgba(15, 107, 83, 0.35);
}

.xp-card__icon {
	font-size: 40px;
	line-height: 1;
	margin-bottom: 16px;
}

.xp-card__title {
	font-size: 19px;
	font-weight: 800;
	margin: 0 0 10px;
	color: var(--xp-primary-dark);
}

.xp-card__text {
	margin: 0;
	color: var(--xp-muted);
	font-size: 15px;
}

/* ── الإحصائيات ──────────────────────────── */
.xp-stats-wrap {
	background: var(--xp-bg-soft);
}

.xp-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 20px;
}

.xp-stat {
	background: #fff;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius);
	padding: 28px 18px;
	text-align: center;
	box-shadow: var(--xp-shadow);
}

.xp-stat__value {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 900;
	color: var(--xp-primary);
	line-height: 1.1;
}

.xp-stat__label {
	margin-top: 8px;
	color: var(--xp-muted);
	font-size: 15px;
	font-weight: 600;
}

/* ── كيف يعمل (خطوات) ────────────────────── */
.xp-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 28px;
	counter-reset: xp-step;
}

.xp-step {
	position: relative;
	text-align: center;
	padding: 34px 22px 26px;
	background: #fff;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius);
	box-shadow: var(--xp-shadow);
}

.xp-step__num {
	position: absolute;
	inset-block-start: -18px;
	inset-inline-start: 50%;
	transform: translateX(50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--xp-primary);
	color: #fff;
	font-weight: 800;
	display: grid;
	place-items: center;
	box-shadow: 0 4px 10px rgba(15, 107, 83, 0.35);
}

.xp-step__icon { font-size: 34px; margin-bottom: 12px; }
.xp-step__title { font-size: 18px; font-weight: 800; margin: 0 0 8px; color: var(--xp-primary-dark); }
.xp-step__text { margin: 0; color: var(--xp-muted); font-size: 15px; }

/* ── آراء العملاء ────────────────────────── */
.xp-reviews { background: var(--xp-bg-soft); }

.xp-review {
	background: #fff;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius);
	padding: 26px;
	box-shadow: var(--xp-shadow);
}

.xp-review__stars { color: var(--xp-accent); font-size: 18px; letter-spacing: 2px; }
.xp-review__text { margin: 12px 0 16px; color: var(--xp-text); font-size: 15px; }
.xp-review__name { font-weight: 800; color: var(--xp-primary-dark); }

/* ── الصفحة المفردة (xp_page) ─────────────── */
.xp-single { padding-bottom: 60px; }

.xp-single__cover {
	max-height: 420px;
	overflow: hidden;
}

.xp-single__cover img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

.xp-single__body {
	max-width: 820px;
	margin-block-start: 40px;
}

.xp-single__title {
	font-size: clamp(26px, 4vw, 40px);
	font-weight: 900;
	margin: 0 0 24px;
	padding-inline-start: 14px;
	border-inline-start: 5px solid var(--xp-accent);
}

.xp-single__content {
	font-size: 17px;
	color: #374151;
}

.xp-single__content img { max-width: 100%; height: auto; border-radius: 10px; }
.xp-single__content h2 { color: var(--xp-primary-dark); margin-top: 1.6em; }
.xp-single__content a { color: var(--xp-primary); }

/* ── حركة لطيفة عند الظهور ────────────────── */
.xp-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.xp-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.xp-reveal { opacity: 1; transform: none; transition: none; }
	.xp-btn, .xp-card { transition: none; }
}

/* ── الاستجابة للهواتف ────────────────────── */
@media (max-width: 600px) {
	.xp-section { padding-block: 44px; }
	.xp-hero { padding-block: 68px; }
	.xp-btn { width: 100%; text-align: center; }
	.xp-hero__actions { flex-direction: column; }
}

/* ── صورة داخل بطاقة القيمة ── */
.xp-card__media { width: 64px; height: 64px; margin-bottom: 16px; border-radius: 12px; overflow: hidden; }
.xp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── الهيرو بخلفية صورة ── */
.xp-hero--image { background: #0c5643; }
.xp-hero--image .xp-hero__overlay {
	background: linear-gradient(160deg, var(--xp-primary), var(--xp-primary-dark));
	opacity: .55;
}
.xp-hero--image { background-size: cover; background-position: center; }

/* ── قسم دعوة لإجراء (CTA) ── */
.xp-cta { background: linear-gradient(160deg, var(--xp-primary) 0%, var(--xp-primary-dark) 100%); color: #fff; }
.xp-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.xp-cta__title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 0 0 6px; }
.xp-cta__desc { margin: 0; opacity: .95; max-width: 620px; }
.xp-cta__btn { white-space: nowrap; }

/* ── الشركاء / الشعارات ── */
.xp-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; }
.xp-logo { display: inline-flex; align-items: center; justify-content: center; height: 60px; opacity: .75; transition: opacity .2s ease, transform .2s ease; }
.xp-logo:hover { opacity: 1; transform: translateY(-2px); }
.xp-logo img { max-height: 60px; width: auto; filter: grayscale(100%); transition: filter .2s ease; }
.xp-logo:hover img { filter: none; }

/* ── الأسئلة الشائعة (أكورديون) ── */
.xp-faq__inner { max-width: 780px; }
.xp-accordion { display: flex; flex-direction: column; gap: 12px; }
.xp-accordion__item { background: #fff; border: 1px solid var(--xp-border); border-radius: var(--xp-radius); box-shadow: var(--xp-shadow); overflow: hidden; }
.xp-accordion__q { cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--xp-primary-dark); list-style: none; position: relative; }
.xp-accordion__q::-webkit-details-marker { display: none; }
.xp-accordion__q::after { content: "+"; position: absolute; inset-inline-end: 22px; font-size: 20px; color: var(--xp-accent); }
.xp-accordion__item[open] .xp-accordion__q::after { content: "−"; }
.xp-accordion__a { padding: 0 22px 18px; color: var(--xp-muted); }

@media (max-width: 600px) {
	.xp-cta__inner { flex-direction: column; text-align: center; }
}

/* ═══ الثيم المصغّر: عرض الصفحة ═══ */
/* محتوى محدود العرض (افتراضي) — الحاويات محدودة بـ --xp-maxw */
.xp-main--boxed .xp-container { max-width: var(--xp-maxw); }
/* بعرض الشاشة بالكامل — الحاويات تمتد مع هامش جانبي مريح */
.xp-main--full .xp-container { max-width: 100%; padding-inline: clamp(20px, 5vw, 80px); }

/* ═══ ترويسة الثيم المصغّر ═══ */
.xp-site-header {
	background: #fff;
	border-bottom: 1px solid var(--xp-border);
	box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.xp-site-header--sticky { position: sticky; top: 0; z-index: 50; }
.xp-site-header__inner {
	display: flex; align-items: center; gap: 20px;
	min-height: 68px; padding-block: 10px;
}
.xp-brand { display: inline-flex; align-items: center; text-decoration: none; }
.xp-brand__name { font-weight: 800; font-size: 20px; color: var(--xp-primary-dark); }
.xp-brand__logo { max-height: 40px; width: auto; display: block; }
.xp-nav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; flex-wrap: wrap; }
.xp-nav__link {
	color: var(--xp-text); text-decoration: none; font-weight: 600; font-size: 15px;
	transition: color .15s ease;
}
.xp-nav__link:hover { color: var(--xp-primary); }
.xp-site-header__cta { margin-inline-start: 8px; padding: 10px 18px; }
/* عند غياب القائمة يبقى الزر على اليسار */
.xp-nav + .xp-site-header__cta { margin-inline-start: 8px; }
.xp-site-header__inner > .xp-site-header__cta:not(.xp-nav ~ *) { margin-inline-start: auto; }
.xp-nav-toggle {
	display: none; margin-inline-start: auto; background: none; border: 0;
	font-size: 24px; cursor: pointer; color: var(--xp-primary-dark); line-height: 1;
}

/* ═══ تذييل الثيم المصغّر ═══ */
.xp-site-footer {
	background: var(--xp-primary-dark); color: #eaf3ef;
	padding-block: 28px; margin-top: 40px;
}
.xp-site-footer__text { margin: 0; text-align: center; font-size: 14px; opacity: .9; }

/* ═══ استجابة الجوال للترويسة ═══ */
@media (max-width: 782px) {
	.xp-nav-toggle { display: inline-block; }
	.xp-nav {
		display: none; order: 3; width: 100%; flex-direction: column;
		align-items: flex-start; gap: 4px; margin: 8px 0 0;
	}
	.xp-nav.is-open { display: flex; }
	.xp-nav__link { padding: 8px 0; width: 100%; border-bottom: 1px solid var(--xp-border); }
	.xp-site-header__cta { margin-inline-start: 0; }
	.xp-site-header__inner { flex-wrap: wrap; }
}

/* ── دعم قائمة ووردبريس (ul/li) في الترويسة ── */
ul.xp-nav { list-style: none; margin: 0 0 0 auto; padding: 0; }
ul.xp-nav > li { position: relative; }
.xp-nav a { color: var(--xp-text); text-decoration: none; font-weight: 600; font-size: 15px; transition: color .15s ease; display: inline-block; }
.xp-nav a:hover, .xp-nav .current-menu-item > a { color: var(--xp-primary); }

/* ── ودجات التذييل ── */
.xp-site-footer__widgets {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 28px; padding-bottom: 24px; margin-bottom: 20px;
	border-bottom: 1px solid rgba(255,255,255,.15); text-align: start;
}
.xp-footer-widget { font-size: 14px; }
.xp-footer-widget__title { margin: 0 0 12px; font-size: 15px; color: #fff; font-weight: 700; }
.xp-site-footer__widgets a { color: #eaf3ef; text-decoration: none; }
.xp-site-footer__widgets a:hover { text-decoration: underline; }
.xp-site-footer__widgets ul { list-style: none; margin: 0; padding: 0; }
.xp-site-footer__widgets li { padding: 4px 0; }

@media (max-width: 782px) {
	ul.xp-nav { margin: 8px 0 0; flex-direction: column; width: 100%; }
}

/* ── الشريط الجانبي للصفحة المفردة ── */
.xp-single__body--has-side {
	display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start;
}
.xp-single__aside { position: sticky; top: 88px; }
.xp-side-widget {
	background: var(--xp-bg-soft); border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius); padding: 18px 20px; margin-bottom: 20px;
}
.xp-side-widget__title { margin: 0 0 12px; font-size: 16px; color: var(--xp-primary-dark); font-weight: 700; }
.xp-side-widget ul { list-style: none; margin: 0; padding: 0; }
.xp-side-widget li { padding: 5px 0; border-bottom: 1px solid var(--xp-border); }
.xp-side-widget a { color: var(--xp-text); text-decoration: none; }
.xp-side-widget a:hover { color: var(--xp-primary); }

/* ── شعار الموقع المخصّص داخل الترويسة ── */
.xp-brand--custom .custom-logo-link { display: inline-flex; }
.xp-brand--custom img { max-height: 44px; width: auto; display: block; }

@media (max-width: 860px) {
	.xp-single__body--has-side { grid-template-columns: 1fr; }
	.xp-single__aside { position: static; }
}

/* ── قسم فريق العمل ─────────────────────────────── */
.xp-team {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
}

.xp-team__member {
	background: #fff;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius);
	padding: 28px 22px;
	text-align: center;
	box-shadow: var(--xp-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.xp-team__member:hover {
	transform: translateY(-4px);
	box-shadow: var(--xp-shadow-lg);
	border-color: rgba(15, 107, 83, 0.35);
}

.xp-team__photo {
	width: 104px;
	height: 104px;
	margin: 0 auto 16px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid var(--xp-bg-soft);
	box-shadow: 0 0 0 1px var(--xp-border);
}

.xp-team__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.xp-team__name {
	font-size: 18px;
	font-weight: 800;
	color: var(--xp-primary-dark);
	margin-bottom: 4px;
}

.xp-team__role {
	font-size: 14px;
	font-weight: 600;
	color: var(--xp-accent);
	margin-bottom: 12px;
}

.xp-team__bio {
	margin: 0;
	color: var(--xp-muted);
	font-size: 14px;
	line-height: 1.7;
}

/* ── قسم شورت كود / HTML ────────────────────────── */
.xp-shortcode-wrap .xp-shortcode {
	margin: 0 auto;
}
.xp-shortcode-wrap .xp-shortcode > *:first-child { margin-top: 0; }
.xp-shortcode-wrap .xp-shortcode > *:last-child { margin-bottom: 0; }

/* ── بطاقة قابلة للنقر (برابط) ─────────────────── */
.xp-card--link {
	text-decoration: none;
	color: inherit;
	display: block;
}
.xp-card--link:hover { text-decoration: none; }
.xp-card__more {
	display: inline-block;
	margin-top: 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--xp-primary);
}
.xp-card--link:hover .xp-card__more { color: var(--xp-primary-dark); }
