/* ==========================================================================
   BLOCKS.CSS — Block-specific styles
   Global styles (typography, buttons, containers) are in style.css
   ========================================================================== */


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 100;
	transition: background var(--transition-base), box-shadow var(--transition-base);
	padding: 1.25rem 0;

	& .header-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	& .header-logo {
		position: relative;
		z-index: 101;
	}

	& .header-logo-wrap {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0.6rem 1rem;
		border-radius: var(--radius-pill);
		border-bottom-left-radius: 0;
		background: rgba(0, 0, 0, 0.08);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		transition: background var(--transition-base);

		& svg {
			width: auto;
			height: 32px;
		}
	}

	& .header-right {
		display: flex;
		align-items: center;
		gap: 0.75rem;
	}

	& .header-search-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		border-radius: 50%;
		transition: opacity var(--transition-fast);
		cursor: pointer;

		& svg {
			width: 24px;
			height: 24px;
		}

		&:hover {
			opacity: 0.7;
		}
	}

	& .header-cta {
		font-size: var(--fs-small);
		padding: 0.7em 1.75em;
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		background: rgba(255, 255, 255, 0.22);
		border: none;
		box-shadow: none;
		color: var(--color-white);
		overflow: visible;
		transition: background var(--transition-base), color var(--transition-base);

		&::before {
			display: none;
		}

		&:hover {
			background: rgba(255, 255, 255, 0.38);
			color: var(--color-white);
		}

		@media (max-width: 768px) {
			display: none;
		}
	}

	& .header-cta-2 {
		font-size: var(--fs-small);
		padding: 0.7em 1.75em;
		background: rgba(255, 255, 255, 0.22);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border: none;
		box-shadow: none;
		color: var(--color-white);
		overflow: visible;
		transition: background var(--transition-base), color var(--transition-base);

		&::before {
			display: none;
		}

		&:hover {
			background: rgba(255, 255, 255, 0.38);
			color: var(--color-white);
		}

		@media (max-width: 768px) {
			display: none;
		}
	}
}

/* Header: Dark style (white text — over hero/dark sections) */
.site-header[data-header-style="dark"] {
	color: var(--color-white);

	& .header-logo-wrap svg .cls-1 {
		fill: var(--color-white);
	}

	& .header-search-toggle {
		color: var(--color-white);
	}
}

/* Header: Light style (dark text — over light sections) */
.site-header[data-header-style="light"] {
	color: var(--color-black);

	& .header-logo-wrap svg .cls-1 {
		fill: var(--color-black);
		transition: fill var(--transition-base);
	}

	& .header-logo-wrap:hover svg .cls-1 {
		fill: var(--color-primary);
	}

	& .header-search-toggle {
		color: var(--color-black);
	}

	& .header-cta {
		background: rgba(0, 0, 0, 0.08);
		color: var(--color-black);

		&:hover {
			background: rgba(0, 0, 0, 0.15);
		}
	}

	& .header-cta-2 {
		background: var(--color-black);
		color: var(--color-white);

		&:hover {
			background: rgba(0, 0, 0, 0.7);
		}
	}
}

/* Scrolled state — removed: header is always transparent, colour is driven
   entirely by data-header-style which JS updates based on background beneath. */


/* ==========================================================================
   HAMBURGER
   ========================================================================== */

.header-hamburger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	cursor: pointer;
	position: relative;
	z-index: 101;

	& .hamburger-lines {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 6px;
		width: 32px;
		height: 32px;
	}

	& .hamburger-line {
		display: block;
		height: 2px;
		background: currentColor;
		transition: width var(--transition-base), transform var(--transition-base), opacity var(--transition-base);
		transform-origin: center;
	}

	& .hamburger-line-1 {
		width: 66%;
		margin-left: auto;
	}

	& .hamburger-line-2 {
		width: 100%;
	}

	& .hamburger-line-3 {
		width: 66%;
		margin-left: auto;
	}

	&:hover {
		& .hamburger-line-1,
		& .hamburger-line-3 {
			width: 100%;
		}
	}

	/* Active state */
	&.is-active {
		& .hamburger-line-1 {
			width: 100%;
			transform: translateY(8px) rotate(45deg);
		}

		& .hamburger-line-2 {
			opacity: 0;
		}

		& .hamburger-line-3 {
			width: 100%;
			transform: translateY(-8px) rotate(-45deg);
		}
	}
}


/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */

.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba(28, 28, 28, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition-base), visibility var(--transition-base);

	&.is-open {
		opacity: 1;
		visibility: visible;
	}

	& .search-overlay-close {
		position: absolute;
		top: 2rem;
		right: 2rem;
		color: var(--color-white);
		cursor: pointer;
		width: 48px;
		height: 48px;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: opacity var(--transition-fast);

		&:hover {
			opacity: 0.7;
		}
	}

	& .search-overlay-inner {
		width: 100%;
	}

	& .search-input {
		width: 100%;
		font-size: clamp(1.5rem, 4vw, 3rem);
		font-family: var(--font-heading);
		font-weight: 500;
		color: var(--color-white);
		background: transparent;
		border: none;
		border-bottom: 2px solid rgba(255, 255, 255, 0.2);
		padding: 0.5em 0;
		letter-spacing: var(--ls-heading);

		&::placeholder {
			color: rgba(255, 255, 255, 0.3);
		}

		&:focus {
			border-bottom-color: var(--color-white);
			outline: none;
		}
	}

	& .search-results {
		margin-top: 2rem;
		max-height: 50vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	& .search-result-item {
		display: block;
		padding: 1rem 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		color: var(--color-white);
		transition: opacity var(--transition-fast);

		&:hover {
			opacity: 0.7;
		}

		& .search-result-type {
			font-size: var(--fs-eyebrow);
			text-transform: uppercase;
			letter-spacing: 0.1em;
			opacity: 0.5;
			margin-bottom: 0.25em;
		}

		& .search-result-title {
			font-family: var(--font-heading);
			font-weight: 500;
			font-size: 1.125rem;
			margin-bottom: 0.25em;
		}

		& .search-result-excerpt {
			font-size: var(--fs-small);
			opacity: 0.6;
		}
	}

	& .search-no-results {
		color: rgba(255, 255, 255, 0.5);
		padding: 1rem 0;
	}
}


/* ==========================================================================
   OFF-CANVAS MENU
   ========================================================================== */

.offcanvas-menu {
	position: fixed;
	top: 0;
	right: 0;
	width: min(560px, 92vw);
	height: 100vh;
	background: var(--color-white);
	z-index: 150;
	transform: translateX(100%);
	transition: transform var(--transition-base);
	overflow-y: auto;
	display: flex;
	flex-direction: column;

	&.is-open {
		transform: translateX(0);
	}

	& .offcanvas-inner {
		padding: 1.5rem 2rem 2rem;
		flex: 1;
		display: flex;
		flex-direction: column;
	}

	& .offcanvas-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 3rem;
	}

	& .offcanvas-logo svg {
		height: 30px;
		width: auto;

		& .cls-1 {
			fill: var(--color-primary);
		}
	}

	& .offcanvas-close {
		color: var(--color-black);
		cursor: pointer;
		width: 48px;
		height: 48px;
		display: flex;
		align-items: center;
		justify-content: center;

		&:hover {
			opacity: 0.6;
		}
	}

	& .offcanvas-menu-list {
		list-style: none;
		padding: 0;
		margin: 0;

		& li {
			border-bottom: 1px solid var(--color-alt-bg);
		}

		& a {
			display: block;
			padding: 1rem 0;
			font-family: var(--font-heading);
			font-size: 1.25rem;
			font-weight: 500;
			position: relative;
			transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
				padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);

			&::before {
				content: '';
				position: absolute;
				left: 0;
				top: 50%;
				transform: translateY(-50%);
				width: 0;
				height: 2px;
				background: var(--color-primary);
				border-radius: 1px;
				transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
			}

			&:hover {
				color: var(--color-primary);
				padding-left: 1.5rem;

				&::before {
					width: 1rem;
				}
			}
		}

		/* Top-level items only get the effect */
		& > li > a {
			font-size: 1.25rem;
		}

		/* Parent items with sub-menus: row layout for link + toggle */
		& > li.menu-item-has-children {
			display: flex;
			flex-wrap: wrap;

			& > a {
				flex: 1;
				min-width: 0;
			}
		}

		/* Arrow toggle button */
		& .submenu-toggle {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 48px;
			cursor: pointer;
			color: var(--color-black);
			transition: color var(--transition-fast);

			& svg {
				transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
			}

			&:hover {
				color: var(--color-primary);
			}

			&.is-open svg {
				transform: rotate(180deg);
			}
		}

		& .sub-menu {
			width: 100%;
			padding-left: 1.5rem;
			overflow: hidden;
			max-height: 0;
			transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);

			&.is-open {
				max-height: 500px;
			}

			& li:last-child a {
				border-bottom: none;
			}

			& li:last-child {
				border-bottom: none;
			}

			& a {
				font-size: 1rem;
				font-weight: 400;

				&::before {
					height: 1.5px;
				}

				&:hover {
					padding-left: 1.25rem;

					&::before {
						width: 0.75rem;
					}
				}
			}
		}
	}

	& .offcanvas-ctas {
		margin-top: auto;
		padding-top: 2rem;
		display: flex;
		gap: 0.75rem;
		flex-wrap: wrap;
	}
}

