/*
 * Estilos añadidos tras la reconstrucción del tema.
 * css/app.css es el Tailwind compilado del tema original: no se puede
 * regenerar, así que los estilos nuevos van en este archivo.
 */

.rpp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin: 3rem 0 4rem;
	font-family: Manrope-Semibold, sans-serif;
}

.rpp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 .9rem;
	border: 1px solid #e5e7eb;
	border-radius: .5rem;
	color: #1f2937;
}

.rpp-pagination a.page-numbers:hover {
	border-color: #1a592c;
	color: #1a592c;
}

.rpp-pagination .page-numbers.current {
	background-color: #1a592c;
	border-color: #1a592c;
	color: #fff;
}

.rpp-empty {
	margin: 2rem auto 6rem;
	font-family: Manrope, sans-serif;
	color: #4b5563;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Banner de portada ---------- */
.rpp-hero.rpp-hero-section_wrapper {
	height: auto;
	min-height: 520px;
	align-items: center;
	background-color: #1a592c;
	background-image: url(../images/hero-bg.svg);
	background-size: cover;
	background-position: center right;
	color: #fff;
}

.rpp-hero__inner {
	display: grid;
	grid-template-columns: 1fr;
	align-items: center;
	gap: 2.5rem;
	padding: 3.5rem 0;
}

.rpp-hero__text {
	max-width: 40rem;
}

.rpp-hero__title {
	font-family: Manrope-Bold, sans-serif;
	font-size: clamp(2rem, 4.2vw, 3.4rem);
	line-height: 1.12;
	color: #fff;
	text-wrap: balance;
}

.rpp-hero__lead {
	margin-top: 1.25rem;
	font-family: Manrope, sans-serif;
	font-size: 1.1rem;
	line-height: 1.65;
	color: #d6eadb;
	max-width: 34rem;
}

.rpp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 2rem;
}

.rpp-hero__button {
	display: inline-flex;
	align-items: center;
	padding: .8rem 1.4rem;
	border-radius: .5rem;
	border: 1px solid #fff;
	font-family: Manrope-Semibold, sans-serif;
	font-size: .95rem;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.rpp-hero__button--primary {
	background-color: #fff;
	color: #1a592c;
}

.rpp-hero__button--primary:hover {
	background-color: #e4f2e2;
	border-color: #e4f2e2;
}

.rpp-hero__button--secondary {
	background-color: transparent;
	border-color: rgba(255, 255, 255, .6);
	color: #fff;
}

.rpp-hero__button--secondary:hover {
	background-color: rgba(255, 255, 255, .12);
	border-color: #fff;
}

.rpp-hero__media {
	display: flex;
	justify-content: center;
}

.rpp-hero__media img {
	width: 100%;
	max-width: 32rem;
	max-height: 420px;
	object-fit: cover;
	border-radius: 1rem;
	box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55);
}

.rpp-hero__media--seal img {
	width: min(340px, 70vw);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 6px solid rgba(255, 255, 255, .9);
}

@media (min-width: 1024px) {
	.rpp-hero__inner {
		grid-template-columns: 1.2fr 1fr;
		gap: 4rem;
		padding: 4.5rem 0;
	}
	.rpp-hero__media {
		justify-content: flex-end;
	}
}

@media (max-width: 1023px) {
	.rpp-hero.rpp-hero-section_wrapper {
		min-height: 0;
		background-position: 30% center;
	}
	.rpp-hero__media--seal {
		display: none;
	}
}

/* ---------- Cabecera de categorías, etiquetas y búsqueda ---------- */
.rpp-page-header {
	background-color: #e4f2e2;
	background-image: url(../images/circles.png);
	background-size: cover;
	background-position: center;
	padding: 3.5rem 0;
	margin-bottom: 3rem;
}

.rpp-page-header h1 {
	font-family: Manrope-Bold, sans-serif;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	color: #1d2327;
}

.rpp-page-header p {
	margin-top: .5rem;
	font-family: Manrope, sans-serif;
	color: #37393a;
	max-width: 40rem;
}

.rpp-empty a {
	color: #1a592c;
	text-decoration: underline;
}

/* ---------- Franja "Especiales" ---------- */
.rpp-especiales.rpp-module-especial_container {
	height: auto;
	padding: 4rem 0;
}

.rpp-especiales__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.rpp-especiales__header h2 {
	font-family: Manrope-Bold, sans-serif;
	font-size: 1.5rem;
	color: #1d2327;
}

