/* ==========================================================================
   Hakan Interiors – Work: project list ([hakan_work]) and project page
   (single-thegem_pf_item.php)
   ========================================================================== */

.hakan-work,
.hakan-project {
	--hw-espresso: #361F1C;
	--hw-burgundy: #60211A;
	--hw-olive: #605331;
	--hw-sand: #B2A591;
	--hw-cream: #F2EFEB;
	--hw-line: rgba(178, 165, 145, 0.6);
	font-family: 'Raleway', sans-serif;
}

/* ---- Filter bar ---- */
.hakan-work__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	margin-bottom: 48px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hw-line);
}

.hakan-work__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hakan-work .hakan-work__filter {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 20px;
	border: 1px solid rgba(54, 31, 28, 0.25);
	border-radius: 0;
	background: transparent;
	color: var(--hw-espresso);
	font-family: 'Raleway', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.hakan-work__filter span {
	color: var(--hw-olive);
	font-size: 11px;
	letter-spacing: 0.08em;
	transition: color .25s ease;
}

.hakan-work .hakan-work__filter:hover,
.hakan-work .hakan-work__filter:focus-visible {
	border-color: var(--hw-espresso);
}

.hakan-work .hakan-work__filter[aria-pressed="true"] {
	border-color: var(--hw-espresso);
	background: var(--hw-espresso);
	color: var(--hw-cream);
}

.hakan-work__filter[aria-pressed="true"] span {
	color: var(--hw-sand);
}

.hakan-work .hakan-work__maplink,
.hakan-project .hakan-project__maplink {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--hw-burgundy);
	color: var(--hw-burgundy);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}

.hakan-work .hakan-work__maplink:hover,
.hakan-project .hakan-project__maplink:hover {
	color: var(--hw-espresso);
	border-color: var(--hw-espresso);
}

/* ---- Grid ---- */
.hakan-work__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 48px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hakan-work__item {
	margin: 0;
	padding: 0;
	animation: hakan-work-in .45s ease both;
}

.hakan-work__item[hidden] {
	display: none;
}

@keyframes hakan-work-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

.hakan-work .hakan-work__card {
	position: relative;
	display: block;
	color: var(--hw-espresso);
	text-decoration: none;
}

.hakan-work__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--hw-espresso);
}

.hakan-work__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

/* Until photography is added: espresso tile with the Hakan "H" */
.hakan-work__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		repeating-linear-gradient(135deg, rgba(242, 239, 235, 0.035) 0 1px, transparent 1px 14px),
		linear-gradient(160deg, #3f2622 0%, #361F1C 45%, #4a3d27 100%);
	color: rgba(178, 165, 145, 0.55);
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.hakan-work__card:hover .hakan-work__img,
.hakan-work__card:hover .hakan-work__placeholder {
	transform: scale(1.04);
}

.hakan-work__meta {
	display: block;
	padding: 20px 40px 0 0;
}

.hakan-work__meta em {
	display: block;
	margin-bottom: 8px;
	color: var(--hw-olive);
	font-size: 11px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.hakan-work__meta strong {
	display: block;
	color: var(--hw-espresso);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.35;
	transition: color .25s ease;
}

.hakan-work__meta small {
	display: block;
	margin-top: 4px;
	color: #6b5f5b;
	font-size: 14px;
}

.hakan-work__arrow {
	position: absolute;
	right: 0;
	bottom: 4px;
	color: var(--hw-burgundy);
	font-size: 18px;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity .25s ease, transform .25s ease;
}

.hakan-work__card:hover .hakan-work__meta strong,
.hakan-work__card:focus-visible .hakan-work__meta strong {
	color: var(--hw-burgundy);
}

.hakan-work__card:hover .hakan-work__arrow,
.hakan-work__card:focus-visible .hakan-work__arrow {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.hakan-work__item { animation: none; }
}

@media (max-width: 1024px) {
	.hakan-work__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 40px 24px;
	}
}

@media (max-width: 767px) {
	.hakan-work__bar {
		margin-bottom: 32px;
	}

	.hakan-work .hakan-work__filter {
		padding: 11px 14px;
		font-size: 11px;
		letter-spacing: 0.12em;
	}

	.hakan-work__grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

/* ==========================================================================
   Project page
   ========================================================================== */

/* TheGem's parallax footer sits fixed behind the page, so the page needs its own background */
.hakan-project {
	position: relative;
	z-index: 1;
	background: #fff;
}

/* ---- Hero ---- */
.hakan-project__hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 62vh;
	padding: 180px 0 90px;
	overflow: hidden;
	background: var(--hw-espresso);
}

.hakan-project__hero.has-image {
	min-height: 86vh;
}

.hakan-project__hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hakan-project__hero.has-image:after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(54, 31, 28, .88) 0%, rgba(54, 31, 28, .35) 55%, rgba(54, 31, 28, .55) 100%);
}

