/*
Theme Name: Qeeid
Theme URI: https://qeeid.com
Author: Qeeid
Author URI: https://qeeid.com
Description: قالب قيد — منصة المحتوى التقني والأتمتة. قالب عربي RTL حديث مبني على أساس Qeeid، مع تعريب كامل، خط Tajawal، تمييز الأكواد، بحث فوري، وتحسينات سيو (Schema + Open Graph).
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qeeid
RTL: true
Tags: rtl-language-support, custom-menu, custom-logo, featured-images, theme-options, translation-ready, blog, education
*/

/* =========================================================
   0. Design Tokens
   ========================================================= */
:root {
	/* === إعادة تعريف ألوان القالب الأب: أخضر → أزرق الهوية === */
	--qeeid-primary: #2563eb;
	--qeeid-primary-hover: #1d4ed8;
	--qeeid-link: #2563eb;
	--qeeid-link-hover: #1d4ed8;

	--qv-font-body: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--qv-font-code: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

	--qv-content-width: 820px;
	--qv-radius: 10px;

	/* ألوان الكود (خلفية بيضاء — نمط فاتح) */
	--qv-code-bg: #f8f9fa;
	--qv-code-fg: #1f2937;
	--qv-code-border: #e2e8f0;
	--qv-code-lineno: #9ca3af;

	--qv-accent: #2c3e50;
	--qv-accent-hover: #1a252f;
}

/* =========================================================
   1. الأساس: اتجاه RTL + الخط العربي
   ========================================================= */
body,
.qeeid-main,
.qeeid-header,
.site-content,
.qeeid-footer {
	font-family: var(--qv-font-body) !important;
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
}

/* فرض الخط العربي على العناصر النصية */
h1, h2, h3, h4, h5, h6, p, a, li, span, button, input {
	font-family: var(--qv-font-body) !important;
}

/* =========================================================
   2. تخطيط المحتوى  (تحييد شبكة الـ Docs)
   ========================================================= */
.qeeid-docs-layout-grid__left,
.qeeid-docs-layout-grid__right,
#qeeid-docs-drawer,
.qeeid-docs-toolbar {
	display: none !important;
}

.qeeid-docs-layout-grid,
.qeeid-docs-layout-grid--with-toc,
.qeeid-docs-layout-grid--reserve-right {
	display: block !important;
	grid-template-columns: 1fr !important;
}

.qeeid-docs-layout-grid__content {
	width: 100%;
	max-width: var(--qv-content-width);
	margin-inline: auto;
	float: none;
}

#main.qeeid-main {
	display: block;
}

@media (min-width: 768px) {
	.qeeid-docs-layout-grid,
	.qeeid-docs-layout-grid--with-toc,
	.qeeid-docs-layout-grid--reserve-right {
		display: block !important;
		grid-template-columns: 1fr !important;
		justify-content: initial !important;
	}

	.qeeid-docs-layout-grid__left,
	.qeeid-docs-layout-grid__right,
	.qeeid-docs-layout-grid--with-toc .qeeid-docs-layout-grid__right {
		display: none !important;
	}
}

/* =========================================================
   3. الهيدر  (تحسين العناصر العلوية — كمبيوتر، RTL)
   ========================================================= */

/* إخفاء القائمة الرئيسية من الهيدر (تواصل معنا تبقى في الفوتر فقط) */
.qeeid-header .qeeid-primary-nav {
	display: none !important;
}

.qeeid-header__menu-toggle {
	display: none !important;
}

@media (min-width: 768px) {
	.qeeid-header .qeeid-primary-nav {
		display: none !important;
	}
}

.qeeid-header__inner {
	max-width: 1240px;
	padding: 0.85rem 1.5rem;
	gap: 1.5rem;
}

.qeeid-brand {
	gap: 0.65rem;
}

.qeeid-brand__logo img,
.qeeid-brand__logo-fallback {
	border-radius: 8px;
}

