/* ==========================================================================
   Wahat Al-Hijaz — Services module (front end)
   --------------------------------------------------------------------------
   Loads after specialists.css and reuses its shared UI layer (tokens,
   buttons, toolbar, search, pagination, [hidden] handling) through the
   .wahat-specialists namespace on the wrapper. Everything here is scoped
   under .wahat-services. No global selectors, no !important.
   ========================================================================== */

.wahat-specialists.wahat-services {
	--wah-svc-card-bg: #EEF7F5;
	--wah-svc-radius: 12px;
}

/* --------------------------------------------------------------------------
   Services page: filter buttons as soft rectangles (mockup), not pills
   -------------------------------------------------------------------------- */

.wahat-services--page button.wahat-sp-filter {
	border-radius: 8px;
	box-shadow: none;
	background-color: var(--wah-sp-chip-bg, #F3F5F5);
}

/* --------------------------------------------------------------------------
   Services page grid + image card
   -------------------------------------------------------------------------- */

.wahat-services .wahat-services-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	align-items: stretch;
}

.wahat-services .wahat-svc-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background-color: var(--wah-svc-card-bg);
	border-radius: var(--wah-svc-radius);
	text-align: center;
}

.wahat-services .wahat-svc-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: var(--wah-sp-photo-bg, #EDEEF0);
}

.wahat-services .wahat-svc-card__img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: center;
}

.wahat-services .wahat-svc-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	padding: 24px 22px 26px;
}

.wahat-services .wahat-svc-card__title {
	margin: 0 0 12px;
	padding: 0;
	color: var(--wah-sp-dark);
	font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
	font-weight: 800;
	line-height: 1.4;
}

.wahat-services .wahat-svc-card__desc {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--wah-sp-muted);
	font-size: 0.98rem;
	line-height: 1.9;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	line-clamp: 3;
}

/* --------------------------------------------------------------------------
   Shared footer: price + booking
   -------------------------------------------------------------------------- */

.wahat-services .wahat-svc-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin-top: auto;
	padding-top: 20px;
}

.wahat-services .wahat-svc-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 4px 6px;
	margin: 0;
	color: var(--wah-sp-dark);
	font-size: 0.95rem;
	line-height: 1.4;
}

.wahat-services .wahat-svc-price__prefix,
.wahat-services .wahat-svc-price__suffix {
	color: var(--wah-sp-muted);
	font-weight: 500;
}

/* Number + official Riyal symbol. Per SAMA rules: symbol left of the number,
   same height as the text, with a space. */
.wahat-services .wahat-svc-price__amount {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: var(--wah-sp-dark);
	font-size: 1.35rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.wahat-services .wahat-svc-riyal {
	display: inline-block;
	width: 0.82em;
	height: 0.92em;
	flex: 0 0 auto;
	fill: currentColor;
}

.wahat-services a.wahat-sp-btn.wahat-svc-book {
	gap: 6px;
	width: 100%;
	max-width: 260px;
	min-height: 0;
	padding: 10px 16px;
	border-radius: var(--wah-sp-radius-ctl, 999px);
}

/* --------------------------------------------------------------------------
   Homepage icon cards — 4 per row; a short last row stretches to fill
   (6 services → 4 + 2 wide, as in the mockup; 8 → 4 + 4).
   -------------------------------------------------------------------------- */

.wahat-services .wahat-services-home-grid {
	--wah-svc-cols: 4;
	--wah-svc-gap: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wah-svc-gap);
}

.wahat-services .wahat-svc-home-card {
	display: flex;
	flex: 1 1 calc((100% - (var(--wah-svc-cols) - 1) * var(--wah-svc-gap)) / var(--wah-svc-cols));
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
	margin: 0;
	padding: 30px 22px;
	background-color: var(--wah-sp-white);
	border-radius: var(--wah-svc-radius);
	text-align: center;
}

.wahat-services .wahat-svc-home-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 14px;
}

.wahat-services .wahat-svc-home-card__icon-img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

.wahat-services .wahat-svc-home-card__title {
	margin: 0 0 10px;
	padding: 0;
	color: var(--wah-sp-dark);
	font-size: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
	font-weight: 800;
	line-height: 1.45;
}

.wahat-services .wahat-svc-home-card__line {
	margin: 0;
	color: var(--wah-sp-muted);
	font-size: 0.95rem;
	line-height: 1.8;
}

.wahat-services .wahat-svc-home-card .wahat-svc-footer {
	margin-top: 0;
	padding-top: 16px;
}

/* --------------------------------------------------------------------------
   Tablet (≤ 1024px)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.wahat-services .wahat-services-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.wahat-services .wahat-services-home-grid {
		--wah-svc-cols: 2;
	}
}

/* --------------------------------------------------------------------------
   Mobile (≤ 767px)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.wahat-services .wahat-services-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.wahat-services .wahat-svc-card__body {
		padding: 20px 18px 22px;
	}

	.wahat-services .wahat-services-home-grid {
		--wah-svc-gap: 12px;
	}

	.wahat-services .wahat-svc-home-card {
		padding: 22px 14px;
	}

	.wahat-services .wahat-svc-home-card__icon {
		width: 60px;
		height: 60px;
	}

	.wahat-services a.wahat-sp-btn.wahat-svc-book {
		max-width: none;
	}
}

/* Small phones: keep 2 per row, just tighten the cards so both fit. */
@media (max-width: 400px) {
	.wahat-services .wahat-services-home-grid {
		--wah-svc-gap: 10px;
	}

	.wahat-services .wahat-svc-home-card {
		padding: 18px 10px;
	}

	.wahat-services .wahat-svc-home-card__icon {
		width: 52px;
		height: 52px;
		margin-bottom: 10px;
	}

	.wahat-services .wahat-svc-home-card__title {
		margin-bottom: 6px;
		font-size: 1rem;
	}

	.wahat-services .wahat-svc-home-card__line {
		font-size: 0.85rem;
		line-height: 1.7;
	}
}