.offcanvas-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(28, 28, 28, 0.5);
	z-index: 140;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition-base), visibility var(--transition-base);

	&.is-open {
		opacity: 1;
		visibility: visible;
	}
}


/* ==========================================================================
   HERO BLOCK
   ========================================================================== */

.block-hero {
	position: relative;
	width: 100%;
	height: max(560px, 100dvh);
	overflow: hidden;

	& .hero-slider {
		position: absolute;
		inset: 0;
	}

	& .hero-slide {
		position: absolute;
		inset: 0;
		opacity: 0;
		transition: opacity 1s ease;
		z-index: 1;

		&.is-active {
			opacity: 1;
			z-index: 2;
		}
	}

	& .hero-slide-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
		will-change: transform;
		transform: translateY(0) scale(1.15);
	}

	& .hero-slide-overlay {
		position: absolute;
		inset: 0;
		background:
			linear-gradient(to bottom, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0) 14%),
			linear-gradient(to right, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.32) 100%);
	}

	& .hero-slide-content {
		position: relative;
		z-index: 3;
		height: 100%;
		display: flex;
		align-items: center;
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: clamp(8rem, 14vw, 12rem);

		@media (max-height: 750px) {
			padding-bottom: clamp(3.5rem, 6vh, 6rem);
		}
	}

	& .hero-slide-text {
		max-width: 60%;

		@media (max-width: 768px) {
			max-width: none;
		}
	}

	& .hero-title {
		color: var(--color-cream);
		font-size: clamp(2.75rem, 5vw, 8rem);
		line-height: 1.0;
		letter-spacing: -0.01em;
		margin-bottom: 2rem;
	}

	& .hero-subtitle {
		color: var(--color-cream);
		font-family: var(--font-heading);
		font-size: clamp(1.125rem, 1.75vw, 1.5rem);
		opacity: 0.85;
		line-height: 1.6;
	}

	/* Contact toggle */
	& .hero-contact-toggle {
		position: relative;
		display: inline-flex;
		align-items: center;
		border-radius: var(--radius-pill);
		background: var(--color-cream);
		padding: 6px;
		margin-top: 1.5rem;
	}

	& .hero-contact-slider {
		position: absolute;
		top: 6px;
		bottom: 6px;
		border-radius: var(--radius-pill);
		background: var(--color-primary);
		transition: left var(--transition-base), width var(--transition-base);
		pointer-events: none;
		z-index: 1;
	}

	& .hero-contact-option {
		position: relative;
		z-index: 2;
		padding: 0.8em 3em;
		border-radius: var(--radius-pill);
		font-family: var(--font-heading);
		font-size: clamp(1rem, 1.2vw, 1.125rem);
		font-weight: 600; 
		color: var(--color-black);
		text-decoration: none;
		white-space: nowrap;
		transition: color var(--transition-base);
	}

	/* Active option (under the slider) gets cream text */
	& .hero-contact-toggle[data-active="email"] .hero-contact-option[data-option="email"],
	& .hero-contact-toggle[data-active="phone"] .hero-contact-option[data-option="phone"] {
		color: var(--color-cream);
	}

	/* Dot Navigation */
	& .hero-dots {
		position: absolute;
		right: 2rem;
		top: 50%;
		transform: translateY(-50%);
		z-index: 10;
		display: flex;
		flex-direction: column;
		gap: 1rem;

		@media (max-width: 768px) {
			right: 1rem;
		}
	}

	& .hero-dot {
		width: 15px;
		height: 15px;
		border-radius: 50%;
		border: none;
		box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
		background: transparent;
		cursor: pointer;
		padding: 0;
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		transition: box-shadow var(--transition-fast);

		& span {
			display: block;
			width: 100%;
			height: 100%;
			border-radius: 50%;
			background: transparent;
			transition: background var(--transition-fast);
		}

		&.is-active {
			box-shadow: inset 0 0 0 2px var(--color-white);

			& span {
				background: var(--color-white);
			}
		}

		&:hover {
			box-shadow: inset 0 0 0 2px var(--color-white);
		}
	}

	/* Quick Links */
	& .hero-quick-links {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 10;
		padding: clamp(1.25rem, 2.5vw, 2.5rem) 0;
		border-top: 1px solid rgba(255, 255, 255, 0.15);

		@media (max-width: 750px) {
			display: none;
		}

		@media (max-height: 750px) {
			padding: 0.75rem 0;
		}
	}

	& .hero-quick-links-inner {
		position: relative;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	/* Sliding hover indicator line */
	& .hero-nav-indicator {
		position: absolute;
		top: -2px;
		height: 3px;
		background: var(--color-cream);
		border-radius: 2px;
		transition: left var(--transition-base), width var(--transition-base), opacity var(--transition-base);
		pointer-events: none;
		opacity: 0;
	}

	& .hero-quick-link {
		position: relative;
		font-family: var(--font-heading);
		font-size: var(--fs-body);
		font-weight: 500;
		color: var(--color-cream);
		opacity: 0.85;
		transition: opacity var(--transition-fast);
		letter-spacing: 0.01em;

		@media (max-height: 750px) {
			font-size: var(--fs-small);
		}

		&:hover {
			opacity: 1;
		}
	}

	/* Slide-change entrance animations */
	& .hero-slide:not(.is-active) .hero-title,
	& .hero-slide:not(.is-active) .hero-subtitle,
	& .hero-slide:not(.is-active) .hero-contact-toggle {
		opacity: 0;
	}

	& .hero-slide.is-active .hero-title {
		animation: heroPanIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
	}

	& .hero-slide.is-active .hero-subtitle {
		animation: heroPanIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
	}

	& .hero-slide.is-active .hero-contact-toggle {
		animation: heroPanIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
	}
}

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


/* ==========================================================================
   CUSTOM HTML BLOCK
   ========================================================================== */

.custom-html {
	/* Padding classes handled globally in style.css (.block.padding-*) */

	& iframe {
		width: 100%;
		border: none;
	}
}


/* ==========================================================================
   CONTACT BLOCK
   ========================================================================== */

.block-contact {
	& .contact-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(2.5rem, 6vw, 7rem);
		align-items: start;

		@media (max-width: 900px) {
			grid-template-columns: 1fr;
		}
	}

	& .contact-details {
		& h1, & h2 {
			margin-bottom: 0.75em;
		}

		& .subtitle {
			margin-bottom: 3rem;
		}
	}

	/* Contact detail cards */
	& .contact-cards {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(2rem, 3vw, 3rem);
		border-top: 1px solid rgba(28, 28, 28, 0.15);
		padding-top: 2rem;
		margin-top: 2rem;

		@media (max-width: 600px) {
			grid-template-columns: 1fr;
		}
	}

	& .contact-cards-col {
		display: flex;
		flex-direction: column;
		gap: 2rem;
	}

	& .contact-card {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		text-decoration: none;
		color: inherit;
	}

	a.contact-card {
		cursor: pointer;
	}

	& .contact-card-header {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	}

	& .contact-card-icon {
		display: inline-flex;
		align-items: center;
		color: var(--color-primary);
		flex-shrink: 0;

		& svg {
			width: 18px;
			height: 18px;
		}
	}

	& .contact-card-label {
		font-family: var(--font-heading);
		font-size: 0.95rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		color: var(--color-primary);
	}

	& .contact-card-value {
		font-size: var(--fs-body);
		line-height: 1.6;
		color: var(--color-black);
	}

	& .contact-form-wrap {
		background: var(--color-alt-bg);
		padding: clamp(2.5rem, 4vw, 4rem);

		& .contact-form-title {
			margin-bottom: 1.75rem;
			font-size: var(--fs-h3);
		}
	}

	& .contact-map-wrap {
		margin-top: clamp(3rem, 5vw, 5rem);
		overflow: hidden;

		& iframe {
			width: 100%;
			height: 650px;
			border: none;
			display: block;

			@media (max-width: 600px) {
				height: 400px;
			}
		}
	}
}


/* ==========================================================================
   IMAGE BLOCK
   ========================================================================== */