.rpp-especiales__header a {
	display: inline-flex;
	align-items: center;
	font-family: Manrope-Semibold, sans-serif;
	color: #1a592c;
}

.rpp-especiales__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 780px) {
	.rpp-especiales__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.rpp-especiales__item a {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: .75rem;
	aspect-ratio: 4 / 3;
}

.rpp-especiales__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.rpp-especiales__item a:hover img {
	transform: scale(1.04);
}

.rpp-especiales__item a > div {
	position: absolute;
	inset: auto 0 0 0;
	padding: 1.25rem;
	background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
	color: #fff;
}

.rpp-especiales__item time {
	font-family: Manrope-Medium, sans-serif;
	font-size: .8rem;
	opacity: .85;
}

.rpp-especiales__item h3 {
	margin-top: .25rem;
	font-family: Manrope-Bold, sans-serif;
	font-size: 1.1rem;
	line-height: 1.3;
}

/* ---------- Formato editorial de las notas ---------- */
.entry-content .rpp-claves {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	border-left: 4px solid #1a592c;
	border-radius: 0 .75rem .75rem 0;
	background-color: #f1f8f0;
}

.entry-content .rpp-claves > h3 {
	margin: 0 0 .75rem;
	font-family: Manrope-Bold, sans-serif;
	font-size: .85rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #1a592c;
}

.entry-content .rpp-claves ul {
	margin: 0;
	padding-left: 1.1rem;
	list-style: disc;
}

.entry-content .rpp-claves li {
	margin: .4rem 0;
	font-family: Manrope, sans-serif;
	line-height: 1.55;
	color: #1d2327;
}

.entry-content .rpp-claves li::marker {
	color: #1a592c;
}

.entry-content h2.wp-block-heading {
	margin: 2.25rem 0 .75rem;
	font-family: Manrope-Bold, sans-serif;
	font-size: 1.35rem;
	line-height: 1.3;
	color: #1d2327;
}

.entry-content ul.wp-block-list,
.entry-content ol.wp-block-list {
	margin: 1rem 0 1.25rem;
	padding-left: 1.25rem;
}

.entry-content ul.wp-block-list { list-style: disc; }
.entry-content ol.wp-block-list { list-style: decimal; }

.entry-content .wp-block-list li {
	margin: .45rem 0;
	line-height: 1.6;
}

.entry-content .rpp-fuentes {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
	font-family: Manrope, sans-serif;
	font-size: .85rem;
	line-height: 1.6;
	color: #5b5e60;
}

.entry-content .rpp-fuentes a {
	color: #1a592c;
	text-decoration: underline;
}

/* ---------- Barra principal ---------- */
.rpp-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background-color: #fff;
	border-bottom: 1px solid #eeeeee;
	box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .35);
}

.admin-bar .rpp-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .rpp-header {
		top: 0;
	}
}

.rpp-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 4.5rem;
}

.rpp-header__logo .custom-logo-link {
	width: auto;
	display: flex;
}

.rpp-header__logo img {
	width: auto;
	height: 3.25rem;
}

