/* Consultants Directory & WhatsApp Booking - frontend styles */

.cdw-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

.cdw-page-title {
	margin: 40px 0 24px;
}

/* Grid / archive */
.cdw-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	margin-bottom: 60px;
}

.cdw-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s ease, transform .2s ease;
}

.cdw-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.08);
	transform: translateY(-2px);
}

.cdw-card-img {
	aspect-ratio: 3 / 2.5;
	background: #f4f4f5;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.cdw-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cdw-card-body {
	padding: 16px 18px 20px;
}

.cdw-card-title {
	margin: 0 0 8px;
	font-size: 18px;
}

.cdw-card-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #555;
}

.cdw-card-btn {
	display: inline-block;
	margin-top: 12px;
	padding: 7px 16px;
	border-radius: 999px;
	background: #eafaf1;
	color: #1ebd5a;
	font-size: 13px;
	font-weight: 600;
}

.cdw-card:hover .cdw-card-btn {
	background: #25D366;
	color: #fff;
}

/* [services] shortcode: fixed column count via the --cdw-cols custom
   property (set inline per shortcode call), instead of .cdw-grid's default
   auto-fill. Scoped to this modifier class so [consultants_grid]'s existing
   .cdw-grid output/behaviour is untouched. Same 3 / 2 / 1 collapse pattern
   used everywhere else in the plugin. */
.cdw-grid.cdw-grid-fixed-cols {
	grid-template-columns: repeat(var(--cdw-cols, 3), 1fr);
}

@media (max-width: 991px) {
	.cdw-grid.cdw-grid-fixed-cols {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 599px) {
	.cdw-grid.cdw-grid-fixed-cols {
		grid-template-columns: 1fr;
	}
}

.cdw-no-image {
	color: #b7b7bd;
}

/* Single consultant */
.cdw-single-wrap {
	padding: 50px 0 70px;
}

.cdw-single-grid {
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 48px;
	align-items: start;
}

@media (max-width: 780px) {
	.cdw-single-grid {
		grid-template-columns: 1fr;
	}
}

.cdw-single-image {
	border-radius: 12px;
	overflow: hidden;
	background: #f4f4f5;
	position: sticky;
	top: 24px;
}

.cdw-single-image img {
	width: 100%;
	height: auto;
	display: block;
}

.cdw-no-image-lg {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cdw-single-title {
	margin: 0 0 16px;
	font-size: 32px;
}

.cdw-single-desc {
	color: #444;
	line-height: 1.7;
	margin-bottom: 28px;
}

.cdw-services-title {
	font-size: 16px;
	margin: 0 0 12px;
}

.cdw-services-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.cdw-service-pill {
	position: relative;
	cursor: pointer;
}

.cdw-service-pill input {
	position: absolute;
	opacity: 0;
}

.cdw-service-pill span {
	display: inline-block;
	padding: 9px 16px;
	border: 1px solid #d5d5d9;
	border-radius: 999px;
	font-size: 14px;
	transition: all .15s ease;
}

.cdw-service-pill input:checked + span {
	background: #25D366;
	border-color: #25D366;
	color: #fff;
}

.cdw-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #25D366;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 13px 24px;
	margin-top:15px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}

.cdw-whatsapp-btn:hover {
	background: #1ebd5a;
}

.cdw-whatsapp-btn:disabled {
	opacity: .7;
	cursor: default;
}

.cdw-service-hint {
	color: #d33;
	font-size: 13px;
	margin-top: 10px;
}

/* ============================================================
   Single consultant page — section wrappers
   (Section 1 = .cdw-section-profile, Section 2 = .cdw-section-services,
   Section 3 = .cdw-section-cta)
   ============================================================ */
.cdw-section {
	padding: 50px 0;
}

.cdw-section-profile {
	padding-top: 50px;
	padding-bottom: 30px;
}

/* ============================================================
   SECTION 2 — Services cards grid
   Desktop: 3 per row / Tablet: 2 per row / Mobile: 1 per row
   ============================================================ */
.cdw-section-services {
	background: #fafafa;
	border-top: 1px solid #ececec;
	border-bottom: 1px solid #ececec;
}

.cdw-services-heading {
	font-size: 26px;
	margin: 0 0 28px;
	text-align: center;
}

.cdw-services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 991px) {
	.cdw-services-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 599px) {
	.cdw-services-grid {
		grid-template-columns: 1fr;
	}
}

.cdw-service-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 28px 22px;
	text-align: center;
	transition: box-shadow .2s ease, transform .2s ease;
}

.cdw-service-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
	transform: translateY(-2px);
}

.cdw-service-card-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #eafaf1;
	color: #25D366;
}

.cdw-service-card-icon-img {
	max-width: 32px;
	max-height: 32px;
	object-fit: contain;
}

.cdw-service-card-title {
	margin: 0 0 8px;
	font-size: 17px;
}

.cdw-service-card-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #555;
}

/* ============================================================
   SECTION 3 — Contact / booking CTA
   ============================================================ */
.cdw-section-cta {
	text-align: center;
}

.cdw-cta-inner {
	max-width: 100%;
}

.cdw-cta-heading,
.cdw-cta-text {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.cdw-cta-heading {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 26px;
}

.cdw-cta-text {
	color: #555;
	margin-bottom: 24px;
}

/* The existing service-pill list, re-centered for its new home in Section 3. */
.cdw-cta-inner .cdw-services {
	max-width: 900px;
	margin: 0 auto 28px;
	text-align: left;
}

.cdw-cta-inner .cdw-services-title {
	text-align: center;
}

.cdw-cta-inner .cdw-services-list {
	justify-content: center;
}

/* ============================================================
   RTL support (Arabic sites, or any RTL language).
   WordPress adds the "rtl" class to <body> automatically via
   body_class() when the site language is RTL, so we scope the
   overrides to that instead of duplicating layout rules.

   The two-column grids (.cdw-single-grid, .cdw-services-grid,
   .cdw-grid) don't need any override here: CSS Grid already
   mirrors column placement on its own once the computed
   direction is rtl, so the image/content sides swap
   automatically. Only text alignment and a couple of
   left/right-specific rules need flipping.
   ============================================================ */
.rtl .cdw-card,
.rtl .cdw-service-card,
.rtl .cdw-cta-heading,
.rtl .cdw-cta-text {
	text-align: center;
}

.rtl .cdw-cta-inner .cdw-services {
	text-align: right;
}

/* .cdw-whatsapp-btn uses flexbox "gap" for icon/text spacing, and flex
   items already reorder along with inline direction, so no extra RTL
   rule is needed there. */
