/*
 * Vesubio WP Bloqs — front.css (portable)
 * Estilos propios de los bloques del plugin: carrusel hero y banda fotográfica.
 * No depende del tema: define sus propios tokens bajo :root.
 */

:root {
	--vwb-accent: #7f0022;
	--vwb-accent-dark: color-mix(in srgb, #7f0022 78%, #000);
	--vwb-paper: #faf8f5;
	--vwb-placeholder: #e8e4e0;
	--vwb-line: #ddd8d2;
	/* Alias para compatibilidad con markup generado por el tema */
	--rpm-accent: var(--vwb-accent);
	--rpm-accent-dark: var(--vwb-accent-dark);
	--rpm-placeholder: var(--vwb-placeholder);
	--rpm-paper: #faf8f5;
	--rpm-surface: #f4f2ef;
	--rpm-line: #ddd8d2;
	--rpm-ink: #21201f;
	--rpm-muted: #6b6560;
}

/* ====== Carrusel hero ====== */
.rpm-page-content > .alignfull,
.rpm-page-content .entry-content > .alignfull,
.rpm-page-content > .wp-block-gruporpm-hero-carousel.alignfull,
.rpm-page-content .entry-content > .wp-block-gruporpm-hero-carousel.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.rpm-hero {
	position: relative;
	min-height: 68vh;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	overflow: hidden;
	padding-block: 8rem 4rem;
}
.rpm-hero__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.8s ease;
}
.rpm-hero__slide.is-active {
	opacity: 1;
}
.rpm-hero__slide.is-active .rpm-hero__media {
	animation: rpm-ken 12s ease-out forwards;
	-webkit-animation: rpm-ken 12s ease-out forwards;
}
.rpm-hero__media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #6b5a4e;
}
.rpm-hero__media--ph1 { background-image: linear-gradient(135deg, #3d3530 0%, #6b5a4e 45%, #8a6f5c 100%); }
.rpm-hero__media--ph2 { background-image: linear-gradient(145deg, #2a3d36 0%, #4a6358 50%, #7a9488 100%); }
.rpm-hero__media--ph3 { background-image: linear-gradient(160deg, #4a3228 0%, #8b4e3d 40%, #c45a45 100%); }
.rpm-hero__slide:after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.25) 55%, rgba(0,0,0,.1));
}
.rpm-hero__content {
	position: relative;
	z-index: 2;
	max-width: 44rem;
	text-align: center;
	color: #fff;
	padding-inline: 1rem;
}
.rpm-hero__title {
	font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
	font-weight: 600;
	margin: 0 0 1rem;
	color: #fff;
}
.rpm-hero__text {
	font-size: 1.125rem;
	line-height: 1.6;
	margin: 0 0 1.5rem;
	opacity: 0.92;
}
.rpm-hero__btn {
	margin-top: 0.25rem;
}
.rpm-hero__dots {
	position: absolute;
	z-index: 3;
	bottom: 1.25rem;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 0.6rem;
}
.rpm-hero__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255,255,255,.45);
	border: 0;
	cursor: pointer;
	padding: 0;
}
.rpm-hero__dot.is-active {
	background: #fff;
}
.rpm-hero__arrow {
	position: absolute;
	z-index: 4;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.55);
	background: rgba(0,0,0,.28);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background .2s ease;
}
.rpm-hero__arrow:hover {
	background: rgba(0,0,0,.55);
}
.rpm-hero__arrow--prev { left: 1.25rem; }
.rpm-hero__arrow--next { right: 1.25rem; }
.rpm-hero--no-arrows .rpm-hero__arrow {
	display: none;
}
@media (max-width: 47.99rem) {
	.rpm-hero__arrow {
		width: 38px;
		height: 38px;
	}
	.rpm-hero__arrow--prev { left: .75rem; }
	.rpm-hero__arrow--next { right: .75rem; }
}
@keyframes rpm-ken {
	from { transform: scale(1); }
	to { transform: scale(1.08); }
}

/* ====== Botones píldora (usados por el carrusel) ====== */
.rpm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	padding: 1rem 2.5rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
}
.rpm-btn--solid {
	background: var(--rpm-accent);
	color: #fff;
}
.rpm-btn--solid:hover {
	background: var(--rpm-accent-dark);
	color: #fff;
}
.rpm-btn--outline {
	background: transparent;
	color: var(--rpm-accent);
	border: 1px solid var(--rpm-accent);
}
.rpm-btn--outline:hover {
	background: var(--rpm-accent);
	color: #fff;
}

