/* ===========================================================
   Final Form Post — Before & After Projects
   Brand: navy #1a2b45 · gold #d4a574 · cream #fafaf7
   Font:  Poppins
   =========================================================== */

.ffp-projects,
.ffp-projects *,
.ffp-single,
.ffp-single * {
	box-sizing: border-box;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ffp-projects,
.ffp-single {
	--ffp-navy: #1a2b45;
	--ffp-navy-2: #243857;
	--ffp-gold: #d4a574;
	--ffp-gold-dark: #b88a55;
	--ffp-cream: #fafaf7;
	--ffp-line: #e8e4dc;
	--ffp-text: #2a2a2a;
	--ffp-muted: #7a7a7a;
}

.ffp-projects {
	background: transparent !important;
	padding: 40px 0 80px;
	color: var(--ffp-text);
}

.ffp-projects--archive {
	padding: 0 0 80px;
}

.ffp-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* -------- Section heading -------- */
.ffp-section-head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 36px;
}

.ffp-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ffp-gold-dark);
	margin-bottom: 14px;
}

.ffp-eyebrow--light {
	color: var(--ffp-gold);
}

.ffp-section-title {
	font-size: 42px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--ffp-navy);
	margin: 0 0 14px;
	letter-spacing: -0.01em;
}

.ffp-section-sub {
	font-size: 16px;
	line-height: 1.7;
	color: var(--ffp-muted);
	margin: 0;
}

/* -------- Filters -------- */
.ffp-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 36px;
}

.ffp-projects button.ffp-pill,
.ffp-projects .ffp-pill {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 10px 20px !important;
	border-radius: 999px !important;
	border: 1.5px solid #e8e4dc !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #1a2b45 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: all 0.2s ease;
	font-family: 'Poppins', sans-serif !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
	box-shadow: none !important;
	line-height: 1.2 !important;
	height: auto !important;
}

.ffp-projects button.ffp-pill:hover,
.ffp-projects .ffp-pill:hover {
	border-color: #d4a574 !important;
	color: #b88a55 !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
}

.ffp-projects button.ffp-pill.is-active,
.ffp-projects .ffp-pill.is-active {
	background: #1a2b45 !important;
	background-color: #1a2b45 !important;
	border-color: #1a2b45 !important;
	color: #ffffff !important;
}

.ffp-projects .ffp-pill__count {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 24px !important;
	height: 22px !important;
	padding: 0 7px !important;
	border-radius: 999px !important;
	background: rgba(0, 0, 0, 0.08) !important;
	background-color: rgba(0, 0, 0, 0.08) !important;
	color: #1a2b45 !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
}

.ffp-projects .ffp-pill.is-active .ffp-pill__count {
	background: #d4a574 !important;
	background-color: #d4a574 !important;
	color: #1a2b45 !important;
}

/* -------- Grid -------- */
.ffp-grid {
	display: grid;
	gap: 28px;
}

.ffp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ffp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ffp-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
	.ffp-grid--3,
	.ffp-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.ffp-grid--2,
	.ffp-grid--3,
	.ffp-grid--4 { grid-template-columns: 1fr; }
}

/* -------- Card -------- */
.ffp-projects a.ffp-card,
.ffp-projects .ffp-card {
	display: block !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	text-decoration: none !important;
	color: #1a2b45 !important;
	box-shadow: 0 2px 12px rgba(26, 43, 69, 0.06) !important;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ffp-projects a.ffp-card:hover,
.ffp-projects .ffp-card:hover {
	transform: translateY(-4px) !important;
	box-shadow: 0 12px 28px rgba(26, 43, 69, 0.14) !important;
	color: #1a2b45 !important;
	text-decoration: none !important;
}

.ffp-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f0ece2;
}

/* Image element used in both split and solo states */
.ffp-card__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.6s ease;
}

/* Split (before + after) state */
.ffp-card__media--split .ffp-card__img--before {
	clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.ffp-card__media--split .ffp-card__img--after {
	clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}
.ffp-card__media--split::before {
	content: '';
	position: absolute;
	top: 0; bottom: 0; left: 50%;
	width: 2px;
	background: #fff;
	transform: translateX(-50%);
	z-index: 2;
	box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.4);
}

