/* HacerPerú Blocks - modal-box */
.hpb-mb { --hpb-mb-img: 150px; }

/* ---------- Tarjeta ---------- */
.hpb-mb__trigger {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 0;
	text-align: center;
	cursor: pointer;
	transition: transform .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.hpb-mb--align-left .hpb-mb__trigger { align-items: flex-start; text-align: left; }
.hpb-mb--align-right .hpb-mb__trigger { align-items: flex-end; text-align: right; }
.hpb-mb__trigger:focus-visible { outline: 2px solid var(--hpb-accent); outline-offset: 4px; }

.hpb-mb__media {
	display: block;
	flex: none;
	width: var(--hpb-mb-img);
	height: var(--hpb-mb-img);
	overflow: hidden;
	border-radius: 50%;
	background: #e6e6e6;
}
.hpb-block .hpb-mb__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	border-radius: inherit;
	object-fit: cover;
	transition: transform .25s ease;
}
/* Sin sombra por defecto (anula sombras del tema); se puede agregar desde Estilo > Tarjeta */
.hpb-block .hpb-mb__media,
.hpb-block .hpb-mb__media img { box-shadow: none; }
.hpb-mb--hover-zoom .hpb-mb__trigger:hover .hpb-mb__media img { transform: scale(1.07); }
.hpb-mb--hover-lift .hpb-mb__trigger:hover { transform: translateY(-4px); }

.hpb-block .hpb-mb__title {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--hpb-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	transition: color .2s ease;
}
.hpb-mb__trigger:hover .hpb-mb__title { color: var(--hpb-accent); }
.hpb-block .hpb-mb__subtitle {
	display: block;
	margin: -8px 0 0;
	padding: 0;
	color: #6b6b6b;
	font-size: 14px;
	line-height: 1.4;
}
.hpb-mb__notice {
	margin: 0;
	padding: 10px 12px;
	border-left: 4px solid var(--hpb-accent);
	background: #fdeced;
	background: color-mix(in srgb, var(--hpb-accent) 8%, #fff);
	font-size: 13px;
	line-height: 1.5;
	color: #3a3a3a;
}

/* ---------- Modal ---------- */
html.hpb-mb-lock { overflow: hidden; scrollbar-gutter: stable; }

dialog.hpb-mb__dialog {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	overflow: hidden;
}
dialog.hpb-mb__dialog[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.hpb-mb__dialog::backdrop { background: rgba(0, 0, 0, .65); }

.hpb-mb__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(720px, 94vw);
	max-height: 90vh;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.hpb-mb__scroll {
	flex: 1;
	min-height: 0;
	padding: 32px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.hpb-mb__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .07);
	color: #1a1a1a;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.hpb-mb__close:hover { background: var(--hpb-accent); color: #fff; }
.hpb-mb__close:focus-visible { outline: 2px solid var(--hpb-accent); outline-offset: 2px; }

.hpb-mb__mimage { margin: 0 0 18px; }
.hpb-block .hpb-mb__mimage img,
.hpb-mb__mcontent img { max-width: 100%; height: auto; }
.hpb-mb__mimage img { display: block; width: 100%; }
.hpb-block .hpb-mb__mtitle {
	margin: 0 0 14px;
	padding-right: 36px;
	color: var(--hpb-text);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
}
.hpb-mb__mcontent { color: var(--hpb-text); font-size: 16px; line-height: 1.65; }
.hpb-mb__mcontent > :first-child { margin-top: 0; }
.hpb-mb__mcontent > :last-child { margin-bottom: 0; }

/* Animaciones de apertura */
.hpb-mb--anim-zoom .hpb-mb__dialog[open] .hpb-mb__panel { animation: hpb-mb-zoom .22s ease both; }
.hpb-mb--anim-fade .hpb-mb__dialog[open] .hpb-mb__panel { animation: hpb-mb-fade .22s ease both; }
.hpb-mb--anim-up   .hpb-mb__dialog[open] .hpb-mb__panel { animation: hpb-mb-up .25s ease both; }
.hpb-mb__dialog[open]::backdrop { animation: hpb-mb-fade .22s ease both; }
.hpb-mb--anim-none .hpb-mb__dialog[open]::backdrop { animation: none; }
@keyframes hpb-mb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hpb-mb-zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes hpb-mb-up   { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
	.hpb-mb__dialog[open] .hpb-mb__panel,
	.hpb-mb__dialog[open]::backdrop { animation: none !important; }
	.hpb-mb__trigger, .hpb-mb__media img { transition: none; }
}

@media (max-width: 600px) {
	.hpb-mb__scroll { padding: 24px 18px; }
	.hpb-block .hpb-mb__mtitle { font-size: 22px; }
}
