/* ==========================================================================
   Arock Construction — Projects

   Two related things live here:

     .arock-pj-*   the completed-project card grid on the Projects listing
     .arock-pjx-*  the extra blocks the project detail pages need on top of
                   arock-portfolio-detail.css (video, before & after,
                   testimonial)

   The detail pages deliberately reuse arock-portfolio-detail.css for their
   shared furniture — hero, breadcrumbs, chips, section headings, gallery grid,
   lightbox, specification list and the enquire panel — so a project page and a
   portfolio page are the same object visually. That file must therefore be
   linked BEFORE this one in <head>.

   Loaded last so it wins on cascade order without touching the shared
   Elementor stylesheets.
   ========================================================================== */

.arock-pj,
.arock-pjx {
	--pj-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--pj-dur: 380ms;
	--pj-accent: #FFB214; /* same amber as arock-enhancements.css */
	--pj-ink: #0C0C0C;
	--pj-muted: #6A6A6A;
	--pj-hairline: rgba(0, 0, 0, 0.12);
	--pj-surface: #F6F4F0;
}


/* ==========================================================================
   PART ONE — Listing cards
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Section shell + grid
   Three across, because a completed-project card carries only a name and a
   one-liner. That is also what keeps it from reading like the Portfolio page,
   which runs two across and hangs six specifications inside the photo.
   -------------------------------------------------------------------------- */

.arock-pj {
	padding: 0 0 30px;
}

.arock-pj-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 42px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Loading/empty/error state for the live-fetched grid (arock-projects-list.js,
   arock-project-view.js) — also reused as-is by the Portfolio and Sales
   listings/detail pages for the same purpose. */
.arock-pj-status {
	margin: 0;
	padding: 60px 20px;
	text-align: center;
	font-size: 0.95rem;
	color: var(--pj-muted, #6A6A6A);
}

.arock-pj-status a {
	color: inherit;
	text-decoration: underline;
}


/* --------------------------------------------------------------------------
   2. Card
   Photograph on top, a light information panel beneath it. Nothing in the
   panel moves on hover, so the card never reflows — the "View Project"
   button fades in over the photograph instead of being appended below it.
   -------------------------------------------------------------------------- */

.arock-pj-card {
	position: relative;
	display: flex;
	border-radius: 6px;
	overflow: hidden;
	background-color: #ffffff;
	box-shadow:
		0 0 0 1px var(--pj-hairline),
		0 2px 10px rgba(0, 0, 0, 0.05);
	transform: translateZ(0);
	transition:
		transform var(--pj-dur) var(--pj-ease),
		box-shadow var(--pj-dur) var(--pj-ease);
}

.arock-pj-card__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.arock-pj-card__link:hover,
.arock-pj-card__link:focus {
	text-decoration: none;
}

.arock-pj-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: #141414;
}

.arock-pj-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 620ms var(--pj-ease);
}

/* Dark wash under the button. Kept off the resting state so the photograph is
   never dimmed until the visitor is actually pointing at it. */
.arock-pj-card__veil {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	background-color: rgba(8, 8, 8, 0.42);
	transition: opacity var(--pj-dur) var(--pj-ease);
}

.arock-pj-card__action {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transform: translateY(8px);
	transition:
		opacity var(--pj-dur) var(--pj-ease),
		transform var(--pj-dur) var(--pj-ease);
}

.arock-pj-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 27px;
	border-radius: 999px;
	background-color: var(--pj-accent);
	font-family: 'Plus Jakarta Sans', 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--pj-ink);
}

.arock-pj-card__btn svg {
	display: block;
	flex: none;
}

.arock-pj-card__btn svg polygon {
	fill: currentColor;
}


/* --------------------------------------------------------------------------
   3. Information panel
   -------------------------------------------------------------------------- */

.arock-pj-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 24px 26px 27px;
}

.arock-pj-card__meta {
	display: block;
	font-family: 'Plus Jakarta Sans', 'Jost', sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pj-muted);
}

.arock-pj-card__title {
	margin: 11px 0 0;
	font-family: 'Urbanist', sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--pj-ink);
	transition: color var(--pj-dur) var(--pj-ease);
}

/* Amber underline that grows out from under the name on hover. */
.arock-pj-card__rule {
	display: block;
	width: 26px;
	height: 2px;
	margin: 15px 0 0;
	background-color: var(--pj-accent);
	transition: width var(--pj-dur) var(--pj-ease);
}

.arock-pj-card__desc {
	margin: 13px 0 0;
	font-family: 'Jost', sans-serif;
	font-size: 13.5px;
	line-height: 1.58;
	color: #4A4A4A;
}


/* --------------------------------------------------------------------------
   4. Hover / focus state
   :focus-within mirrors hover so a keyboard visitor sees the same thing.
   -------------------------------------------------------------------------- */

