/*
Theme Name: JAD GROUP LTD
Theme URI: https://jadgroupltd.com
Author: JAD GROUP
Author URI: https://jadgroupltd.com
Description: ثيم وردبريس كامل لشركة JAD GROUP LTD — تقنية، تسويق، ومنتجات رقمية. كل أجزاء الموقع قابلة للتعديل من لوحة التحكم (ألوان، محتوى، صور، أقسام، أيقونات) مع أنواع منشورات مخصّصة للمشاريع والمنتجات وآراء العملاء والخدمات والعملاء وقصص النجاح. ثنائي اللغة، يدعم RTL.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jadgroupltd
Tags: rtl-language-support, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, theme-options

هذا الملف مطلوب من وردبريس كترويسة للثيم فقط.
أنماط التصميم الفعلية موجودة في مجلد css/ (tokens.css, base.css, style.css, responsive.css)
ويتم تحميلها من inc/setup.php.
*/

/* ====== إضافات الثيم فوق ملفات التصميم ====== */

/* الكلمة المميّزة داخل العناوين (span.accent) تأخذ اللون المميّز */
.t-display .accent,
.t-h1 .accent,
.t-h2 .accent,
.t-h3 .accent,
.x144 .accent { color: var(--gold-500); }

/* محتوى المقالات/الصفحات العام داخل الموقع */
.jad-prose { color: var(--fg-muted); line-height: 1.9; font-size: 16px; }
.jad-prose h2, .jad-prose h3, .jad-prose h4 { color: var(--fg); margin: 1.4em 0 .5em; }
.jad-prose a { color: var(--gold-400); }
.jad-prose img { max-width: 100%; height: auto; border-radius: var(--r-lg); }
.jad-prose ul, .jad-prose ol { padding-inline-start: 22px; }
.jad-prose li { margin: 6px 0; }
.jad-prose blockquote { border-inline-start: 3px solid var(--gold-500); padding-inline-start: 16px; color: var(--fg); margin: 1em 0; }

/* شبكة المدونة الافتراضية */
.jad-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px){ .jad-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .jad-blog-grid { grid-template-columns: 1fr; } }
.jad-blog-card { background: var(--ink-600); border: 1px solid var(--ink-450); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.jad-blog-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--ink-700); }
.jad-blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.jad-blog-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.jad-blog-card h3 { margin: 0; font-size: 18px; color: var(--fg); }
.jad-blog-card h3 a { color: inherit; text-decoration: none; }
.jad-blog-card .meta { font-size: 13px; color: var(--fg-faint); font-family: var(--font-mono); }

/* روابط داخل العناصر */
.x110 { text-decoration: none; }
.x60, .x221 { text-decoration: none; }

/* قسم نصوص + صورة (شبكة 2×2) داخل صفحة الخدمة */
.jad-svc-section { border-top: 1px solid var(--ink-450); }
.jad-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 64px; align-items: start; }
.jad-ftext h2 { margin: 0 0 16px; color: var(--fg); }
.jad-ftext .jad-prose { color: var(--fg-muted); }
.jad-ftext .jad-prose p { margin: 0 0 14px; }
.jad-fimg { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); align-self: stretch; }
.jad-fimg img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; display: block; }
.jad-fcta { margin-top: 24px; width: 100%; justify-content: center; }
@media (max-width: 860px) {
	.jad-fgrid { grid-template-columns: 1fr; gap: 26px; }
	.jad-fimg img { min-height: 240px; }
}

