/*
 * Galería y ficha de casos de éxito.
 * Los colores toman la paleta global de Kadence (Personalizar → Colores);
 * los valores después de la coma son el respaldo si el tema no la define.
 */
.fz-casos,
.fz-ficha,
.fz-testimonio {
	--fz-primario: var(--global-palette1, #0167b0);
	--fz-primario-oscuro: var(--global-palette2, #02557f);
	--fz-texto: var(--global-palette3, #10222e);
	--fz-texto-suave: var(--global-palette5, #5a6b78);
	--fz-borde: var(--global-gray-400, #d5dee4);
	--fz-fondo-suave: var(--global-palette7, #f3f7f9);
	--fz-fondo: var(--global-palette9, #ffffff);
	--fz-degradado: linear-gradient(135deg, #0167b0 0%, #047b83 45%, #3fa974 75%, #bee45d 100%);
	--fz-verde: var(--global-palette10, #3fa974);
	--fz-radio: 12px;
}

.fz-casos {
	container: fz-casos / inline-size;
}

/* Filtros */
.fz-casos__filtros {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.fz-casos__filtro {
	padding: 0.5rem 1.1rem;
	border: 1px solid var(--fz-borde);
	border-radius: 999px;
	background: var(--fz-fondo);
	color: var(--fz-texto);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.fz-casos__filtro:hover {
	border-color: var(--fz-primario);
	color: var(--fz-primario);
	background: var(--fz-fondo);
}

.fz-casos__filtro[aria-pressed="true"] {
	background: var(--fz-primario);
	border-color: var(--fz-primario);
	color: #fff;
}

.fz-casos__filtro:focus-visible {
	outline: 2px solid var(--fz-primario);
	outline-offset: 2px;
}

/* Galería ancha: centrada y hasta 1720px. Kadence la limitaba y la corría a la izquierda con
   ".wp-site-blocks .content-container .is-layout-constrained > .alignwide"; las clases
   repetidas suben la especificidad para ganarle sin usar !important. */
:is(.entry-content, .editor-styles-wrapper) .wp-block-fz-galeria-casos.wp-block-fz-galeria-casos.alignwide.alignwide {
	width: 100%;
	max-width: 1720px;
	margin-right: auto;
	margin-left: auto;
}

/* Tarjetas en filas centradas: si la última fila queda incompleta, se centra */
.fz-casos__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
}

/* Ancho fijo (sin crecer) para que todas las tarjetas midan lo mismo, incluso en la última fila */
.fz-casos__grid > .fz-caso {
	flex: 0 1 262px;
}

@media (max-width: 600px) {
	.fz-casos__grid > .fz-caso {
		flex-basis: 100%;
	}
}

.fz-caso {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--fz-borde);
	border-radius: var(--fz-radio);
	background: var(--fz-fondo);
	transition: box-shadow 0.2s, transform 0.2s;
}

.fz-caso:hover {
	box-shadow: 0 12px 28px rgba(16, 34, 46, 0.12);
	transform: translateY(-2px);
}

.fz-caso[hidden] {
	display: none;
}

.fz-caso__imagen {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--fz-degradado);
}

.fz-caso__imagen img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fz-caso__sin-foto {
	display: grid;
	place-items: center;
	height: 100%;
	color: rgba(255, 255, 255, 0.9);
	font-size: 3.5rem;
	font-weight: 700;
}

.fz-caso__insignia {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: #bee45d;
	color: #10222e;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.fz-caso__cuerpo {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1.1rem 1.25rem 1.25rem;
}

.fz-casos .fz-caso__cuerpo p {
	margin: 0;
}

.fz-caso__tipo {
	color: var(--fz-primario);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fz-casos .fz-caso__titulo {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.3;
}

.fz-caso__titulo a {
	color: var(--fz-texto);
	text-decoration: none;
}

.fz-caso__titulo a:hover {
	color: var(--fz-primario);
}

.fz-caso__ciudad,
.fz-caso__implementacion {
	color: var(--fz-texto-suave);
	font-size: 0.95rem;
}

.fz-caso__testimonio {
	margin: 0.5rem 0 0;
	padding: 0 0 0 1rem;
	border-left: 3px solid var(--fz-verde);
	color: var(--fz-texto);
	font-style: italic;
}

.fz-caso__mas {
	margin-top: auto;
	padding-top: 0.75rem;
	color: var(--fz-primario);
	font-weight: 600;
	text-decoration: none;
}

.fz-caso__mas::after {
	content: " →";
}

.fz-caso__mas:hover {
	color: var(--fz-primario-oscuro);
}

/* Destacados: ocupan dos columnas con la foto a un lado */
@container fz-casos (min-width: 700px) {
	.fz-casos__grid > .fz-caso--destacado {
		flex: 0 1 548px;
		flex-direction: row;
	}

	.fz-caso--destacado .fz-caso__imagen {
		flex: 0 0 55%;
		aspect-ratio: auto;
		min-height: 320px;
	}

	.fz-caso--destacado .fz-caso__cuerpo {
		justify-content: center;
		padding: 1.75rem;
	}

	.fz-caso--destacado .fz-caso__titulo {
		font-size: 1.6rem;
	}
}

.fz-casos-vacio {
	color: var(--global-palette5, #5a6b78);
}

/* Página individual del caso */
.fz-ficha {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--fz-radio);
	background: var(--fz-fondo-suave);
}

.fz-ficha dt {
	color: var(--fz-texto-suave);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fz-ficha dd {
	margin: 0.2rem 0 0;
	color: var(--fz-texto);
	font-weight: 600;
}

.fz-testimonio {
	margin: 2.5rem 0 0;
	padding: 1.75rem 2rem;
	border-left: 4px solid var(--fz-verde);
	border-radius: var(--fz-radio);
	background: var(--fz-fondo-suave);
}

.fz-testimonio blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--fz-texto);
	font-size: 1.15rem;
	font-style: italic;
}

.fz-testimonio blockquote p:last-child {
	margin-bottom: 0;
}

.fz-testimonio figcaption {
	margin-top: 0.75rem;
	color: var(--fz-texto-suave);
	font-weight: 600;
}

.fz-testimonio figcaption::before {
	content: "— ";
}

@media (prefers-reduced-motion: reduce) {
	.fz-caso,
	.fz-casos__filtro {
		transition: none;
	}

	.fz-caso:hover {
		transform: none;
	}
}

/* ---------- Ventana emergente del caso ---------- */
.fz-modal {
	--fz-modal-alto: min(88vh, 720px);
	width: min(1100px, calc(100vw - 2rem));
	max-width: none;
	max-height: none;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 18px;
	background: var(--global-palette9, #fff);
	color: var(--global-palette4, #1e3a4c);
	box-shadow: 0 30px 80px rgba(16, 34, 46, 0.35);
}

.fz-modal[open] {
	animation: fz-modal-entra 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fz-modal.is-cerrando {
	animation: fz-modal-sale 0.2s ease-in forwards;
}

.fz-modal::backdrop {
	background: rgba(16, 34, 46, 0.7);
	backdrop-filter: blur(4px);
}

.fz-modal[open]::backdrop {
	animation: fz-fondo-entra 0.35s ease-out;
}

.fz-modal.is-cerrando::backdrop {
	animation: fz-fondo-sale 0.2s ease-in forwards;
}

@keyframes fz-modal-entra {
	from { opacity: 0; transform: translateY(24px) scale(0.97); }
	to { opacity: 1; transform: none; }
}

@keyframes fz-modal-sale {
	to { opacity: 0; transform: translateY(12px) scale(0.98); }
}

@keyframes fz-fondo-entra {
	from { opacity: 0; }
}

@keyframes fz-fondo-sale {
	to { opacity: 0; }
}

/* Evita que la página de atrás se desplace con la ventana abierta */
html:has(.fz-modal[open]) {
	overflow: hidden;
}

.fz-modal__cerrar {
	display: grid;
	position: absolute;
	z-index: 2;
	top: 0.9rem;
	right: 0.9rem;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 4px 14px rgba(16, 34, 46, 0.2);
	color: var(--global-palette3, #10222e);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.2s, background-color 0.2s;
}

.fz-modal__cerrar:hover {
	background: #bee45d;
	color: var(--global-palette3, #10222e);
	transform: rotate(90deg);
}

.fz-modal__cerrar:focus-visible {
	outline: 2px solid var(--global-palette1, #0167b0);
	outline-offset: 2px;
}

.fz-modal__contenido {
	max-height: var(--fz-modal-alto);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.fz-detalle__foto {
	position: relative;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #0167b0 0%, #047b83 45%, #3fa974 75%, #bee45d 100%);
}

.fz-detalle__foto img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Con foto: se ve completa (sin recorte) y el espacio sobrante se rellena
   con la misma foto desenfocada. */
.fz-detalle__foto.tiene-foto {
	overflow: hidden;
	background: var(--global-palette3, #10222e);
}

.fz-detalle__foto.tiene-foto::before {
	position: absolute;
	inset: -10%;
	background: var(--fz-foto-fondo) center / cover no-repeat;
	filter: blur(28px) saturate(1.2);
	opacity: 0.75;
	content: "";
}

.fz-detalle__foto.tiene-foto img {
	position: relative;
	object-fit: contain;
}

.fz-detalle__texto {
	padding: 1.75rem 1.5rem 2rem;
}

.fz-modal .fz-detalle__texto .fz-caso__tipo {
	margin: 0 0 0.35rem;
}

.fz-modal .fz-detalle__titulo {
	margin: 0 3rem 1.25rem 0;
	color: var(--global-palette3, #10222e);
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.2;
}

.fz-modal .fz-ficha {
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
}

.fz-detalle__historia > :first-child {
	margin-top: 0;
}

.fz-detalle__historia p {
	margin: 0 0 1em;
}

.fz-modal .fz-testimonio {
	margin-top: 1.5rem;
	padding: 1.25rem 1.5rem;
}

.fz-detalle__acciones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--fz-borde, #d5dee4);
}

.fz-detalle__cta {
	padding: 0.75rem 1.4rem;
	border-radius: 8px;
	background: var(--global-palette1, #0167b0);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s, transform 0.2s;
}

.fz-detalle__cta:hover {
	background: var(--global-palette2, #02557f);
	color: #fff;
	transform: translateY(-2px);
}

/* Escritorio: foto fija a la izquierda, texto con scroll propio a la derecha */
@media (min-width: 800px) {
	.fz-modal__contenido {
		overflow: hidden;
	}

	.fz-detalle {
		display: grid;
		grid-template-columns: 45% 1fr;
		height: var(--fz-modal-alto);
	}

	.fz-detalle__foto {
		aspect-ratio: auto;
		height: 100%;
	}

	.fz-detalle__foto .fz-caso__sin-foto {
		font-size: 6rem;
	}

	.fz-detalle__texto {
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 2.5rem 2.5rem 2.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fz-modal[open],
	.fz-modal.is-cerrando,
	.fz-modal[open]::backdrop,
	.fz-modal.is-cerrando::backdrop {
		animation-duration: 0.01ms;
	}
}

/* ---------- Detalles de la galería ---------- */

/* Foto: leve zoom al pasar el mouse */
.fz-caso__imagen {
	overflow: hidden;
}

.fz-caso__imagen img {
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fz-caso:hover .fz-caso__imagen img {
	transform: scale(1.06);
}

/* Línea con el degradado de la marca que aparece arriba de la tarjeta */
.fz-caso {
	position: relative;
}

.fz-caso::before {
	position: absolute;
	z-index: 1;
	top: 0;
	right: 0;
	left: 0;
	height: 4px;
	transform: scaleX(0);
	transform-origin: left;
	background: linear-gradient(90deg, #0167b0, #047b83, #3fa974, #bee45d);
	content: "";
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fz-caso:hover::before {
	transform: scaleX(1);
}

/* Contador en cada filtro */
.fz-casos__filtro-num {
	display: inline-grid;
	min-width: 1.5em;
	height: 1.5em;
	margin-left: 0.35em;
	padding: 0 0.35em;
	place-items: center;
	border-radius: 999px;
	background: var(--fz-fondo-suave);
	color: var(--fz-texto-suave);
	font-size: 0.75em;
	font-weight: 700;
}

.fz-casos__filtro[aria-pressed="true"] .fz-casos__filtro-num {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.fz-casos__filtro[aria-pressed="true"] {
	background: linear-gradient(120deg, #0167b0, #047b83);
	box-shadow: 0 6px 16px rgba(1, 103, 176, 0.25);
}

.fz-casos__filtros {
	justify-content: center;
}

/* Animación al filtrar (View Transitions) */
::view-transition-group(*) {
	animation-duration: 0.45s;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
	.fz-caso__imagen img,
	.fz-caso::before {
		transition: none;
	}

	.fz-caso:hover .fz-caso__imagen img {
		transform: none;
	}
}

/* Año "Cliente desde" arriba a la derecha de la foto */
.fz-caso__anio {
	position: absolute;
	z-index: 1;
	top: 0.75rem;
	right: 0.75rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: linear-gradient(120deg, rgba(1, 103, 176, 0.92), rgba(4, 123, 131, 0.92));
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 4px 12px rgba(16, 34, 46, 0.25);
	color: #fff;
	font-family: var(--global-heading-font-family);
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.fz-caso__anio small {
	margin-right: 0.15em;
	font-family: var(--global-body-font-family);
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.04em;
	opacity: 0.85;
	text-transform: uppercase;
}

/* ---------- Línea de tiempo [fz_casos_historia] (horizontal) ---------- */
.fz-historia-wrap {
	position: relative;
	max-width: 1240px;
	margin: 0 auto;
}

.fz-historia {
	--fz-h-punto: 18px;
	--fz-h-gap: 1.5rem;
	display: flex;
	gap: var(--fz-h-gap);
	margin: 0;
	padding: 0.5rem 2rem 1.5rem;
	overflow-x: auto;
	scroll-padding-inline: 2rem;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(1, 103, 176, 0.35) transparent;
	list-style: none;
	/* Difumina los bordes para indicar que hay más contenido al costado */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}

.fz-historia:focus-visible {
	outline: 2px solid var(--global-palette1, #0167b0);
	outline-offset: 4px;
}

.fz-historia__hito {
	position: relative;
	flex: 0 0 min(270px, 78vw);
	margin: 0;
	padding-top: calc(var(--fz-h-punto) + 1rem);
	scroll-snap-align: start;
	text-align: left;
}

/* Tramo de línea de cada hito (se une con el siguiente a través del espacio entre ambos) */
.fz-historia__hito::after {
	position: absolute;
	top: calc(var(--fz-h-punto) / 2 - 1.5px);
	right: calc(var(--fz-h-gap) * -1);
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, #0167b0, #047b83);
	content: "";
}

.fz-historia__hito:nth-child(even)::after {
	background: linear-gradient(90deg, #047b83, #3fa974);
}

.fz-historia__hito:last-child::after {
	right: 0;
	background: linear-gradient(90deg, #3fa974, rgba(190, 228, 93, 0));
}

/* Punto */
.fz-historia__hito::before {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 1.25rem;
	width: var(--fz-h-punto);
	height: var(--fz-h-punto);
	border: 4px solid var(--global-palette9, #fff);
	border-radius: 50%;
	background: linear-gradient(135deg, #0167b0, #3fa974);
	box-shadow: 0 0 0 2px rgba(1, 103, 176, 0.25);
	content: "";
}

.fz-historia__hito--clave::before {
	background: #bee45d;
	box-shadow: 0 0 0 2px rgba(63, 169, 116, 0.5), 0 0 18px rgba(190, 228, 93, 0.8);
}

.fz-historia__anio {
	display: inline-block;
	margin-bottom: 0.6rem;
	padding: 0.25rem 0.8rem;
	border-radius: 999px;
	background: linear-gradient(120deg, #0167b0, #047b83);
	color: #fff;
	font-family: var(--global-heading-font-family);
	font-size: 0.95rem;
	font-weight: 800;
}

.fz-historia__hito--clave .fz-historia__anio {
	background: linear-gradient(120deg, #2a8a60, #3fa974);
}

.fz-historia__contenido {
	min-height: 9.5rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--global-gray-400, #d5dee4);
	border-radius: 14px;
	background: var(--global-palette9, #fff);
	box-shadow: 0 10px 26px rgba(16, 34, 46, 0.05);
	transition: transform 0.25s, box-shadow 0.25s;
}

.fz-historia__contenido:hover {
	box-shadow: 0 16px 34px rgba(16, 34, 46, 0.1);
	transform: translateY(-3px);
}

.fz-historia .fz-historia__contenido h3 {
	margin: 0 0 0.3rem;
	font-size: 1.05rem;
	line-height: 1.3;
}

.fz-historia .fz-historia__contenido p {
	margin: 0;
	color: var(--global-palette5, #5a6b78);
	font-size: 0.95rem;
}

.fz-historia__contenido a {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.fz-historia__contenido a::after {
	content: " →";
}

/* Flechas */
.fz-historia__flecha {
	display: grid;
	position: absolute;
	z-index: 2;
	top: 50%;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	place-items: center;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: var(--global-palette9, #fff);
	box-shadow: 0 6px 18px rgba(16, 34, 46, 0.18);
	color: var(--global-palette1, #0167b0);
	font-size: 1.2rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.fz-historia__flecha[hidden] {
	display: none;
}

.fz-historia__flecha:hover {
	background: linear-gradient(120deg, #0167b0, #047b83);
	color: #fff;
	transform: translateY(-50%) scale(1.08);
}

.fz-historia__flecha--prev {
	left: -0.5rem;
}

.fz-historia__flecha--next {
	right: -0.5rem;
}

@media (hover: none) {
	.fz-historia__flecha {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fz-historia {
		scroll-behavior: auto;
	}

	.fz-historia__contenido,
	.fz-historia__flecha {
		transition: none;
	}

	.fz-historia__contenido:hover {
		transform: none;
	}
}

/* ---------- Sucursales ---------- */

/* Etiqueta "3 sucursales" abajo a la izquierda de la foto */
.fz-caso__sucursales {
	position: absolute;
	z-index: 1;
	bottom: 0.75rem;
	left: 0.75rem;
	padding: 0.3rem 0.7rem 0.3rem 1.6rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230167b0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M4 9v11h16V9'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E") 0.55rem center / 0.85rem no-repeat;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 4px 12px rgba(16, 34, 46, 0.2);
	color: var(--global-palette2, #02557f);
	font-size: 0.8rem;
	font-weight: 700;
}

/* Lista de sucursales en la ficha */
.fz-ficha__dato--ancho {
	grid-column: 1 / -1;
}

.fz-ficha .fz-ficha__sucursales {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.5rem;
	margin: 0.4rem 0 0;
	padding: 0;
	list-style: none;
}

.fz-ficha__sucursales li {
	margin: 0;
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--global-gray-400, #d5dee4);
	border-radius: 999px;
	background: var(--global-palette9, #fff);
	font-size: 0.88rem;
	font-weight: 500;
}

.fz-ficha__sucursales strong {
	color: var(--global-palette1, #0167b0);
}

/* ---------- Carrusel de fotos en la ventana del caso ---------- */
.fz-carrusel {
	touch-action: pan-y;
	user-select: none;
}

.fz-carrusel .fz-carrusel__foto {
	position: absolute;
	z-index: 1;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 0.45s ease;
}

.fz-carrusel .fz-carrusel__foto.is-activa {
	z-index: 2;
	opacity: 1;
}

.fz-detalle__foto.fz-carrusel .fz-carrusel__foto img {
	position: static;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

.fz-carrusel__foto figcaption {
	position: absolute;
	bottom: 2.6rem;
	left: 50%;
	max-width: 85%;
	padding: 0.35rem 0.9rem;
	transform: translateX(-50%);
	border-radius: 999px;
	background: rgba(11, 22, 32, 0.72);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fz-carrusel__flecha {
	display: grid;
	position: absolute;
	z-index: 3;
	top: 50%;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	place-items: center;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 14px rgba(16, 34, 46, 0.25);
	color: var(--global-palette1, #0167b0);
	font-size: 1.1rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.fz-carrusel__flecha:hover {
	background: linear-gradient(120deg, #0167b0, #047b83);
	color: #fff;
	transform: translateY(-50%) scale(1.08);
}

.fz-carrusel__flecha--prev {
	left: 0.75rem;
}

.fz-carrusel__flecha--next {
	right: 0.75rem;
}

.fz-carrusel__puntos {
	display: flex;
	position: absolute;
	z-index: 3;
	bottom: 0.9rem;
	left: 50%;
	gap: 0.4rem;
	transform: translateX(-50%);
}

.fz-carrusel__puntos button {
	width: 0.6rem;
	height: 0.6rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: width 0.3s, background-color 0.3s;
}

.fz-carrusel__puntos button[aria-current="true"] {
	width: 1.6rem;
	background: #bee45d;
}

.fz-carrusel__flecha:focus-visible,
.fz-carrusel__puntos button:focus-visible {
	outline: 2px solid #bee45d;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.fz-carrusel .fz-carrusel__foto,
	.fz-carrusel__puntos button,
	.fz-carrusel__flecha {
		transition: none;
	}
}

/* Etiqueta "Facturación electrónica" arriba de "Ver caso" */
.fz-casos .fz-caso__cuerpo .fz-caso__fe {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 0.4rem;
	margin: auto 0 0;
	padding: 0.35rem 0.8rem 0.35rem 0.45rem;
	border-radius: 999px;
	/* Verde oscuro para que el texto blanco se lea bien */
	background: #1f8a5b;
	box-shadow: 0 4px 12px rgba(31, 138, 91, 0.25);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
}

.fz-caso__fe::before {
	display: grid;
	width: 1.1rem;
	height: 1.1rem;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	content: "✓";
	font-size: 0.72rem;
	font-weight: 800;
}

.fz-caso__fe + .fz-caso__mas {
	margin-top: 0;
}
