/**
 * Cemimax Portfolio styles.
 * Brand tokens taken from the site's Elementor global kit.
 */

.cx {
	--cx-accent: #D70065;
	--cx-accent-dark: #b00253;
	--cx-ink: #171717;
	--cx-ink-2: #303B41;
	--cx-body: #5a5f63;
	--cx-light: #F8F8F7;
	--cx-line: #e7e7e6;
	--cx-white: #ffffff;
	--cx-radius: 12px;
	--cx-shadow: 0 10px 30px rgba(23, 23, 23, .08);
	--cx-shadow-lg: 0 22px 55px rgba(23, 23, 23, .16);
	--cx-max: 1180px;
	--cx-font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--cx-head: "Roboto Slab", Georgia, "Times New Roman", serif;

	font-family: var(--cx-font);
	color: var(--cx-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.cx *,
.cx *::before,
.cx *::after {
	box-sizing: border-box;
}

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

.cx-wrap {
	width: 100%;
	max-width: var(--cx-max);
	margin: 0 auto;
	padding: 0 24px;
}

.cx h1,
.cx h2,
.cx h3 {
	font-family: var(--cx-head);
	color: var(--cx-ink);
	line-height: 1.18;
	margin: 0;
}

.cx a {
	text-decoration: none;
}

/* ---------- Buttons ---------- */
.cx-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--cx-font);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .2px;
	line-height: 1;
	padding: 15px 28px;
	border-radius: 50px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.cx-btn svg {
	width: 16px;
	height: 16px;
}

.cx-btn--primary {
	background: var(--cx-accent);
	color: #fff;
}

.cx-btn--primary:hover {
	background: var(--cx-ink);
	color: #fff;
	transform: translateY(-2px);
}

.cx-btn--ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, .55);
}

.cx-btn--ghost:hover {
	background: #fff;
	color: var(--cx-ink);
	transform: translateY(-2px);
}

.cx-btn--outline {
	background: transparent;
	color: var(--cx-ink);
	border-color: var(--cx-line);
}

.cx-btn--outline:hover {
	border-color: var(--cx-accent);
	color: var(--cx-accent);
	transform: translateY(-2px);
}

/* ---------- Section framing ---------- */
.cx-eyebrow {
	display: inline-block;
	font-family: var(--cx-font);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--cx-accent);
	margin-bottom: 14px;
}

.cx-section {
	padding: 84px 0;
}

.cx-section--tint {
	background: var(--cx-light);
}

.cx-section__head {
	max-width: 720px;
	margin: 0 auto 52px;
	text-align: center;
}

.cx-section__head h2 {
	font-size: clamp(28px, 4vw, 40px);
}

.cx-section__head p {
	margin: 16px 0 0;
	font-size: 17px;
}

.cx-section__head--left {
	max-width: none;
	margin: 0 0 34px;
	text-align: left;
}

/* =========================================================
   LISTING PAGE
   ========================================================= */
.cx-page-hero {
	position: relative;
	background: var(--cx-ink);
	color: #fff;
	padding: 96px 0 88px;
	text-align: center;
	overflow: hidden;
}

.cx-page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(1100px 380px at 50% -10%, rgba(215, 0, 101, .38), transparent 60%),
		linear-gradient(180deg, #1d1d1d 0%, #141414 100%);
	z-index: 0;
}

.cx-page-hero > * {
	position: relative;
	z-index: 1;
}

.cx-page-hero h1 {
	color: #fff;
	font-size: clamp(34px, 5.5vw, 56px);
}

.cx-page-hero p {
	max-width: 640px;
	margin: 18px auto 0;
	font-size: 18px;
	color: rgba(255, 255, 255, .78);
}

.cx-breadcrumb {
	font-size: 13px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
	margin-bottom: 18px;
}

.cx-breadcrumb span {
	margin: 0 6px;
	opacity: .6;
}

.cx-breadcrumb a {
	color: rgba(255, 255, 255, .78);
}

.cx-breadcrumb a:hover {
	color: #fff;
}

.cx-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 34px;
}

.cx-card {
	background: #fff;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--cx-shadow);
	transition: transform .28s ease, box-shadow .28s ease;
}

.cx-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--cx-shadow-lg);
}

.cx-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.cx-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.cx-card:hover .cx-card__media img {
	transform: scale(1.06);
}

.cx-card__tag {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--cx-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .4px;
	padding: 7px 14px;
	border-radius: 50px;
}

.cx-card__body {
	padding: 26px 26px 30px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.cx-card__meta {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--cx-accent);
	margin-bottom: 10px;
}

.cx-card__body h3 {
	font-size: 23px;
	margin-bottom: 12px;
}

.cx-card__body p {
	margin: 0 0 24px;
	font-size: 15.5px;
}