.rpp-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.rpp-nav__list {
	display: flex;
	align-items: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rpp-nav__list > li > a {
	position: relative;
	display: block;
	padding: .6rem .9rem;
	font-family: Manrope-Semibold, sans-serif;
	font-size: .95rem;
	color: #37393a;
	white-space: nowrap;
	transition: color .2s ease;
}

.rpp-nav__list > li > a::after {
	content: "";
	position: absolute;
	left: .9rem;
	right: .9rem;
	bottom: .2rem;
	height: 2px;
	border-radius: 2px;
	background-color: #1a592c;
	transform: scaleX(0);
	transition: transform .2s ease;
}

.rpp-nav__list > li > a:hover,
.rpp-nav__list > li.current-menu-item > a,
.rpp-nav__list > li.current-menu-parent > a {
	color: #1a592c;
}

.rpp-nav__list > li > a:hover::after,
.rpp-nav__list > li.current-menu-item > a::after,
.rpp-nav__list > li.current-menu-parent > a::after {
	transform: scaleX(1);
}

.rpp-header__actions {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.rpp-header__panel {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .55rem 1rem;
	border: 1px solid #1a592c;
	border-radius: .5rem;
	font-family: Manrope-Semibold, sans-serif;
	font-size: .88rem;
	color: #1a592c;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}

.rpp-header__panel:hover {
	background-color: #1a592c;
	color: #fff;
}

.rpp-header__panel svg {
	flex-shrink: 0;
}

.rpp-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0 .65rem;
	border: 1px solid #e5e7eb;
	border-radius: .5rem;
	background: #fff;
	cursor: pointer;
}

.rpp-header__toggle span {
	display: block;
	height: 2px;
	border-radius: 2px;
	background-color: #1d2327;
	transition: transform .2s ease, opacity .2s ease;
}

.rpp-header.is-open .rpp-header__toggle span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.rpp-header.is-open .rpp-header__toggle span:nth-child(2) {
	opacity: 0;
}

.rpp-header.is-open .rpp-header__toggle span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Móvil y tablet: menú desplegable */
@media (max-width: 1023px) {
	.rpp-header__inner {
		min-height: 4rem;
	}

	.rpp-header__logo img {
		height: 2.6rem;
	}

	.rpp-header__toggle {
		display: inline-flex;
	}

	.rpp-header__nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: .5rem 0 1rem;
		background-color: #fff;
		border-bottom: 1px solid #eeeeee;
		box-shadow: 0 16px 24px -18px rgba(0, 0, 0, .35);
	}

	.rpp-header.is-open .rpp-header__nav {
		display: block;
	}

	.rpp-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.rpp-nav__list > li > a {
		padding: .85rem .25rem;
		border-bottom: 1px solid #f1f1f1;
		font-size: 1rem;
	}

	.rpp-nav__list > li > a::after {
		display: none;
	}

	.rpp-nav__list > li.current-menu-item > a {
		padding-left: .75rem;
		border-left: 3px solid #1a592c;
	}
}

@media (max-width: 639px) {
	.rpp-header__panel span {
		display: none;
	}

	.rpp-header__panel {
		padding: .6rem;
	}
}

/* ---------- Últimas Noticias (fila horizontal) ---------- */
.rpp-latest {
	padding: 4rem 0 5rem;
}

.rpp-latest__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.75rem;
	padding-bottom: .9rem;
	border-bottom: 2px solid #1a592c;
}

.rpp-latest__header h2 {
	font-family: Manrope-Bold, sans-serif;
	font-size: 1.5rem;
	color: #1d2327;
}

.rpp-latest__header a {
	display: inline-flex;
	align-items: center;
	font-family: Manrope-Semibold, sans-serif;
	font-size: .92rem;
	color: #1a592c;
	white-space: nowrap;
}

.rpp-latest__row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 80%;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: .75rem;
	scrollbar-width: thin;
}

@media (min-width: 640px) {
	.rpp-latest__row {
		grid-auto-columns: calc((100% - 1.25rem) / 2);
	}
}

@media (min-width: 1024px) {
	.rpp-latest__row {
		grid-auto-flow: row;
		grid-template-columns: repeat(4, 1fr);
		overflow: visible;
		padding-bottom: 0;
	}
}

.rpp-latest__card {
	scroll-snap-align: start;
}

.rpp-latest__card > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid #eeeeee;
	border-radius: .75rem;
	overflow: hidden;
	background-color: #fff;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rpp-latest__card > a:hover {
	border-color: #1a592c;
	box-shadow: 0 14px 30px -18px rgba(26, 89, 44, .45);
	transform: translateY(-2px);
}

.rpp-latest__image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: #e4f2e2;
}

.rpp-latest__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rpp-latest__body {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 1rem 1.1rem 1.25rem;
}

.rpp-latest__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem .75rem;
	font-family: Manrope-Medium, sans-serif;
	font-size: .75rem;
	color: #5b5e60;
}

.rpp-latest__category {
	padding: .15rem .55rem;
	border-radius: 999px;
	background-color: #e4f2e2;
	color: #1a592c;
}

.rpp-latest__body h3 {
	font-family: Manrope-Bold, sans-serif;
	font-size: 1.02rem;
	line-height: 1.35;
	color: #1d2327;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rpp-latest__body p {
	font-family: Manrope, sans-serif;
	font-size: .86rem;
	line-height: 1.55;
	color: #5b5e60;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Cuadrícula de noticias (Noticias, categorías, etiquetas, búsqueda) ---------- */
.rpp-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.rpp-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.rpp-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1280px) {
	.rpp-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.rpp-page-header + .rpp-grid,
.rpp-page-header + .rpp-empty {
	margin-top: 0;
}

/* ---------- Márgenes laterales en pantallas pequeñas ---------- */
@media (max-width: 1343px) {
	.container {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (max-width: 1023px) {
	.rpp-header__nav {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (max-width: 639px) {
	.rpp-latest__header h2 {
		font-size: 1.25rem;
	}

	.rpp-latest__header a {
		font-size: .85rem;
	}
}
