/**
 * Featured Portfolio Showcase — Card Style 3
 *
 * SVG clipPath silhouette:
 * - Folder-tab step notch (top-right shelf for pills)
 * - Circular BR pocket (arrow nests into the image)
 * - Large convex TL / BL corners
 *
 * @package Zouetech_Portfolio
 */

.ztp-fs--card-style-3,
.elementor-widget-ztp-featured-portfolio-showcase .ztp-fs--card-style-3 {
	--ztp-fs-cols-d: 3;
	--ztp-fs-cols-t: 2;
	--ztp-fs-cols-m: 1;
	--ztp-fs-s3-gap: 32px;
	--ztp-fs-s3-title-gap: 18px;
	--ztp-fs-s3-aspect: 4 / 3;
	--ztp-fs-s3-img-fit: cover;
	--ztp-fs-s3-pill-bg: #faf9f6;
	--ztp-fs-s3-pill-color: #111111;
	--ztp-fs-s3-pill-gap: 8px;
	--ztp-fs-s3-arrow-bg: #111111;
	--ztp-fs-s3-arrow-bg-hover: #000000;
	--ztp-fs-s3-arrow-color: #ffffff;
	--ztp-fs-s3-arrow-size: 56px;
	/* Nest into BR notch — slight outside hang */
	--ztp-fs-s3-arrow-hang: 0.12;
	--ztp-fs-s3-arrow-offset-x: 0px;
	--ztp-fs-s3-arrow-offset-y: 0px;
	--ztp-fs-s3-r: 36px;
	--ztp-fs-s3-card-radius: 0px;
	--ztp-fs-s3-title-color: #111111;
	--ztp-fs-s3-title-hover: #111111;
	--ztp-fs-s3-title-align: left;
	--ztp-fs-s3-overlay: rgba(0, 0, 0, 0.16);
	--ztp-fs-s3-pill-top: 16px;
	--ztp-fs-s3-pill-right: 16px;
	--ztp-fs-s3-pill-left: auto;
	--ztp-fs-s3-pill-bottom: auto;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none;
}

/* Kill Elementor / theme white wrappers around Style 3 */
.elementor-widget-ztp-featured-portfolio-showcase:has(.ztp-fs--card-style-3) > .elementor-widget-container,
.elementor-widget-ztp-featured-portfolio-showcase:has(.ztp-fs--card-style-3) {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
}

.ztp-fs--card-style-3.is-fit-contain {
	--ztp-fs-s3-img-fit: contain;
}

.ztp-fs--card-style-3 .ztp-fs__s3-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
	pointer-events: none;
}

