.elementor-widget-tz-portfolio-gallery,
.elementor-widget-tz-portfolio-gallery-cards {
	--tzpg-gallery-gap: 20px;
	--tzpg-gallery-height: 82vh;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery {
	position: relative;
	width: 100%;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__scroller {
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	padding-bottom: 10px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__canvas {
	position: relative;
	display: block;
	height: var(--tzpg-gallery-height);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__item {
	position: absolute;
	overflow: visible;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__item.is-lane-break {
	z-index: 2;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #ece3d7;
	box-shadow: 0 18px 40px rgba(47, 31, 17, 0.12);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__media {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	background: #ece3d7;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__image {
	opacity: 0;
	transition: opacity 220ms ease;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__image.is-loaded {
	opacity: 1;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--paper-tape {
	border: 14px solid #f5eee5;
	box-shadow: 0 28px 60px rgba(54, 38, 22, 0.18);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--paper-tape::before,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--paper-tape::after {
	content: "";
	position: absolute;
	top: 12px;
	width: 44px;
	height: 14px;
	background: rgba(235, 214, 167, 0.82);
	z-index: 2;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--paper-tape::before {
	left: 14px;
	transform: rotate(-8deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--paper-tape::after {
	right: 14px;
	transform: rotate(9deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--vintage-border {
	padding: 14px;
	background:
		linear-gradient(135deg, rgba(255,255,255,0.55), rgba(163,140,111,0.15)),
		#efe4d4;
	border: 1px solid rgba(121, 93, 63, 0.2);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__frame--mat-shadow {
	padding: 18px;
	background: #f6f1ea;
	box-shadow:
		0 12px 26px rgba(42, 27, 15, 0.12),
		inset 0 0 0 1px rgba(78, 57, 36, 0.12);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text {
	position: absolute;
	z-index: 3;
	max-width: min(320px, 70%);
	pointer-events: none;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text-inner {
	font-family: "Georgia", serif;
	font-size: clamp(15px, 1vw, 18px);
	line-height: 1.35;
	color: #251a12;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--overlay {
	left: 18px;
	right: 18px;
	bottom: 18px;
	max-width: none;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--overlay .tzpg-gallery__text-inner {
	display: inline-block;
	padding: 14px 16px;
	background: rgba(246, 241, 234, 0.84);
	backdrop-filter: blur(6px);
	box-shadow: 0 14px 28px rgba(35, 22, 11, 0.12);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-left,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-right,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-top,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-bottom {
	filter: drop-shadow(0 12px 24px rgba(30, 18, 9, 0.13));
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-left .tzpg-gallery__text-inner,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-right .tzpg-gallery__text-inner,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-top .tzpg-gallery__text-inner,
.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-bottom .tzpg-gallery__text-inner {
	padding: 16px 18px;
	background: #f7f1e8;
	border-radius: 2px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-left {
	left: -24px;
	top: 18px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-right {
	right: -24px;
	top: 18px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-top {
	left: 18px;
	top: -18px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-bottom {
	right: 18px;
	bottom: -18px;
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-left .tzpg-gallery__text-inner {
	transform: rotate(-3deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-right .tzpg-gallery__text-inner {
	transform: rotate(3deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-top .tzpg-gallery__text-inner {
	transform: rotate(-2deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-bottom .tzpg-gallery__text-inner {
	transform: rotate(2deg);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery--empty {
	padding: 24px;
	border: 1px dashed rgba(61, 40, 20, 0.24);
	background: rgba(249, 243, 234, 0.8);
}

.elementor-widget-tz-portfolio-gallery .tzpg-gallery__empty {
	color: #4e3b29;
}

.tzpg-gallery-cards {
	--tzpg-card-min-width: 240px;
	--tzpg-cards-gap: 24px;
	--tzpg-cards-height: auto;
	--tzpg-cards-body-gap: 14px;
	--tzpg-cards-title-surface-bg: rgba(255, 252, 247, 0.84);
	--tzpg-cards-title-surface-radius: 14px;
	--tzpg-cards-title-surface-padding: 0.4em 0.75em;
	position: relative;
}

.tzpg-gallery-cards__scroller {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y pinch-zoom;
	scrollbar-width: none;
}

.tzpg-gallery-cards__scroller::-webkit-scrollbar {
	display: none;
}

.tzpg-gallery-cards__canvas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--tzpg-card-min-width), 1fr));
	gap: var(--tzpg-cards-gap);
}

.tzpg-gallery-cards.is-enhanced .tzpg-gallery-cards__scroller {
	block-size: var(--tzpg-cards-height);
}

.tzpg-gallery-cards.is-enhanced .tzpg-gallery-cards__scroller.is-dragging .tzpg-gallery-cards__card {
	pointer-events: none;
	user-select: none;
}

.tzpg-gallery-cards.is-enhanced .tzpg-gallery-cards__canvas {
	position: relative;
	display: block;
	min-width: 100%;
	block-size: var(--tzpg-cards-height);
}

.tzpg-gallery-cards.is-in-story-band {
	flex: 0 0 auto;
}

.tzpg-gallery-cards.is-in-story-band .tzpg-gallery-cards__scroller {
	overflow: visible;
	touch-action: auto;
	-webkit-overflow-scrolling: auto;
}

.tzpg-gallery-cards.is-in-story-band .tzpg-gallery-cards__canvas,
.tzpg-gallery-cards.is-in-story-band .tzpg-gallery-cards__card {
	touch-action: auto;
}

.tzpg-gallery-cards__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.tzpg-gallery-cards.is-enhanced .tzpg-gallery-cards__card {
	position: absolute;
	inset: auto auto auto auto;
	overflow: hidden;
	-webkit-user-drag: none;
}

.tzpg-gallery-cards__media {
	position: relative;
	flex: 0 0 auto;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #ece3d7;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	pointer-events: none;
}

.tzpg-gallery-cards__image,
.tzpg-gallery-cards__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
}

.tzpg-gallery-cards__placeholder {
	background:
		linear-gradient(140deg, rgba(255,255,255,0.5), rgba(189, 164, 133, 0.2)),
		#ece3d7;
}

.tzpg-gallery-cards__body {
	flex: 0 0 auto;
	position: relative;
	z-index: 1;
	pointer-events: none;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-below .tzpg-gallery-cards__body {
	padding-top: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-above .tzpg-gallery-cards__card {
	flex-direction: column-reverse;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-above .tzpg-gallery-cards__body {
	padding-bottom: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-alternating .tzpg-gallery-cards__card--title-above {
	flex-direction: column-reverse;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-alternating .tzpg-gallery-cards__card--title-above .tzpg-gallery-cards__body {
	padding-bottom: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-alternating .tzpg-gallery-cards__card--title-below .tzpg-gallery-cards__body {
	padding-top: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__card {
	flex-direction: row-reverse;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__card {
	flex-direction: row;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__body,
.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__body {
	display: flex;
	align-items: center;
	justify-content: center;
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__body {
	padding-right: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-outside.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__body {
	padding-left: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside .tzpg-gallery-cards__body {
	position: absolute;
	z-index: 1;
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-above .tzpg-gallery-cards__body {
	top: 0;
	right: 0;
	left: 0;
	padding: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-below .tzpg-gallery-cards__body {
	right: 0;
	bottom: 0;
	left: 0;
	padding: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-alternating .tzpg-gallery-cards__card--title-above .tzpg-gallery-cards__body {
	top: 0;
	right: 0;
	left: 0;
	padding: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-alternating .tzpg-gallery-cards__card--title-below .tzpg-gallery-cards__body {
	right: 0;
	bottom: 0;
	left: 0;
	padding: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__body,
.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__body {
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding: var(--tzpg-cards-body-gap);
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__body {
	left: 0;
}

.tzpg-gallery-cards--title-placement-inside.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__body {
	right: 0;
	justify-content: flex-end;
}

.tzpg-gallery-cards__title {
	margin: 0;
	max-width: 100%;
	font-size: clamp(20px, 1.6vw, 28px);
	line-height: 1.1;
	color: #241912;
	pointer-events: none;
}

.tzpg-gallery-cards__title-part--stacked {
	display: block;
}

.tzpg-gallery-cards--inside-title-surface.tzpg-gallery-cards--title-placement-inside .tzpg-gallery-cards__title {
	padding: var(--tzpg-cards-title-surface-padding);
	background: var(--tzpg-cards-title-surface-bg);
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: var(--tzpg-cards-title-surface-radius);
	box-shadow: 0 16px 34px rgba(33, 23, 17, 0.18);
	-webkit-backdrop-filter: blur(16px) saturate(135%);
	backdrop-filter: blur(16px) saturate(135%);
}

.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__title,
.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__title {
	display: inline-block;
	max-width: none;
	white-space: nowrap;
	transform-origin: center center;
}

.tzpg-gallery-cards--title-position-left .tzpg-gallery-cards__title {
	transform: rotate(-90deg);
}

.tzpg-gallery-cards--title-position-right .tzpg-gallery-cards__title {
	transform: rotate(90deg);
}

.tzpg-gallery-cards.is-enhanced .tzpg-gallery-cards__title {
	overflow-wrap: anywhere;
}

.tzpg-gallery-cards--empty {
	padding: 18px;
	border: 1px dashed rgba(61, 40, 20, 0.24);
	background: rgba(249, 243, 234, 0.8);
	color: #4e3b29;
}

@media (max-width: 767px) {
	.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text {
		max-width: min(240px, 78%);
	}

	.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-left {
		left: 10px;
		top: 10px;
	}

	.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-right {
		right: 10px;
		top: 10px;
	}

	.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-top {
		left: 10px;
		top: 10px;
	}

	.elementor-widget-tz-portfolio-gallery .tzpg-gallery__text--paper-bottom {
		right: 10px;
		bottom: 10px;
	}
}