.cx-card__foot {
	margin-top: auto;
}

.cx-card__link {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 600;
	color: var(--cx-ink);
	transition: gap .2s ease, color .2s ease;
}

.cx-card__link svg {
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}

.cx-card__link:hover {
	color: var(--cx-accent);
}

.cx-card__link:hover svg {
	transform: translateX(4px);
}

/* =========================================================
   SINGLE PORTFOLIO PAGE
   ========================================================= */
.cx-hero {
	position: relative;
	min-height: 62vh;
	display: flex;
	align-items: flex-end;
	color: #fff;
	background-size: cover;
	background-position: center;
}

.cx-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 10, 10, .25) 0%, rgba(10, 10, 10, .82) 100%);
}

.cx-hero__inner {
	position: relative;
	width: 100%;
	padding: 64px 0;
}

.cx-hero h1 {
	color: #fff;
	font-size: clamp(32px, 5.2vw, 54px);
	max-width: 780px;
}

.cx-breadcrumb--onhero {
	color: rgba(255, 255, 255, .72);
	margin-bottom: 22px;
}

.cx-breadcrumb--onhero a {
	color: rgba(255, 255, 255, .82);
}

.cx-breadcrumb--onhero a:hover {
	color: #fff;
}

.cx-hero__tag {
	display: inline-block;
	background: var(--cx-accent);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .5px;
	padding: 8px 16px;
	border-radius: 50px;
	margin-bottom: 20px;
}

/* Quick-facts bar */
.cx-facts {
	background: var(--cx-ink);
	color: #fff;
}

.cx-facts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.cx-facts__item {
	padding: 30px 24px;
	border-left: 1px solid rgba(255, 255, 255, .09);
}

.cx-facts__item:first-child {
	border-left: 0;
}

.cx-facts__label {
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--cx-accent);
	font-weight: 700;
	margin-bottom: 6px;
}

.cx-facts__value {
	font-family: var(--cx-head);
	font-size: 20px;
	color: #fff;
}

/* Overview */
.cx-overview {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 56px;
	align-items: start;
}

.cx-overview h2 {
	font-size: clamp(26px, 3.4vw, 36px);
	margin-bottom: 22px;
}

.cx-overview p {
	font-size: 17px;
	margin: 0 0 18px;
}

.cx-aside {
	background: var(--cx-light);
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	padding: 30px;
}

.cx-aside h3 {
	font-size: 19px;
	margin-bottom: 18px;
}

.cx-aside__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 0;
	border-top: 1px solid var(--cx-line);
	font-size: 15px;
}

.cx-aside__row:first-of-type {
	border-top: 0;
}

.cx-aside__row span:first-child {
	color: var(--cx-body);
}

.cx-aside__row span:last-child {
	font-weight: 600;
	color: var(--cx-ink);
	text-align: right;
}

/* System spec cards */
.cx-systems {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
}

.cx-sys {
	background: #fff;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	overflow: hidden;
	box-shadow: var(--cx-shadow);
}

.cx-sys__head {
	padding: 24px 28px;
	background: var(--cx-ink-2);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cx-sys__head h3 {
	color: #fff;
	font-size: 22px;
}

.cx-sys__ctx {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	background: rgba(255, 255, 255, .14);
	padding: 6px 12px;
	border-radius: 50px;
	white-space: nowrap;
}

.cx-sys__body {
	padding: 8px 28px 20px;
}

.cx-spec {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--cx-line);
}

.cx-spec:last-child {
	border-bottom: 0;
}

.cx-spec__label {
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cx-body);
	font-weight: 600;
}

.cx-spec__value {
	font-family: var(--cx-head);
	font-size: 19px;
	color: var(--cx-accent);
	font-weight: 600;
	text-align: right;
}

/* Rationale callout */
.cx-callout {
	background:
		radial-gradient(900px 300px at 100% 0%, rgba(215, 0, 101, .28), transparent 60%),
		var(--cx-ink);
	color: #fff;
	border-radius: 16px;
	padding: 52px clamp(28px, 5vw, 60px);
}

.cx-callout h2 {
	color: #fff;
	font-size: clamp(24px, 3.2vw, 34px);
	margin-bottom: 18px;
	max-width: 640px;
}

.cx-callout p {
	font-size: 17.5px;
	color: rgba(255, 255, 255, .82);
	max-width: 780px;
	margin: 0;
}

/* Products used — image + info cards (equal height, evenly aligned) */
.cx-products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
	align-items: stretch;
}

.cx-product {
	background: #fff;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: var(--cx-shadow);
	transition: transform .28s ease, box-shadow .28s ease;
}

.cx-product:hover {
	transform: translateY(-5px);
	box-shadow: var(--cx-shadow-lg);
}

