/*
 * Taima Pillar Renderer
 * Styles for [tpf_services], [tpf_process], [tpf_faq].
 * Built for the dark brand background (#080808). Fonts inherit from the site.
 * --tpf-accent is set per page from the pillar_accent_color ACF field.
 */

.tpf {
	--tpf-gold: #c9a84c;
	--tpf-text: #ffffff;
	--tpf-muted: #b8b8b8;
	--tpf-card: #0d0d0d;
	--tpf-border: rgba(255, 255, 255, 0.12);
	--tpf-accent: #c9a84c;
	color: var(--tpf-text);
	margin: 0 0 3rem;
}

.tpf *,
.tpf *::before,
.tpf *::after {
	box-sizing: border-box;
}

.tpf-heading {
	color: var(--tpf-gold);
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 1.25rem;
}

/* ---------- Services ---------- */

.tpf-service-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpf-service-card {
	background: var(--tpf-card);
	border: 1px solid var(--tpf-border);
	border-radius: 8px;
	border-top: 3px solid var(--tpf-accent);
	margin: 0;
	padding: 1.25rem 1.5rem;
}

.tpf-card-title {
	color: var(--tpf-text);
	font-size: 1.125rem;
	font-weight: 500;
	margin: 0 0 0.35rem;
}

.tpf-card-text {
	color: var(--tpf-muted);
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0;
}