/* ===== أداة إمكانية الوصول (Accessibility) ===== */
.jad-a11y { position: fixed; left: 24px; bottom: 96px; z-index: 1100; }
.jad-a11y-toggle {
	width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	background: var(--blue-500); color: #fff; border: 0;
	box-shadow: 0 10px 30px -8px rgba(62,123,250,.6); transition: transform .2s ease;
}
.jad-a11y-toggle:hover { transform: scale(1.08); }
.jad-a11y-panel {
	position: absolute; bottom: calc(100% + 12px); left: 0;
	width: 270px; max-width: 78vw; background: var(--ink-700);
	border: 1px solid var(--ink-450); border-radius: var(--r-lg);
	box-shadow: var(--shadow-lg); padding: 14px;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease;
}
.jad-a11y.is-open .jad-a11y-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.jad-a11y-head { display: flex; align-items: center; gap: 8px; color: var(--gold-400); font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.jad-a11y-size-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: var(--fg); font-size: 14px; }
.jad-a11y-size { display: inline-flex; gap: 4px; }
.jad-a11y-size button { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--ink-450); background: var(--ink-600); color: var(--fg); cursor: pointer; font-weight: 700; font-size: 15px; }
.jad-a11y-size button:hover { border-color: var(--gold-500); color: var(--gold-400); }
.jad-a11y-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.jad-a11y-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 6px; border-radius: var(--r-sm); border: 1px solid var(--ink-450); background: var(--ink-600); color: var(--fg-muted); cursor: pointer; font-size: 12px; line-height: 1.3; transition: .15s; }
.jad-a11y-opt:hover { color: var(--fg); border-color: var(--ink-400); }
.jad-a11y-opt.is-on { background: var(--gold-500); color: var(--accent-ink); border-color: var(--gold-500); }
.jad-a11y-reset { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--ink-450); background: transparent; color: var(--fg-muted); cursor: pointer; font-size: 13px; }
.jad-a11y-reset:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 600px) { .jad-a11y { left: 16px; bottom: 80px; } .jad-a11y-toggle { width: 48px; height: 48px; } }

/* تأثيرات إمكانية الوصول على المحتوى */
html.a11y-links .site-scroll a { text-decoration: underline !important; text-underline-offset: 3px; outline: 1px dashed var(--gold-400); outline-offset: 2px; }
html.a11y-readable .site-scroll,
html.a11y-readable .site-scroll * { font-family: 'Tajawal', system-ui, 'Segoe UI', sans-serif !important; letter-spacing: 0 !important; }
html.a11y-no-motion .site-scroll *,
html.a11y-no-motion .site-scroll *::before,
html.a11y-no-motion .site-scroll *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-big-cursor, html.a11y-big-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1.5'%3E%3Cpath d='M5 3l14 9-6 1 3 6-3 1-3-6-5 4z'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* زر واتساب عائم ثابت */
.jad-wa {
	position: fixed; left: 24px; bottom: 24px; z-index: 1100;
	width: 58px; height: 58px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #25D366; color: #fff; text-decoration: none;
	box-shadow: 0 10px 30px -6px rgba(37,211,102,.6);
	transition: transform .2s ease, box-shadow .2s ease;
}
.jad-wa:hover { transform: scale(1.08); box-shadow: 0 14px 36px -6px rgba(37,211,102,.75); }
.jad-wa::before {
	content: ""; position: absolute; inset: -8px; border-radius: 50%;
	background: rgba(37,211,102,.45); z-index: -1; animation: jad-wa-pulse 2s ease-out infinite;
}
@keyframes jad-wa-pulse {
	0%   { transform: scale(.85); opacity: .7; }
	70%  { transform: scale(1.4); opacity: 0; }
	100% { transform: scale(1.4); opacity: 0; }
}
@media (max-width: 600px) {
	.jad-wa { width: 52px; height: 52px; left: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .jad-wa::before { animation: none; } }

/* قسم ميزات المنتج (أيقونة + عنوان + وصف) — 3 في الصف */
.jad-pfeat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; margin-top: 8px; }
.jad-pfeat { text-align: center; display: flex; flex-direction: column; align-items: center; }
.jad-pfeat .service-ring { margin-bottom: 18px; }
.jad-pfeat-title { margin: 0 0 10px; font-size: 19px; font-weight: 800; color: var(--fg); }
.jad-pfeat-desc { margin: 0; font-size: 15px; line-height: 1.7; color: var(--fg-muted); max-width: 340px; }
@media (max-width: 860px) { .jad-pfeat-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 560px) { .jad-pfeat-grid { grid-template-columns: 1fr; } }

/* معرض المشروع: ارتفاع الصور 800px */
.x277 .x289 {
	aspect-ratio: auto;
	height: 550px;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-position: center top !important;
	background-color: #fff;
}
@media (max-width: 900px) { .x277 {grid-template-columns: 2fr;display: flex;} .x277 .x289 {height: 219px;width: 49%;} }