.qeeid-brand__title {
	font-size: 1.3rem;
	font-weight: 800;
}

.qeeid-header__actions {
	gap: 0.75rem;
}

/* حقل البحث: مظهر أنظف (RTL) */
.qeeid-header__search input[type="search"],
.qeeid-header__search .search-field {
	border: 1px solid #d9e1ea;
	border-radius: 8px;
	padding: 0.5rem 0.85rem;
	font-size: 0.95rem;
	min-width: 220px;
	text-align: right;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qeeid-header__search input[type="search"]:focus,
.qeeid-header__search .search-field:focus {
	border-color: var(--qv-accent);
	box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
	outline: none;
}

.qeeid-header__search button,
.qeeid-header__search input[type="submit"],
.qeeid-header__search .search-submit {
	background-color: var(--qv-accent);
	border: 2px solid var(--qv-accent);
	color: #fff;
	border-radius: 8px;
	padding: 0.5rem 1rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.qeeid-header__search button:hover,
.qeeid-header__search input[type="submit"]:hover {
	background-color: var(--qv-accent-hover);
	border-color: var(--qv-accent-hover);
}

.qeeid-header__search button svg,
.qeeid-header__search .search-submit svg {
	fill: #fff;
	stroke: #fff;
}

/* =========================================================
   4. الهيدر في الجوال (RTL)
   ========================================================= */
@media screen and (max-width: 767px) {
	.qeeid-header__inner {
		padding: 0.7rem 1rem;
		gap: 0.75rem;
	}
	.qeeid-brand__title {
		font-size: 1.15rem;
	}
	.qeeid-header__search {
		width: 100%;
	}
	.qeeid-header__search input[type="search"],
	.qeeid-header__search .search-field {
		width: 100%;
		min-width: 0;
	}
}

/* =========================================================
   5. صناديق الأكواد  (خلفية بيضاء — تبقى LTR دائماً)
   ========================================================= */
pre,
pre[class*="language-"],
.wp-block-code {
	background-color: var(--qv-code-bg) !important;
	color: var(--qv-code-fg) !important;
	border: 1px solid var(--qv-code-border) !important;
	border-radius: var(--qv-radius) !important;
	padding: 18px 20px !important;
	direction: ltr !important;
	text-align: left !important;
	overflow-x: auto;
	font-family: var(--qv-font-code) !important;
	font-size: 0.88rem;
	line-height: 1.65;
	margin: 1.5rem 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
	position: relative;
}

/* كل عناصر الكود الداخلية تبقى LTR وبخط برمجي */
pre code,
pre code *,
pre span,
pre[class*="language-"] *,
.wp-block-code code,
.wp-block-code code * {
	direction: ltr !important;
	text-align: left !important;
	font-family: var(--qv-font-code) !important;
	background: transparent !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

/* تلوين Prism على الخلفية البيضاء */
pre[class*="language-"] .token.comment,
pre[class*="language-"] .token.prolog,
pre[class*="language-"] .token.doctype { color: #6a9955 !important; }

pre[class*="language-"] .token.string,
pre[class*="language-"] .token.attr-value,
pre[class*="language-"] .token.char,
pre[class*="language-"] .token.inserted { color: #a31515 !important; }

pre[class*="language-"] .token.keyword,
pre[class*="language-"] .token.atrule { color: #0000ff !important; }

pre[class*="language-"] .token.function,
pre[class*="language-"] .token.class-name { color: #795e26 !important; }

pre[class*="language-"] .token.number,
pre[class*="language-"] .token.boolean,
pre[class*="language-"] .token.constant { color: #098658 !important; }

pre[class*="language-"] .token.operator,
pre[class*="language-"] .token.punctuation { color: #393a34 !important; }

pre[class*="language-"] .token.property,
pre[class*="language-"] .token.tag,
pre[class*="language-"] .token.symbol { color: #267f99 !important; }

pre[class*="language-"] .token.selector,
pre[class*="language-"] .token.attr-name,
pre[class*="language-"] .token.builtin { color: #800000 !important; }

/* الكود المضمّن داخل السطر العربي (يبقى LTR) */
p code,
li code,
td code,
h1 code, h2 code, h3 code,
:not(pre) > code {
	direction: ltr !important;
	unicode-bidi: embed !important;
	background-color: rgba(44, 62, 80, 0.08) !important;
	color: #d63384 !important;
	padding: 2px 7px !important;
	border-radius: 5px !important;
	font-family: var(--qv-font-code) !important;
	font-size: 0.86em !important;
	display: inline-block !important;
}

/* =========================================================
   6. زر النسخ (RTL — على يسار الصندوق)
   ========================================================= */
.qv-code-wrap {
	position: relative;
}

.qv-copy-btn {
	position: absolute;
	top: 10px;
	left: 10px;             /* RTL: الزر على اليسار */
	background-color: #fff;
	color: #475569;
	border: 1px solid var(--qv-code-border);
	border-radius: 6px;
	padding: 5px 14px;
	font-family: var(--qv-font-body);
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qv-code-wrap:hover .qv-copy-btn {
	opacity: 1;
}

.qv-copy-btn:hover {
	background-color: #f1f5f9;
	color: var(--qv-accent);
}

.qv-copy-btn.qv-copied {
	background-color: #2e7d32;
	color: #fff;
	border-color: #2e7d32;
	opacity: 1;
}

@media (hover: none) {
	.qv-copy-btn { opacity: 1; }
}

/* =========================================================
   7. وقت القراءة (RTL)
   ========================================================= */
.qv-reading-time {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	color: #6b7280;
}

.qv-reading-time svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

.qv-meta-bar {
	display: flex;
	align-items: center;
	padding-bottom: 14px;
	margin-bottom: 22px;
	border-bottom: 1px solid #eaeaea;
}

/* =========================================================
   8b. الصور والجداول داخل المقال (كل الشاشات)
   ========================================================= */

/* الصور: لا تتعدّى عرض المحتوى أبداً */
.entry-content img,
.qeeid-entry__thumb,
.wp-block-image img,
.entry-content figure img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.entry-content figure,
.entry-content .wp-block-image {
	max-width: 100%;
	margin-inline: auto;
}

/* الجداول: حدود واضحة ومظهر أنيق */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.entry-content table th,
.entry-content table td {
	border: 1px solid #e2e8f0;
	padding: 0.75rem 1rem;
	text-align: right;
	vertical-align: top;
}

.entry-content table th {
	background-color: #f8fafc;
	font-weight: 700;
	color: var(--qv-accent);
}

.entry-content table tr:nth-child(even) td {
	background-color: #fafbfc;
}

/* =========================================================
   8c. بطاقات المقالات + الصفحات
   ========================================================= */

/* إخفاء الصورة المصغرة من بطاقات القائمة (الرئيسية + الأرشيف) */
/* المطلوب: عنوان + نبذة + تاريخ فقط، بدون صورة */
.qeeid-post-list .qeeid-card__thumb-link,
.qeeid-post-list .qeeid-card__thumb {
	display: none !important;
}
body.blog .qeeid-docs-layout-grid__content,
body.archive .qeeid-docs-layout-grid__content,
body.search .qeeid-docs-layout-grid__content,
body.home .qeeid-docs-layout-grid__content {
	max-width: 1000px;
}

body.single .qeeid-docs-layout-grid__content,
body.page .qeeid-docs-layout-grid__content {
	max-width: 980px;
}

.qeeid-post-list .qeeid-card {
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.qeeid-post-list .qeeid-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* أرقام الصفحات — توسيط */
.navigation.pagination {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.navigation.pagination .nav-links {
	justify-content: center;
}

/* =========================================================
   9. الفوتر (RTL — محسّن ومتوسّط)
   ========================================================= */
.qeeid-footer {
	margin-top: 3rem;
	border-top: 1px solid #e5e7eb;
	background: #fafbfc;
}

.qeeid-footer__inner {
	max-width: 1000px;
	margin-inline: auto;
	padding: 2.5rem 1.5rem 2rem;
}

.qeeid-footer__widgets {
	text-align: center;
}

.qeeid-footer__widgets ul,
.qeeid-footer__column ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.qeeid-footer__widgets a,
.qeeid-footer__column a {
	color: var(--qv-accent);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.qeeid-footer__widgets a:hover,
.qeeid-footer__column a:hover {
	color: var(--qv-accent-hover);
	text-decoration: underline;
}

.qeeid-footer__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	text-align: center;
	padding-top: 1.5rem;
	margin-top: 1.5rem;
	border-top: 1px solid #ececec;
}

.qeeid-footer__menu {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.qeeid-footer__menu a {
	color: var(--qv-accent);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.qeeid-footer__menu a:hover {
	color: var(--qv-accent-hover);
	text-decoration: underline;
}

.qeeid-footer__copyright {
	margin: 0;
	color: #6b7280;
	font-size: 0.9rem;
}

/* =========================================================
   10. القوائم النقطية (RTL — الهوامش على اليمين)
   ========================================================= */
.entry-content ul,
.entry-content ol {
	padding-right: 1.5rem;
	padding-left: 0;
}

/* =========================================================
   11. الجوال  (صور + نص + محتوى — RTL)
   ========================================================= */
@media screen and (max-width: 768px) {

	html, body {
		overflow-x: hidden;
		width: 100%;
	}

	.qeeid-docs-layout-grid__content {
		padding-inline: 1rem;
	}

	/* الصور: تجاوب كامل */
	.entry-content img,
	.qeeid-entry__thumb,
	.qeeid-card__thumb,
	.entry-content figure,
	.entry-content .wp-block-image {
		max-width: 100% !important;
		height: auto !important;
		border-radius: 8px;
	}

	.entry-content figure {
		margin-inline: 0;
	}

	/* النص: كسر صحيح للكلمات الطويلة فقط */
	.entry-content p,
	.entry-content li,
	.entry-content a,
	.entry-content h1,
	.entry-content h2,
	.entry-content h3,
	.entry-content h4 {
		overflow-wrap: break-word;
		word-break: normal;
	}

	.entry-content h1 { font-size: 1.6rem; line-height: 1.4; }
	.entry-content h2 { font-size: 1.35rem; line-height: 1.4; }
	.entry-content h3 { font-size: 1.15rem; }

	/* الأكواد: تمرير أفقي (تبقى LTR) */
	pre,
	pre[class*="language-"],
	.wp-block-code,
	.entry-content table {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: pre;
		font-size: 0.82rem !important;
		padding: 14px 16px !important;
	}

	.entry-content div[style*="width"] {
		max-width: 100% !important;
	}

	.entry-content table {
		display: block;
		width: 100%;
	}
}

/* =========================================================
   12. شعار قيد (نص + أيقونة مربّعة — أسلوب CodeSerial)
   النص "قيد" يميناً، الأيقونة على يساره مباشرة.
   ========================================================= */
.qeeid-brand-link {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	line-height: 1;
}

.qeeid-brand-name {
	font-family: Tajawal, 'Segoe UI', sans-serif;
	font-size: 1.8rem;
	font-weight: 800;
	color: #1e293b;
	letter-spacing: -0.5px;
}

.qeeid-brand-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: block;
	flex-shrink: 0;
	box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.qeeid-brand-link:hover .qeeid-brand-icon {
	transform: translateY(-1px);
	transition: transform 0.15s ease;
}

/* رابط الدورات (نص + أيقونة صغيرة) */
.qeeid-courses-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-start: 28px;   /* مسافة بعد اسم الموقع */
	font-family: Tajawal, 'Segoe UI', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: #2563eb;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 10px;
	transition: background 0.15s ease, color 0.15s ease;
}

.qeeid-courses-link:hover,
.qeeid-courses-link:focus {
	background: rgba(37, 99, 235, 0.1);
	color: #1d4ed8;
}

.qeeid-courses-icon {
	flex-shrink: 0;
}

/* إخفاء أي نص عنوان مكرر */
.qeeid-brand:has(.qeeid-brand-link) .qeeid-brand__text {
	display: none;
}

/* تجميع الشعار + الدورات في مجموعة واحدة */
.qeeid-brand {
	display: flex;
	align-items: center;
}

/* =========================================================
   13. تحسينات الهيدر (تباعد + بحث متناسق)
   ========================================================= */

/* البحث ظاهر على كل المقاسات */
.qeeid-header__search {
	display: block !important;
}

/* مسافة مريحة بين الشعار وبقية الهيدر */
.qeeid-header__inner {
	gap: 24px;
	align-items: center;
	justify-content: space-between;
}

/* مسافة بين الشعار وأدوات البحث */
.qeeid-brand {
	margin-inline-end: 16px;
}

/* زر البحث بلون الهوية الأزرق */
.qeeid-search-form__submit,
.qeeid-header__search button[type="submit"],
.qeeid-header__search .qeeid-btn {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: #ffffff !important;
}

.qeeid-search-form__submit:hover,
.qeeid-header__search button[type="submit"]:hover {
	background: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
}

/* حقل البحث: حدود أنعم */
.qeeid-search-form__field {
	border-radius: 10px;
}

/* على الموبايل */
@media (max-width: 767px) {
	.qeeid-brand-name {
		font-size: 1.45rem;
	}
	.qeeid-brand-icon {
		width: 40px;
		height: 40px;
		border-radius: 10px;
	}
	.qeeid-courses-link {
		margin-inline-start: 12px;
		font-size: 0.95rem;
		padding: 6px 10px;
	}
	.qeeid-header__inner {
		gap: 12px;
	}
	.qeeid-brand {
		margin-inline-end: 8px;
	}
	.qeeid-header__actions {
		display: flex !important;
		align-items: center;
	}
	.qeeid-header__search .qeeid-search-form__field {
		width: 120px;
		min-width: 0;
		font-size: 0.85rem;
		padding: 6px 10px;
	}
	.qeeid-header__search .qeeid-search-form__submit {
		padding: 6px 12px;
		font-size: 0.85rem;
	}
	.qeeid-search-form__results {
		max-width: 90vw;
	}
}

/* شاشات صغيرة جداً */
@media (max-width: 420px) {
	.qeeid-brand-name {
		font-size: 1.25rem;
	}
	.qeeid-brand-icon {
		width: 36px;
		height: 36px;
	}
	/* نبقي أيقونة الدورات فقط لتوفير المساحة */
	.qeeid-courses-link span {
		display: none;
	}
	.qeeid-courses-link {
		margin-inline-start: 6px;
		padding: 6px 8px;
	}
}

/* =========================================================
   14. تصميم الفوتر المحسّن (قيد)
   ========================================================= */
.qeeid-footer.qeeid-footer {
	background: #0f172a !important;
	border-top: 3px solid #2563eb;
	padding: 44px 0 24px;
	margin-top: 48px;
	width: 100%;
	color: #cbd5e1;
}

.qeeid-footer__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
}

.qeeid-footer__top {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	justify-content: space-between;
	align-items: flex-start;
	padding-bottom: 28px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* العلامة */
.qeeid-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 360px;
}

.qeeid-footer__logo {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
}

.qeeid-footer__tagline {
	color: #94a3b8 !important;
	font-size: 0.95rem;
	line-height: 1.8;
	margin: 0;
}

/* عنوان قسم الروابط */
.qeeid-footer__heading {
	color: #ffffff !important;
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 16px;
}

/* قائمة روابط الفوتر */
.qeeid-footer .qeeid-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 32px;
}

.qeeid-footer__menu li {
	margin: 0;
}

.qeeid-footer .qeeid-footer__menu a {
	color: #cbd5e1 !important;
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.15s ease, padding 0.15s ease;
	display: inline-block;
}

.qeeid-footer .qeeid-footer__menu a:hover,
.qeeid-footer .qeeid-footer__menu a:focus {
	color: #60a5fa !important;
	padding-inline-start: 4px;
}

/* الشريط السفلي: حقوق النشر */
.qeeid-footer__bottom {
	padding-top: 22px;
	text-align: center;
}

.qeeid-footer .qeeid-footer__copyright {
	color: #94a3b8 !important;
	font-size: 0.9rem;
	margin: 0;
}

/* الموبايل */
@media (max-width: 600px) {
	.qeeid-footer__top {
		flex-direction: column;
		gap: 28px;
	}
	.qeeid-footer .qeeid-footer__menu {
		grid-template-columns: 1fr 1fr;
	}
	.qeeid-footer__brand {
		max-width: 100%;
	}
}

/* =========================================================
   15. ترقيم الصفحات (Pagination) — أزرق متناسق
   ========================================================= */
.page-numbers,
.navigation.pagination .page-numbers,
.qeeid-pagination .page-numbers,
.nav-links .page-numbers {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: #ffffff !important;
	border-radius: 10px !important;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus-visible,
.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
	background: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #ffffff !important;
}

.page-numbers.dots {
	background: transparent !important;
	border-color: transparent !important;
	color: #64748b !important;
}

/* أزرار/روابط الهوية الأخرى التي كانت خضراء */
.qeeid-btn--primary,
.button.qeeid-primary {
	background: #2563eb !important;
	border-color: #2563eb !important;
}
.qeeid-btn--primary:hover,
.button.qeeid-primary:hover {
	background: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
}

/* =========================================================
   16. صفحة الدورات (شبكة بطاقات)
   ========================================================= */
.qeeid-tutorials-main {
	background: #f1f5f9;
	padding: 48px 0 64px;
}

.qeeid-tutorials {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

.qeeid-tutorials__head {
	text-align: center;
	margin-bottom: 36px;
}

.qeeid-tutorials__title {
	font-family: Tajawal, 'Segoe UI', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 10px;
}

.qeeid-tutorials__intro {
	color: #64748b;
	font-size: 1.05rem;
	line-height: 1.8;
	max-width: 640px;
	margin: 0 auto;
}

/* الشبكة: تتكيّف تلقائياً (4 دورات → صف واحد على الشاشات الواسعة) */
.qeeid-tutorials__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 22px;
	max-width: 1000px;
	margin: 0 auto;
}

/* البطاقة */
.qeeid-course-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: #ffffff;
	border: 1px solid #e8edf3;
	border-radius: 16px;
	padding: 32px 18px;
	text-decoration: none;
	min-height: 150px;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.qeeid-course-card:hover,
.qeeid-course-card:focus {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
	border-color: #c7d6ea;
}

/* الأيقونة */
.qeeid-course-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
}

.qeeid-course-card__icon i {
	font-size: 52px;
	line-height: 1;
}

.qeeid-course-card__icon svg {
	width: 48px;
	height: 48px;
}

/* اسم الدورة */
.qeeid-course-card__title {
	font-family: Tajawal, 'Segoe UI', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e293b;
	text-align: center;
	line-height: 1.5;
}

/* تابلت: 3 أعمدة */
@media (max-width: 1024px) {
	.qeeid-tutorials__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* موبايل كبير: عمودان */
@media (max-width: 700px) {
	.qeeid-tutorials__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
	.qeeid-course-card {
		padding: 24px 12px;
		min-height: 130px;
	}
	.qeeid-tutorials__title {
		font-size: 1.6rem;
	}
}

/* موبايل صغير: عمودان مضغوطان */
@media (max-width: 380px) {
	.qeeid-course-card__icon i {
		font-size: 42px;
	}
}
