/* ZZ Project Cards v1.3.0 — frontend styles */

.zz-pc-wrapper {
	position: relative;
	--zz-pc-duration: 0.4s;
	--zz-pc-panel-bg: rgba(0, 0, 0, 0);
	--zz-pc-panel-bg-hover: #f97b22;
	--zz-pc-panel-height: 190px;
}

.zz-pc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

/* ---------- Stacked (no slider) ---------- */

.zz-pc-stack {
	display: flex;
	gap: 30px;
}

/* Horizontal: cards share the row in equal widths. */
.zz-pc-stack-row {
	flex-direction: row;
	flex-wrap: nowrap;
}

.zz-pc-stack-row > .zz-pc-card {
	flex: 1 1 0;
	min-width: 0;
}

/* Vertical: each card takes the full width. */
.zz-pc-stack-col {
	flex-direction: column;
}

.zz-pc-stack-col > .zz-pc-card {
	flex: 0 0 auto;
	width: 100%;
}

/* Mobile: force a single full-width column so rows never get cramped. */
@media ( max-width: 768px ) {
	.zz-pc-stack-mobile-col {
		flex-direction: column;
	}

	.zz-pc-stack-mobile-col > .zz-pc-card {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
	}
}

/* ---------- Card ---------- */

.zz-pc-card {
	position: relative;
	height: 480px;
	overflow: hidden;
	isolation: isolate;
}

.zz-pc-media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform var(--zz-pc-duration) ease;
	z-index: 1;
}

.zz-pc-has-zoom .zz-pc-card:hover .zz-pc-media,
.zz-pc-has-zoom .zz-pc-card.zz-pc-solid .zz-pc-media {
	transform: scale(1.06);
}

.zz-pc-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	transition: background-color var(--zz-pc-duration) ease;
	pointer-events: none;
}

.zz-pc-card-link {
	position: absolute;
	inset: 0;
	z-index: 3;
}

/* ---------- Content panel ---------- */

.zz-pc-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--zz-pc-panel-height);
	background-color: var(--zz-pc-panel-bg);
	transition:
		background-color var(--zz-pc-duration) ease,
		transform var(--zz-pc-duration) ease,
		opacity var(--zz-pc-duration) ease;
}

.zz-pc-card:hover .zz-pc-panel,
.zz-pc-card.zz-pc-solid .zz-pc-panel {
	background-color: var(--zz-pc-panel-bg-hover);
}

/* Slide-up: panel sits lower at rest, slides into place on hover */
.zz-pc-anim-slide-up .zz-pc-card .zz-pc-panel {
	transform: translateY(12px);
}

.zz-pc-anim-slide-up .zz-pc-card:hover .zz-pc-panel,
.zz-pc-anim-slide-up .zz-pc-card.zz-pc-solid .zz-pc-panel {
	transform: translateY(0);
}

/* Fade: solid background fades in (handled by background-color transition) */

.zz-pc-panel-text {
	min-width: 0;
}

.zz-pc-title {
	margin: 0 0 14px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.zz-pc-title a {
	color: inherit;
	text-decoration: none;
}

.zz-pc-desc {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
	max-width: 90%;
	color: rgba(255, 255, 255, 0.85);
	transition: color var(--zz-pc-duration) ease;
}

.zz-pc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.zz-pc-tag {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 30px;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	position: relative;
	z-index: 5;
	transition:
		color var(--zz-pc-duration) ease,
		background-color var(--zz-pc-duration) ease,
		border-color var(--zz-pc-duration) ease;
}

/* ---------- Arrow button ---------- */

.zz-pc-arrow {
	position: relative;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50px;
	color: #fff;
	opacity: 0;
	transform: translateX(-8px);
	transition:
		opacity var(--zz-pc-duration) ease,
		transform var(--zz-pc-duration) ease,
		color var(--zz-pc-duration) ease,
		background-color var(--zz-pc-duration) ease,
		border-color var(--zz-pc-duration) ease;
}

.zz-pc-arrow svg {
	width: 20px;
	height: 20px;
}

.zz-pc-card:hover .zz-pc-arrow,
.zz-pc-card.zz-pc-solid .zz-pc-arrow {
	opacity: 1;
	transform: translateX(0);
}

/* ---------- Carousel ---------- */

.zz-pc-carousel {
	overflow: hidden;
}

/* Defensive fallback: guarantees a horizontal flex track and full-height
   slides even if Elementor's Swiper stylesheet fails to load on the frontend.
   Without this, an uninitialized or unstyled track collapses and clips. */
.zz-pc-carousel .swiper-wrapper {
	display: flex;
	box-sizing: content-box;
}

.zz-pc-carousel .swiper-slide {
	flex-shrink: 0;
	height: auto;
}

.zz-pc-nav {
	display: flex;
	gap: 12px;
	margin-top: 40px;
}

.zz-pc-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 1px solid #111;
	background-color: #fff;
	color: #111;
	cursor: pointer;
	transition:
		color 0.3s ease,
		background-color 0.3s ease,
		border-color 0.3s ease;
}

.zz-pc-nav-btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

/* ---------- Responsive type defaults ---------- */
/* Only properties without Elementor control defaults; panel typography
   controls override these via Elementor's more specific selectors. */

@media ( max-width: 1024px ) {
	.zz-pc-title {
		font-size: 23px;
	}
}

@media ( max-width: 768px ) {
	.zz-pc-title {
		font-size: 20px;
	}

	.zz-pc-tag {
		font-size: 13px;
	}

	.zz-pc-nav-btn svg {
		width: 18px;
		height: 18px;
	}
}

/* ---------- Touch / mobile ---------- */

@media ( max-width: 768px ) {
	.zz-pc-touch-solid .zz-pc-card .zz-pc-panel {
		background-color: var(--zz-pc-panel-bg-hover);
		transform: translateY(0);
	}

	.zz-pc-touch-solid .zz-pc-card .zz-pc-arrow {
		opacity: 1;
		transform: translateX(0);
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.zz-pc-wrapper * {
		transition-duration: 0.01ms !important;
	}
}
