/**
 * Services Carousel — pillars-style cards for the services post type.
 */

.omsar-services-carousel-widget {
	width: 100%;
	font-family: var(--font-main, 'Inter', sans-serif);
	overflow: visible;
}

.omsar-services-carousel-header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.omsar-services-carousel-heading {
	font-weight: 600;
	font-size: 40px;
	color: #000;
	margin: 0;
}

.omsar-services-carousel-wrapper {
	position: relative;
	overflow: hidden;
	padding: 8px 0 28px;
}

.omsar-services-carousel {
	width: 100%;
	overflow: hidden;
	min-height: 200px;
	padding: 8px 10px 20px;
	margin: 0;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	box-sizing: border-box;
	container-type: inline-size;
	container-name: omsar-services-carousel;
}

.omsar-services-carousel.is-static {
	cursor: default;
}

.omsar-services-carousel.is-dragging {
	cursor: grabbing;
}

.omsar-services-carousel.is-dragging .omsar-service-pillar-card {
	pointer-events: none;
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-services-carousel,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-services-carousel {
	direction: rtl;
}

.omsar-services-carousel-track {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 24px;
	width: max-content;
	max-width: none;
	box-sizing: border-box;
	transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

.omsar-services-carousel-slide {
	box-sizing: border-box;
	flex: 0 0 calc((100cqw - 48px) / 3);
	width: calc((100cqw - 48px) / 3);
	max-width: calc((100cqw - 48px) / 3);
	padding: 0;
	overflow: visible;
}

@container omsar-services-carousel (max-width: 991px) {
	.omsar-services-carousel-slide {
		flex: 0 0 calc((100cqw - 24px) / 2);
		width: calc((100cqw - 24px) / 2);
		max-width: calc((100cqw - 24px) / 2);
	}
}

@container omsar-services-carousel (max-width: 575px) {
	.omsar-services-carousel-slide {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
	}
}

.omsar-service-pillar-card {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 200px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: transparent;
	box-shadow: 0 3px 10px rgb(0 0 0 / 69%);
	cursor: pointer;
	text-align: start;
	font: inherit;
	color: inherit;
	overflow: visible;
}

.omsar-service-pillar-card:hover {
	transform: translateY(-3px);
	transition: transform 0.3s ease;
}

.omsar-service-pillar-card:focus {
	outline: none;
}

.omsar-service-pillar-card:focus-visible {
	outline: 2px solid #307FE2;
	outline-offset: 3px;
}

.omsar-service-pillar-surface {
	position: relative;
	display: block;
	height: 100%;
	min-height: 200px;
	border-radius: 18px;
	overflow: hidden;
	padding: 22px 24px;
	color: #fff;
	background: linear-gradient(165deg, #082C5E 0%, #0E4A8A 45%, #1A6DAA 100%);
	box-sizing: border-box;
}

.omsar-service-pillar-icon {
	position: absolute;
	top: 68%;
	left: auto;
	right: 5%;
	transform: translateY(-50%);
	width: 48%;
	max-width: 200px;
	height: 78%;
	object-fit: contain;
	object-position: right bottom;
	opacity: 0.4;
	pointer-events: none;
	z-index: 1;
	user-select: none;
}

.omsar-service-pillar-link {
	position: absolute;
	top: 16px;
	left: auto;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.omsar-service-pillar-arrow {
	width: 42px;
	height: 42px;
	display: block;
	pointer-events: none;
}

.omsar-service-pillar-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 65%;
	max-width: 65%;
	margin-left: 0;
	margin-right: auto;
	text-align: left;
	min-height: 100%;
	box-sizing: border-box;
}

.omsar-service-pillar-title {
	display: block;
	font-weight: 400;
	font-size: 25px;
	line-height: 1.3;
	margin: 0 0 0.5rem;
	color: #fff;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.omsar-services-carousel-widget .omsar-service-pillar-card .omsar-service-tag {
	align-self: flex-start;
	margin-bottom: 12px;
}

.omsar-services-carousel-widget .omsar-service-pillar-card .omsar-service-directorate {
	margin-top: 0;
	color: rgba(255, 255, 255, 0.82);
}

.omsar-services-carousel-widget .omsar-service-pillar-card .omsar-service-directorate-name {
	color: inherit;
}

.omsar-services-carousel-dots:empty {
	display: none;
}

.omsar-services-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.omsar-services-carousel-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border-radius: 50%;
	border: 1.5px solid #323A45;
	background: transparent;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.omsar-services-carousel-dot.is-active,
.omsar-services-carousel-dot:hover {
	background: #323A45;
	border-color: #323A45;
}

/* RTL — icon left; text + arrow layout for Arabic */
.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-card,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-card {
	text-align: right;
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-content,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-content {
	margin-left: auto;
	margin-right: 0;
	text-align: right;
	align-items: flex-start;
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-icon,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-icon {
	left: 5%;
	right: auto;
	object-position: left bottom;
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-link,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-link {
	left: 16px;
	right: auto;
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-arrow,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-arrow {
	transform: scaleX(-1);
}

.omsar-services-carousel-widget[dir="rtl"] .omsar-services-carousel-heading,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-services-carousel-heading,
.omsar-services-carousel-widget[dir="rtl"] .omsar-service-pillar-title,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-pillar-title,
.omsar-services-carousel-widget[dir="rtl"] .omsar-service-tag,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-tag,
.omsar-services-carousel-widget[dir="rtl"] .omsar-service-directorate,
.omsar-services-carousel-widget.omsar-bd-rtl .omsar-service-directorate {
	font-family: 'Almarai', sans-serif;
}

@media (max-width: 767px) {
	.omsar-services-carousel-heading {
		font-size: 28px;
	}

	.omsar-services-carousel-track {
		gap: 16px;
	}

	.omsar-service-pillar-card,
	.omsar-service-pillar-surface {
		min-height: 180px;
	}

	.omsar-service-pillar-surface {
		padding: 18px 20px;
	}

	.omsar-service-pillar-title {
		font-size: 18px;
	}

	.omsar-service-pillar-arrow {
		width: 36px;
		height: 36px;
	}

	.omsar-services-carousel {
		padding-left: 4px;
		padding-right: 4px;
	}

	.omsar-service-pillar-content {
		width: 70%;
		max-width: 70%;
	}
}

@media (min-width: 576px) and (max-width: 991px) {
	.omsar-service-pillar-title {
		font-size: 24px;
	}

	.omsar-service-pillar-content {
		width: 62%;
		max-width: 62%;
	}

	.omsar-services-carousel-track {
		gap: 24px;
	}
}

@media (min-width: 992px) {
	.omsar-services-carousel-track {
		gap: 24px;
	}
}
