/* =========================================================
   SIDEBAR CTA TEMPLATE — styling
   All selectors are scoped to #ps-* / .ps-* namespaced IDs
   and classes so this never conflicts with Blocksy's own
   styles or your other sliders. Fonts/colors default to your
   theme's inherited values unless overridden below.
   ========================================================= */

/* ---------- Hero banner ---------- */
#ps-hero {
	position: relative;
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 70px 0 60px;
	text-align: center;
	overflow: hidden;
}

/* Extra vertical room when a featured image is present, so it reads as a real banner */
#ps-hero.ps-hero--has-bg {
	padding: 130px 0 110px;
}

/* Slow, subtle zoom on the featured image for a bit of life without being distracting */
#ps-hero.ps-hero--has-bg {
	animation: ps-hero-zoom 18s ease-in-out infinite alternate;
}

@keyframes ps-hero-zoom {
	from { background-size: 100%; }
	to   { background-size: 112%; }
}

/* Full, even dark overlay so text stays readable over any photo */
.ps-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,10,10,0.72) 0%, rgba(10,10,10,0.5) 45%, rgba(10,10,10,0.75) 100%);
}

#ps-hero .ps-hero__inner {
	position: relative;
	z-index: 1;
}

#ps-hero .ps-hero__title {
	color: #ffffff;
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 700;
	margin: 0 0 12px;
	opacity: 0;
	animation: ps-fade-up 0.7s ease forwards 0.15s;
}

#ps-hero .ps-hero__subtitle {
	color: #e2e2e2;
	font-size: 16px;
	max-width: 640px;
	margin: 0 auto;
	opacity: 0;
	animation: ps-fade-up 0.7s ease forwards 0.35s;
}

@keyframes ps-fade-up {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#ps-hero.ps-hero--has-bg,
	#ps-hero .ps-hero__title,
	#ps-hero .ps-hero__subtitle {
		animation: none;
		opacity: 1;
	}
}

/* ---------- Main grid: 70% content / 30% sidebar ---------- */
#ps-main {
	padding: 60px 0;
}

/* Defensive: some themes set overflow-x:hidden on wrapper elements to
   prevent horizontal scroll, which silently breaks position:sticky by
   turning that ancestor into the sticky containing block. This keeps
   horizontal clipping (no layout shift) without breaking stickiness. */
#ps-main,
#ps-main .ct-container {
	overflow: visible;
}

#ps-grid {
	display: flex;
	align-items: stretch; /* sidebar column must match content column's height for sticky to have room to work */
	gap: 48px;
}

#ps-content {
	flex: 0 0 68%;
	max-width: 68%;
	min-width: 0; /* prevents flex overflow on long words/embeds */
}

#ps-content img {
	max-width: 100%;
	height: auto;
}

#ps-sidebar {
	flex: 0 0 30%;
	max-width: 30%;
}

/* ---------- Sticky sidebar ---------- */
#ps-sidebar-sticky {
	position: sticky;
	top: var(--ps-sticky-top, 100px); /* JS updates this to match your header height */
	display: flex;
	flex-direction: column;
	gap: 24px;
	transition: transform 0.25s ease;
}

#ps-sidebar-sticky.ps-is-stuck .ps-sidebar__card {
	box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.ps-sidebar__card {
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.05);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ps-sidebar__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 28px rgba(0,0,0,0.09);
}

/* Contact Form 7 spacing reset so it fits the card cleanly */
#ps-form-card .wpcf7-form p {
	margin-bottom: 14px;
}

#ps-form-card input[type="text"],
#ps-form-card input[type="email"],
#ps-form-card input[type="tel"],
#ps-form-card textarea {
	width: 100%;
	box-sizing: border-box;
}

/* ---------- CTA card ---------- */
#ps-cta-card {
	background: #1a1a1a;
	border: none;
}

.ps-cta__subheading {
	display: inline-block;
	color: #f0a941;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.ps-cta__heading {
	color: #ffffff;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 12px;
}

.ps-cta__paragraph {
	color: #b7b7b7;
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 22px;
}

.ps-cta__button {
	display: inline-block;
	background: #f0a941;
	color: #1a1a1a;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	padding: 13px 22px;
	border-radius: 8px;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ps-cta__button:hover {
	opacity: 0.9;
	transform: translateY(-2px);
	color: #1a1a1a;
}

/* ---------- Trust logos ---------- */
#ps-trust {
	padding: 50px 0 70px;
	border-top: 1px solid #ececec;
}

.ps-trust__label {
	text-align: center;
	color: #8a8a8a;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin: 0 0 30px;
}

.ps-trust__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 44px;
}

.ps-trust__logo {
	max-height: 42px;
	width: auto;
	opacity: 0.7;
	filter: grayscale(100%);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.ps-trust__logo:hover {
	opacity: 1;
	filter: grayscale(0%);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet: narrower sidebar, tighter gaps */
@media (max-width: 1024px) {
	#ps-grid {
		gap: 32px;
	}
	#ps-content {
		flex: 0 0 62%;
		max-width: 62%;
	}
	#ps-sidebar {
		flex: 0 0 36%;
		max-width: 36%;
	}
}

/* Mobile: stack content then sidebar, sidebar no longer sticky */
@media (max-width: 782px) {
	#ps-hero {
		padding: 50px 0 40px;
	}

	#ps-hero.ps-hero--has-bg {
		padding: 80px 0 60px;
	}

	#ps-main {
		padding: 40px 0;
	}

	#ps-grid {
		flex-direction: column;
		gap: 32px;
	}

	#ps-content,
	#ps-sidebar {
		flex: 1 1 100%;
		max-width: 100%;
	}

	#ps-sidebar-sticky {
		position: static;
		transition: none;
	}

	.ps-sidebar__card {
		padding: 22px;
	}

	.ps-trust__logos {
		gap: 28px;
	}

	.ps-trust__logo {
		max-height: 32px;
	}
}