/* ==========================================================================
MR Interiors — WordPress migration overrides
Loaded AFTER styles.css. Keep migration-specific fixes here rather than
editing the large inherited styles.css, so template changes stay easy to
diff against the original static site.
========================================================================== */
.tf-footer {
	position: relative;
	z-index: 2;
}
.mr-entry-content {
	color: var(--mr-text, #f4f2ee);
}

.mr-entry-content > * + * {
	margin-top: 24px;
}

.mr-entry-content h2,
.mr-entry-content h3,
.mr-entry-content h4,
.mr-entry-content h5,
.mr-entry-content h6 {
	font-family: "Optima", Georgia, serif;
	color: #fff;
	font-weight: 400;
	line-height: 1.25;
	margin-top: 48px;
}

.mr-entry-content h2 { font-size: clamp(28px, 3vw, 40px); }
.mr-entry-content h3 { font-size: clamp(24px, 2.4vw, 32px); }
.mr-entry-content h4 { font-size: clamp(20px, 2vw, 24px); }

.mr-entry-content p,
.mr-entry-content li {
	color: var(--mr-text-5, #cfcbc4);
	line-height: 1.8;
}

.mr-entry-content a {
	color: var(--mr-gold, #ca9938);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mr-entry-content strong { color: var(--mr-text, #f4f2ee); }

.mr-entry-content ul,
.mr-entry-content ol {
	padding-left: 1.25em;
}

.mr-entry-content li + li { margin-top: 8px; }

.mr-entry-content blockquote {
	border-left: 2px solid var(--mr-gold, #ca9938);
	padding: 4px 0 4px 28px;
	margin: 40px 0;
	font-family: "Optima", Georgia, serif;
	font-size: clamp(20px, 2.2vw, 26px);
	line-height: 1.5;
	color: #fff;
}

.mr-entry-content img {
	max-width: 100%;
	height: auto;
}

.mr-entry-content figcaption {
	color: var(--mr-text-5, #cfcbc4);
	font-size: 13px;
	margin-top: 10px;
	text-align: left;
}

.mr-entry-content hr,
.mr-entry-content .wp-block-separator {
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin: 56px 0;
}

/* Core gallery — used for case-study image grids. */
.mr-entry-content .wp-block-gallery {
	gap: 16px;
}

.mr-entry-content .wp-block-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Core columns — used for capability / value grids. */
.mr-entry-content .wp-block-columns {
	gap: 24px;
}

@media (max-width: 781px) {
	.mr-entry-content .wp-block-columns {
		gap: 32px;
	}
}

/* Wide/full alignment inside the theme's fixed-width container. */
.mr-entry-content .alignwide {
	width: 100%;
	max-width: 100%;
}

.mr-entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Was an inline style on the static page's <h2>. */
.mr-service-statement {
	font-size: clamp(24px, 2.6vw, 32px);
	letter-spacing: -0.02em;
	line-height: 1.4 !important;
}

/* ACF wysiwyg output inside the statement columns. */
.mr-rte > :first-child { margin-top: 0; }
.mr-rte > :last-child { margin-bottom: 0; }
.mr-rte p { margin-bottom: 16px; }
.mr-rte p:last-child { margin-bottom: 0; }

.mr-capabilities .wp-block-columns,
.mr-entry-content .mr-capability-row,
.mr-entry-content .mr-value-row {
	margin-bottom: 30px;
	gap: 24px;
}

.mr-capabilities .wp-block-columns:last-child { margin-bottom: 0; }

.mr-capabilities h4,
.mr-entry-content .mr-capability-row h4,
.mr-entry-content .mr-value-row h4 {
	margin-top: 0;
	font-size: 18px;
}

.mr-capabilities p { margin-bottom: 0; }

@media (max-width: 781px) {
	.mr-capabilities .wp-block-columns,
	.mr-entry-content .mr-capability-row,
	.mr-entry-content .mr-value-row {
		gap: 30px;
	}
}

/* Case-study editorial gallery rows. */
.mr-entry-content .mr-gallery-row {
	margin-bottom: 16px;
}

.mr-entry-content .mr-gallery-row.is-row-2 img { aspect-ratio: 4 / 3; }
.mr-entry-content .mr-gallery-row.is-row-3 img { aspect-ratio: 1 / 1; }

.mr-project-card {
	position: relative;
	min-height: 320px;
}

/*
* Desktop (≥992px) goes back down to the original, more compact 16:9 crop
* instead — overriding the 4:3 set inline on the <img> in front-page.php.
* Needs !important because an inline style="" attribute always wins over an
* external stylesheet rule otherwise, regardless of selector specificity.
*/
@media (min-width: 992px) {
	.mr-project-card {
		min-height: 0;
	}
	
	.mr-project-card img {
		aspect-ratio: 16 / 9 !important;
	}
}

.mr-project-card__link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.mr-project-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: clamp(20px, 3vw, 40px);
	/* Bottom-up scrim so the copy stays legible over any photo. */
	background: linear-gradient(
	to top,
	rgba(0, 0, 0, 0.88) 0%,
	rgba(0, 0, 0, 0.65) 28%,
	rgba(0, 0, 0, 0.18) 58%,
	rgba(0, 0, 0, 0) 85%
	);
	/* Hidden by default everywhere; see the two rules below for when it shows. */
	opacity: 0;
	pointer-events: none;
}

.mr-project-card__content {
	border-left: 1px solid var(--mr-gold, #ca9938);
	padding-left: clamp(14px, 1.6vw, 22px);
	max-width: 34em;
}
.gallery-centered-slider .swiper-slide-active .mr-project-card__overlay {
	opacity: 1;
}

@media (max-width: 991px) {
	.mr-project-card__overlay {
		background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.92) 0%,
		rgba(0, 0, 0, 0.85) 45%,
		rgba(0, 0, 0, 0.2) 100%
		);
	}
}

@media (hover: hover) and (min-width: 992px) {
	.mr-project-card__overlay {
		transition: opacity 0.45s ease;
	}
	
	.mr-project-card__content {
		transform: translateY(14px);
		transition: transform 0.45s ease;
	}
	
	.gallery-centered-slider .swiper-slide-active .mr-project-card__overlay {
		opacity: 0;
	}
	
	.mr-project-card:hover .mr-project-card__overlay,
	.mr-project-card__link:focus-visible .mr-project-card__overlay {
		opacity: 1;
	}
	
	.mr-project-card:hover .mr-project-card__content,
	.mr-project-card__link:focus-visible .mr-project-card__content {
		transform: translateY(0);
	}
}

.mr-project-card__title {
	color: #fff;
	font-size: clamp(20px, 2.1vw, 30px);
	line-height: 1.2;
	margin: 0 0 12px;
}

.mr-project-card__desc {
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(13px, 1.05vw, 15px);
	line-height: 1.6;
	margin: 0 0 16px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mr-project-card__more {
	display: inline-block;
	color: #fff;
	font-size: 14px;
	letter-spacing: 0.02em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.65);
	padding-bottom: 3px;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.mr-project-card:hover .mr-project-card__more {
	color: var(--mr-gold, #ca9938);
	border-color: var(--mr-gold, #ca9938);
}

.mr-entry-content .mr-page-links,
.navigation.pagination {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}
.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--mr-text, #f4f2ee);
	text-decoration: none;
	transition: border-color 0.25s ease, color 0.25s ease;
}
.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
	border-color: var(--mr-gold, #ca9938);
	color: var(--mr-gold, #ca9938);
}

.navigation.pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.tf-list .link svg {
	color: #fff;
}
.mr-tagline {
	display: block;
	margin-top: 8px;
	font-size: 11px;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mr-gold, #ca9938);
}

.mr-tagline--sm {
	font-size: 8px;
	margin-top: 4px;
	letter-spacing: 0.02em;
	white-space: nowrap;
	text-align: center;
}
.mr-tagline--lg {
	font-size: 18px;
	font-weight: 600;
	line-height: 3;
	letter-spacing: 0.1em;
	color: var(--mr-gold, #ca9938) !important;
}

@media (min-width: 1200px) {
	.mr-tagline--lg {
		font-size: 20px;
	}
}
