/* Home works block. */

.trabajos-home-wrapper {
	--tgh-black: #000000;
	--tgh-white: #ffffff;
	--tgh-gap: 0px;
	--tgh-ease: cubic-bezier(0.16, 1, 0.3, 1);

	background: var(--tgh-black);
	padding: 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.trabajos-home-wrapper,
.trabajos-home-wrapper *,
.trabajos-home-wrapper *::before,
.trabajos-home-wrapper *::after {
	box-sizing: border-box !important;
}

.trabajos-home-wrapper a,
.trabajos-home-wrapper a:hover,
.trabajos-home-wrapper a:visited,
.trabajos-home-wrapper a:focus {
	text-decoration: none !important;
	color: inherit !important;
}

.trabajos-home-wrapper h3,
.trabajos-home-wrapper span,
.trabajos-home-wrapper div {
	margin: 0;
	padding: 0;
	color: inherit;
}

.trabajos-home-grid {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: var(--tgh-gap);
}

.trabajo-home-item {
	display: grid !important;
	grid-template-columns: 3fr 1fr;
	align-items: stretch;
	height: 380px;
	overflow: hidden;

	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.8s var(--tgh-ease), transform 0.8s var(--tgh-ease);
}

.trabajo-home-item.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.trabajo-home-item.is-media-first .trabajo-home-item__media { order: 1; }
.trabajo-home-item.is-media-first .trabajo-home-item__caption { order: 2; }

.trabajo-home-item.is-caption-first {
	grid-template-columns: 1fr 3fr;
}
.trabajo-home-item.is-caption-first .trabajo-home-item__caption { order: 1; }
.trabajo-home-item.is-caption-first .trabajo-home-item__media { order: 2; }

.trabajo-home-item__media {
	position: relative;
	height: 100%;
	overflow: hidden;
	background: #111;
	line-height: 0;
}

.trabajo-home-item__media img,
.trabajo-home-item__media video {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	transition: transform 0.7s var(--tgh-ease);
}

.trabajo-home-item__video-preview {
	opacity: 0;
	z-index: 2;
	transition: opacity 0.25s ease, transform 0.7s var(--tgh-ease);
}

.trabajo-home-item.is-previewing .trabajo-home-item__video-preview {
	opacity: 1;
}

.trabajo-home-item:hover .trabajo-home-item__media img,
.trabajo-home-item:hover .trabajo-home-item__media video {
	transform: scale(1.05);
}

.trabajo-home-item__caption {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
	height: 100% !important;
	background: var(--tgh-white) !important;
	color: #000000 !important;
	padding: 44px 14px !important;
	text-align: center !important;
}

.trabajo-home-item__label {
	position: absolute;
	top: 16px;
	left: 14px;
	right: 14px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #000 !important;
	font-family: Inter;
	text-align: center !important;
}

.trabajo-home-item__title {
	font-size: clamp(15px, 1.8vw, 38px);
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
	color: #000000 !important;
	text-align: center !important;
	margin: 0 !important;
}

.trabajo-home-item__year {
	position: absolute;
	bottom: 16px;
	left: 14px;
	right: 14px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #000 !important;
	font-family: Inter;
	text-align: center !important;
}

.trabajos-home-transition-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	background: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
	opacity: 0;
	transition: opacity 0.55s ease, backdrop-filter 0.55s ease, background 0.55s ease;
}

.trabajos-home-transition-overlay.is-active {
	opacity: 1;
	pointer-events: all;
	background: rgba(0, 0, 0, 0.92);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

@media (max-width: 780px) {
    .trabajo-home-item__title {
    	font-size: clamp(32px, 1.8vw, 38px);
    	letter-spacing:0px;
    }
	.trabajos-home-grid {
		grid-template-columns: 1fr !important;
	}
	.trabajo-home-item,
	.trabajo-home-item.is-caption-first {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		height: auto;
	}
	.trabajo-home-item .trabajo-home-item__media { order: 1 !important; height: 300px; }
	.trabajo-home-item .trabajo-home-item__caption { order: 2 !important; }
}
