/* RPSCR Posts Grid — CSS vanilla, sin dependencias */

.rpscr-pg {
	--rpscr-pg-primary: #830082;
	--rpscr-pg-text: #000;
	--rpscr-pg-gap: 3rem;

	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--rpscr-pg-gap);
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.rpscr-pg *,
.rpscr-pg *::before,
.rpscr-pg *::after {
	box-sizing: inherit;
}

.rpscr-pg__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin: 0;
	min-width: 0;
}

/* Imagen */
.rpscr-pg__media {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	margin: 0 0 1.75rem;
	background: #e6e6e6;
}

.rpscr-pg__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rpscr-pg__media:hover .rpscr-pg__img {
	transform: scale(1.04);
}

/* Título */
.rpscr-pg__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--rpscr-pg-text);
}

.rpscr-pg__title a {
	color: inherit;
	text-decoration: none;
}

.rpscr-pg__title a:hover,
.rpscr-pg__title a:focus-visible {
	color: var(--rpscr-pg-primary);
}

/* Extracto */
.rpscr-pg__excerpt {
	margin: 0 0 1.5rem;
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--rpscr-pg-text);
}

/* Ver más */
.rpscr-pg__more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	color: var(--rpscr-pg-primary);
	text-decoration: none;
}

.rpscr-pg__more:hover,
.rpscr-pg__more:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rpscr-pg__arrow {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.rpscr-pg__more:hover .rpscr-pg__arrow {
	transform: translateX(4px);
}

/* Texto solo para lectores de pantalla */
.rpscr-pg__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
	.rpscr-pg {
		--rpscr-pg-gap: 2rem;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.rpscr-pg {
		grid-template-columns: 1fr;
	}

	.rpscr-pg__title {
		font-size: 1.375rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rpscr-pg__img,
	.rpscr-pg__arrow {
		transition: none;
	}
}