.block-image {
	/* Remove block padding when full-width with fixed height */
	&.imgb-width-full {
		padding-top: 0;
		padding-bottom: 0;
	}

	& .imgb-wrap {
		position: relative;
		overflow: hidden;
		line-height: 0;
	}

	& img {
		display: block;
		width: 100%;
		height: auto;
	}

	/* --- Background-image rendering for fixed heights & parallax --- */
	& .imgb-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
	}

	& .imgb-parallax {
		will-change: transform;
		transform: translateY(0) scale(1.15);
	}

	/* Auto height with parallax needs a fixed aspect ratio container */
	&.imgb-height-auto .imgb-parallax {
		position: relative;
		padding-bottom: 50%;
	}

	/* --- Height variants --- */
	&.imgb-height-medium .imgb-wrap { height: 50vh; }
	&.imgb-height-tall .imgb-wrap   { height: 75vh; }
	&.imgb-height-fullscreen .imgb-wrap {
		height: 100vh;
		height: 100dvh;
	}

	/* --- Overlays --- */
	& .imgb-overlay {
		position: absolute;
		inset: 0;
		pointer-events: none;
	}

	& .imgb-overlay-light  { background: rgba(0, 0, 0, 0.2); }
	& .imgb-overlay-medium { background: rgba(0, 0, 0, 0.4); }
	& .imgb-overlay-dark   { background: rgba(0, 0, 0, 0.6); }

	/* --- Caption --- */
	& .imgb-caption {
		position: absolute;
		z-index: 3;
		color: var(--color-white);
		max-width: 700px;
	}

	& .imgb-caption-title {
		color: inherit;
		font-size: clamp(1.5rem, 3vw, 3rem);
		margin: 0;
	}

	& .imgb-caption-sub {
		color: inherit;
		opacity: 0.85;
		font-size: clamp(1rem, 1.5vw, 1.25rem);
		margin: 0.5em 0 0;
	}

	/* Caption positions */
	&.imgb-caption-center .imgb-caption {
		inset: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		padding: 2rem;
	}

	&.imgb-caption-bottom-left .imgb-caption {
		bottom: 0;
		left: 0;
		padding: clamp(1.5rem, 3vw, 3rem);
	}

	&.imgb-caption-bottom-center .imgb-caption {
		bottom: 0;
		left: 0;
		right: 0;
		text-align: center;
		padding: clamp(1.5rem, 3vw, 3rem);
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	/* Contained width gets block padding back */
	&.imgb-width-contained {
		& .imgb-wrap {
			border-radius: var(--radius-sm, 0);
		}
	}
}


/* ==========================================================================
   TEXT & IMAGE GRID BLOCK
   ========================================================================== */

.block-tig {

	& .tig-title {
		margin-bottom: clamp(2.5rem, 4vw, 4rem);
	}

	& .tig-item-image {
		overflow: hidden;

		& img {
			display: block;
			width: 100%;
			height: auto;
			object-fit: cover;
		}
	}

	& .tig-item-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 1rem;
	}

	& .tig-item-subtitle {
		font-size: var(--fs-h3);
		margin: 0;
	}

	& .tig-item-desc {
		line-height: 1.7;

		& p:last-child { margin-bottom: 0; }
	}

	& .btn {
		align-self: flex-start;
		margin-top: 0.5rem;
	}
}

/* --- 1-Column layout: image beside text, alternating --- */
.tig-1col {

	& .tig-grid {
		display: flex;
		flex-direction: column;
		gap: clamp(4rem, 6vw, 7rem);
	}

	& .tig-item {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(2rem, 4vw, 4rem);
		align-items: center;

		@media (max-width: 768px) {
			grid-template-columns: 1fr;
		}
	}

	& .tig-item--img-right {
		& .tig-item-image { order: 2; }
		& .tig-item-content { order: 1; }

		@media (max-width: 768px) {
			& .tig-item-image { order: -1; }
			& .tig-item-content { order: 0; }
		}
	}
}

/* --- 2-Column layout: image top, text below --- */
.tig-2col {

	& .tig-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: clamp(2rem, 3vw, 3rem);

		@media (max-width: 768px) {
			grid-template-columns: 1fr;
		}
	}

	& .tig-item {
		display: flex;
		flex-direction: column;
	}

	& .tig-item-content {
		padding-top: clamp(1.25rem, 2vw, 2rem);
	}
}

/* --- Image aspect ratio variants --- */
.tig-ratio-1-1 .tig-item-image  { aspect-ratio: 1 / 1; }
.tig-ratio-4-3 .tig-item-image  { aspect-ratio: 4 / 3; }
.tig-ratio-3-2 .tig-item-image  { aspect-ratio: 3 / 2; }
.tig-ratio-16-9 .tig-item-image { aspect-ratio: 16 / 9; }
.tig-ratio-21-9 .tig-item-image { aspect-ratio: 21 / 9; }

.tig-ratio-1-1 .tig-item-image img,
.tig-ratio-4-3 .tig-item-image img,
.tig-ratio-3-2 .tig-item-image img,
.tig-ratio-16-9 .tig-item-image img,
.tig-ratio-21-9 .tig-item-image img {
	height: 100%;
	object-fit: cover;
}

/* Match text height — image stretches to fill the grid row (1-col only) */
.tig-1col.tig-ratio-match {
	& .tig-item { align-items: stretch; }

	& .tig-item-image {
		& img {
			height: 100%;
			object-fit: cover;
		}
	}
}


/* ==========================================================================
   SPACER BLOCK
   ========================================================================== */

.block-spacer {
	/* No padding — height is set inline via style attribute */
	&.bg-white   { background: var(--color-white); }
	&.bg-cream   { background: var(--color-cream); }
	&.bg-alt     { background: var(--color-alt-bg); }
	&.bg-primary { background: var(--color-primary); }
	&.bg-dark    { background: var(--color-dark-gray); }
}


/* ==========================================================================
   CTA BLOCK — Inline (Style 1)
   ========================================================================== */

.cta-inline {
	background-color: var(--color-cream);

	& .cta-inner {
		text-align: center;
		padding: clamp(4rem, 7vw, 7rem) clamp(1.5rem, 4vw, 4rem);
		min-height: clamp(380px, 50vw, 620px);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: clamp(1.5rem, 2.6vw, 2.5rem);
		position: relative;
		overflow: hidden;
	}

	& .eyebrow {
		display: block;
		margin: 0;
		position: relative;
		z-index: 1;
	}

	& h2 {
		margin: 0;
		position: relative;
		z-index: 1;
	}

	& .subtitle {
		margin: 0;
		max-width: 600px;
		position: relative;
		z-index: 1;
	}

	& .cta-inner a.btn {
		margin-top: clamp(0.75rem, 1.5vw, 1.5rem);
		position: relative;
		z-index: 1;

		@media (min-width: 768px) {
			font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
			padding: 1em 3em;
		}
	}

	/* Keep primary hover colour on light CTA backgrounds */
	&.cta-cream,
	&.cta-white,
	&.cta-alt {
		& .btn:not(.btn-outline-white):not(.btn-outline-primary):hover {
			color: var(--color-primary);
			box-shadow: inset 0 0 0 2px var(--color-primary);
		}
	}

	/* Cream background (default) — inner matches outer */
	&.cta-cream .cta-inner {
		background-color: var(--color-cream);
	}

	/* White background */
	&.cta-white .cta-inner {
		background-color: var(--color-white);
	}

	/* Alt background */
	&.cta-alt .cta-inner {
		background-color: var(--color-alt-bg);
	}

	/* Primary background */
	&.cta-primary .cta-inner {
		background-color: var(--color-primary);
		color: var(--color-white);

		& h2 { color: var(--color-white); }
		& .eyebrow { color: rgba(255, 255, 255, 0.7); }

		/* Pattern overlay */
		&::before {
			content: '';
			position: absolute;
			inset: 0;
			background: url('../images/pattern.svg') center / cover no-repeat;
			opacity: 0.4;
			pointer-events: none;
			z-index: 0;
			mix-blend-mode: hard-light;
		}
	}

	/* Dark background */
	&.cta-dark .cta-inner {
		background-color: var(--color-dark-gray);
		color: var(--color-white);

		& h2 { color: var(--color-white); }
		& .eyebrow { color: rgba(255, 255, 255, 0.7); }

		/* Pattern overlay */
		&::before {
			content: '';
			position: absolute;
			inset: 0;
			background: url('../images/pattern.svg') center / cover no-repeat;
			opacity: 0.4;
			pointer-events: none;
			z-index: 0;
			mix-blend-mode: hard-light;
		}
	}
}


/* ==========================================================================
   CTA BLOCK — Full Screen (Style 2)
   Now a direct .block.block-cta.cta-fullscreen section (no wrapper).
   Scroll-expand animation drives --cta-inset via JS.
   ========================================================================== */

