/**
 * Services page — services / category carousel, luxury black & gold restyle.
 *
 * PURE STYLING for ONE carousel. Every rule is scoped to
 * `.category.ptcf-services-carousel` — a marker class the child-theme JS puts
 * on the single carousel named in functions.php — so no other section, block
 * or page can be affected, and the parent theme / plugin stay untouched.
 *
 * The Owl Carousel markup, its options (3 / 2 / 1 columns), its arrows and the
 * theme's own class names are all left exactly as they are; only the look of
 * the cards changes.
 *
 * Specificity note: the plugin styles these cards with `body .category .item…`,
 * so the overrides below carry a `body .category.ptcf-services-carousel` prefix
 * to win on specificity rather than on `!important`.
 */

.category.ptcf-services-carousel {
	/* Same gold ramp as the rest of the child theme, so branding stays one set. */
	--ptcf-gold-1: #f9edc0;
	--ptcf-gold-2: #e9cd7d;
	--ptcf-gold-3: #caa14a;

	--ptcf-wa: #25d366;
	--ptcf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------------------------------------------------------------
 * Card shell — taller, editorial, content anchored to the bottom
 * ---------------------------------------------------------------------- */
body .category.ptcf-services-carousel .item {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 470px;
	padding: 40px 30px 38px;
	overflow: hidden; /* clips the photo zoom to the card */
}

/* The photo, on its own layer so it can scale without moving the text.
 * Overrides the plugin's `body .category.type-normal .item>*` rule, which
 * would otherwise make this layer a relative, z-index:2 flex child. */
body .category.ptcf-services-carousel .item > .ptcf-svc-media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	background: 50% no-repeat;
	background-size: cover;
	transform: scale(1);
	transition:
		transform 0.6s var(--ptcf-ease),
		filter 0.6s ease;
	will-change: transform;
}

/* Readability veil — deepest at the bottom, where the text sits, so the
 * photograph itself keeps its colours and detail. */
body .category.ptcf-services-carousel.type-normal .item:after {
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.12) 0%,
		rgba(0, 0, 0, 0.34) 45%,
		rgba(0, 0, 0, 0.78) 100%
	);
	transition: background 0.5s ease;
}

/* -------------------------------------------------------------------------
 * Typography
 * ---------------------------------------------------------------------- */
body .category.ptcf-services-carousel .item .sub-h {
	margin: 0 0 14px;
	color: var(--ptcf-gold-2);
	font-family: "Montserrat", sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 3.5px;
	line-height: 1.4;
	text-transform: uppercase;
	transition: transform 0.5s var(--ptcf-ease);
}

body .category.ptcf-services-carousel .item .h {
	margin: 0;
	color: #fff;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 42px;
	font-weight: 500;
	letter-spacing: normal;
	line-height: 1.05;
	text-transform: none;
	transition: transform 0.5s var(--ptcf-ease);
}

/* -------------------------------------------------------------------------
 * WhatsApp CTA
 *
 * Scoped to THIS carousel. `pricelist-whatsapp.css` styles `.ptcf-wa-btn`
 * globally as a full-width green pill for the Price List cards, so these rules
 * have to do two things: stay out of that section, and undo the parts of it
 * that do not belong here — `width: 100%`, `border: 0` and the green glow.
 * ---------------------------------------------------------------------- */
body .category.ptcf-services-carousel .item .ptcf-wa-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	width: auto; /* undo the Price List's width: 100% */
	max-width: 100%;
	margin: 20px auto 0;
	padding: 11px 22px;
	border: 1px solid var(--ptcf-wa); /* undo its `border: 0` */
	border-radius: 999px;
	background: var(--ptcf-wa);
	box-shadow: none; /* undo its green drop glow */
	color: #fff;
	font-family: "Montserrat", sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.6px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	transition:
		background 0.45s ease,
		border-color 0.45s ease,
		box-shadow 0.45s ease,
		transform 0.45s var(--ptcf-ease);
}

