.lge-gallery,
.lge-gallery * {
	box-sizing: border-box;
}

.lge-gallery {
	--lge-height: 520px;
	--lge-gap: 4px;
	--lge-active-grow: 4.5;
	--lge-full-width: 100vw;
	--lge-full-offset: calc(50% - 50vw);
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	background: #fff;
	isolation: isolate;
}

.lge-gallery--full {
	width: var(--lge-full-width);
	max-width: none !important;
	margin-left: var(--lge-full-offset) !important;
	margin-right: 0 !important;
}

.lge-gallery__track {
	display: flex;
	width: 100%;
	height: var(--lge-height);
	gap: var(--lge-gap);
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
}

.lge-panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	margin: 0;
	overflow: hidden;
	transition: flex-grow 650ms cubic-bezier(.22, .61, .36, 1);
}

.lge-panel.is-active {
	flex-grow: var(--lge-active-grow);
}

.lge-gallery .lge-panel__button {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0;
	background: #27343a !important;
	box-shadow: none !important;
	color: #fff !important;
	font: inherit;
	text-align: left;
	text-decoration: none !important;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.lge-gallery .lge-panel__button::before,
.lge-gallery .lge-panel__button::after {
	display: none !important;
	content: none !important;
}

.lge-panel__media,
.lge-panel__overlay {
	position: absolute;
	inset: 0;
	display: block;
}

.lge-panel__media {
	z-index: 0;
	overflow: hidden;
}

.lge-panel__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
	transform: scale(1.01);
	transition: transform 750ms cubic-bezier(.22, .61, .36, 1), filter 450ms ease;
}

.lge-panel__image--placeholder {
	background:
		linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0)),
		#33434a;
}

.lge-panel__overlay {
	z-index: 1;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .47) 100%);
	transition: background 450ms ease, opacity 450ms ease;
}

.lge-panel__content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: clamp(18px, 2.5vw, 44px);
	color: #fff;
	text-align: center;
	pointer-events: none;
}

.lge-panel__title {
	display: block;
	width: 100%;
	max-width: 520px;
	font-size: clamp(13px, 1.05vw, 17px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -.015em;
	text-wrap: balance;
	transition: font-size 500ms ease, transform 500ms ease, opacity 350ms ease;
}

.lge-gallery--uppercase .lge-panel__title {
	text-transform: uppercase;
}

.lge-panel__description {
	display: block;
	width: min(760px, 94%);
	max-height: 0;
	margin-top: 0;
	overflow: hidden;
	opacity: 0;
	font-size: clamp(14px, 1.28vw, 20px);
	font-weight: 300;
	line-height: 1.42;
	letter-spacing: -.015em;
	text-wrap: balance;
	transform: translateY(14px);
	transition:
		max-height 500ms cubic-bezier(.22, .61, .36, 1),
		margin-top 450ms ease,
		opacity 280ms ease,
		transform 450ms ease;
}

.lge-panel.is-active .lge-panel__image {
	transform: scale(1.055);
}

.lge-panel.is-active .lge-panel__overlay {
	background:
		linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .58) 100%);
}

.lge-panel.is-active .lge-panel__title {
	font-size: clamp(18px, 1.65vw, 28px);
	transform: translateY(-2px);
}

.lge-panel.is-active .lge-panel__description {
	max-height: 13em;
	margin-top: clamp(12px, 1.4vw, 22px);
	opacity: 1;
	transform: translateY(0);
	transition-delay: 100ms, 80ms, 180ms, 100ms;
}

.lge-panel:not(.is-active) .lge-panel__button:hover .lge-panel__image {
	transform: scale(1.04);
	filter: brightness(1.07);
}

.lge-panel__button:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: -5px;
}

.lge-gallery-empty {
	margin: 0;
}

@media (max-width: 1024px) {
	.lge-panel__content {
		padding: 20px;
	}

	.lge-panel__title {
		font-size: clamp(12px, 1.45vw, 15px);
	}

	.lge-panel.is-active .lge-panel__title {
		font-size: clamp(18px, 2.25vw, 24px);
	}

	.lge-panel__description {
		font-size: clamp(14px, 1.8vw, 18px);
	}
}

@media (max-width: 767px) {
	.lge-gallery__track {
		flex-direction: column;
		height: auto;
		gap: var(--lge-gap);
	}

	.lge-panel,
	.lge-panel.is-active {
		flex: none;
		width: 100%;
	}

	.lge-panel {
		height: 104px;
		transition: height 560ms cubic-bezier(.22, .61, .36, 1);
	}

	.lge-panel.is-active {
		height: clamp(330px, 62vh, 470px);
	}

	.lge-panel__content {
		align-items: flex-start;
		justify-content: flex-end;
		padding: 24px 20px;
		text-align: left;
	}

	.lge-panel__title,
	.lge-panel.is-active .lge-panel__title {
		width: 100%;
		max-width: 100%;
		font-size: 17px;
		text-align: left;
	}

	.lge-panel.is-active .lge-panel__title {
		font-size: clamp(22px, 6.2vw, 29px);
	}

	.lge-panel__description {
		width: 100%;
		max-width: 620px;
		font-size: 16px;
		text-align: left;
		text-wrap: pretty;
	}

	.lge-panel.is-active .lge-panel__description {
		max-height: 16em;
		margin-top: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lge-panel,
	.lge-panel__image,
	.lge-panel__overlay,
	.lge-panel__title,
	.lge-panel__description {
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
	}
}

/*
 * Corrección 1.0.1
 * Elementor y algunos temas aplican `height:auto` a todas las imágenes.
 * En los paneles estrechos esto dejaba visible el fondo sólido bajo la foto.
 * Estas reglas garantizan que la imagen cubra siempre el panel completo.
 */
.lge-gallery .lge-panel,
.lge-gallery .lge-panel__button {
	background: transparent !important;
}

.lge-gallery .lge-panel__media {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
}

.lge-gallery .lge-panel__media > img.lge-panel__image,
.lge-gallery img.lge-panel__image {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
}