.ffp-card:hover .ffp-card__img { transform: scale(1.04); }

.ffp-card__badge {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border-radius: 999px;
	background: rgba(26, 43, 69, 0.92);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	z-index: 3;
	backdrop-filter: blur(6px);
}

.ffp-card__badge svg { color: var(--ffp-gold); }

.ffp-projects .ffp-card__body {
	padding: 20px 22px 22px !important;
	background: #ffffff !important;
}

.ffp-projects .ffp-card__title {
	font-size: 17px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: #1a2b45 !important;
	margin: 0 0 8px !important;
	letter-spacing: -0.005em !important;
	font-family: 'Poppins', sans-serif !important;
}

.ffp-projects .ffp-card__meta {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 13px !important;
	color: #7a7a7a !important;
	font-weight: 400 !important;
}

.ffp-card__meta .ffp-dot { opacity: 0.5; }

/* -------- Section CTA -------- */
.ffp-section-cta {
	text-align: center;
	margin-top: 48px;
}

.ffp-link-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	border-radius: 999px;
	border: 1.5px solid var(--ffp-navy);
	color: var(--ffp-navy);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	transition: all 0.25s ease;
}

.ffp-link-cta:hover {
	background: var(--ffp-navy);
	color: #fff;
}

/* -------- Empty state -------- */
.ffp-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: var(--ffp-muted);
	font-size: 15px;
}

.ffp-empty a { color: var(--ffp-gold-dark); }

/* ===========================================================
   Archive hero
   =========================================================== */
.ffp-archive-hero {
	background: linear-gradient(135deg, var(--ffp-navy) 0%, var(--ffp-navy-2) 100%);
	color: #fff;
	padding: 110px 0 100px;
	text-align: center;
	margin-bottom: 50px;
	position: relative;
	overflow: hidden;
}

/* When admin uploads a background image, the inline style takes over.
   Just make sure text-shadow + min-height keep it readable. */
.ffp-archive-hero.ffp-archive-hero--image {
	min-height: 380px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #0f1628;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.ffp-archive-hero::after {
	content: '';
	position: absolute;
	bottom: -40px;
	left: 50%;
	transform: translateX(-50%);
	width: 220px;
	height: 80px;
	background: var(--ffp-gold);
	opacity: 0.15;
	filter: blur(40px);
	border-radius: 50%;
}
.ffp-archive-hero.ffp-archive-hero--image::after { display: none; }

.ffp-archive-title {
	font-size: 56px;
	font-weight: 700;
	line-height: 1.05;
	margin: 14px 0 18px;
	letter-spacing: -0.02em;
	color: #fff;
}

.ffp-archive-sub {
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
	max-width: 640px;
	margin: 0 auto;
}

/* -------- Pagination -------- */
.ffp-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 48px;
	flex-wrap: wrap;
}

.ffp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1.5px solid var(--ffp-line);
	background: #fff;
	color: var(--ffp-navy);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.2s ease;
}

.ffp-pagination .page-numbers:hover { border-color: var(--ffp-gold); color: var(--ffp-gold-dark); }
.ffp-pagination .page-numbers.current {
	background: var(--ffp-navy);
	border-color: var(--ffp-navy);
	color: #fff;
}

/* ===========================================================
   SINGLE PROJECT PAGE
   =========================================================== */
.ffp-single {
	background: var(--ffp-cream);
	padding: 90px 0 80px; /* +50px top to push breadcrumb down */
	color: var(--ffp-text);
}

.ffp-crumbs {
	font-size: 13px;
	color: var(--ffp-muted);
	margin-bottom: 32px;
}
.ffp-crumbs a { color: var(--ffp-muted); text-decoration: none; }
.ffp-crumbs a:hover { color: var(--ffp-gold-dark); }
.ffp-crumbs__sep { margin: 0 10px; opacity: 0.5; }