.cta-fullscreen {
	--cta-inset: clamp(16px, 3vw, 40px);

	min-height: calc(100vh - var(--cta-inset) * 2);
	min-height: calc(100dvh - var(--cta-inset) * 2);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: var(--cta-inset);
	padding: 0;
	will-change: margin;

	& .cta-fullscreen-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
		will-change: transform;
		transform: translateY(0) scale(1.15);
	}

	& .cta-fullscreen-overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
	}

	& .cta-fullscreen-content {
		position: relative;
		z-index: 2;
		width: 100%;
	}

	& .cta-inner {
		padding: clamp(5rem, 9vw, 9rem) clamp(1.5rem, 4vw, 4rem);
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: clamp(1.5rem, 2.5vw, 2.25rem);

		& .eyebrow { display: block; margin: 0; }
		& h2 { margin: 0; max-width: 1500px; }
		& .subtitle { margin: 0; max-width: 1000px; }
		& .btn,
		& .button { margin-top: 0.75rem; }
	}

	/* === With background image: cream card on narrow container === */
	&.has-bg-image {
		& .cta-inner {
			background: var(--color-cream);
			color: var(--color-black);

			& h2 { color: var(--color-black); }
			& .eyebrow { color: var(--color-primary); }
			& .subtitle { color: var(--color-black); opacity: 0.75; }
		}
	}

	/* === Without image: solid bg colour fills the full section === */
	&:not(.has-bg-image) {
		& .cta-inner {
			background: none;
		}
	}

	/* --- BG colour variants (no image) --- */
	&.cta-fs-cream:not(.has-bg-image) {
		background-color: var(--color-cream);
	}

	&.cta-fs-white:not(.has-bg-image) {
		background-color: var(--color-white);
	}

	&.cta-fs-alt:not(.has-bg-image) {
		background-color: var(--color-alt-bg);
	}

	&.cta-fs-primary:not(.has-bg-image) {
		background-color: var(--color-primary);

		& .cta-inner {
			color: var(--color-white);
			& h2 { color: var(--color-white); }
			& .eyebrow { color: rgba(255, 255, 255, 0.7); }
		}
	}

	&.cta-fs-dark:not(.has-bg-image) {
		background-color: var(--color-dark-gray);

		& .cta-inner {
			color: var(--color-white);
			& h2 { color: var(--color-white); }
			& .eyebrow { color: rgba(255, 255, 255, 0.7); }
		}
	}
}


/* ==========================================================================
   CONTENT GRID BLOCK
   ========================================================================== */

.block-content-grid {
	& .content-grid-header {
		margin-bottom: clamp(2.5rem, 5vw, 5rem);
		max-width: 900px;

		& h2 {
			margin-bottom: 0.5em;
		}

		& .subtitle {
			max-width: 700px;
		}
	}

	& .content-grid {
		display: grid;
		gap: clamp(2.5rem, 3.5vw, 4rem);

		&.grid-cols-2 {
			grid-template-columns: repeat(2, 1fr);

			@media (max-width: 700px) {
				grid-template-columns: 1fr;
			}
		}

		&.grid-cols-3 {
			grid-template-columns: repeat(3, 1fr);

			@media (max-width: 900px) {
				grid-template-columns: repeat(2, 1fr);
			}

			@media (max-width: 600px) {
				grid-template-columns: 1fr;
			}
		}

		&.grid-cols-4 {
			grid-template-columns: repeat(4, 1fr);

			@media (max-width: 1000px) {
				grid-template-columns: repeat(2, 1fr);
			}

			@media (max-width: 600px) {
				grid-template-columns: 1fr;
			}
		}
	}

	& .content-grid-item {
		display: flex;
		flex-direction: column;

		& h2 {
			margin-bottom: 0.4em;
		}

		& h3 {
			margin-bottom: 0.75em;
		}
	}

	& .content-grid-item-body {
		flex: 1;
	}

	& .content-grid-item-link {
		margin-top: 0.25rem;
	}
}


/* ==========================================================================
   TESTIMONIALS BLOCK
   ========================================================================== */

.block-testimonials {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;

	& .testimonials-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
		will-change: transform;
		transform: translateY(0) scale(1.15);
	}

	& .testimonials-bg-solid {
		background: var(--color-dark-gray);
	}

	& .testimonials-overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.6);
	}

	& .testimonials-content {
		position: relative;
		z-index: 2;
		width: 100%;
		text-align: center;
		color: var(--color-cream);
		padding: var(--block-padding-y) 0;
	}

	& .testimonials-quote-icon {
		margin-bottom: 2rem;
		opacity: 0.3;

		& svg {
			margin: 0 auto;
		}
	}

	& .testimonials-slider {
		position: relative;
		min-height: 200px;
	}

	& .testimonials-slide {
		opacity: 0;
		visibility: hidden;
		position: absolute;
		inset: 0;
		transition: opacity 0.6s ease, visibility 0.6s ease;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		&.is-active {
			opacity: 1;
			visibility: visible;
			position: relative;
		}
	}

	& .testimonials-quote-text {
		font-family: var(--font-heading);
		font-size: clamp(1.5rem, 3vw, 2.75rem);
		font-weight: 500;
		line-height: 1.35;
		letter-spacing: -0.02em;
		max-width: 900px;
		margin: 0 auto 2rem;
	}

	& .testimonials-cite {
		& strong {
			display: block;
			font-family: var(--font-heading);
			font-size: var(--fs-body);
			font-weight: 600;
			margin-bottom: 0.25em;
		}

		& span {
			font-size: var(--fs-body);
			opacity: 0.6;
		}
	}

	& .testimonials-dots {
		display: flex;
		justify-content: center;
		gap: 0.75rem;
		margin-top: 3rem;
	}

	& .testimonials-dot {
		width: 15px;
		height: 15px;
		border-radius: 50%;
		border: none;
		box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
		background: transparent;
		cursor: pointer;
		padding: 0;
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		transition: box-shadow var(--transition-fast);

		& span {
			display: block;
			width: 100%;
			height: 100%;
			border-radius: 50%;
			transition: background var(--transition-fast);
		}

		&.is-active {
			box-shadow: inset 0 0 0 2px var(--color-white);

			& span {
				background: var(--color-white);
			}
		}

		&:hover {
			box-shadow: inset 0 0 0 2px var(--color-white);
		}
	}
}


/* ==========================================================================
   ACCORDION BLOCK
   ========================================================================== */

.block-accordion {
	/* 50:50 layout */
	& .accordion-columns {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(2rem, 5vw, 5rem);
		align-items: start;

		@media (max-width: 900px) {
			grid-template-columns: 1fr;
		}
	}

	& .accordion-text-col {
		& h2 {
			margin-bottom: 0.75em;
		}
	}

	/* Text top header */
	& .accordion-header {
		margin-bottom: clamp(2.5rem, 5vw, 4rem);
		max-width: 700px;

		& h2 {
			margin-bottom: 0.5em;
		}
	}

	/* 2-column accordion grid */
	& .accordion-2col-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(1.5rem, 3vw, 2.5rem);
		align-items: start;

		@media (max-width: 768px) {
			grid-template-columns: 1fr;
		}
	}

	/* Accordion items */
	& .accordion-item {
		border-bottom: 1px solid var(--color-alt-bg);
	}

	& .accordion-trigger {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 1.375rem 0;
		font-family: var(--font-heading);
		font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
		font-weight: 500;
		text-align: left;
		cursor: pointer;
		transition: color var(--transition-fast);
		gap: 1rem;

		&:hover {
			color: var(--color-primary);
		}

		&[aria-expanded="true"] {
			& .accordion-icon::after {
				transform: translate(-50%, -32%) rotate(-135deg);
			}
		}
	}

	& .accordion-icon {
		position: relative;
		width: 28px;
		height: 28px;
		flex-shrink: 0;
		border-radius: 50%;
		background: var(--color-alt-bg);
		transition: background var(--transition-fast);

		&::before {
			display: none;
		}

		&::after {
			content: '';
			position: absolute;
			background: none;
			width: 7px;
			height: 7px;
			border-right: 2px solid var(--color-dark-gray);
			border-bottom: 2px solid var(--color-dark-gray);
			top: 50%;
			left: 50%;
			transform: translate(-50%, -68%) rotate(45deg);
			transition: transform var(--transition-base);
		}
	}

	/* On alt-bg: use cream circle, slightly darker arrow */
	&.bg-alt {
		& .accordion-item {
			border-bottom-color: rgba(0, 0, 0, 0.1);
		}

		& .accordion-icon {
			background: var(--color-cream);
		}
	}

	& .accordion-panel {
		overflow: hidden;
		max-height: 0;
		transition: max-height var(--transition-base);
	}

	& .accordion-panel-inner {
		padding-bottom: 1.5rem;

		& .accordion-read-more {
			margin-top: 1.25rem;
			text-decoration: none;
		}
	}
}


/* ==========================================================================
   LOGO SLIDER (Footer)
   ========================================================================== */

