/* -------- Layout / Container -------- */
.opo-blog-grid {
	width: 100%;
}

/* Tabs sin fondo */
.opo-blog-grid__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 26px;
	align-items: center;
	max-width: 1140px;
	margin: 0 auto 2px auto;
	padding: 0 15px;
}

.opo-tab {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 10px 10px;
	cursor: pointer;
	font-family: "Satoshi", Sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 16px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #2d2d2d;
	position: relative;
}

.opo-tab:hover,
.opo-tab:focus,
.opo-tab:active {
	background-color: transparent;
	color: #2d2d2d;
	text-decoration: none;
}

.opo-tab.is-active {
	color: #c1301d;
}

.opo-tab.is-active::after,
.opo-tab:hover::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 1px;
	width: 100%;
	background: #2d2d2d;
	border-radius: 2px;
}

/* Contenido con fondo (posts + footer) */
.opo-blog-grid__content {
	background: #f4f5f8;
	border-radius: 18px;
	padding: 70px 15px 125px 15px;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* -------- Grid -------- */
.opo-blog-grid__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 22px;
	position: relative;
	max-width: 1140px;
	margin: auto;
}

@media (max-width: 1024px) {
	.opo-blog-grid__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.opo-blog-grid__grid {
		grid-template-columns: 1fr;
	}
}

/* -------- Card -------- */
.opo-card {
	height: 100%;
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
	max-width: 365px;
}

.opo-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.opo-card__media {
	height: 260px;
	background-size: cover;
	background-position: center;
	border-radius: 25px;
	position: relative;
}

.opo-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #fff;
	background: #2e2e2e;
}

/* Colores por slug (ajusta a tus slugs reales) */
.opo-card--cat-articulo .opo-card__badge,
.opo-card--cat-articulos .opo-card__badge {
	background: #c83c2a;
}

.opo-card--cat-consejo .opo-card__badge,
.opo-card--cat-consejos .opo-card__badge {
	background: #d7c4a7;
	color: #2a241e;
}

.opo-card--cat-descargable .opo-card__badge,
.opo-card--cat-descargables .opo-card__badge {
	background: #e8c43a;
	color: #2a241e;
}

.opo-card--cat-podcast .opo-card__badge,
.opo-card--cat-podcasts .opo-card__badge {
	background: #ffffff;
	color: #2a241e;
}

.opo-card--cat-historia-real .opo-card__badge,
.opo-card--cat-historias-reales .opo-card__badge {
	background: #222;
}

.opo-card__body {
	padding: 20px 25px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.opo-card__title {
	font-size: 24px;
	line-height: 25px;
	color: #2d2d2d;
	font-weight: 500;
	font-family: "ClashDisplay", Sans-serif;
}

.opo-card__excerpt {
	font-size: 12px;
	line-height: 14px;
	color: #2d2d2d;
	font-family: "Satoshi", Sans-serif;
	font-weight: 500;
	letter-spacing: 1px;
}

.opo-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 30px;
}

.opo-card__cta {
	font-size: 14px;
	line-height: 16px;
	font-weight: 700;
	color: #2d2d2d;
	font-family: "Satoshi", Sans-serif;
	letter-spacing: 1.5px;
}

.opo-card__icon {
	width: 46px;
	height: 46px;
	border-radius: 999px;
	border: 1px solid #edb926;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #2d2d2d;
}

.opo-card__link:hover .opo-card__title {
	text-decoration: underline;
}

.opo-card__link:hover .opo-card__cta {
	text-decoration: underline;
}

.opo-card__link:hover .opo-card__icon {
	background: #edb926;
}

.opo-card__icon:hover {
	color: #2d2d2d;
}

.opo-card__icon svg {
	width: 22px;
	height: 22px;
}

/* -------- Footer -------- */
.opo-blog-grid__footer {
	margin-top: 22px;
	display: flex;
	align-items: center;
	gap: 12px;
	justify-content: center;
}

.opo-load-more {
	appearance: none;
	border: 0;
	background: #edb926;
	color: #111;
	border-radius: 999px;
	padding: 10px 16px;
	font-weight: 700;
	cursor: pointer;
}

.opo-load-more:hover {
	background: #c1301d;
	color: white;
}

.opo-load-more.is-loading {
	opacity: 0.7;
	cursor: progress;
}

.opo-blog-grid__status {
	font-size: 12px;
	color: rgba(17, 17, 17, 0.65);
}

.opo-blog-grid__empty {
	grid-column: 1 / -1;
	padding: 14px 0;
	color: rgba(17, 17, 17, 0.7);
}

/* -------- Overlay + spinner (sobre el bloque gris entero) -------- */
.opo-blog-grid__content.is-loading::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.06);
	z-index: 5;
	border-radius: 18px;
	pointer-events: auto;
	cursor: progress;
}

.opo-blog-grid__content.is-loading::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 4px solid rgba(17, 17, 17, 0.18);
	border-top-color: #e2572d;
	transform: translate(-50%, -50%);
	animation: opoSpin 0.9s linear infinite;
	z-index: 6;
}

@keyframes opoSpin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

@media (max-width: 768px) {
	.opo-blog-grid__content {
		padding: 35px 15px 60px 15px;
	}

	.opo-card__media {
		height: 220px;
	}
}

@media (max-width: 480px) {
	.opo-blog-grid__content {
		padding: 24px 12px 40px 12px;
		border-radius: 14px;
	}

	.opo-card__media {
		height: 190px;
		border-radius: 18px;
	}

	.opo-blog-grid__tabs {
		gap: 12px;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.opo-tab {
		white-space: nowrap;
	}
}