@media (min-width: 768px) {
	.tpf-service-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Process timeline ---------- */

.tpf-timeline {
	--tpf-gap: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpf-step {
	margin: 0;
	padding-left: 2.5rem;
	position: relative;
}

.tpf-step::before {
	background: var(--tpf-gold);
	border-radius: 50%;
	box-shadow: 0 0 0 5px rgba(201, 168, 76, 0.25);
	content: "";
	height: 14px;
	left: 0;
	position: absolute;
	top: 0.3rem;
	width: 14px;
	z-index: 1;
}

.tpf-step::after {
	background: var(--tpf-gold);
	bottom: -1.5rem;
	content: "";
	left: 6px;
	opacity: 0.6;
	position: absolute;
	top: 1.3rem;
	width: 2px;
}

.tpf-step:last-child::after {
	display: none;
}

.tpf-step-title {
	color: var(--tpf-text);
	font-size: 1.125rem;
	font-weight: 500;
	margin: 0 0 0.25rem;
}

.tpf-step-text {
	color: var(--tpf-muted);
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0;
}

@media (min-width: 900px) {
	.tpf-timeline {
		flex-direction: row;
		gap: var(--tpf-gap);
	}

	.tpf-step {
		flex: 1 1 0;
		padding: 2.25rem 0.5rem 0;
		text-align: center;
	}

	.tpf-step::before {
		left: 50%;
		top: 0;
		transform: translateX(-50%);
	}

	.tpf-step::after {
		bottom: auto;
		height: 2px;
		left: 50%;
		top: 6px;
		width: calc(100% + var(--tpf-gap));
	}
}

/* ---------- FAQ ---------- */

.tpf-faq-list {
	border-top: 1px solid var(--tpf-border);
}

.tpf-faq-item {
	border-bottom: 1px solid var(--tpf-border);
}

.tpf-faq-q {
	color: var(--tpf-text);
	cursor: pointer;
	font-size: 1.05rem;
	font-weight: 500;
	list-style: none;
	padding: 1.1rem 2.5rem 1.1rem 0;
	position: relative;
}

.tpf-faq-q::-webkit-details-marker {
	display: none;
}

.tpf-faq-q::after {
	color: var(--tpf-gold);
	content: "+";
	font-size: 1.5rem;
	line-height: 1;
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
}

.tpf-faq-item[open] > .tpf-faq-q::after {
	content: "\2212";
}

.tpf-faq-q:focus-visible {
	outline: 2px solid var(--tpf-gold);
	outline-offset: 2px;
}

.tpf-faq-a {
	color: var(--tpf-muted);
	font-size: 0.975rem;
	line-height: 1.65;
	padding: 0 0 1.25rem;
}

.tpf-faq-a p {
	margin: 0 0 0.75rem;
}

.tpf-faq-a p:last-child {
	margin-bottom: 0;
}

/* ---------- v1.1: layout wrapper, hero, pricing, CTA ---------- */

.tpf-wrap {
	margin: 0 auto;
	max-width: 1100px;
	padding: 0 1.5rem;
}

.tpf-hero {
	border-top: 4px solid var(--tpf-accent);
	margin-bottom: 2.5rem;
	padding: 2.5rem 0 1rem;
}

.tpf-breadcrumb ol {
	color: var(--tpf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9rem;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 1.75rem;
	padding: 0;
}

.tpf-breadcrumb li {
	margin: 0;
}

.tpf-breadcrumb li + li::before {
	content: "/";
	margin-right: 0.5rem;
}

.tpf-breadcrumb a {
	color: var(--tpf-muted);
	text-decoration: none;
}

.tpf-breadcrumb a:hover,
.tpf-breadcrumb a:focus-visible {
	color: var(--tpf-gold);
	text-decoration: underline;
}

.tpf-h1 {
	color: #ffffff;
	font-family: var(--e-global-typography-primary-font-family, "Playfair Display"), Georgia, serif;
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 1rem;
}

.tpf-lead {
	color: var(--tpf-muted);
	font-size: 1.2rem;
	line-height: 1.55;
	margin: 0;
	max-width: 40rem;
}

.tpf-btn {
	background: var(--tpf-gold);
	border-radius: 999px;
	color: #080808;
	display: inline-block;
	font-weight: 600;
	padding: 0.8rem 1.75rem;
	text-decoration: none;
}

.tpf-btn:hover,
.tpf-btn:focus-visible {
	background: #e2be70;
	color: #080808;
}

.tpf-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.tpf-cta-box {
	background: var(--tpf-card);
	border: 1px solid var(--tpf-border);
	border-radius: 8px;
	border-top: 3px solid var(--tpf-accent);
	padding: 2rem;
}

/* Contact Form 7 inside the CTA, restyled for the dark theme. */
.tpf-cta-form .wpcf7-form p {
	margin: 0 0 1rem;
}

.tpf-cta-form label {
	color: var(--tpf-text);
	display: block;
	font-size: 0.95rem;
}

.tpf-cta-form input[type="text"],
.tpf-cta-form input[type="email"],
.tpf-cta-form input[type="tel"],
.tpf-cta-form input[type="url"],
.tpf-cta-form select,
.tpf-cta-form textarea {
	background: #121212;
	border: 1px solid var(--tpf-border);
	border-radius: 6px;
	color: var(--tpf-text);
	display: block;
	margin-top: 0.35rem;
	padding: 0.75rem 0.9rem;
	width: 100%;
}

.tpf-cta-form input:focus-visible,
.tpf-cta-form select:focus-visible,
.tpf-cta-form textarea:focus-visible {
	border-color: var(--tpf-gold);
	outline: 2px solid var(--tpf-gold);
	outline-offset: 1px;
}

.tpf-cta-form input[type="submit"] {
	background: var(--tpf-gold);
	border: 0;
	border-radius: 999px;
	color: #080808;
	cursor: pointer;
	font-weight: 600;
	padding: 0.8rem 1.75rem;
}

.tpf-cta-form input[type="submit"]:hover,
.tpf-cta-form input[type="submit"]:focus-visible {
	background: #e2be70;
}

.tpf-cta-form .wpcf7-response-output {
	border-color: var(--tpf-gold);
	color: var(--tpf-text);
}

.tpf-cta-form .wpcf7-not-valid-tip {
	color: #ff8a8a;
}

/* ---------- v1.2.2: pillar card grid ([tpf_cards]) ---------- */

.tpf-card-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpf-pcard {
	background: var(--tpf-card);
	border: 1px solid var(--tpf-border);
	border-radius: 8px;
	border-top: 3px solid var(--tpf-accent);
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	position: relative;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.tpf-pcard:hover,
.tpf-pcard:focus-within {
	border-color: var(--tpf-accent);
	transform: translateY(-2px);
}

.tpf-pcard-media img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.tpf-pcard-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.25rem 1.5rem 1.5rem;
}

.tpf-pcard-link {
	color: var(--tpf-text);
	text-decoration: none;
}

/* Stretch the title link over the whole card. */
.tpf-pcard-link::after {
	content: "";
	inset: 0;
	position: absolute;
}

.tpf-pcard-link:hover,
.tpf-pcard-link:focus-visible {
	color: var(--tpf-gold);
}

.tpf-pcard-link:focus-visible {
	outline: 2px solid var(--tpf-gold);
	outline-offset: -2px;
}

.tpf-pcard-more {
	color: var(--tpf-gold);
	font-size: 0.9rem;
	font-weight: 600;
	margin-top: auto;
	padding-top: 1rem;
}

@media (min-width: 700px) {
	.tpf-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.tpf-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tpf-pcard {
		transition: none;
	}

	.tpf-pcard:hover,
	.tpf-pcard:focus-within {
		transform: none;
	}
}

/* v1.2.4: align the card grid with the page text column (the content area already has padding). */
.tpf-cards .tpf-wrap {
	padding-left: 0;
	padding-right: 0;
}

/* v1.2.5: shorter icon area on phones. */
@media (max-width: 699px) {
	.tpf-pcard-media img {
		aspect-ratio: 12 / 5;
	}
}

/* v1.2.5: with exactly five cards, centre the second row instead of leaving a gap on the right. */
@media (min-width: 1024px) {
	.tpf-card-grid:has(.tpf-pcard:nth-child(5):last-child) {
		grid-template-columns: repeat(6, 1fr);
	}

	.tpf-card-grid:has(.tpf-pcard:nth-child(5):last-child) .tpf-pcard {
		grid-column: span 2;
	}

	.tpf-card-grid:has(.tpf-pcard:nth-child(5):last-child) .tpf-pcard:nth-child(4) {
		grid-column: 2 / span 2;
	}

	.tpf-card-grid:has(.tpf-pcard:nth-child(5):last-child) .tpf-pcard:nth-child(5) {
		grid-column: 4 / span 2;
	}
}
