/* HacerPerú Blocks - Banner de noticias */
.hpb-news {
	--hpb-gap: 15px;
	--hpb-row-gap: 20px;
	--hpb-overlay: .95;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--hpb-gap);
	row-gap: var(--hpb-row-gap);
}
.hpb-news__featured { grid-column: 1; display: flex; flex-direction: column; min-width: 0; }
.hpb-news__editor   { grid-column: 2; min-width: 0; }
.hpb-news__trending { grid-column: 1 / -1; min-width: 0; }

/* ---------- Historias destacadas ---------- */
.hpb-featured {
	position: relative;
	display: flex;
	align-items: flex-end;
	flex: 1;
	min-height: 390px;
	overflow: hidden;
	background: #dcdcdc;
}
.hpb-featured__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hpb-featured__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,var(--hpb-overlay)) 100%);
}
.hpb-featured__content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 15px 15px 18px;
	color: #fff;
	pointer-events: none;
}
.hpb-featured__content a { pointer-events: auto; }
.hpb-featured__content .hpb-cat { margin-bottom: 10px; }
.hpb-featured .hpb-title { margin-bottom: 12px; font-size: 20px; font-weight: 600; color: #f1f1f1; }
.hpb-featured .hpb-meta { color: #fff; }

/* ---------- Tarjetas (Selecciones del editor / En tendencia) ---------- */
.hpb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--hpb-card-bg);
	border: 1px solid var(--hpb-card-border);
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.hpb-card__media {
	position: relative;
	height: 190px;
	overflow: hidden;
	background: #e6e6e6;
}
.hpb-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hpb-card__media .hpb-cat { position: absolute; left: 15px; bottom: 15px; }
.hpb-card__body { position: relative; z-index: 2; padding: 15px; pointer-events: none; }
.hpb-card__body a { pointer-events: auto; }
.hpb-card .hpb-title { margin-bottom: 12px; font-size: 17px; font-weight: 700; color: var(--hpb-text); }
.hpb-card .hpb-title a:hover { color: var(--hpb-accent); }

.hpb-editor__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

/* ---------- En tendencia ---------- */
.hpb-trending__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.hpb-card--row { flex-direction: row; align-items: stretch; }
.hpb-card--row .hpb-card__media { flex: 0 0 125px; width: 125px; height: auto; min-height: 120px; }
.hpb-card--row .hpb-card__body { flex: 1; min-width: 0; padding: 12px 10px; }
.hpb-card--row .hpb-title { margin: 4px 0 0; font-size: 15px; }
.hpb-count {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 25px;
	height: 25px;
	padding: 0 6px;
	background: var(--hpb-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.hpb-news { grid-template-columns: minmax(0, 1fr); }
	.hpb-news__featured,
	.hpb-news__editor,
	.hpb-news__trending { grid-column: 1; }
	.hpb-trending__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.hpb-featured { min-height: 300px; }
	.hpb-editor__grid,
	.hpb-trending__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Metadata en filas de "En tendencia" */
.hpb-card--row .hpb-meta { margin-top: 8px; }
