/**
 * Property Search - Why Us widget styles
 *
 * Self-contained port of the static site why-us section (the plugin
 * does not load Bootstrap, so the four/two/one column grid and the
 * semantic-colour icon tiles are recreated here). Colours are CSS
 * custom properties written by Elementor; values below are the
 * design defaults.
 *
 * @package PropertySearch
 */

.ps-why {
	--ps-why-label: #006241;
	--ps-why-label-bar: #ffcc00;
	--ps-why-heading: #003d2b;
	--ps-why-desc: #6c757d;
	--ps-why-card-bg: #ffffff;
	--ps-why-card-border: rgba(0, 0, 0, 0.04);
	--ps-why-card-shadow: rgba(0, 61, 43, 0.1);
	--ps-why-card-bar: #ffcc00;
	--ps-why-card-title: #212529;
	--ps-why-card-text: #6c757d;
	--ps-why-icon-bg: rgba(13, 110, 253, 0.1);
	--ps-why-icon-color: #0d6efd;

	margin-top: 16px;
	padding: 48px 0;
	font-family: inherit;
	line-height: 1.5;
}

.ps-why,
.ps-why * {
	box-sizing: border-box;
}

.ps-why-container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 15px;
}

/* Centred header (mirrors .text-center.mb-5) -------------------------- */
.ps-why-header {
	text-align: center;
	margin-bottom: 48px;
}

/* Eyebrow label (mirrors .section-label, green on light sections) ---- */
.ps-why-label {
	color: var(--ps-why-label);
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 10px;
}

.ps-why-label::before {
	content: '';
	width: 30px;
	height: 2px;
	background: var(--ps-why-label-bar);
	display: inline-block;
	flex: 0 0 auto;
}

/* Heading (mirrors .section-heading) --------------------------------- */
.ps-why-heading {
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--ps-why-heading);
	line-height: 1.3;
	margin: 0 0 15px;
}

/* Description (mirrors .section-desc.mx-auto) ------------------------ */
.ps-why-desc {
	color: var(--ps-why-desc);
	font-size: 1.05rem;
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.7;
}

/* Card grid (mirrors .row.g-4 with col-lg-3 / col-md-6) -------------- */
.ps-why-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* Cards (mirrors .why-card) ------------------------------------------ */
.ps-why-card {
	background: var(--ps-why-card-bg);
	border-radius: 16px;
	padding: 35px 28px;
	text-align: center;
	border: 1px solid var(--ps-why-card-border);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	height: 100%;
	position: relative;
	overflow: hidden;
}

/* Gold bottom bar revealed on hover */
.ps-why-card::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--ps-why-card-bar);
	transform: scaleX(0);
	transition: transform 0.4s ease;
}

.ps-why-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 32px var(--ps-why-card-shadow);
}

.ps-why-card:hover::after {
	transform: scaleX(1);
}

/* Icon tile (mirrors .why-icon + Bootstrap colour utilities) --------- */
.ps-why-icon {
	width: 70px;
	height: 70px;
	border-radius: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	margin: 0 auto 20px;
	background: var(--ps-why-icon-bg);
	color: var(--ps-why-icon-color);
	transition: transform 0.3s ease;
}

.ps-why-icon i,
.ps-why-icon svg {
	width: 1em;
	height: 1em;
}

.ps-why-card:hover .ps-why-icon {
	transform: scale(1.1);
}

/* Card title (mirrors h5.fw-bold) ------------------------------------ */
.ps-why-card-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ps-why-card-title);
	line-height: 1.4;
	margin: 0 0 0.5rem;
}

/* Card text (mirrors p.text-muted.small) ----------------------------- */
.ps-why-card-text {
	color: var(--ps-why-card-text);
	font-size: 0.875rem;
	line-height: 1.7;
	margin: 0 0 1rem;
}

/* Scroll reveal (mirrors .fade-up / .fade-up.show) ------------------- */
.ps-why .ps-reveal {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.ps-why .ps-reveal.ps-show {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.ps-why .ps-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Responsive (Bootstrap lg/md column behaviour)                       */
/* ------------------------------------------------------------------ */
@media (max-width: 991px) {
	/* col-md-6: two cards per row */
	.ps-why-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	/* Below md the columns go full width */
	.ps-why-grid {
		grid-template-columns: 1fr;
	}
}