.hakan-project__hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 21px;
}

.hakan-project .hakan-project__back {
	display: inline-flex;
	gap: 10px;
	margin-bottom: 48px;
	color: var(--hw-sand);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .25s ease;
}

.hakan-project .hakan-project__back:hover {
	color: var(--hw-cream);
}

.hakan-project__eyebrow {
	margin: 0 0 26px;
	color: var(--hw-sand);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.32em;
	text-transform: uppercase;
}

.hakan-project .hakan-project__title {
	max-width: 900px;
	margin: 0;
	color: var(--hw-cream);
	font-family: 'Raleway', sans-serif;
	font-size: clamp(32px, 4.2vw, 58px);
	font-weight: 300;
	line-height: 1.12;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.hakan-project .hakan-project__title:before {
	content: '';
	display: block;
	width: 56px;
	height: 1px;
	margin-bottom: 32px;
	background: var(--hw-sand);
}

/* ---- Body: details + content ---- */
.hakan-project__body {
	display: grid;
	grid-template-columns: 4fr 8fr;
	gap: 64px;
	max-width: 1170px;
	margin: 0 auto;
	padding: 110px 21px;
}

.hakan-project__details dl {
	margin: 0 0 36px;
	border-top: 1px solid var(--hw-line);
}

.hakan-project__details dt {
	margin: 0;
	padding-top: 18px;
	color: var(--hw-burgundy);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.hakan-project__details dd {
	margin: 6px 0 0;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--hw-line);
	color: var(--hw-espresso);
	font-size: 16px;
	line-height: 1.6;
}

.hakan-project__content {
	color: #4a3f3c;
	font-size: 17px;
	line-height: 1.85;
}

.hakan-project__content > *:first-child {
	margin-top: 0;
}

.hakan-project__content p {
	margin: 0 0 24px;
}

.hakan-project__content h2,
.hakan-project__content h3 {
	margin: 48px 0 16px;
	color: var(--hw-espresso);
	font-family: 'Raleway', sans-serif;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hakan-project__content h2 { font-size: 26px; }
.hakan-project__content h3 { font-size: 19px; }

.hakan-project__content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.hakan-project__content .wp-block-gallery,
.hakan-project__content .wp-block-image,
.hakan-project__content .gallery {
	margin: 0 0 32px;
}

.hakan-project__pending {
	padding: 40px 0;
	border-top: 1px solid var(--hw-line);
	border-bottom: 1px solid var(--hw-line);
	color: var(--hw-olive);
	font-size: 18px;
	line-height: 1.6;
}

/* ---- Gallery (TheGem "Gallery" box on the portfolio item) ---- */
.hakan-project__gallery {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 21px 110px;
}

.hakan-project .hakan-project__photo {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--hw-cream);
	cursor: zoom-in;
}

.hakan-project .hakan-project__photo--lead {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
}

/* An odd photo at the end spans the row instead of leaving a gap */
.hakan-project .hakan-project__photo:not(.hakan-project__photo--lead):last-child:nth-child(even) {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
}

.hakan-project__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.hakan-project__photo:hover img {
	transform: scale(1.03);
}

/* ---- Lightbox ---- */
html.hakan-lightbox-open,
html.hakan-lightbox-open body {
	overflow: hidden;
}

.hakan-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 88px;
	background: rgba(36, 20, 18, 0.96);
	font-family: 'Raleway', sans-serif;
}

.hakan-lightbox[hidden] {
	display: none;
}

.hakan-lightbox__figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	text-align: center;
}

.hakan-lightbox__figure img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 160px);
	margin: 0 auto;
	object-fit: contain;
}

.hakan-lightbox__figure figcaption {
	margin-top: 14px;
	color: #B2A591;
	font-size: 14px;
}