.block-logo-slider {

	& .logo-slider-title {
		text-align: center;
		margin-bottom: clamp(2rem, 4vw, 3rem);
	}

	& .logo-slider-carousel {
		position: relative;
		overflow: hidden;
	}

	& .logo-slider-track {
		display: flex;
	}

	& .logo-slider-item {
		flex: 0 0 calc(100% / var(--logo-visible, 5));
		display: flex;
		align-items: center;
		justify-content: center;
		height: 80px;
		padding: 0 clamp(0.75rem, 1.5vw, 1.5rem);
		transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
		/* Local background matches the block — required for mix-blend-mode to work
		   when a CSS transform on the track creates a new compositing layer */
		background-color: var(--logo-item-bg, transparent);

		& img {
			max-height: 70px;
			max-width: min(150px, 85%);
			width: auto;
			height: auto;
			object-fit: contain;
			margin: 0 !important;
			mix-blend-mode: var(--logo-blend, normal);
		}
	}

	/* Set the local background + blend mode per block background variant so the
	   blending is always computed against the correct surface colour. */
	&.bg-cream {
		--logo-item-bg: var(--color-cream);
		--logo-blend: multiply;
	}

	&.bg-white {
		--logo-item-bg: var(--color-white);
		--logo-blend: multiply;
	}

	&.bg-alt {
		--logo-item-bg: var(--color-alt-bg);
		--logo-blend: multiply;
	}

	&.bg-dark {
		--logo-item-bg: var(--color-dark-gray);
		--logo-blend: screen;
	}

	& .logo-slider-arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 2.5rem;
		height: 2.5rem;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.12);
		color: var(--color-white);
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		border: 1px solid rgba(255, 255, 255, 0.2);
		transition: background var(--transition-fast), opacity var(--transition-fast);
		z-index: 2;

		&:hover {
			background: rgba(255, 255, 255, 0.25);
		}

		&.is-disabled {
			opacity: 0.25;
			pointer-events: none;
		}
	}

	& .logo-slider-prev {
		left: 0.5rem;
	}

	& .logo-slider-next {
		right: 0.5rem;
	}

	/* Light background variants */
	&:not(.bg-dark) .logo-slider-arrow {
		background: rgba(0, 0, 0, 0.06);
		color: var(--color-black);
		border-color: rgba(0, 0, 0, 0.1);

		&:hover {
			background: rgba(0, 0, 0, 0.12);
		}
	}
}

@media (max-width: 900px) {
	.block-logo-slider .logo-slider-prev {
		left: 0.25rem;
	}
	.block-logo-slider .logo-slider-next {
		right: 0.25rem;
	}
}

@media (max-width: 600px) {
	.block-logo-slider .logo-slider-arrow {
		display: none;
	}
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
	background: var(--color-dark-gray);
	color: var(--color-white);
	padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);

	& .footer-grid {
		display: grid;
		grid-template-columns: 1.4fr 1fr 1fr auto;
		gap: clamp(3rem, 5vw, 6rem);

		@media (max-width: 960px) {
			grid-template-columns: 1fr 1fr;
			gap: 3rem;
		}

		@media (max-width: 600px) {
			grid-template-columns: 1fr;
			gap: 3rem;
		}
	}

	& .footer-logo {
		margin-bottom: 1.75rem;

		& svg {
			height: 95px;
			width: auto;

			& .cls-1 {
				fill: var(--color-white);
			}
		}
	}

	& .footer-about-text p {
		opacity: 0.7;
		font-size: var(--fs-body);
		line-height: 1.8;
		margin-bottom: 0.4em;

		&:last-child {
			margin-bottom: 0;
		}
	}

	& .footer-col {
		& p {
			opacity: 0.7;
			font-size: var(--fs-body);
			line-height: 1.8;
		}

		& h4 {
			color: var(--color-white);
			font-size: var(--fs-h4);
			margin-bottom: 1.25rem;
			letter-spacing: 0.01em;
		}

		& a:not(.btn) {
			transition: opacity var(--transition-fast);

			&:hover {
				opacity: 0.6;
			}
		}
	}

	/* CTA buttons under about */
	& .footer-cta-wrap {
		display: flex;
		flex-wrap: wrap;
		gap: 0.75rem;
		margin-top: 2rem;
	}

	/* Social icons row */
	& .footer-social {
		display: flex;
		gap: 1rem;

		& a {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 50px;
			height: 50px;
			border-radius: 50%;
			background: rgba(255, 255, 255, 0.08);
			color: var(--color-white);
			opacity: 1;
			transition: background var(--transition-fast);

			&:hover {
				background: rgba(255, 255, 255, 0.22);
				opacity: 1;
			}
		}
	}

	/* Icon + text detail rows */
	& .footer-detail {
		display: flex;
		align-items: flex-start;
		gap: 0.75rem;
		margin-bottom: 1.25rem;

		& svg {
			flex-shrink: 0;
			margin-top: 0.35em;
			opacity: 0.5;
		}

		& a,
		& p {
			font-size: var(--fs-body);
			line-height: 1.8;
			opacity: 0.7;
			margin: 0;
		}

		& a:hover {
			opacity: 1;
		}
	}

	& .footer-rics-logo {
		margin-top: 1.5rem;
		max-width: 160px;
		height: auto !important;
		opacity: 0.9;
	}

	& .footer-social-col {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
	}

	& .footer-opening-times p {
		white-space: nowrap;
	}
}


/* ==========================================================================
   COPYRIGHT BAR
   ========================================================================== */

.copyright-bar {
	background: var(--color-dark-gray);
	color: var(--color-white);
	padding: 2rem 0 2.5rem;
	font-size: var(--fs-small);

	& .copyright-inner {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1.5rem;
		flex-wrap: wrap;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		padding-top: 2rem;

		@media (max-width: 600px) {
			flex-direction: column;
			text-align: center;
		}
	}

	& .copyright-text {
		opacity: 0.5;
	}

	& .copyright-links {
		display: flex;
		gap: 2rem;

		& a {
			opacity: 0.5;
			transition: opacity var(--transition-fast);

			&:hover {
				opacity: 1;
			}
		}
	}
}


/* ==========================================================================
   IMAGE CARDS BLOCK
   ========================================================================== */

.block-image-cards {

	& .image-cards-header {
		margin-bottom: clamp(2.5rem, 5vw, 5rem);

		& .eyebrow {
			margin-bottom: 0.75em;
		}

		& h2 {
			margin-bottom: 0.5em;
		}

		& .subtitle {
			max-width: 800px;
		}

		&.image-cards-header--center {
			text-align: center;

			& .subtitle {
				max-width: 800px;
				margin-left: auto;
				margin-right: auto;
			}
		}
	}

	& .image-cards-grid {
		display: grid;
		gap: clamp(1.25rem, 2.25vw, 2.25rem);

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

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

		@media (max-width: 540px) {
			grid-template-columns: 1fr !important;
		}
	}

	/* ---- Aspect ratio variants ---- */
	& .image-card-media {
		overflow: hidden;
		width: 100%;

		[data-ratio="9-16"]  & { aspect-ratio: 9 / 16; }
		[data-ratio="3-4"]   & { aspect-ratio: 3 / 4; }
		[data-ratio="1-1"]   & { aspect-ratio: 1 / 1; }
		[data-ratio="4-3"]   & { aspect-ratio: 4 / 3; }
		[data-ratio="16-9"]  & { aspect-ratio: 16 / 9; }
	}

	/* ---- Card ---- */
	& .image-card {
		display: flex;
		flex-direction: column;
		text-decoration: none;
		color: inherit;
		position: relative;
		overflow: hidden;

		& .image-card-media {
			position: relative;
			flex: 1 1 auto;
			z-index: 0;

			& img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				display: block;
				transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
			}
		}

		/* Hover overlay (linked cards only) */
		&.image-card--linked .image-card-media::after {
			content: '';
			position: absolute;
			inset: 0;
			background: var(--color-primary);
			opacity: 0;
			mix-blend-mode: multiply;
			transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
			z-index: 1;
		}

		&.image-card--linked .image-card-hover {
			position: absolute;
			inset: 0;
			z-index: 2;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			gap: 1.25rem;
			padding: 1.5rem;
			pointer-events: none;
			opacity: 0;
			transform: translateY(10px);
			transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
				transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
		}

		&.image-card--linked .image-card-hover-title {
			font-family: var(--font-heading);
			font-weight: var(--fw-heading);
			font-size: var(--fs-h4);
			line-height: var(--lh-heading);
			color: var(--color-cream);
			text-align: center;
		}

		&.image-card--linked .image-card-hover-btn {
			display: inline-block;
			padding: 0.65em 2em;
			border: none;
			box-shadow: inset 0 0 0 2px var(--color-cream);
			border-radius: var(--radius-pill);
			color: var(--color-cream);
			background: transparent;
			font-family: var(--font-heading);
			font-weight: 600;
			font-size: var(--fs-small);
			letter-spacing: 0.02em;
			-webkit-backface-visibility: hidden;
			backface-visibility: hidden;
			transition: background var(--transition-fast), color var(--transition-fast);
		}

		& .image-card-body {
			max-height: 120px; /* enough for title + subtitle */
			overflow: hidden;
			transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
				padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
				opacity 0.4s ease;
		}

		&.image-card--linked:hover {
			& .image-card-media::after {
				opacity: 0.88;
			}

			& .image-card-media img {
				transform: scale(1.06);
			}

			& .image-card-hover {
				opacity: 1;
				transform: translateY(0);
			}

			& .image-card-hover-btn:hover {
				background: var(--color-cream);
				color: var(--color-primary);
			}

			& .image-card-body {
				max-height: 0;
				padding-top: 0;
				padding-bottom: 0;
				opacity: 0;
			}
		}
	}

	& .image-card-body {
		padding: clamp(1rem, 1.75vw, 1.75rem) clamp(1.25rem, 2vw, 2rem);
	}

	/* Card body background swaps with block background */
	&.bg-white .image-card-body {
		background: var(--color-cream);
	}

	&.bg-cream .image-card-body,
	&.bg-alt .image-card-body {
		background: var(--color-white);
	}

	& .image-card-title {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h4);
		line-height: var(--lh-heading);
		color: var(--color-black);
		margin-bottom: 0.3em;
		transition: color var(--transition-fast);

		&:last-child {
			margin-bottom: 0;
		}
	}

	& .image-card-subtitle {
		font-size: var(--fs-small);
		opacity: 0.65;
		margin: 0;
	}
}