/* .ptcf-wa-btn:hover,
.ptcf-wa-btn:focus-visible {
	background: var(--ptcf-wa);
	border-color: var(--ptcf-wa);
	color: #fff;
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 10px 26px rgba(37, 211, 102, 0.34);
} */

body .category.ptcf-services-carousel .item .ptcf-wa-btn:focus-visible {
	outline: 2px solid var(--ptcf-gold-2);
	outline-offset: 3px;
}

body .category.ptcf-services-carousel .item .ptcf-wa-icon {
	display: inline-flex;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

/* Inherits the button's colour, so the icon follows every state. */
body .category.ptcf-services-carousel .item .ptcf-wa-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

body .category.ptcf-services-carousel .item .ptcf-wa-label {
	display: inline-block;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Hover — zoom the photo, deepen the veil, lift the text
 * ---------------------------------------------------------------------- */
body .category.ptcf-services-carousel .item:hover > .ptcf-svc-media {
	transform: scale(1.05);
	filter: brightness(1.06);
}

body .category.ptcf-services-carousel.type-normal .item:hover:after {
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.22) 0%,
		rgba(0, 0, 0, 0.46) 45%,
		rgba(0, 0, 0, 0.86) 100%
	);
}

body .category.ptcf-services-carousel .item:hover .sub-h,
body .category.ptcf-services-carousel .item:hover .h {
	transform: translateY(-6px);
}

body .category.ptcf-services-carousel .item:hover .ptcf-wa-btn {
	border-color: #1ebe5b;
	background: #1ebe5b;
}

/* -------------------------------------------------------------------------
 * Carousel arrows — same behaviour, gold on hover
 * ---------------------------------------------------------------------- */
body .category.ptcf-services-carousel .owl-nav [class*="owl-"]:hover {
	color: var(--ptcf-gold-2);
}

/* -------------------------------------------------------------------------
 * Responsive — matches the carousel's own 3 / 2 / 1 breakpoints
 * ---------------------------------------------------------------------- */

/* 2 cards per view (Owl switches at 980px). */
@media screen and (max-width: 1199.98px) {
	body .category.ptcf-services-carousel .item {
		height: 430px;
		padding: 34px 26px 34px;
	}

	body .category.ptcf-services-carousel .item .h {
		font-size: 36px;
	}
}

/* 1 card per view. */
@media screen and (max-width: 979.98px) {
	body .category.ptcf-services-carousel .item {
		height: 410px;
	}

	body .category.ptcf-services-carousel .item .h {
		font-size: 34px;
	}
}

@media screen and (max-width: 767.98px) {
	body .category.ptcf-services-carousel .item {
		height: 370px;
		padding: 30px 22px 30px;
	}

	body .category.ptcf-services-carousel .item .sub-h {
		margin-bottom: 10px;
		font-size: 10px;
		letter-spacing: 3px;
	}

	body .category.ptcf-services-carousel .item .h {
		font-size: 30px;
	}

	body .category.ptcf-services-carousel .item .ptcf-wa-btn {
		margin-top: 16px;
		padding: 10px 18px;
		font-size: 10px;
		letter-spacing: 1.3px;
	}

	body .category.ptcf-services-carousel .item .ptcf-wa-icon {
		width: 15px;
		height: 15px;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	body .category.ptcf-services-carousel .item > .ptcf-svc-media,
	body .category.ptcf-services-carousel .item .sub-h,
	body .category.ptcf-services-carousel .item .h,
	body .category.ptcf-services-carousel.type-normal .item:after,
	body .category.ptcf-services-carousel .item .ptcf-wa-btn {
		transition: none;
	}

	body .category.ptcf-services-carousel .item:hover > .ptcf-svc-media,
	body .category.ptcf-services-carousel .item:hover .sub-h,
	body .category.ptcf-services-carousel .item:hover .h {
		transform: none;
	}
}