/* ====== Banda fotográfica ====== */
.rpm-band {
	position: relative;
	overflow: hidden;
	min-height: 340px;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* Alturas configurables (atributo height del bloque) */
.rpm-band.rpm-band--h-auto    { min-height: auto !important; padding-block: 0; }
.rpm-band.rpm-band--h-compact { min-height: clamp(240px, 32vh, 360px) !important; }
.rpm-band.rpm-band--h-tall    { min-height: clamp(300px, 40vh, 440px) !important; }
.rpm-band.rpm-band--h-hero    { min-height: clamp(400px, 78vh, 720px) !important; }
.rpm-band__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	will-change: transform;
}
.rpm-band--parallax .rpm-band__media {
	height: 132%;
	top: -16%;
}
.rpm-band--fixed .rpm-band__media {
	background-attachment: fixed;
}
.rpm-band--kenburns .rpm-band__media {
	animation: rpm-band-ken 16s ease-in-out infinite alternate;
	-webkit-animation: rpm-band-ken 16s ease-in-out infinite alternate;
}
@keyframes rpm-band-ken {
	from { transform: scale(1.02); }
	to { transform: scale(1.14); }
}
.rpm-band__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.32), rgba(0,0,0,.5));
}
.rpm-band__content {
	position: relative;
	color: #fff;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: 60rem;
	padding: 5rem 1.5rem;
}
.rpm-band__title {
	color: #fff;
	font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
	line-height: 1.12;
	margin: 0;
}
.rpm-band__text {
	color: rgba(255,255,255,.94);
	font-size: 1.05rem;
	margin: 0;
}
@media (max-width: 47.99rem) {
	.rpm-band { min-height: 280px; }
}

/* Accesibilidad: sin movimiento si se prefiere */
@media (prefers-reduced-motion: reduce) {
	.rpm-hero__slide.is-active .rpm-hero__media,
	.rpm-band--kenburns .rpm-band__media {
		animation: none !important;
	}
}