.ztp-fs--card-style-3 .ztp-fs__cards--s3 {
	display: grid;
	grid-template-columns: repeat(var(--ztp-fs-cols-d), minmax(0, 1fr));
	gap: var(--ztp-fs-s3-gap);
	align-items: start;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.ztp-fs--card-style-3.is-equal-height .ztp-fs__cards--s3 {
	align-items: stretch;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3 {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	min-width: 0;
	padding: 0;
	margin: 0;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border-style: solid;
	border-width: 0;
	border-color: transparent;
	border-radius: var(--ztp-fs-s3-card-radius, 0);
	outline: none !important;
	box-shadow: none;
	text-decoration: none;
	color: inherit;
	overflow: visible;
	container-type: inline-size;
	container-name: ztp-s3-card;
	transition:
		transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 320ms ease,
		border-color 200ms ease;
}

.ztp-fs--card-style-3.is-equal-height .ztp-fs__card--s3 {
	height: 100%;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-border {
	/* Border width/color come from Elementor Style controls */
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-shadow {
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-card-hover:hover,
.ztp-fs--card-style-3 .ztp-fs__card--s3.has-card-hover:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
	background: transparent !important;
	background-color: transparent !important;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-anim {
	animation: ztp-fs-s3-fade-up 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3:nth-child(2).has-anim { animation-delay: 70ms; }
.ztp-fs--card-style-3 .ztp-fs__card--s3:nth-child(3).has-anim { animation-delay: 140ms; }
.ztp-fs--card-style-3 .ztp-fs__card--s3:nth-child(4).has-anim { animation-delay: 210ms; }
.ztp-fs--card-style-3 .ztp-fs__card--s3:nth-child(5).has-anim { animation-delay: 280ms; }

@keyframes ztp-fs-s3-fade-up {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ztp-fs--card-style-3 .ztp-fs__s3-visual {
	position: relative;
	width: 100%;
	flex: 0 0 auto;
	overflow: visible;
	isolation: isolate;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
}

.ztp-fs--card-style-3 .ztp-fs__s3-visual.has-arrow {
	padding-bottom: calc(var(--ztp-fs-s3-arrow-size) * var(--ztp-fs-s3-arrow-hang) + var(--ztp-fs-s3-arrow-offset-y));
}

.ztp-fs--card-style-3 .ztp-fs__s3-card-link {
	position: absolute;
	inset: 0;
	z-index: 4;
}

/*
 * Image container — silhouette from SVG clipPath (native 0–1 path, no transform).
 */
.ztp-fs--card-style-3 .ztp-fs__s3-shape {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ztp-fs-s3-aspect);
	height: auto !important;
	overflow: hidden;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	outline: none !important;
	box-shadow: none !important;
}

.ztp-fs--card-style-3 .ztp-fs__s3-shape--empty {
	background: transparent !important;
}

.ztp-fs--card-style-3 .ztp-fs__s3-media-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	cursor: default;
	background: transparent !important;
	border: none !important;
}

.ztp-fs--card-style-3 .ztp-fs__s3-media-link.is-linked {
	cursor: pointer;
}

.ztp-fs--card-style-3 .ztp-fs__s3-media-link img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: var(--ztp-fs-s3-img-fit);
	object-position: center;
	transform: scale(1);
	transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-image-hover:hover .ztp-fs__s3-media-link img {
	transform: scale(1.05);
}

.ztp-fs--card-style-3 .ztp-fs__s3-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: transparent;
	opacity: 0;
	transition: opacity 280ms ease;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-overlay .ztp-fs__s3-overlay {
	background: var(--ztp-fs-s3-overlay);
	opacity: 0.28;
}

.ztp-fs--card-style-3 .ztp-fs__card--s3.has-overlay.has-image-hover:hover .ztp-fs__s3-overlay {
	opacity: 0.4;
}

/*
 * Category pills — position via CSS vars (Elementor responsive controls).
 */
.ztp-fs--card-style-3 .ztp-fs__s3-pills {
	position: absolute;
	top: var(--ztp-fs-s3-pill-top, 16px);
	right: var(--ztp-fs-s3-pill-right, 16px);
	left: var(--ztp-fs-s3-pill-left, auto);
	bottom: var(--ztp-fs-s3-pill-bottom, auto);
	z-index: 3;
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
	gap: var(--ztp-fs-s3-pill-gap);
	max-width: 70%;
	pointer-events: auto;
	transform: none;
}

.ztp-fs--card-style-3 .ztp-fs__s3-pills.is-pos-left {
	justify-content: flex-start;
	right: auto;
	left: var(--ztp-fs-s3-pill-left, 16px);
}

.ztp-fs--card-style-3 .ztp-fs__s3-pills.is-pos-center {
	justify-content: center;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	max-width: 90%;
}

.ztp-fs--card-style-3 .ztp-fs__s3-pills.is-pos-right {
	justify-content: flex-end;
	left: auto;
	right: var(--ztp-fs-s3-pill-right, 16px);
}

.ztp-fs--card-style-3 .ztp-fs__s3-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--ztp-fs-s3-pill-bg);
	color: var(--ztp-fs-s3-pill-color);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: opacity 200ms ease;
}

.ztp-fs--card-style-3 a.ztp-fs__s3-pill:hover {
	opacity: 0.85;
	color: var(--ztp-fs-s3-pill-color);
}

/*
 * Arrow — nests into the BR circular notch of the clip path.
 */
.ztp-fs--card-style-3 .ztp-fs__s3-arrow {
	position: absolute;
	z-index: 5;
	right: calc((var(--ztp-fs-s3-arrow-size) * var(--ztp-fs-s3-arrow-hang) * -1) + var(--ztp-fs-s3-arrow-offset-x));
	bottom: calc((var(--ztp-fs-s3-arrow-size) * var(--ztp-fs-s3-arrow-hang) * -1) + var(--ztp-fs-s3-arrow-offset-y));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ztp-fs-s3-arrow-size);
	height: var(--ztp-fs-s3-arrow-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ztp-fs-s3-arrow-bg);
	color: var(--ztp-fs-s3-arrow-color);
	text-decoration: none;
	box-shadow: none;
	transform: translate3d(0, 0, 0);
	transition:
		transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
		background-color 200ms ease;
}

.ztp-fs--card-style-3 .ztp-fs__s3-arrow svg,
.ztp-fs--card-style-3 .ztp-fs__s3-arrow i,
.ztp-fs--card-style-3 .ztp-fs__s3-arrow .elementor-icon {
	display: block;
	width: 42%;
	height: 42%;
	font-size: 42%;
	line-height: 1;
	pointer-events: none;
}

.ztp-fs--card-style-3 a.ztp-fs__s3-arrow:hover,
.ztp-fs--card-style-3 a.ztp-fs__s3-arrow:focus-visible,
.ztp-fs--card-style-3 .ztp-fs__card--s3.has-card-hover:hover .ztp-fs__s3-arrow {
	transform: translate3d(3px, 0, 0) scale(1.05);
	background: var(--ztp-fs-s3-arrow-bg-hover);
	color: var(--ztp-fs-s3-arrow-color);
	outline: none;
}

.ztp-fs--card-style-3 .ztp-fs__s3-title {
	position: relative;
	z-index: 1;
	margin: var(--ztp-fs-s3-title-gap) 0 0;
	padding: 0 2px;
	background: none !important;
	background-color: transparent !important;
	font-size: clamp(1.25rem, 1.6vw, 1.75rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--ztp-fs-s3-title-color);
	text-align: var(--ztp-fs-s3-title-align);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 200ms ease;
}

.ztp-fs--card-style-3.is-equal-height .ztp-fs__s3-title {
	margin-top: auto;
	padding-top: var(--ztp-fs-s3-title-gap);
}

.ztp-fs--card-style-3 .ztp-fs__s3-title a,
.ztp-fs--card-style-3 .ztp-fs__s3-title span {
	color: inherit;
	text-decoration: none;
	transition: color 200ms ease;
}

.ztp-fs--card-style-3 .ztp-fs__s3-title a:hover,
.ztp-fs--card-style-3 .ztp-fs__card--s3.has-card-hover:hover .ztp-fs__s3-title {
	color: var(--ztp-fs-s3-title-hover);
}

@media (max-width: 1024px) {
	.ztp-fs--card-style-3 .ztp-fs__cards--s3 {
		grid-template-columns: repeat(var(--ztp-fs-cols-t), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.ztp-fs--card-style-3 .ztp-fs__cards--s3 {
		grid-template-columns: repeat(var(--ztp-fs-cols-m), minmax(0, 1fr));
	}

	.ztp-fs--card-style-3 {
		--ztp-fs-s3-gap: 24px;
		--ztp-fs-s3-arrow-size: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ztp-fs--card-style-3 .ztp-fs__card--s3,
	.ztp-fs--card-style-3 .ztp-fs__s3-media-link img,
	.ztp-fs--card-style-3 .ztp-fs__s3-arrow {
		transition: none !important;
		animation: none !important;
	}
}
