/* Mosaico de cabecera */
.cv-mosaico {
	position: relative;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 8px;
	height: clamp(300px, 40vw, 540px);
	border-radius: 18px;
	overflow: hidden;
	margin-top: 24px;
	margin-bottom: 40px;
}
.cv-mosaico .cv-foto {
	display: block;
	overflow: hidden;
	background: #DCE5E7;
	min-height: 0;
}
.cv-mosaico .cv-foto:first-child {
	grid-row: 1 / 3;
}
.cv-mosaico .cv-foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease, filter .3s ease;
}
.cv-mosaico .cv-foto:hover img,
.cv-mosaico .cv-foto:focus-visible img {
	transform: scale(1.04);
	filter: brightness(.92);
}
.cv-mosaico .cv-oculta {
	display: none;
}
.cv-ver-todas {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid #0B1F2A;
	border-radius: 10px;
	background: #FFFFFF;
	color: #0B1F2A;
	font: 600 14px/1 var(--wp--preset--font-family--cuerpo, inherit);
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(11, 31, 42, .18);
}
.cv-ver-todas:hover {
	background: #1CC8D4;
}
@media (max-width: 720px) {
	.cv-mosaico {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 2fr 1fr;
		height: 78vw;
		gap: 4px;
		border-radius: 12px;
	}
	.cv-mosaico .cv-foto:first-child {
		grid-row: auto;
		grid-column: 1 / 3;
	}
	.cv-mosaico .cv-foto:nth-child(n+4) {
		display: none;
	}
	.cv-ver-todas {
		right: 10px;
		bottom: 10px;
		padding: 8px 12px;
		font-size: 13px;
	}
}

/* Fotos dentro del texto */
.single .wp-block-post-content figure.wp-block-image {
	margin: 28px 0;
}
.single .wp-block-post-content figure.wp-block-image img {
	border-radius: 14px;
	width: 100%;
	height: auto;
}
.single .wp-block-post-content figure.wp-block-image figcaption {
	font-size: 14px;
	color: var(--wp--preset--color--gris, #5B6B73);
	text-align: left;
	margin-top: 8px;
}
img[data-cv-full] {
	cursor: zoom-in;
}

/* Visor */
.cv-visor {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(6, 18, 24, .96);
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}
.cv-visor.abierto {
	display: flex;
}
.cv-visor img {
	max-width: min(94vw, 1500px);
	max-height: 82vh;
	object-fit: contain;
	border-radius: 6px;
	user-select: none;
}
.cv-visor-pie {
	color: #E8F0F2;
	font-size: 15px;
	margin-top: 14px;
	padding: 0 20px;
	text-align: center;
	min-height: 22px;
	max-width: 900px;
}
.cv-visor-cuenta {
	position: absolute;
	top: 18px;
	left: 22px;
	color: #E8F0F2;
	font-size: 14px;
	font-weight: 600;
}
.cv-visor button {
	position: absolute;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, .12);
	color: #FFFFFF;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.cv-visor button:hover {
	background: #1CC8D4;
	color: #0B1F2A;
}
.cv-visor .cv-cerrar { top: 12px; right: 14px; }
.cv-visor .cv-ant { left: 14px; top: 50%; transform: translateY(-50%); }
.cv-visor .cv-sig { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) {
	.cv-visor .cv-ant, .cv-visor .cv-sig { top: auto; bottom: 18px; transform: none; }
	.cv-visor img { max-height: 70vh; }
}