.arock-pj-card:hover,
.arock-pj-card:focus-within {
	transform: translateY(-8px);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.08),
		0 26px 48px rgba(0, 0, 0, 0.18);
}

.arock-pj-card:hover .arock-pj-card__img,
.arock-pj-card:focus-within .arock-pj-card__img {
	transform: scale(1.06);
}

.arock-pj-card:hover .arock-pj-card__veil,
.arock-pj-card:focus-within .arock-pj-card__veil,
.arock-pj-card:hover .arock-pj-card__action,
.arock-pj-card:focus-within .arock-pj-card__action {
	opacity: 1;
}

.arock-pj-card:hover .arock-pj-card__action,
.arock-pj-card:focus-within .arock-pj-card__action {
	transform: translateY(0);
}

.arock-pj-card:hover .arock-pj-card__rule,
.arock-pj-card:focus-within .arock-pj-card__rule {
	width: 46px;
}

.arock-pj-card__link:focus-visible {
	outline: 2px solid var(--pj-accent);
	outline-offset: -4px;
}


/* ==========================================================================
   PART TWO — Detail page extras
   ========================================================================== */

/* --------------------------------------------------------------------------
   4b. Detail hero alignment and lightbox variables

   arock-portfolio-detail.css gives the hero inner 20px of side padding, which
   leaves the hero title 20px inboard of every section below it. This restates
   the theme's own .layout-medium measure — width:90%, max-width:1180px, no side
   padding — so the title starts on exactly the same line as the body content at
   every viewport width. Scoped to .arock-pjd-hero so the portfolio pages keep
   whatever their own author intended.

   The lightbox is appended at the foot of the document, outside .arock-pd-body,
   so it never inherits that file's custom properties. They are restated here.
   -------------------------------------------------------------------------- */

.arock-pjd-hero .arock-pd-hero__inner {
	width: 90%;
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 0;
	padding-right: 0;
}

.arock-pd-lightbox {
	--pd-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--pd-accent: #FFB214;
	--pd-ink: #0C0C0C;
}


/* --------------------------------------------------------------------------
   5. Video
   A poster frame sized 16:9 with the slot for the finished walkthrough. Until
   a film exists the frame carries a plain "coming soon" note rather than a
   play control that would do nothing when pressed.
   -------------------------------------------------------------------------- */

.arock-pjx-video {
	margin: 0;
}

.arock-pjx-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	background-color: #101010;
}

/* Drop an <iframe> or <video> straight in here and it fills the frame. */
.arock-pjx-video__frame > iframe,
.arock-pjx-video__frame > video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.arock-pjx-video__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.5;
}

.arock-pjx-video__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 24px;
	text-align: center;
	background: linear-gradient(
		to top,
		rgba(6, 6, 6, 0.62) 0%,
		rgba(6, 6, 6, 0.30) 60%,
		rgba(6, 6, 6, 0.34) 100%
	);
}

.arock-pjx-video__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 74px;
	height: 74px;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 999px;
}

.arock-pjx-video__mark svg {
	display: block;
	margin-left: 4px; /* optical centring of the triangle */
}

.arock-pjx-video__mark svg polygon {
	fill: #ffffff;
}

.arock-pjx-video__label {
	font-family: 'Jost', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.88);
}

.arock-pjx-video figcaption,
.arock-pjx-note {
	margin: 18px 0 0;
	font-family: 'Jost', sans-serif;
	font-size: 13px;
	line-height: 1.6;
	color: var(--pj-muted);
}


/* --------------------------------------------------------------------------
   6. Before & after
   Two frames side by side with the stage named on each. Optional per project;
   only pages that have genuine "before" photography use it.
   -------------------------------------------------------------------------- */

.arock-pjx-ba {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.arock-pjx-ba figure {
	margin: 0;
}

.arock-pjx-ba__frame {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 4px;
	background-color: #141414;
}

.arock-pjx-ba__frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.arock-pjx-ba__stage {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 7px 15px;
	border-radius: 999px;
	background-color: rgba(8, 8, 8, 0.72);
	font-family: 'Jost', sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #ffffff;
}

.arock-pjx-ba figcaption {
	margin-top: 12px;
	font-family: 'Jost', sans-serif;
	font-size: 13px;
	line-height: 1.6;
	color: var(--pj-muted);
}


/* --------------------------------------------------------------------------
   7. Client testimonial
   -------------------------------------------------------------------------- */

/* The theme caps blockquotes inside the content area at 640px and indents them;
   this one is a full-width panel, so both are reset. */
.arock-pjx-quote {
	width: auto;
	max-width: none;
	margin: 0;
	padding: 46px 48px;
	border-radius: 6px;
	border-left: 2px solid var(--pj-accent);
	background-color: var(--pj-surface);
}

.arock-pjx-quote p {
	margin: 0;
	font-family: 'Urbanist', sans-serif;
	font-size: clamp(17px, 1.8vw, 22px);
	font-weight: 500;
	line-height: 1.42;
	letter-spacing: -0.01em;
	color: var(--pj-ink);
}

.arock-pjx-quote footer {
	margin-top: 24px;
	font-family: 'Jost', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pj-muted);
}


