/* ==========================================================================
   LWWIS Portfolio – detalle de Galleries (plantilla por defecto) y lightbox
   Para cambiar colores sin tocar el plugin, sobrescribe desde Elementor:
   .lw-single { --lw-title: #a0a7c2; --lw-muted: rgba(255,255,255,.62); }
   ========================================================================== */

.lw-single {
	--lw-title: #a0a7c2;                 /* título de la página */
	--lw-text: #ffffff;
	--lw-muted: rgba(255, 255, 255, 0.62);
	--lw-line: rgba(255, 255, 255, 0.16);
	--lw-surface: #1b1c22;
	--lw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	box-sizing: border-box;
	flex: 1 1 100%;
	width: 100%;
	max-width: var(--lw-single-width, 1100px);
	margin: 0 auto;
	padding: 32px 24px 80px;
	color: var(--lw-text);
	font-family: 'Inter', var(--e-global-typography-text-font-family, sans-serif);
}

.lw-single a,
.lw-single a:hover,
.lw-single a:focus,
.lw-single a:visited {
	color: inherit;
	text-decoration: none;
}

.lw-single a:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* ---------- Volver y anterior / siguiente dentro de un portfolio (Elementor) ----------
   Se alinean con el contenido de Elementor: mismo ancho máximo (960 px) y sin
   sangría lateral. Para cambiarlo: .lw-single { --lw-embed-width: 1140px; } */

.lw-single--top,
.lw-single--bottom {
	width: min(var(--lw-embed-width, 960px), calc(100% - 40px));
	max-width: var(--lw-embed-width, 960px);
	padding-left: 0;
	padding-right: 0;
}

.lw-single--top {
	padding-top: 24px;
	padding-bottom: 0;
}

.lw-single--bottom {
	padding-top: 0;
	padding-bottom: 72px;
}

.lw-single--bottom .lw-single__nav {
	margin-top: 56px;
}

/* ---------- Volver (mismo estilo que Anterior / Siguiente) ---------- */

.lw-single a.lw-single__back {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	padding: 12px 18px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	transition: background-color 0.2s var(--lw-ease), border-color 0.2s var(--lw-ease);
}

.lw-single a.lw-single__back:hover,
.lw-single a.lw-single__back:focus-visible {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.06);
}

.lw-single__back-arrow {
	flex: 0 0 auto;
	transition: transform 0.2s var(--lw-ease);
}

.lw-single a.lw-single__back:hover .lw-single__back-arrow,
.lw-single a.lw-single__back:focus-visible .lw-single__back-arrow {
	transform: translateX(-3px);
}

/* ---------- Título ---------- */

.lw-single__head {
	margin: 20px 0 28px;
	text-align: left;
}

.lw-single .lw-single__title {
	margin: 0;
	font-family: 'Inter', var(--e-global-typography-text-font-family, sans-serif);
	font-size: clamp(20px, 2.4vw, 24px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--lw-title);
}

.lw-single__meta {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--lw-muted);
}

/* ---------- Imagen principal y miniaturas ---------- */

.lw-single a.lw-single__main {
	display: block;
	cursor: zoom-in;
}

/* La imagen principal ocupa siempre todo el ancho, con su proporción original
   (sin recortes ni franjas oscuras a los lados). */
.lw-single .lw-single__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: none;
	margin: 0;
	border: 0;
	border-radius: 0;
}

.lw-single__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.lw-single__thumbs li {
	margin: 0;
	padding: 0;
}

.lw-single a.lw-single__thumb {
	display: block;
	width: 92px;
	height: 92px;
	overflow: hidden;
	opacity: 0.7;
	background: var(--lw-surface);
	cursor: zoom-in;
	transition: opacity 0.2s var(--lw-ease);
}

.lw-single a.lw-single__thumb:hover,
.lw-single a.lw-single__thumb:focus-visible {
	opacity: 1;
}

.lw-single a.lw-single__thumb.is-main {
	opacity: 1;
	box-shadow: 0 0 0 2px #ffffff;
}

.lw-single__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

/* ---------- Descripción (contenido del editor) ---------- */