/* Fixed-ratio media box → every product image occupies an identical frame,
   with object-fit: contain preserving each image's own aspect ratio. */
.cx-product__media {
	position: relative;
	aspect-ratio: 1 / 1;
	width: 100%;
	background: var(--cx-light);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px;
	border-bottom: 1px solid var(--cx-line);
}

.cx-product__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* Branded fallback tile when a product has no render available */
.cx-product__media--placeholder {
	flex-direction: column;
	gap: 8px;
	background:
		radial-gradient(120% 120% at 50% 0%, rgba(215, 0, 101, .10), transparent 60%),
		var(--cx-light);
}

.cx-product__ph-code {
	font-family: var(--cx-head);
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 700;
	color: var(--cx-accent);
	line-height: 1;
}

.cx-product__ph-brand {
	font-size: 11px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--cx-body);
}

.cx-product__body {
	padding: 20px 22px 24px;
}

.cx-product__name {
	font-size: 20px;
	margin-bottom: 8px;
}

.cx-product__use {
	display: block;
	font-size: 14.5px;
	color: var(--cx-body);
	line-height: 1.5;
}

/* Gallery — featured mosaic (first image leads, the rest flow 3-up) */
.cx-gallery {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-rows: 200px;
	gap: 14px;
}

.cx-gallery__item {
	position: relative;
	grid-column: span 2;
	overflow: hidden;
	border-radius: 12px;
	cursor: pointer;
	background: var(--cx-light);
	border: 0;
	margin: 0;
	padding: 0;
	font: inherit;
	display: block;
}

.cx-gallery__item:first-child {
	grid-column: span 4;
	grid-row: span 2;
}

.cx-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}

.cx-gallery__item:hover img {
	transform: scale(1.06);
}

.cx-gallery__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(23, 23, 23, 0);
	transition: background .3s ease;
}

.cx-gallery__item:hover::after {
	background: rgba(23, 23, 23, .28);
}

.cx-gallery__zoom {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--cx-ink);
	transform: translate(-50%, -50%) scale(.8);
	opacity: 0;
	transition: opacity .25s ease, transform .25s ease;
}

.cx-gallery__zoom svg {
	width: 20px;
	height: 20px;
}

.cx-gallery__item:hover .cx-gallery__zoom {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* Bottom CTA */
.cx-cta {
	text-align: center;
	background: var(--cx-light);
	padding: 80px 0;
}

.cx-cta h2 {
	font-size: clamp(26px, 3.6vw, 38px);
	margin-bottom: 16px;
}

.cx-cta p {
	max-width: 560px;
	margin: 0 auto 30px;
	font-size: 17px;
}

.cx-cta__btns {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

.cx-cta .cx-btn--outline {
	border-color: #d5d5d3;
}

/* Lightbox */
.cx-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(12, 12, 12, .92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 24px;
}

.cx-lightbox.is-open {
	display: flex;
}

.cx-lightbox img {
	max-width: 92vw;
	max-height: 86vh;
	border-radius: 8px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.cx-lightbox__close,
.cx-lightbox__nav {
	position: absolute;
	background: rgba(255, 255, 255, .12);
	border: 0;
	color: #fff;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
}

.cx-lightbox__close:hover,
.cx-lightbox__nav:hover {
	background: var(--cx-accent);
}

.cx-lightbox__close {
	top: 22px;
	right: 22px;
}

.cx-lightbox__nav--prev {
	left: 22px;
	top: 50%;
	transform: translateY(-50%);
}

.cx-lightbox__nav--next {
	right: 22px;
	top: 50%;
	transform: translateY(-50%);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
	.cx-overview {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.cx-products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 860px) {
	.cx-section {
		padding: 60px 0;
	}

	.cx-systems {
		grid-template-columns: 1fr;
	}

	/* Gallery mosaic collapses to a clean 2-up; feature spans full width. */
	.cx-gallery {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 180px;
	}

	.cx-gallery__item {
		grid-column: span 1;
	}

	.cx-gallery__item:first-child {
		grid-column: span 2;
		grid-row: span 2;
	}

	.cx-facts__grid {
		grid-template-columns: 1fr;
	}

	.cx-facts__item {
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, .09);
	}

	.cx-facts__item:first-child {
		border-top: 0;
	}
}

@media (max-width: 560px) {
	.cx-wrap {
		padding: 0 18px;
	}

	.cx-gallery {
		gap: 10px;
		grid-auto-rows: 150px;
	}

	.cx-products {
		grid-template-columns: 1fr;
		max-width: 340px;
		margin: 0 auto;
	}

	.cx-hero {
		min-height: 52vh;
	}

	.cx-lightbox__nav {
		width: 44px;
		height: 44px;
	}
}
