/**
 * Block Style: Home Services (Uniform Height & Side-by-Side Header Layout)
 */

.services-section {
	background: transparent !important;
	padding: 70px 0;
}

.services-section .section-header {
	margin-bottom: 45px;
}

.services-section .section-badge-wrapper {
	display: block;
	margin-bottom: 14px;
}

/* الشارة العليا تأخذ خلفية من اللون الرئيسي primary_color */
.services-section .section-badge {
	display: inline-flex;
	align-items: center;
	background: rgba(var(--theme-primary-rgb), 0.12) !important;
	color: var(--theme-text-light) !important;
	padding: 6px 18px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 0.88rem;
}

/* العنوان يظهر فيه الوصف ويأخذ لون الخط الرئيسي text_color_primary */
.services-section .section-title {
	color: var(--theme-text-dark) !important;
	font-weight: 800;
	font-size: 2.1rem;
	margin-bottom: 0;
	line-height: 1.4;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

/* سلايدر الخدمات */
.services-swiper {
	padding: 10px 4px 15px !important;
	overflow: hidden;
}

.services-swiper .swiper-wrapper {
	align-items: stretch !important;
}

.services-swiper .swiper-slide {
	height: auto !important;
	display: flex !important;
	flex-direction: column !important;
}

.services-slider-pagination {
	position: relative !important;
	bottom: auto !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 6px !important;
	margin-top: 32px !important;
	margin-bottom: 5px !important;
	z-index: 5 !important;
}

.services-slider-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	border-radius: 50px;
	background: rgba(var(--theme-primary-rgb), 0.25);
	opacity: 1;
	transition: all 0.3s ease;
}

.services-slider-pagination .swiper-pagination-bullet-active {
	width: 32px;
	background: var(--theme-primary) !important;
	box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.4);
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 28px;
	align-items: stretch; /* توحيد ارتفاع جميع البطاقات بالشبكة */
}

/* بطاقة الخدمة (ارتفاع موحد متناسق) */
.service-item {
	padding: 28px 24px 24px;
	border-radius: 20px;
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	height: 100%; /* ارتفاع موحد لكل البطاقات */
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	border: 1px solid transparent;
	box-sizing: border-box;
}

.service-item:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.07);
}

/* رأس البطاقة: الأيقونة بجانب العنوان بدون مساحة فارغة علوية */
.service-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
	width: 100%;
}

.service-card-header .service-icon-circle {
	margin-bottom: 0 !important;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
}

.service-card-header .service-title {
	margin-bottom: 0 !important;
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--theme-text-dark) !important;
	line-height: 1.3;
	text-align: right;
}

/* تنوع ألوان خلفيات البطاقات */

/* 1. النمط الثانوي (variant-secondary) */
.service-item.variant-secondary,
.service-item:nth-child(3n+1) {
	background: rgba(var(--theme-secondary-rgb), 0.12) !important;
	border-color: rgba(var(--theme-secondary-rgb), 0.18);
}
.service-item.variant-secondary .service-icon-circle,
.service-item:nth-child(3n+1) .service-icon-circle {
	background: var(--theme-secondary) !important;
	color: #ffffff !important;
}
.service-item.variant-secondary .btn-service,
.service-item:nth-child(3n+1) .btn-service {
	background: rgba(var(--theme-secondary-rgb), 0.15);
	color: var(--theme-secondary) !important;
	border: 1px solid rgba(var(--theme-secondary-rgb), 0.3);
}
.service-item.variant-secondary .btn-service:hover,
.service-item:nth-child(3n+1) .btn-service:hover {
	background: var(--theme-secondary);
	color: #ffffff !important;
	border-color: var(--theme-secondary);
}

/* 2. النمط الرئيسي (variant-primary) */
.service-item.variant-primary,
.service-item:nth-child(3n+2) {
	background: rgba(var(--theme-primary-rgb), 0.1) !important;
	border-color: rgba(var(--theme-primary-rgb), 0.15);
}
.service-item.variant-primary .service-icon-circle,
.service-item:nth-child(3n+2) .service-icon-circle {
	background: var(--theme-primary) !important;
	color: #ffffff !important;
}
.service-item.variant-primary .btn-service,
.service-item:nth-child(3n+2) .btn-service {
	background: rgba(var(--theme-primary-rgb), 0.15);
	color: var(--theme-primary) !important;
	border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
}
.service-item.variant-primary .btn-service:hover,
.service-item:nth-child(3n+2) .btn-service:hover {
	background: var(--theme-primary);
	color: #ffffff !important;
	border-color: var(--theme-primary);
}

/* 3. النمط المحايد (variant-neutral) */
.service-item.variant-neutral,
.service-item:nth-child(3n) {
	background: rgba(var(--theme-primary-rgb), 0.05) !important;
	border-color: rgba(var(--theme-primary-rgb), 0.1);
}
.service-item.variant-neutral .service-icon-circle,
.service-item:nth-child(3n) .service-icon-circle {
	background: var(--theme-text-dark) !important;
	color: #ffffff !important;
}
.service-item.variant-neutral .btn-service,
.service-item:nth-child(3n) .btn-service {
	background: rgba(var(--theme-primary-rgb), 0.08);
	color: var(--theme-text-dark) !important;
	border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
}
.service-item.variant-neutral .btn-service:hover,
.service-item:nth-child(3n) .btn-service:hover {
	background: var(--theme-text-dark);
	color: #ffffff !important;
	border-color: var(--theme-text-dark);
}

/* الدائرة الملونة للأيقونة */
.service-icon-circle {
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff !important;
	flex-shrink: 0;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.service-icon-mask {
	display: inline-block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	position: relative;
}

.service-icon-fallback {
	opacity: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.service-svg-icon {
	color: #ffffff !important;
	stroke-width: 2.5;
}

/* وصف الخدمة داخل البطاقة */
.service-desc {
	font-size: 0.96rem;
	line-height: 1.75;
	color: var(--theme-text-dark) !important;
	opacity: 0.88;
	margin: 0 0 20px 0;
	text-align: right;
	font-weight: 500;
	width: 100%;
	flex-grow: 1; /* يدفع الزر للأسفل لتوحيد الارتفاع */
}

/* زر طلب الخدمة */
.service-action {
	margin-top: auto;
	width: 100%;
	display: flex;
	justify-content: flex-start;
}

.btn-service {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 20px;
	border-radius: 50px;
	font-size: 0.92rem;
	font-weight: 700;
	transition: all 0.3s ease;
	text-decoration: none !important;
}

.btn-service svg {
	transition: transform 0.3s ease;
}

.service-item:hover .btn-service svg {
	transform: translateX(-4px);
}

@media (max-width: 768px) {
	.services-grid {
		grid-template-columns: 1fr;
	}
	.service-item {
		padding: 24px 20px 22px;
	}
}