/* -------- Side-by-side layout: image left, content right -------- */
.ffp-single .ffp-single__layout {
	display: grid !important;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important;
	gap: 56px !important;
	align-items: start !important;
	width: 100% !important;
}
.ffp-single .ffp-single__layout > .ffp-single__visual,
.ffp-single .ffp-single__layout > .ffp-single__content {
	min-width: 0 !important;
	width: auto !important;
	max-width: 100% !important;
	float: none !important;
	clear: none !important;
}
.ffp-single .ffp-single__visual { position: sticky; top: 90px; }

@media (max-width: 900px) {
	.ffp-single .ffp-single__layout {
		grid-template-columns: 1fr !important;
		gap: 36px !important;
	}
	.ffp-single .ffp-single__visual { position: static; }
}

.ffp-single__title {
	font-size: 38px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var(--ffp-navy);
	margin: 10px 0 18px;
}

.ffp-single__meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	font-size: 14px;
	color: var(--ffp-muted);
	margin-bottom: 26px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--ffp-line);
}
.ffp-single__meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.ffp-single__meta-row svg { color: var(--ffp-gold-dark); }

/* -------- Comparison slider --------
   Height is driven by the BEFORE image's natural aspect ratio
   (it's positioned statically as a normal block element).
   The AFTER image overlays absolutely on top. */
.ffp-single .ffp-compare {
	position: relative !important;
	width: 100% !important;
	border-radius: 16px !important;
	overflow: hidden !important;
	user-select: none;
	background: #f0ece2;
	box-shadow: 0 14px 50px rgba(26, 43, 69, 0.18);
	max-height: 720px;
	display: block !important;
}

/* Featured image fallback — show photo at natural ratio, no cropping */
.ffp-feature-img {
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: #f0ece2;
	box-shadow: 0 14px 50px rgba(26, 43, 69, 0.18);
	max-height: 720px;
}
.ffp-feature-img img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 720px;
	object-fit: contain;
}

/* BEFORE image — natural flow, drives container height */
.ffp-single .ffp-compare__img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	pointer-events: none;
}

/* AFTER image — absolute overlay, matches container exactly */
.ffp-single .ffp-compare__after-img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	clip-path: inset(0 0 0 50%);
	will-change: clip-path;
}

.ffp-single .ffp-compare__label,
.ffp-compare__label {
	position: absolute !important;
	top: 22px !important;
	bottom: auto !important;
	padding: 7px 16px !important;
	border-radius: 999px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.16em !important;
	z-index: 4 !important;
	backdrop-filter: blur(6px);
	display: inline-block !important;
	line-height: 1 !important;
}
.ffp-single .ffp-compare__label--before,
.ffp-compare__label--before {
	left: 22px !important;
	right: auto !important;
	background: rgba(26, 43, 69, 0.9) !important;
	background-color: rgba(26, 43, 69, 0.9) !important;
	color: #ffffff !important;
}
.ffp-single .ffp-compare__label--after,
.ffp-compare__label--after {
	right: 22px !important;
	left: auto !important;
	background: #d4a574 !important;
	background-color: #d4a574 !important;
	color: #1a2b45 !important;
}

.ffp-compare__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 3px;
	background: #fff;
	transform: translateX(-50%);
	z-index: 5;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
	cursor: ew-resize;
}

.ffp-compare__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	color: var(--ffp-navy);
}

.ffp-compare__hint {
	text-align: center;
	font-size: 13px;
	color: var(--ffp-muted);
	margin: 16px 0 0;
	font-weight: 500;
}

/* -------- Right column content -------- */
.ffp-single__content { min-width: 0; }

.ffp-block-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--ffp-navy);
	margin: 0 0 12px;
}