/* ==========================================================================
   PAGE TITLE BLOCK
   ========================================================================== */

/* --- Simple style (text on solid bg — mirrors .archive-header) --- */
.page-title-simple {
	padding-top: calc(var(--header-height) + var(--block-padding-y));

	& h1 {
		margin-bottom: 0.25em;
	}

	& .subtitle {
		max-width: 600px;
	}
}

/* --- Image style (shared) --- */
.page-title-image {
	position: relative;
	width: 100%;
	overflow: hidden;

	& .page-title-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
		will-change: transform;
		transform: translateY(0) scale(1.15);
	}

	& .page-title-overlay {
		position: absolute;
		inset: 0;
		background:
			linear-gradient(to bottom, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0) 14%),
			linear-gradient(to right, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.22) 100%);
	}

	& .page-title-content {
		position: relative;
		z-index: 3;
		display: flex;
		align-items: center;
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: clamp(4rem, 8vw, 8rem);
	}

	& .page-title-inner {
		max-width: 60%;

		@media (max-width: 768px) {
			max-width: none;
		}
	}

	& .page-title-heading {
		color: var(--color-cream);
		font-size: clamp(2.5rem, 4.5vw, 7rem);
		line-height: 1.0;
		letter-spacing: -0.01em;
		margin-bottom: 1.25rem;
		animation: pageTitleFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
	}

	& .page-title-subtitle {
		color: var(--color-cream);
		font-family: var(--font-heading);
		font-size: clamp(1.125rem, 1.75vw, 1.5rem);
		opacity: 0.85;
		line-height: 1.6;
		margin-bottom: 0;
		animation: pageTitleFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
	}

	/* Scroll prompt — centred at bottom of viewport */
	& .page-title-scroll {
		position: absolute;
		bottom: clamp(2rem, 4vw, 3.5rem);
		left: 50%;
		transform: translateX(-50%);
		z-index: 10;
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		gap: 0.75rem;
		color: var(--color-cream);
		transition: opacity var(--transition-fast);
		animation: pageTitleFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;

		&:hover {
			opacity: 0.7;
		}
	}

	& .page-title-scroll-text {
		font-family: var(--font-heading);
		font-size: var(--fs-small);
		font-weight: 500;
		letter-spacing: 0.04em;
	}

	& .page-title-scroll-icon {
		position: relative;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.15);
		flex-shrink: 0;
		animation: pageTitleBounce 2s ease-in-out infinite;

		&::after {
			content: '';
			position: absolute;
			width: 9px;
			height: 9px;
			border-right: 2px solid var(--color-cream);
			border-bottom: 2px solid var(--color-cream);
			top: 50%;
			left: 50%;
			transform: translate(-50%, -68%) rotate(45deg);
		}
	}
}

/* Height variants */
.page-title-full {
	min-height: 100vh;
	min-height: 100dvh;

	& .page-title-content {
		min-height: 100vh;
		min-height: 100dvh;
	}
}

.page-title-tall {
	min-height: 70vh;
	min-height: 70dvh;

	& .page-title-content {
		min-height: 70vh;
		min-height: 70dvh;
	}
}

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

@keyframes pageTitleBounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(6px); }
}


/* ==========================================================================
   TEAM BLOCK
   ========================================================================== */

.block-team {
	& .team-header {
		margin-bottom: clamp(2.5rem, 5vw, 5rem);
		max-width: 900px;

		& h2 {
			margin-bottom: 0.5em;
		}

		& .subtitle {
			max-width: 800px;
		}
	}

	& .team-grid {
		display: grid;
		gap: clamp(1.25rem, 2.25vw, 2.25rem);

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

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

		@media (max-width: 540px) {
			grid-template-columns: 1fr !important;
		}
	}

	/* ---- Card (mirrors .image-card pattern) ---- */
	& .team-card {
		display: flex;
		flex-direction: column;
		position: relative;
		overflow: hidden;
	}

	& .team-card-btn {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
		text-align: left;
		cursor: pointer;
		position: relative;
	}

	& .team-card-media {
		overflow: hidden;
		width: 100%;
		aspect-ratio: 2 / 3;
		flex: 1 1 auto;
		position: relative;
		z-index: 0;

		& img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
			transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
		}

		/* Purple overlay */
		&::after {
			content: '';
			position: absolute;
			inset: 0;
			background: var(--color-primary);
			opacity: 0;
			mix-blend-mode: multiply;
			transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
			z-index: 1;
		}
	}

	/* Hover content overlay — positioned on .team-card (like image-card-hover) */
	& .team-card-hover {
		position: absolute;
		inset: 0;
		z-index: 2;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1.25rem;
		padding: 1.5rem;
		pointer-events: none;
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		            transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	}

	& .team-card-hover-name {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h4);
		line-height: var(--lh-heading);
		color: var(--color-cream);
		text-align: center;
	}

	& .team-card-hover-btn {
		display: inline-block;
		font-family: var(--font-heading);
		font-size: var(--fs-small);
		font-weight: 600;
		letter-spacing: 0.02em;
		color: var(--color-cream);
		border: none;
		box-shadow: inset 0 0 0 2px var(--color-cream);
		border-radius: var(--radius-pill);
		padding: 0.65em 2em;
		background: transparent;
		transition: background var(--transition-fast), color var(--transition-fast);
	}

	& .team-card-btn:hover {
		& .team-card-media img {
			transform: scale(1.06);
		}

		& .team-card-media::after {
			opacity: 0.88;
		}

		& .team-card-hover {
			opacity: 1;
			transform: translateY(0);
		}

		& .team-card-hover-btn:hover {
			background: var(--color-cream);
			color: var(--color-primary);
		}

		& .team-card-body {
			max-height: 0;
			padding-top: 0;
			padding-bottom: 0;
			opacity: 0;
		}
	}

	& .team-card-body {
		max-height: 120px;
		overflow: hidden;
		padding: clamp(1rem, 1.75vw, 1.5rem) clamp(1.25rem, 2vw, 2rem);
		transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		            padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		            opacity 0.4s ease;
	}

	/* Card body background swaps with block background */
	&.bg-white .team-card-body {
		background: var(--color-cream);
	}

	&.bg-cream .team-card-body,
	&.bg-alt .team-card-body {
		background: var(--color-white);
	}

	& .team-card-name {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h4);
		line-height: var(--lh-heading);
		color: var(--color-black);
		margin-bottom: 0.2em;
		transition: color var(--transition-fast);
	}

	& .team-card-role {
		font-size: var(--fs-small);
		opacity: 0.65;
		margin: 0;
	}
}

/* ---- Team Modal ---- */
.team-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(28, 28, 28, 0.6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition-base), visibility var(--transition-base);

	&.is-open {
		opacity: 1;
		visibility: visible;
	}
}

.team-modal-backdrop {
	position: absolute;
	inset: 0;
	cursor: pointer;
}

.team-modal-panel {
	position: relative;
	z-index: 1;
	width: min(var(--container-default), 92vw);
	height: min(82vh, 82dvh);
	background: var(--color-white);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: translateY(20px) scale(0.98);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);

	.team-modal.is-open & {
		transform: translateY(0) scale(1);
	}

	@media (max-width: 768px) {
		width: min(500px, 94vw);
		height: min(90vh, 90dvh);
	}
}

.team-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 10;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--color-white);
	color: var(--color-black);
	cursor: pointer;
	transition: opacity var(--transition-fast);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);

	&:hover {
		opacity: 0.7;
	}
}

.team-modal-inner {
	display: grid;
	grid-template-columns: 5fr 7fr;
	overflow: hidden;
	height: 100%;

	@media (max-width: 1100px) {
		grid-template-columns: 1fr 1fr;
	}

	@media (max-width: 768px) {
		display: flex;
		flex-direction: column;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
}

.team-modal-image {
	position: relative;
	overflow: hidden;
	background: var(--color-alt-bg);
	min-height: 0;

	& img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: top center;
		display: block;
	}

	@media (max-width: 768px) {
		flex: 0 0 auto;
		width: 100%;
		aspect-ratio: 1 / 1;

		& img {
			position: absolute;
			inset: 0;
		}
	}
}

/* Mobile-only gradient overlay + name on image */
.team-modal-image-name {
	display: none;

	@media (max-width: 768px) {
		display: block;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 3rem 1.5rem 1.25rem;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
		color: var(--color-cream);
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h3);
		line-height: var(--lh-heading);
	}
}