/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.arock-pj-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 24px;
	}

	.arock-pj-card__body {
		padding: 22px 22px 24px;
	}

	.arock-pj-card__title {
		font-size: 18.5px;
	}

	.arock-pjx-quote {
		padding: 36px 32px;
	}
}

@media (max-width: 767px) {
	.arock-pj-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.arock-pjx-ba {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.arock-pjx-video__mark {
		width: 58px;
		height: 58px;
	}

	.arock-pjx-quote {
		padding: 30px 24px;
	}
}


/* --------------------------------------------------------------------------
   9. Touch and reduced-motion fallbacks
   With no hover there is nothing to reveal the button, so it sits permanently
   over the bottom of the photograph instead of centred behind a wash.
   -------------------------------------------------------------------------- */

@media (hover: none) {
	.arock-pj-card__veil {
		display: none;
	}

	.arock-pj-card__action {
		top: auto;
		bottom: 16px;
		opacity: 1;
		transform: none;
	}

	.arock-pj-card__btn {
		padding: 11px 22px;
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.arock-pj-card,
	.arock-pj-card__img,
	.arock-pj-card__veil,
	.arock-pj-card__action,
	.arock-pj-card__rule,
	.arock-pj-card__title {
		transition-duration: 1ms;
	}

	.arock-pj-card:hover,
	.arock-pj-card:focus-within {
		transform: none;
	}

	.arock-pj-card:hover .arock-pj-card__img,
	.arock-pj-card:focus-within .arock-pj-card__img {
		transform: none;
	}

	.arock-pj-card__action {
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   Storeys filter bar (arock-projects-list.js) — "All / Single Storey /
   Double Storey / Split-Level". Matches the Sales page (.arock-sl-filterbar)
   design: pill shape, 10px gap, 10px 18px padding, gold on black active state.
   -------------------------------------------------------------------------- */

.arock-pj-filterbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 34px;
	align-items: center;
	padding: 0;
}

.arock-pj-filterbar .arock-pj-filter-btn,
button.arock-pj-filter-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 10px 18px !important;
	border-radius: 999px !important;
	border: 1px solid rgba(12, 12, 12, 0.16) !important;
	background-color: #ffffff !important;
	color: #0C0C0C !important;
	font-family: 'Plus Jakarta Sans', 'Urbanist', 'Jost', -apple-system, BlinkMacSystemFont, sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	line-height: 1.2 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-shadow: none !important;
	box-shadow: none !important;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	transform: translateZ(0);
	transition: background-color 200ms ease,
	            color 200ms ease,
	            border-color 200ms ease,
	            transform 180ms ease !important;
}

.arock-pj-filterbar .arock-pj-filter-btn:hover,
button.arock-pj-filter-btn:hover {
	border-color: #FFB214 !important;
	color: #000000 !important;
	background-color: #ffffff !important;
}

.arock-pj-filterbar .arock-pj-filter-btn:focus-visible,
button.arock-pj-filter-btn:focus-visible {
	outline: 2px solid #FFB214 !important;
	outline-offset: 2px !important;
}

.arock-pj-filterbar .arock-pj-filter-btn.is-active,
button.arock-pj-filter-btn.is-active {
	background-color: #0C0C0C !important;
	border-color: #0C0C0C !important;
	color: #FFB214 !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	transform: none !important;
	cursor: pointer;
}

.arock-pj-filterbar .arock-pj-filter-btn.is-active:hover,
button.arock-pj-filter-btn.is-active:hover {
	background-color: #0C0C0C !important;
	border-color: #0C0C0C !important;
	color: #FFB214 !important;
}

.arock-pj-card--animated {
	animation: arockCardIn 350ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes arockCardIn {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 767px) {
	.arock-pj-filterbar {
		gap: 8px;
		margin-bottom: 24px;
	}

	.arock-pj-filterbar .arock-pj-filter-btn,
	button.arock-pj-filter-btn {
		padding: 8px 14px !important;
		font-size: 12px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.arock-pj-filterbar .arock-pj-filter-btn,
	button.arock-pj-filter-btn {
		transition-duration: 1ms !important;
		transform: none !important;
	}
	.arock-pj-card--animated {
		animation: none;
	}
}