.lw-single__desc {
	max-width: 62ch;
	margin: 40px auto 0;
	font-size: 15px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.86);
}

.lw-single__desc > *:first-child {
	margin-top: 0;
}

.lw-single__desc > *:last-child {
	margin-bottom: 0;
}

.lw-single__desc p {
	margin: 0 0 1em;
}

/* ---------- Sliders antes / después ---------- */

.lw-single__compare {
	display: grid;
	gap: 28px;
	margin-top: 48px;
}

.lw-single__compare-item {
	width: 100%;
	max-width: 100%;
}

.lw-single__compare-item img {
	max-width: 100%;
}

/* ---------- Anterior / Siguiente (botones con flecha) ---------- */

.lw-single__nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 64px;
}

.lw-single a.lw-single__nav-link {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	max-width: 48%;
	padding: 14px 18px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 10px;
	transition: background-color 0.2s var(--lw-ease), border-color 0.2s var(--lw-ease);
}

.lw-single a.lw-single__nav-link.is-next {
	margin-left: auto;
	text-align: right;
}

.lw-single a.lw-single__nav-link:hover,
.lw-single a.lw-single__nav-link:focus-visible {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.06);
}

.lw-single__nav-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.lw-single__nav-label {
	font-size: 12px;
	color: var(--lw-muted);
}

.lw-single__nav-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.lw-single__nav-arrow {
	flex: 0 0 auto;
	transition: transform 0.2s var(--lw-ease);
}

.lw-single a.lw-single__nav-link.is-prev:hover .lw-single__nav-arrow,
.lw-single a.lw-single__nav-link.is-prev:focus-visible .lw-single__nav-arrow {
	transform: translateX(-3px);
}

.lw-single a.lw-single__nav-link.is-next:hover .lw-single__nav-arrow,
.lw-single a.lw-single__nav-link.is-next:focus-visible .lw-single__nav-arrow {
	transform: translateX(3px);
}

/* ---------- Lightbox ---------- */

html.lw-lb-open {
	overflow: hidden;
}

.lw-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(14, 15, 20, 0.95);
}

.lw-lb[hidden] {
	display: none;
}

.lw-lb__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: calc(100vw - 168px);
	max-height: calc(100vh - 96px);
	margin: 0;
}

.lw-lb .lw-lb__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 96px);
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.lw-lb .lw-lb__img.is-ready {
	opacity: 1;
}

.lw-lb .lw-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	box-shadow: none;
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.lw-lb .lw-lb__btn[hidden] {
	display: none;
}

.lw-lb .lw-lb__btn:hover,
.lw-lb .lw-lb__btn:focus {
	background: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}

.lw-lb .lw-lb__btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.lw-lb__close {
	top: 20px;
	right: 20px;
}

.lw-lb__prev {
	top: 50%;
	left: 20px;
	transform: translateY(-50%);
}

.lw-lb__next {
	top: 50%;
	right: 20px;
	transform: translateY(-50%);
}

.lw-lb__count {
	position: absolute;
	bottom: 20px;
	left: 50%;
	margin: 0;
	transform: translateX(-50%);
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.lw-lb__count[hidden] {
	display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.lw-single {
		padding: 24px 16px 64px;
	}

	.lw-single .lw-single__title {
		font-size: 20px;
	}

	.lw-single a.lw-single__thumb {
		width: 68px;
		height: 68px;
	}

	.lw-single__nav {
		flex-direction: column;
		gap: 20px;
	}

	.lw-single a.lw-single__nav-link {
		width: 100%;
		max-width: 100%;
	}

	.lw-single a.lw-single__nav-link.is-next {
		justify-content: space-between;
		margin-left: 0;
		text-align: left;
	}

	/* En celular las flechas van abajo para no tapar la imagen. */
	.lw-lb__stage {
		max-width: calc(100vw - 24px);
		max-height: calc(100vh - 150px);
	}

	.lw-lb .lw-lb__img {
		max-height: calc(100vh - 150px);
	}

	.lw-lb__prev,
	.lw-lb__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.lw-lb__prev {
		left: 16px;
	}

	.lw-lb__next {
		right: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lw-single *,
	.lw-lb * {
		transition: none !important;
	}
}