.hakan-lightbox__figure figcaption:empty {
	display: none;
}

.hakan-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(242, 239, 235, 0.35);
	border-radius: 0;
	background: transparent;
	color: #F2EFEB;
	font-family: 'Raleway', sans-serif;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.hakan-lightbox button[hidden] {
	display: none;
}

.hakan-lightbox button:hover,
.hakan-lightbox button:focus-visible {
	background: #F2EFEB;
	color: #361F1C;
}

.hakan-lightbox__close { top: 20px; right: 20px; }
.hakan-lightbox__prev  { top: 50%; left: 20px; margin-top: -24px; }
.hakan-lightbox__next  { top: 50%; right: 20px; margin-top: -24px; }

.hakan-lightbox__count {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	margin: 0;
	color: #B2A591;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-align: center;
}

/* ---- Prev / next ---- */
.hakan-project__nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-top: 1px solid var(--hw-line);
	border-bottom: 1px solid var(--hw-line);
}

.hakan-project .hakan-project__nav-link {
	display: block;
	padding: 44px max(21px, calc((100vw - 1170px) / 2 + 21px));
	color: var(--hw-espresso);
	text-decoration: none;
	transition: background-color .3s ease;
}

.hakan-project .hakan-project__nav-link--next {
	border-left: 1px solid var(--hw-line);
	text-align: right;
}

.hakan-project .hakan-project__nav-link:hover {
	background: var(--hw-cream);
}

.hakan-project__nav-link small {
	display: block;
	margin-bottom: 10px;
	color: var(--hw-olive);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.hakan-project__nav-link strong {
	color: var(--hw-espresso);
	font-size: clamp(18px, 1.8vw, 24px);
	font-weight: 400;
	line-height: 1.3;
}

/* ---- Call to action ---- */
.hakan-project__cta {
	padding: 110px 21px;
	background: var(--hw-sand);
	text-align: center;
}

.hakan-project .hakan-project__cta h2 {
	margin: 0 0 20px;
	color: var(--hw-espresso);
	font-family: 'Raleway', sans-serif;
	font-size: clamp(26px, 2.8vw, 38px);
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.hakan-project .hakan-project__cta h2:before {
	content: '';
	display: block;
	width: 56px;
	height: 1px;
	margin: 0 auto 28px;
	background: var(--hw-burgundy);
}

.hakan-project__cta p {
	max-width: 560px;
	margin: 0 auto 36px;
	color: var(--hw-espresso);
	font-size: 17px;
	line-height: 1.75;
}

.hakan-project .hakan-project__cta-btn {
	display: inline-block;
	padding: 17px 32px;
	border: 1px solid var(--hw-burgundy);
	background: var(--hw-burgundy);
	color: var(--hw-cream);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .25s ease, border-color .25s ease;
}

.hakan-project .hakan-project__cta-btn:hover {
	border-color: var(--hw-espresso);
	background: var(--hw-espresso);
	color: var(--hw-cream);
}

@media (max-width: 767px) {
	.hakan-project__hero {
		min-height: 0;
		padding: 130px 0 64px;
	}

	.hakan-project__hero.has-image {
		min-height: 70vh;
	}

	.hakan-project__hero-inner {
		padding: 0 16px;
	}

	.hakan-project .hakan-project__back {
		margin-bottom: 36px;
	}

	.hakan-project__body {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 64px 16px;
	}

	.hakan-project__content {
		font-size: 16px;
	}

	.hakan-project__gallery {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 0 16px 64px;
	}

	.hakan-project .hakan-project__photo,
	.hakan-project .hakan-project__photo--lead {
		aspect-ratio: 4 / 3;
	}

	.hakan-lightbox {
		padding: 72px 12px;
	}

	.hakan-lightbox__prev,
	.hakan-lightbox__next {
		top: auto !important;
		bottom: 12px;
		margin-top: 0 !important;
	}

	.hakan-project__nav {
		grid-template-columns: 1fr;
	}

	.hakan-project .hakan-project__nav-link {
		padding: 28px 16px;
	}

	.hakan-project .hakan-project__nav-link--next {
		border-left: 0;
		border-top: 1px solid var(--hw-line);
	}

	.hakan-project__cta {
		padding: 80px 16px;
	}
}