.team-modal-details {
	padding: clamp(2rem, 4vw, 3.5rem);
	overflow-y: auto;

	@media (max-width: 768px) {
		flex: 0 0 auto;
		padding: 1.5rem;
		overflow-y: visible;
	}
}

.team-modal-name {
	font-size: var(--fs-h2);
	margin-bottom: 0.15em;

	@media (max-width: 768px) {
		display: none;
	}
}

.team-modal-role {
	margin-bottom: 0.25rem;
	font-family: var(--font-heading);
	font-size: var(--fs-body);
	font-weight: 600;
	color: var(--color-primary);
}

.team-modal-quals {
	font-size: var(--fs-body);
	opacity: 0.65;
	margin-bottom: 1.75rem;
}

.team-modal-bio {
	margin-bottom: 2rem;
	margin-top: 1rem;

	& p {
		font-size: var(--fs-body);
		line-height: var(--lh-body);
		opacity: 0.85;
		margin-bottom: 1em;

		&:last-child {
			margin-bottom: 0;
		}
	}
}

/* Accordion inside modal — reuses global accordion styles */
.team-modal-sections {
	margin-bottom: 2rem;
}

.team-modal-accordion {
	border-bottom: 1px solid var(--color-alt-bg);
}

.team-modal-accordion .accordion-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.125rem 0;
	font-family: var(--font-heading);
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: color var(--transition-fast);
	gap: 1rem;

	&:hover {
		color: var(--color-primary);
	}

	&[aria-expanded="true"] {
		& .accordion-icon::after {
			transform: translate(-50%, -32%) rotate(-135deg);
		}
	}
}

.team-modal-accordion .accordion-icon {
	position: relative;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--color-alt-bg);
	transition: background var(--transition-fast);

	&::before {
		display: none;
	}

	&::after {
		content: '';
		position: absolute;
		background: none;
		width: 7px;
		height: 7px;
		border-right: 2px solid var(--color-dark-gray);
		border-bottom: 2px solid var(--color-dark-gray);
		top: 50%;
		left: 50%;
		transform: translate(-50%, -68%) rotate(45deg);
		transition: transform var(--transition-base);
	}
}

.team-modal-accordion .accordion-panel {
	overflow: hidden;
	max-height: 0;
	transition: max-height var(--transition-base);
}

.team-modal-accordion .accordion-panel-inner {
	padding-bottom: 1.25rem;
}

/* Contact links */
.team-modal-contact {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	border-top: 1px solid var(--color-alt-bg);
	padding-top: 1.5rem;
}

.team-modal-contact-item {
	font-family: var(--font-heading);
	font-size: var(--fs-small);
	font-weight: 500;
	color: var(--color-black);
	transition: color var(--transition-fast);

	&:hover {
		color: var(--color-primary);
	}
}

.team-modal-linkedin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-left: auto;
	border-radius: 50%;
	background: var(--color-primary);
	color: var(--color-white);
	transition: opacity var(--transition-fast);

	& svg {
		width: 18px;
		height: 18px;
	}

	&:hover {
		opacity: 0.8;
		color: var(--color-white);
	}
}


/* ==========================================================================
   BACK TO TOP BLOCK
   ========================================================================== */

.block-back-to-top {
	text-align: center;
	padding-top: 0;
	padding-bottom: var(--block-padding-y);

	/* No last-child override needed — padding-bottom is already full-size */

	& .back-to-top-btn {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;
		cursor: pointer;
		color: var(--color-black);
		transition: opacity var(--transition-fast);

		&:hover {
			opacity: 0.6;

			& .back-to-top-icon {
				transform: translateY(-3px);
			}
		}
	}

	& .back-to-top-icon {
		position: relative;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: var(--color-alt-bg);
		flex-shrink: 0;
		transition: transform var(--transition-base);

		&::after {
			content: '';
			position: absolute;
			width: 9px;
			height: 9px;
			border-right: 2px solid var(--color-dark-gray);
			border-bottom: 2px solid var(--color-dark-gray);
			top: 50%;
			left: 50%;
			transform: translate(-50%, -32%) rotate(-135deg);
		}
	}

	& .back-to-top-text {
		font-family: var(--font-heading);
		font-size: var(--fs-small);
		font-weight: 500;
		letter-spacing: 0.02em;
	}
}


/* ==========================================================================
   CASE STUDIES BLOCK  —  Bento grid with filters
   ========================================================================== */