/* ====== Parrilla de noticias (bloque gruporpm/noticias-grid) ====== */
.rpm-noticias {
	padding-block: clamp(3rem, 7vw, 5rem);
}
.rpm-noticias__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
}
.rpm-noticias--cols-1 .rpm-noticias__grid { grid-template-columns: 1fr; }
.rpm-noticias--cols-3 .rpm-noticias__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rpm-noticias--cols-4 .rpm-noticias__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rpm-noticia {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--rpm-line, #ddd8d2);
	border-radius: calc(var(--rpm-card-radius, 0.75rem) * 1.6);
	background: var(--rpm-surface, #f4f2ef);
	overflow: hidden;
}
.rpm-noticia__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}
.rpm-noticia__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.6s ease;
}
.rpm-noticia:hover .rpm-noticia__media img {
	transform: scale(1.05);
}
.rpm-noticia__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	flex: 1;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.rpm-noticia__date {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	color: var(--rpm-muted, #6b6560);
}
.rpm-noticia__title {
	font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
	line-height: 1.2;
	margin: 0;
}
.rpm-noticia__title a {
	color: var(--rpm-ink, #21201f);
	text-decoration: none;
}
.rpm-noticia__title a:hover {
	color: var(--rpm-accent);
}
.rpm-noticia__excerpt {
	color: var(--rpm-muted, #6b6560);
	font-size: 1rem;
	margin: 0;
}
.rpm-noticia__cta {
	display: inline-block;
	margin-top: auto;
	padding: 0.45rem 1.15rem;
	border: 1px solid var(--rpm-accent);
	border-radius: 9999px;
	background: transparent;
	color: var(--rpm-accent);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-decoration: none;
}
.rpm-noticia__cta:hover {
	background: var(--rpm-accent);
	color: var(--rpm-paper, #fff);
}
@media (min-width: 48rem) and (max-width: 71.99rem) {
	.rpm-noticias--cols-3 .rpm-noticias__grid,
	.rpm-noticias--cols-4 .rpm-noticias__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 47.99rem) {
	.rpm-noticias .rpm-noticias__grid {
		grid-template-columns: 1fr !important;
	}
}
@media (prefers-reduced-motion: reduce) {
	.rpm-noticia__media img {
		transition: none;
	}
	.rpm-noticia:hover .rpm-noticia__media img {
		transform: none;
	}
}

/* ====== Empresas del grupo (bloque gruporpm/empresas) ====== */
.rpm-empresas ul.wp-block-post-template {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(3.5rem, 8vw, 7rem);
}
.rpm-empresas .wp-block-post {
	margin: 0;
}
.rpm-empresas--cols-2 ul.wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(1.75rem, 3.5vw, 3rem);
	align-items: stretch;
}
.rpm-empresas--cols-2 .rpm-empresa {
	max-width: none;
	flex-direction: column;
}
.rpm-empresas--cols-2 .rpm-empresa__media {
	flex: 0 0 auto;
	max-width: none;
	min-height: 0;
	aspect-ratio: auto;
}
.rpm-empresas--cols-2 .rpm-empresa__image {
	position: relative;
	inset: auto;
	height: 15rem;
}
.rpm-empresas--cols-2 .rpm-empresa__body {
	padding: clamp(1.25rem, 2.5vw, 2rem) !important;
}
@media (max-width: 900px) {
	.rpm-empresas--cols-2 ul.wp-block-post-template {
		grid-template-columns: 1fr;
	}
	.rpm-empresas--cols-2 .rpm-empresa {
		flex-direction: row;
	}
	.rpm-empresas--cols-2 .rpm-empresa__media {
		flex: 0 0 46%;
		max-width: 46%;
		min-height: 100%;
	}
	.rpm-empresas--cols-2 .rpm-empresa__image {
		position: absolute;
		inset: 0;
		height: 100%;
	}
}
.rpm-empresas.alignfull {
	padding-inline: clamp(1rem, 4vw, 3rem);
	box-sizing: border-box;
}
.wp-block-group.rpm-empresa {
	display: flex;
	max-width: 72rem;
	margin-inline: auto;
	align-items: stretch;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0;
	border: 1px solid var(--rpm-line);
	border-radius: calc(var(--rpm-card-radius, 0.75rem) * 1.6);
	background: var(--rpm-surface);
	padding: 0;
	overflow: hidden;
	box-shadow: 0 1.25rem 3rem -2rem rgba(0, 0, 0, 0.18);
}
/* La imagen ocupa toda la columna izquierda como fondo, sin padding */
.rpm-empresa__media {
	position: relative;
	flex: 0 0 46%;
	max-width: 46%;
	align-self: stretch;
	min-height: 24rem;
	padding: 0 !important;
}
.rpm-empresa__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
.rpm-empresa__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}
.rpm-empresa__body {
	flex: 1 1 auto;
	min-width: 0;
	align-items: flex-start;
	justify-content: center;
	text-align: left;
	padding: clamp(1.75rem, 3.5vw, 3rem) !important;
}
.wp-block-group.rpm-empresa__head {
	display: flex;
	width: 100%;
	align-items: center;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: clamp(1rem, 2.5vw, 1.5rem);
	margin-bottom: 1.1rem;
}
/* Contenedor cuadrado reservado para el logotipo */
.wp-block-group.rpm-empresa__logo {
	flex: 0 0 auto;
	width: clamp(5rem, 9vw, 6.5rem);
	height: clamp(5rem, 9vw, 6.5rem) !important;
	max-width: clamp(5rem, 9vw, 6.5rem) !important;
	max-height: clamp(5rem, 9vw, 6.5rem) !important;
	min-width: clamp(5rem, 9vw, 6.5rem);
	min-height: clamp(5rem, 9vw, 6.5rem);
	aspect-ratio: 1 / 1;
	border-radius: calc(var(--rpm-card-radius, 0.75rem) * 0.9);
	border: 1px dashed var(--rpm-line);
	background: var(--rpm-surface);
	display: grid;
	place-items: center;
	overflow: hidden;
	padding: 0 !important;
}
.rpm-empresa__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.rpm-empresa__headtext {
	flex: 1 1 auto;
	min-width: 0;
	align-items: flex-start;
}
.rpm-empresa__headtext > * {
	margin-left: 0 !important;
	margin-right: auto !important;
	text-align: left;
}
.rpm-empresa__body > * {
	margin-left: 0 !important;
	margin-right: auto !important;
	text-align: left;
}
.rpm-empresa__tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading, "Playfair Display", Georgia, serif);
	font-style: italic;
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	color: var(--rpm-accent);
	letter-spacing: 0.01em;
	margin-bottom: 0.5rem;
}
.rpm-empresa__title {
	margin: 0 0 0.9rem !important;
	font-family: var(--wp--preset--font-family--display, "Playfair Display", Georgia, serif);
	line-height: 1.05;
	font-weight: 600;
	text-wrap: balance;
}
.rpm-empresa__desc {
	color: var(--rpm-muted);
	font-size: clamp(1rem, 1.4vw, 1.125rem);
	line-height: 1.7;
	max-width: 34em;
}
.rpm-empresa__desc p {
	margin: 0 0 1rem;
}
.rpm-empresa__desc p:last-child {
	margin-bottom: 0;
}
.rpm-empresa__link {
	display: inline-block;
	margin-top: 1.5rem;
	margin-right: auto;
	background: var(--rpm-accent);
	color: #fff;
	border-radius: 999px;
	padding: 0.85rem 1.9rem;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.rpm-empresa__link:hover {
	background: var(--rpm-accent-dark);
	color: #fff;
	transform: translateY(-1px);
}
@media (max-width: 47.99rem) {
	.wp-block-group.rpm-empresa {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.rpm-empresa__media {
		flex: none;
		max-width: 100%;
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
	.rpm-empresa__body {
		padding: clamp(1.5rem, 4vw, 2rem) !important;
	}
}
