/* =========================================================
 * MyTheme Child - Custom Reusable Blocks CSS
 * كل قسم مستقل عن الآخر، ويستخدم متغير --cb-primary القابل
 * للتخصيص من الـ Shortcode نفسه عبر attribute اسمه color="#xxxxxx"
 * ========================================================= */

.cb-section {
	--cb-primary: #0f9c8f;
	--cb-primary-light: #eaf7f5;
	--cb-text: #1f2937;
	--cb-muted: #6b7280;
	--cb-border: #e5e7eb;
	direction: rtl;
	text-align: right;
	margin: 40px 0;
	font-family: inherit;
}

.cb-section * {
	box-sizing: border-box;
}

/* ---------- عناوين مشتركة ---------- */
.cb-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}

.cb-section-heading h3,
.cb-steps-heading h3 {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: var(--cb-text);
}

.cb-section-heading p,
.cb-steps-heading p {
	margin: 0;
	color: var(--cb-muted);
	font-size: 14px;
}

.cb-section-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cb-more-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--cb-primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.cb-more-link:hover { text-decoration: underline; }

/* =========================================================
 * 1) قسم الخطوات (cb_steps)
 * ========================================================= */
.cb-steps-section {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap-reverse;
	gap: 32px;
	background: #fff;
	border: 1px solid var(--cb-border);
	border-radius: 16px;
	padding: 32px;
}

.cb-steps-heading { flex: 0 0 260px; max-width: 320px; }

.cb-steps-row {
	display: flex;
	align-items: flex-start;
	gap: 46px;
	flex-wrap: wrap;
	flex: 1 1 auto;
}

.cb-step {
	position: relative;
	text-align: center;
	max-width: 170px;
}

.cb-step:not(:first-child)::before {
	content: "\2039"; /* ‹ */
	position: absolute;
	top: 26px;
	right: calc(100% + 6px);
	color: #cbd5e1;
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
}

.cb-step-icon-wrap {
	position: relative;
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
}

.cb-step-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 16px;
	background: #f6f8fa;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
	font-size: 22px;
	color: var(--cb-text);
}

.cb-step-number {
	position: absolute;
	top: -6px;
	left: -6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--cb-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cb-step-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--cb-text);
}

.cb-step-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--cb-muted);
}

/* =========================================================
 * 2) شبكة الأيقونات (cb_icon_grid)
 * ========================================================= */
.cb-icon-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 14px;
}

.cb-icon-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--cb-border);
	border-radius: 12px;
	padding: 20px 10px;
	text-decoration: none;
	color: var(--cb-text);
	transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.cb-icon-item:hover {
	border-color: var(--cb-primary);
	box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
	transform: translateY(-2px);
	color: var(--cb-primary);
}

.cb-icon-item-icon {
	font-size: 22px;
	color: var(--cb-primary);
}

.cb-icon-item-text {
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* =========================================================
 * 3) كاروسيل البطاقات (cb_card_carousel)
 * ========================================================= */
.cb-carousel-nav {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--cb-border);
	background: #fff;
	color: var(--cb-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease, color .2s ease;
}
.cb-carousel-nav:hover {
	background: var(--cb-primary);
	color: #fff;
	border-color: var(--cb-primary);
}

.cb-card-track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	padding-bottom: 6px;
}
.cb-card-track::-webkit-scrollbar { height: 6px; }
.cb-card-track::-webkit-scrollbar-thumb { background: var(--cb-border); border-radius: 4px; }

.cb-card {
	flex: 0 0 260px;
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid var(--cb-border);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.cb-card-media {
	position: relative;
	height: 150px;
}
.cb-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cb-card-badge {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: var(--cb-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
}

.cb-card-body {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cb-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--cb-text);
}

.cb-card-text {
	margin: 0;
	font-size: 13px;
	color: var(--cb-muted);
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cb-card-location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--cb-muted);
	margin-top: 4px;
}
.cb-card-location i { color: var(--cb-primary); }

.cb-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cb-primary);
	text-decoration: none;
}
.cb-card-link:hover { text-decoration: underline; }

/* ---------- استجابة للشاشات الصغيرة ---------- */
@media (max-width: 782px) {
	.cb-steps-section { flex-direction: column; }
	.cb-steps-row { justify-content: center; }
	.cb-step:not(:first-child)::before { display: none; }
	.cb-section-header { flex-direction: column; align-items: flex-start; }
}