/* معرض التطبيقات: عرض اللقطات داخل فريم موبايل (للتطبيقات فقط) */
.x277.jad-phones { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: start; }
.x277.jad-phones .jad-phone {
	height: auto !important;
	width: auto !important;
	aspect-ratio: 9 / 19.5;
	background-color: #000 !important;
	background-size: cover !important;
	background-position: center top !important;
	border: 10px solid #0f1014;
	border-radius: 40px;
	box-shadow: 0 22px 55px -18px rgba(0,0,0,.65), inset 0 0 0 2px #2b2d33;
	position: relative;
	overflow: hidden;
}
.x277.jad-phones .jad-phone::before {
	content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
	width: 42%; height: 18px; background: #0f1014; border-radius: 0 0 14px 14px; z-index: 2;
}
@media (max-width: 1100px) { .x277.jad-phones { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .x277.jad-phones { grid-template-columns: repeat(2, 1fr); gap: 18px; } }

/* هيدر صفحة المشروع: الخلفية والمحتوى أشقّاء (إصلاح انهيار الارتفاع) */
.jad-proj-hero { position: relative; overflow: hidden; }
.jad-proj-hero .x288 { z-index: 1; }
.jad-proj-hero .x262 { position: relative; z-index: 2; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; }

/* أزرار متاجر التطبيقات (Google Play + App Store) في صفحة المشروع */
.jad-stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.jad-store {
	display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
	background: #000; color: #fff; border: 1px solid rgba(255,255,255,.25);
	border-radius: 12px; padding: 9px 16px; transition: .18s ease;
}
.jad-store:hover { transform: translateY(-2px); border-color: #fff; }
.jad-store-ico { display: inline-flex; }
.jad-store-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.jad-store-txt small { font-size: 10px; opacity: .85; font-weight: 500; }
.jad-store-txt strong { font-size: 16px; font-weight: 700; }

/* زر «عرض الموقع» في صفحة المشروع */
.jad-visit { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; text-decoration: none; width: fit-content; }

/* شعار العميل كرابط لموقعه */
a.client-logo { text-decoration: none; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
a.client-logo:hover { transform: translateY(-3px); border-color: var(--gold-500); box-shadow: var(--shadow-md); }

/* شبكة شعارات «عملاء يستخدمون المنتج» (8 في الصف، بدون سلايدر) */
.jad-prod-clients { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; margin-top: 8px; }
@media (max-width: 1200px) { .jad-prod-clients { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 900px)  { .jad-prod-clients { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px)  { .jad-prod-clients { grid-template-columns: repeat(3, 1fr); } }

/* رفع الهيدر وقوائمه فوق كل عناصر الصفحة */
.x1 { z-index: 1000; }
.mega { z-index: 1001; }

/* مبدّل اللغة في الهيدر (قائمة منسدلة) */
.jad-langs { position: relative; }
.jad-lang-toggle {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	background: var(--ink-600); border: 1px solid var(--ink-450); color: var(--fg);
	font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
	padding: 8px 12px; border-radius: var(--r-pill); transition: .18s; white-space: nowrap;
}
.jad-lang-toggle:hover { border-color: var(--gold-500); color: var(--gold-400); }
.jad-lang-toggle .x9 { transition: transform .2s; }
.jad-langs:hover .jad-lang-toggle .x9,
.jad-langs:focus-within .jad-lang-toggle .x9 { transform: rotate(180deg); }

.jad-lang-menu {
	position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 170px;
	background: var(--ink-700); border: 1px solid var(--ink-450); border-radius: var(--r-md);
	box-shadow: var(--shadow-lg); padding: 6px; display: grid; gap: 2px;
	opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; z-index: 1002;
}
.jad-langs:hover .jad-lang-menu,
.jad-langs:focus-within .jad-lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.jad-lang {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
	color: var(--fg-muted); text-decoration: none; font-size: 14px; transition: .15s;
}
.jad-lang:hover { background: var(--ink-600); color: var(--fg); }
.jad-lang .code { font-family: var(--font-mono); font-size: 11px; font-weight: 600; opacity: .7; min-width: 22px; }
.jad-lang.is-active { background: var(--gold-500); color: var(--accent-ink); }
.jad-lang.is-active .code { opacity: 1; }

/* ترقيم الصفحات */
.jad-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.jad-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--ink-600); border: 1px solid var(--ink-450); color: var(--fg-muted); text-decoration: none; }
.jad-pagination .page-numbers.current { background: var(--gold-500); color: var(--accent-ink); border-color: var(--gold-500); }

.pj-projects img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.x300 {
    display: none;
}

.x66{
    display: none;
}

/* صندوق عرض الصور (Lightbox) */
.jad-lb { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center;
	background: rgba(4, 10, 15, .92); padding: 40px; backdrop-filter: blur(4px); }
.jad-lb.is-open { display: flex; }
.jad-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; max-height: 90vh; }
.jad-lb-img { max-width: 92vw; max-height: 78vh; width: auto; height: auto; object-fit: contain;
	border-radius: var(--r-md); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.jad-lb-cap { display: flex; align-items: center; gap: 18px; color: var(--fg-muted); font-size: 14px; }
.jad-lb-count { font-family: var(--font-mono); letter-spacing: 1px; }
.jad-lb-visit { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-500); color: var(--accent-ink);
	font-weight: 700; padding: 8px 16px; border-radius: var(--r-md); text-decoration: none; }
.jad-lb-visit:hover { filter: brightness(1.06); }
.jad-lb-close { position: fixed; top: 18px; inset-inline-end: 22px; width: 46px; height: 46px; border: 0; cursor: pointer;
	background: rgba(255,255,255,.08); color: #fff; font-size: 30px; line-height: 1; border-radius: 50%; }
.jad-lb-close:hover { background: rgba(255,255,255,.18); }
.jad-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border: 0; cursor: pointer;
	background: rgba(255,255,255,.08); color: #fff; font-size: 26px; border-radius: 50%; display: grid; place-items: center; }
.jad-lb-nav:hover { background: rgba(255,255,255,.18); }
.jad-lb-prev { inset-inline-start: 22px; }
.jad-lb-next { inset-inline-end: 22px; }
@media (max-width: 600px) { .jad-lb-nav { width: 44px; height: 44px; } .jad-lb { padding: 16px; } }

/* قسم «عملاؤنا» في صفحة المنتج: 4 في الصف، الصورة كاملة بدون قص */
.jad-ourclients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.jad-ourclients .jad-oc-item {
	display: block; border-radius: var(--r-md); overflow: hidden; background: var(--ink-700);
	border: 1px solid var(--ink-450); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.jad-ourclients a.jad-oc-item:hover { transform: translateY(-3px); border-color: var(--gold-500); box-shadow: var(--shadow-md); }
.jad-ourclients .jad-oc-item img { width: 100%; height: auto; display: block; }
@media (max-width: 1000px) { .jad-ourclients { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .jad-ourclients { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .jad-ourclients { grid-template-columns: 1fr; } }

/* كفر صفحة المشروع: خلفية مختلفة للديسكتوب والموبايل */
.jad-proj-hero .x288.jad-cover {
	background: linear-gradient(0deg, rgba(7,18,26,.92), rgba(7,18,26,.5)), var(--cover-d) center / cover no-repeat;
}
@media (max-width: 768px) {
	.jad-proj-hero .x288.jad-cover {
		background: linear-gradient(0deg, rgba(7,18,26,.92), rgba(7,18,26,.5)), var(--cover-m) center / cover no-repeat;
	}
}

/* بطاقة الخدمة: عرض الصورة البارزة بدل الأيقونة داخل الحلقة */
.service-ring.has-img { overflow: hidden; padding: 0; }
.service-ring.has-img img {
	width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}

/* ===================== قسم «قصتنا» في صفحة من نحن ===================== */
.jad-story-section { border-top: 1px solid var(--ink-450); }
.jad-story {
	display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center;
}
.jad-story-media { position: relative; }
.jad-story-media img {
	position: relative; z-index: 1; width: 100%; height: 100%; max-height: 520px;
	object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--ink-450);
	box-shadow: var(--shadow-lg);
}
.jad-story-glow {
	position: absolute; inset: -22px -22px auto -22px; height: 60%; z-index: 0;
	background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--gold-500) 38%, transparent), transparent 70%);
	filter: blur(36px); border-radius: 50%;
}
.jad-story-body .x20 { margin-bottom: 14px; }
.jad-story-h { color: var(--fg); margin: 0 0 18px; }
.jad-story-prose p { color: var(--fg-muted); line-height: 2; margin: 0 0 16px; }
.jad-story-prose p:first-child { color: var(--fg); font-size: 1.06em; }
@media (max-width: 900px) {
	.jad-story { grid-template-columns: 1fr; gap: 30px; }
	.jad-story-media img { max-height: 420px; }
}