/* ==========================================================================
   3D Portfolio — single project page
   Mobile-first; colours come from per-project CSS variables set inline:
   --lc-bg, --lc-on-bg, --lc-panel, --lc-on-panel, --lc-accent,
   --lc-title-font, --lc-year-font
   ========================================================================== */

.lcueva-single-main {
	margin: 0;
	padding: 0;
	max-width: none;
}

.lcueva-single {
	--lc-card: #ffffff;
	--lc-text: #3a3a3c;
	--lc-muted: #6b6b70;
	--lc-gap: 16px;
	background: var(--lc-bg, #7b3049);
	color: var(--lc-on-bg, #fff);
	padding: 0 0 48px;
	overflow-x: clip;
}

.lcueva-single *,
.lcueva-single *::before,
.lcueva-single *::after {
	box-sizing: border-box;
}

.lcueva-single .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lcueva-single__article {
	max-width: 900px;
	margin: 0 auto;
}

/* Hero */
.lcueva-single__hero {
	margin: 0;
	background: rgba(0, 0, 0, 0.15);
}
.lcueva-single__hero img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 70vh;
	object-fit: cover;
}

/* Body: card + info panel */
.lcueva-single__body {
	padding: 0 var(--lc-gap);
}
.has-hero .lcueva-single__body {
	margin-top: -24px;
}

.lcueva-single__card {
	position: relative;
	z-index: 1;
	background: var(--lc-card);
	color: var(--lc-text);
	padding: 32px 20px 28px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.lcueva-single__header {
	text-align: center;
	margin-bottom: 24px;
}
.lcueva-single__title {
	margin: 0;
	font-family: var(--lc-title-font, Georgia, serif);
	font-weight: 400;
	font-size: clamp(2rem, 7vw, 3.25rem);
	line-height: 1.15;
	color: #1d1d1f;
	letter-spacing: normal;
	text-transform: none;
}
.lcueva-single__subtitle {
	margin: 8px 0 0;
	color: var(--lc-muted);
	font-size: 1rem;
}

.lcueva-single__chips {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
.lcueva-single__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border: 1px solid #d9d9de;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.5;
	color: #3a3a3c;
	text-decoration: none;
}
.lcueva-single__chip.is-category::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--lc-accent, #e0955c);
}
.lcueva-single__chip:hover,
.lcueva-single__chip:focus-visible {
	border-color: #3a3a3c;
}

.lcueva-single__content {
	font-size: 15px;
	line-height: 1.75;
	max-width: 62ch;
	margin: 0 auto;
}
.lcueva-single__content > * {
	margin-top: 0;
	margin-bottom: 1em;
}
.lcueva-single__content > *:last-child {
	margin-bottom: 0;
}
.lcueva-single__content a {
	color: inherit;
	text-decoration-color: var(--lc-accent, #e0955c);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Gallery */
.lcueva-single__gallery {
	list-style: none;
	margin: 32px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.lcueva-single__gallery li:first-child {
	grid-column: 1 / -1;
}
.lcueva-single__gallery-link {
	display: block;
	overflow: hidden;
	background: #f2f2f4;
	outline-offset: 3px;
}
.lcueva-single__gallery-link img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.lcueva-single__gallery li:first-child img {
	aspect-ratio: 16 / 9;
}
.lcueva-single__gallery-link:hover img,
.lcueva-single__gallery-link:focus-visible img {
	transform: scale(1.03);
}

/* Info panel */
.lcueva-single__info {
	position: relative;
	z-index: 2;
	background: var(--lc-panel, #363638);
	color: var(--lc-on-panel, #fff);
	padding: 20px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}
.lcueva-single__year {
	margin: 0 0 12px;
	font-family: var(--lc-year-font, Georgia, serif);
	font-size: 2.25rem;
	line-height: 1;
	color: color-mix(in srgb, var(--lc-on-panel, #fff) 45%, transparent);
}
.lcueva-single__info dl {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 14px 20px;
}
/* Themes style dl/dt/dd (indents, fonts); reset them inside the panel. */
.lcueva-single .lcueva-single__info dl,
.lcueva-single .lcueva-single__info dt,
.lcueva-single .lcueva-single__info dd {
	margin: 0;
	padding: 0;
	border: 0;
	float: none;
	width: auto;
}
.lcueva-single__info-row dt {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lc-accent, #e0955c);
}
.lcueva-single__info-row dd {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: color-mix(in srgb, var(--lc-on-panel, #fff) 85%, transparent);
}

/* Previous / next */
.lcueva-single__pager {
	max-width: 900px;
	margin: 32px auto 0;
	padding: 0 var(--lc-gap);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	align-items: center;
	font-size: 14px;
}
.lcueva-single__pager a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	justify-self: start;
	color: var(--lc-on-bg, #fff);
	text-decoration: none;
	opacity: 0.85;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.lcueva-single__pager a:hover,
.lcueva-single__pager a:focus-visible {
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.lcueva-single__pager .is-next {
	grid-column: 2;
	justify-self: end;
	text-align: right;
}

/* Lightbox */
.lcueva-lightbox {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(10, 10, 12, 0.94);
	color: #fff;
}
.lcueva-lightbox::backdrop {
	background: transparent;
}
.lcueva-lightbox[open] {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.lcueva-lightbox figure {
	margin: 0;
	padding: 56px 16px 16px;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.lcueva-lightbox img {
	max-width: min(1400px, 100%);
	max-height: calc(100dvh - 140px);
	object-fit: contain;
}
.lcueva-lightbox figcaption {
	font-size: 14px;
	opacity: 0.8;
	text-align: center;
}
.lcueva-lightbox button {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.lcueva-lightbox button:hover,
.lcueva-lightbox button:focus-visible {
	background: rgba(255, 255, 255, 0.25);
}
.lcueva-lightbox .is-close { top: 12px; right: 12px; }
.lcueva-lightbox .is-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lcueva-lightbox .is-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lcueva-lightbox .is-count {
	position: absolute;
	top: 22px;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 13px;
	opacity: 0.7;
}

/* Tablet+ : the mockup layout — card overlaps the hero, panel overlaps the card */
@media (min-width: 900px) {
	.lcueva-single {
		--lc-gap: 24px;
		padding: 64px 24px 72px;
	}

	.lcueva-single__body {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 620px) 180px;
		align-items: start;
		padding: 0;
	}
	.has-hero .lcueva-single__body {
		margin-top: -40px;
	}
	.lcueva-single__card {
		grid-column: 2;
		grid-row: 1;
		padding: 48px 64px 56px;
	}
	.lcueva-single__info {
		grid-column: 3;
		grid-row: 1;
		margin-left: -48px;
		margin-top: 56px;
		padding: 22px 22px 26px;
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 32px);
	}
	.lcueva-single__info dl {
		display: block;
	}
	.lcueva-single__info-row {
		padding: 14px 0;
		border-top: 1px solid color-mix(in srgb, var(--lc-on-panel, #fff) 35%, transparent);
	}
	.lcueva-single__info-row:first-child {
		border-top: 0;
		padding-top: 4px;
	}
	.lcueva-single__year {
		font-size: 2.6rem;
		margin-bottom: 18px;
	}

	.lcueva-single__gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.lcueva-single__pager {
		padding: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lcueva-single__gallery-link img {
		transition: none;
	}
}