.block-case-studies {

	/* ---- Header ---- */
	& .cs-header {
		margin-bottom: clamp(2rem, 4vw, 3.5rem);

		& h2 { margin-bottom: 0.35em; }
		& .subtitle { max-width: 700px; }
	}

	/* ---- Filters ---- */
	& .cs-filters {
		position: relative;
		z-index: 30;
		margin-bottom: clamp(2.5rem, 4.5vw, 4rem);
	}

	& .cs-filters-row {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		flex-wrap: wrap;

		/* Count always snaps to the far-right end of its line */
		& .cs-showing-count--top {
			margin-left: auto;
			white-space: nowrap;
			flex-shrink: 0;
		}
	}

	& .cs-filter-group {
		position: relative;
		z-index: 30;
	}

	& .cs-filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.6em;
		padding: 0.65em 2.25em;
		border: none;
		box-shadow: none;
		border-radius: var(--radius-pill);
		background: var(--color-alt-bg);
		font-family: var(--font-heading);
		font-weight: 500;
		font-size: var(--fs-small);
		color: var(--color-black);
		cursor: pointer;
		transition: background var(--transition-fast), color var(--transition-fast),
			box-shadow var(--transition-fast);

		&:hover {
			background: var(--color-black);
			color: var(--color-white);
		}

		&[aria-expanded="true"] {
			background: var(--color-primary);
			color: var(--color-white);
		}

		/* Active state when filters are selected */
		&.has-active {
			background: var(--color-primary);
			color: var(--color-white);
		}
	}

	& .cs-filter-chevron {
		width: 10px;
		height: auto;
		transition: transform var(--transition-fast);

		[aria-expanded="true"] & {
			transform: rotate(180deg);
		}
	}

	& .cs-filter-count {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border-radius: 10px;
		background: rgba(255, 255, 255, 0.25);
		font-size: 0.75rem;
		font-weight: 700;
		line-height: 1;
	}

	& .cs-filter-dropdown {
		position: absolute;
		top: calc(100% + 0.65rem);
		left: 0;
		z-index: 40;
		min-width: 320px;
		max-height: 360px;
		overflow-y: auto;
		padding: 0.5rem;
		background: var(--color-white);
		border-radius: var(--radius-md);
		box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
		opacity: 0;
		transform: translateY(-6px);
		transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
		pointer-events: none;

		&[hidden] {
			display: block !important;
			opacity: 0;
			transform: translateY(-6px);
			pointer-events: none;
			visibility: hidden;
		}

		&.is-open {
			opacity: 1;
			transform: translateY(0);
			pointer-events: auto;
			visibility: visible;
		}

		/* Custom scrollbar */
		&::-webkit-scrollbar { width: 5px; }
		&::-webkit-scrollbar-track { background: transparent; }
		&::-webkit-scrollbar-thumb {
			background: var(--color-alt-bg);
			border-radius: 3px;
		}
	}

	& .cs-filter-option {
		display: flex;
		align-items: center;
		gap: 0.75em;
		padding: 0.6em 0.85em;
		margin: 0;
		font-family: var(--font-body);
		font-size: var(--fs-small);
		cursor: pointer;
		border-radius: 8px;
		transition: background var(--transition-fast);
		user-select: none;

		&:hover {
			background: var(--color-cream);
		}

		& input[type="checkbox"] {
			appearance: none;
			-webkit-appearance: none;
			width: 20px;
			height: 20px;
			border: 2px solid var(--color-alt-bg);
			border-radius: 6px;
			background: var(--color-white);
			cursor: pointer;
			transition: border-color var(--transition-fast), background var(--transition-fast);
			position: relative;
			flex-shrink: 0;

			&:checked {
				background: var(--color-primary);
				border-color: var(--color-primary);
			}

			&:checked::after {
				content: '';
				position: absolute;
				left: 5px;
				top: 2px;
				width: 6px;
				height: 10px;
				border: solid var(--color-white);
				border-width: 0 2px 2px 0;
				transform: rotate(45deg);
			}

			&:focus-visible {
				outline: 2px solid var(--color-primary);
				outline-offset: 2px;
			}
		}

		& span {
			line-height: 1.3;
		}

		& .cs-option-count {
			margin-left: auto;
			font-size: 0.8em;
			opacity: 0.4;
			font-weight: 600;
		}
	}

	& .cs-clear-filters {
		display: inline-flex;
		align-items: center;
		padding: 0;
		border: none;
		background: transparent;
		font-family: var(--font-heading);
		font-weight: 500;
		font-size: var(--fs-small);
		color: var(--color-black);
		opacity: 0.55;
		cursor: pointer;
		transition: opacity var(--transition-fast);
		margin-left: 0.75rem;

		&:hover { opacity: 1; }
	}

	& .cs-showing-count--top {
		margin-left: auto;
	}

	/* ---- Bento grid ---- */
	& .cs-bento {
		position: relative;
		z-index: 1;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		grid-auto-rows: clamp(190px, 22vw, 310px);
		gap: clamp(0.5rem, 1vw, 0.75rem);

		/* 4-item preview: explicit 2-row grid, CSS owns all grid-areas */
		&.cs-bento--preview {
			grid-template-rows: repeat(2, clamp(190px, 22vw, 310px));
			overflow: hidden;

			& .cs-card:nth-child(1) { grid-area: 1 / 1 / 2 / 3 !important; }
			& .cs-card:nth-child(2) { grid-area: 1 / 3 / 3 / 5 !important; }
			& .cs-card:nth-child(3) { grid-area: 2 / 1 / 3 / 2 !important; }
			& .cs-card:nth-child(4) { grid-area: 2 / 2 / 3 / 3 !important; }
			& .cs-card:nth-child(n+5) { display: none; }
		}
	}

	/* ---- Card ---- */
	& .cs-card {
		position: relative;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		text-decoration: none;
		color: inherit;
		border-radius: 0;
		opacity: 0;
		transform: translateY(20px) scale(0.97);
		transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);

		&.cs-revealed {
			opacity: 1;
			transform: translateY(0) scale(1);
		}
	}

	@keyframes cs-shimmer {
		0% { background-position: 200% 0; }
		100% { background-position: -200% 0; }
	}

	& .cs-card-media {
		position: relative;
		flex: 1 1 auto;
		z-index: 0;
		overflow: hidden;

		/* Placeholder shimmer while image loads */
		&::before {
			content: '';
			position: absolute;
			inset: 0;
			background: linear-gradient(
				110deg,
				var(--color-alt-bg) 30%,
				var(--color-cream) 50%,
				var(--color-alt-bg) 70%
			);
			background-size: 200% 100%;
			animation: cs-shimmer 1.5s ease-in-out infinite;
			z-index: 0;
		}

		.cs-img-loaded &::before {
			opacity: 0;
			transition: opacity 0.4s ease;
		}

		& img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
			opacity: 0;
			transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);

			&.cs-img-ready {
				opacity: 1;
			}
		}

		&::after {
			content: '';
			position: absolute;
			inset: 0;
			background: var(--color-primary);
			opacity: 0;
			mix-blend-mode: multiply;
			transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
			z-index: 1;
		}
	}

	& .cs-card-hover {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 2;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1.25rem;
		padding: 1.5rem;
		pointer-events: none;
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	}

	& .cs-card-hover-title {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h4);
		line-height: var(--lh-heading);
		color: var(--color-cream);
		text-align: center;
	}

	& .cs-card-hover-btn {
		display: inline-block;
		padding: 0.65em 2em;
		border: none;
		box-shadow: inset 0 0 0 2px var(--color-cream);
		border-radius: var(--radius-pill);
		color: var(--color-cream);
		background: transparent;
		font-family: var(--font-heading);
		font-weight: 600;
		font-size: var(--fs-small);
		letter-spacing: 0.02em;
		transition: background var(--transition-fast), color var(--transition-fast);
	}

	/* ---- Card body (visible label, like team-card-body) ---- */
	& .cs-card-body {
		position: relative;
		z-index: 3;
		max-height: 0;
		overflow: hidden;
		padding: 0 clamp(1rem, 1.5vw, 1.5rem);
		opacity: 0;
		transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		            padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		            opacity 0.4s ease;
	}

	&.bg-white .cs-card-body {
		background: var(--color-cream);
	}

	&.bg-cream .cs-card-body,
	&.bg-alt .cs-card-body {
		background: var(--color-white);
	}

	& .cs-card-name {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h5);
		line-height: var(--lh-heading);
		color: var(--color-black);
		margin-bottom: 0.15em;
	}

	& .cs-card-category {
		font-size: var(--fs-small);
		opacity: 0.6;
		margin: 0;
	}

	& .cs-card:hover {
		& .cs-card-media::after { opacity: 0.88; }
		& .cs-card-media img { transform: scale(1.06); }
		& .cs-card-hover { opacity: 1; transform: translateY(0); }
		& .cs-card-hover-btn:hover {
			background: var(--color-cream);
			color: var(--color-primary);
		}
		& .cs-card-body {
			max-height: 0;
			padding-top: 0;
			padding-bottom: 0;
			opacity: 0;
		}
	}

	/* Filtered-out & paginated-out cards */
	& .cs-card.cs-hidden,
	& .cs-card.cs-load-hidden {
		display: none;
	}

	/* ---- No results ---- */
	& .cs-no-results {
		padding: clamp(4rem, 8vw, 7rem) 1.5rem;
		text-align: center;
	}

	& .cs-no-results-inner {
		max-width: 560px;
		margin: 0 auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1rem;
	}

	& .cs-no-results-icon {
		color: var(--color-black);
		margin-bottom: 0.5rem;
	}

	& .cs-no-results-title {
		font-family: var(--font-heading);
		font-weight: var(--fw-heading);
		font-size: var(--fs-h3);
		line-height: var(--lh-heading);
		color: var(--color-black);
		margin: 0;
	}

	& .cs-no-results-text {
		font-size: var(--fs-body);
		opacity: 0.6;
		margin: 0 0 0.5rem;
	}

	/* ---- Load More ---- */
	& .cs-load-more-wrap {
		text-align: center;
		margin-top: clamp(2.5rem, 4vw, 4rem);
	}

	& .cs-showing-count {
		font-family: var(--font-body);
		font-size: var(--fs-small);
		color: var(--color-black);
		opacity: 0.4;
		margin: 0;
	}

	& .cs-showing-count--bottom {
		margin-top: 1.25rem;
	}

	/* ---- Standard grid (touch devices / ≤ 1024px) ---- */
	@media (max-width: 1024px) {
		& .cs-bento {
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			grid-auto-rows: auto;
			gap: clamp(1rem, 2vw, 1.75rem);
		}

		& .cs-card {
			grid-area: auto !important;
		}

		& .cs-card-media {
			aspect-ratio: 4 / 3;
		}

		/* Always show card body on touch */
		& .cs-card-body {
			max-height: none;
			opacity: 1;
			padding: clamp(1rem, 1.5vw, 1.35rem) clamp(1rem, 1.5vw, 1.5rem) clamp(0.75rem, 1.25vw, 1.15rem);
		}

		/* Hide hover overlay on touch — label is always visible */
		& .cs-card:hover .cs-card-body {
			max-height: none;
			padding-top: clamp(1rem, 1.5vw, 1.35rem);
			padding-bottom: clamp(0.75rem, 1.25vw, 1.15rem);
			opacity: 1;
		}
	}

	@media (max-width: 700px) {
		& .cs-showing-count--top {
			display: none;
		}
	}

	@media (max-width: 540px) {
		& .cs-bento {
			grid-template-columns: 1fr;
			gap: clamp(0.75rem, 1.5vw, 1.25rem);
		}

		& .cs-card-hover-title {
			font-size: var(--fs-h5);
		}

		& .cs-card-hover-btn {
			display: none;
		}

		& .cs-filter-dropdown {
			min-width: 200px;
		}
	}
}


/* ==========================================================================
   LATEST POSTS
   ========================================================================== */

.block-latest-posts {

	& .latest-posts-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.5rem;
		margin-bottom: clamp(2rem, 3.5vw, 3.5rem);
	}

	& .latest-posts-header h2 {
		margin: 0;
	}

	& .latest-posts-grid {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: clamp(1.25rem, 2vw, 1.75rem);
	}

	& .blog-card-link {
		display: flex;
		flex-direction: column;
		height: 100%;
		text-decoration: none;
		color: var(--color-black);
	}

	& .blog-card-image {
		overflow: hidden;
		height: clamp(180px, 18vw, 300px);
		flex-shrink: 0;

		& img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			transition: transform var(--transition-slow);
		}
	}

	& .blog-card-link:hover .blog-card-image img {
		transform: scale(1.04);
	}

	& .blog-card-content {
		padding: 1.25rem;
		flex: 1;
		display: flex;
		flex-direction: column;
		background: var(--color-alt-bg);
	}

	& .blog-card-date {
		display: block;
		font-family: var(--font-body);
		font-size: var(--fs-small);
		opacity: 0.55;
		margin-bottom: 0.4em;
	}

	& .blog-card-title {
		font-family: var(--font-heading);
		font-size: var(--fs-h5);
		font-weight: var(--fw-heading);
		line-height: var(--lh-heading);
		margin-bottom: 0.45em;
		transition: color var(--transition-fast);
	}

	& .blog-card-link:hover .blog-card-title {
		color: var(--color-primary);
	}

	& .blog-card-excerpt {
		font-size: var(--fs-small);
		line-height: 1.55;
		opacity: 0.65;
		margin: 0;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
	.block-latest-posts .latest-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.block-latest-posts .latest-posts-grid {
		grid-template-columns: 1fr;
	}

	.block-latest-posts .latest-posts-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.block-latest-posts .blog-card-image {
		height: clamp(200px, 50vw, 280px);
	}
}