.ffp-single__text { font-size: 15px; line-height: 1.75; color: #3a3a3a; }
.ffp-single__text p { margin: 0 0 12px; }

.ffp-single ul.ffp-scope,
.ffp-single .ffp-scope {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 30px !important;
}
.ffp-single ul.ffp-scope li,
.ffp-single .ffp-scope li {
	position: relative !important;
	padding: 10px 0 10px 36px !important;
	border-bottom: 1px solid #e8e4dc !important;
	font-size: 14.5px;
	color: #2a2a2a;
	list-style: none !important;
}
.ffp-single ul.ffp-scope li:last-child,
.ffp-single .ffp-scope li:last-child { border-bottom: 0 !important; }
.ffp-single ul.ffp-scope li::before,
.ffp-single .ffp-scope li::before {
	content: '' !important;
	position: absolute !important;
	left: 0 !important;
	top: 12px !important;
	width: 22px !important;
	height: 22px !important;
	border-radius: 50% !important;
	background-color: #d4a574 !important;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 14 14' fill='none'><path d='M3 7l3 3 5-6' stroke='%231a2b45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	display: block !important;
}

.ffp-block-sep { margin-top: 26px; }

/* -------- Details panel (now on right column, below scope) -------- */
.ffp-details {
	background: #fff;
	border: 1px solid var(--ffp-line);
	border-radius: 14px;
	padding: 22px 24px;
	margin: 6px 0 24px;
}

.ffp-details__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ffp-gold-dark);
	margin: 0 0 12px;
}

.ffp-details__list { list-style: none; padding: 0; margin: 0; }
.ffp-details__list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px dashed var(--ffp-line);
	font-size: 14px;
}
.ffp-details__list li:last-child { border-bottom: 0; }
.ffp-details__list span:first-child { color: var(--ffp-muted); }
.ffp-details__list span:last-child  { color: var(--ffp-navy); font-weight: 600; text-align: right; }

/* -------- Professional CTA button -------- */
.ffp-single a.ffp-cta-btn,
.ffp-single .ffp-cta-btn,
a.ffp-cta-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	margin-top: 18px !important;
	padding: 16px 32px !important;
	background: #1a2b45 !important;
	background-color: #1a2b45 !important;
	color: #ffffff !important;
	text-decoration: none !important;
	font-family: 'Poppins', sans-serif !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	border-radius: 4px !important;
	border: 2px solid #1a2b45 !important;
	box-shadow: 0 6px 18px rgba(26, 43, 69, 0.18) !important;
	transition: all 0.25s ease !important;
	cursor: pointer !important;
	line-height: 1 !important;
	width: auto !important;
}
.ffp-single a.ffp-cta-btn:hover,
.ffp-single .ffp-cta-btn:hover,
a.ffp-cta-btn:hover {
	background: #d4a574 !important;
	background-color: #d4a574 !important;
	border-color: #d4a574 !important;
	color: #1a2b45 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 10px 24px rgba(212, 165, 116, 0.35) !important;
}
.ffp-single a.ffp-cta-btn svg,
.ffp-single .ffp-cta-btn svg,
a.ffp-cta-btn svg { transition: transform 0.25s ease !important; }
.ffp-single a.ffp-cta-btn:hover svg,
.ffp-single .ffp-cta-btn:hover svg,
a.ffp-cta-btn:hover svg { transform: translateX(3px) !important; }

/* -------- Related -------- */
.ffp-related { margin-top: 70px; }
.ffp-related__title {
	font-size: 26px;
	font-weight: 700;
	color: var(--ffp-navy);
	margin: 0 0 26px;
	text-align: center;
}

/* ===========================================================
   Responsive tweaks
   =========================================================== */
@media (max-width: 768px) {
	.ffp-projects { padding: 60px 0; }
	.ffp-section-title { font-size: 32px; }
	.ffp-archive-title { font-size: 36px; }
	.ffp-single__title { font-size: 32px; }
	.ffp-pill { padding: 8px 14px; font-size: 13px; }
	.ffp-card__body { padding: 16px 18px 18px; }
	.ffp-compare__knob { width: 48px; height: 48px; }
	.ffp-compare__label { font-size: 10px; padding: 6px 12px; }
}

/* Hide filter pills on transition for nicer fade */
.ffp-card[hidden] { display: none; }
