/* ── HV Gallery ──────────────────────────────────────────────────────────── */

/* ── Galería: página de listado ─────────────────────────────────────────── */

.hv-gallery-page {
	padding: 32px 0 48px;
}

.hv-gallery-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.hv-gallery-title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
	flex: 1;
	line-height: 1.2;
}

.hv-gallery-start-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	background: var(--theme-color-red, #FD4F18);
	color: #fff !important;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	font-size: 15px;
	transition: opacity 0.15s;
}

.hv-gallery-start-btn:hover {
	opacity: 0.88;
}

.hv-gallery-start-btn-sm {
	padding: 6px 14px;
	font-size: 13px;
}

.hv-gallery-description {
	margin-bottom: 24px;
	font-size: 1.05rem;
	color: #555;
	max-width: 760px;
}

.hv-gallery-meta {
	font-size: 13px;
	color: #999;
	margin-bottom: 20px;
}

/* Grid de miniaturas */
.hv-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.hv-gallery-grid-item {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 4 / 3;
	background: #f0f0f0;
}

.hv-gallery-grid-item a {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.hv-gallery-grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.22s ease;
}

.hv-gallery-grid-item:hover img {
	transform: scale(1.06);
}

.hv-gallery-grid-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
	opacity: 0;
	transition: opacity 0.2s;
	display: flex;
	align-items: flex-end;
	padding: 10px;
}

.hv-gallery-grid-item:hover .hv-gallery-grid-overlay {
	opacity: 1;
}

.hv-gallery-grid-overlay span {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.hv-gallery-grid-num {
	position: absolute;
	top: 7px;
	left: 7px;
	background: rgba(0, 0, 0, 0.48);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 3px;
	padding: 2px 6px;
	line-height: 1.5;
}

.hv-gallery-empty {
	color: #999;
	padding: 24px 0;
}

/* Ad slot en la grilla */
.hv-gallery-ad-slot {
	aspect-ratio: unset !important;
	min-height: 260px;
	background: #f7f7f7;
	border: 1px dashed #ddd;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hv-gallery-ad-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.hv-gallery-ad-label {
	font-size: 11px;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}

/* Celda sin imagen */
.hv-gallery-no-thumb {
	width: 100%;
	height: 100%;
	background: #e8e8e8;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: #aaa;
}

/* ── Foto: página individual ─────────────────────────────────────────────── */

.hv-photo-page {
	padding: 20px 0 48px;
}

/* Barra de nav superior */
.hv-photo-topnav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	font-size: 14px;
	color: #666;
	flex-wrap: wrap;
}

.hv-photo-topnav a {
	color: #555;
	text-decoration: none;
}

.hv-photo-topnav a:hover {
	text-decoration: underline;
}

.hv-photo-back-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 600;
}

.hv-photo-counter {
	font-size: 13px;
	color: #aaa;
	flex-shrink: 0;
}

.hv-photo-nav-btns {
	display: flex;
	gap: 6px;
	margin-left: auto;
}

.hv-photo-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 14px;
	/*
	background: #f0f0f0;
	color: #333 !important;
	*/
	background: var(--theme-color-red, #FD4F18);
	color: #fff !important;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s;
}

.hv-photo-nav-btn:hover {
	/*background: #e2e2e2;*/
	opacity: 0.88;
}

.hv-photo-nav-btn.is-disabled {
	display: none !important;
}

/* Imagen principal */
.hv-photo-image-wrap {
	margin-bottom: 22px;
	background: #111;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: calc(100vh - 220px);
	/*min-height: 280px;*/
}

.hv-photo-image-wrap img {
	max-width: 100%;
	/*max-height: calc(100vh - 220px);*/
	object-fit: contain;
	display: block;
	width: auto;
	height: auto;
}

.hv-photo-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 280px;
	font-size: 60px;
	color: #444;
}

/* Título y descripción */
.hv-photo-title {
	font-size: 1.55rem;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.25;
}

.hv-photo-description {
	font-size: 1rem;
	color: #555;
	margin-bottom: 32px;
	max-width: 760px;
}

.hv-photo-description p:last-child {
	margin-bottom: 0;
}

/* Nav inferior (anterior / siguiente con títulos) */
.hv-photo-bottomnav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-top: 24px;
	border-top: 1px solid #e8e8e8;
	flex-wrap: wrap;
}

.hv-photo-bottomnav-link {
	display: inline-flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 18px;
	background: #f5f5f5;
	border-radius: 6px;
	text-decoration: none !important;
	color: #333 !important;
	font-size: 14px;
	max-width: 48%;
	transition: background 0.15s;
}

.hv-photo-bottomnav-link:hover {
	background: #ebebeb;
}

.hv-photo-bottomnav-link.is-disabled {
	display: none !important;
}

.hv-photo-bottomnav-link .nav-label {
	font-size: 11px;
	color: #aaa;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hv-photo-bottomnav-link .nav-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Ad interstitial ────────────────────────────────────────────────────── */

#hv-photo-ad-interstitial {
	padding: 32px 0;
	display: flex;
	justify-content: center;
}

#hv-photo-ad-interstitial[hidden] {
	display: none !important;
}

.hv-ad-interstitial-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	max-width: 360px;
	width: 100%;
}

.hv-ad-interstitial-label {
	font-size: 11px;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	margin: 0;
}

.hv-ad-interstitial-unit {
	min-width: 300px;
	min-height: 250px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hv-ad-interstitial-continue {
	display: inline-flex;
	align-items: center;
	padding: 10px 24px;
	background: var(--theme-color-red, #FD4F18);
	color: #fff !important;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	transition: opacity 0.15s;
}

.hv-ad-interstitial-continue:hover {
	opacity: 0.88;
}

/* Mobile */
@media (max-width: 640px) {
	.hv-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hv-gallery-title {
		font-size: 1.5rem;
	}

	.hv-photo-image-wrap,
	.hv-photo-image-wrap img {
		max-height: 60vh;
	}

	.hv-photo-title {
		font-size: 1.2rem;
	}

	.hv-photo-bottomnav-link {
		max-width: 100%;
		flex: 1;
	}

	.hv-photo-nav-btns {
		margin-left: 0;
	}
}

/* Ocultar la navegación genérica de posts en la vista de foto individual */
.single-hv_photo .post-navigation,
.single-hv_photo nav.navigation.post-navigation {
	display: none !important;
}