/**
 * Portada RMD.
 *
 * Regla de oro: el color de texto NUNCA se fija, se hereda del theme, que ya
 * lo conmuta con [data-scheme]. Las superficies usan las variables --cs-* y
 * los bordes/atenuados salen de currentColor. Asi el claro/oscuro funciona
 * sin duplicar una sola regla.
 */

.rmd-portada {
	--rmd-borde: color-mix(in srgb, currentColor 14%, transparent);
	/* Superficie propia por color-mix, no por la variable del theme: esa
	   variable resuelve vacia en claro y dejaba las tarjetas identicas al
	   fondo de la pagina, sin el contraste que si tenian en oscuro. */
	--rmd-superficie: color-mix(in srgb, currentColor 6%, transparent);
	--rmd-acento: var(--cs-color-accent, currentColor);
	--rmd-radio: var(--cs-image-border-radius, 12px);
}

.rmd-wrap {
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: 20px;
}

.rmd-seccion {
	padding-block: clamp(2rem, 4.5vw, 3.25rem);
}

/* Franja apenas despegada del fondo, valida en los dos esquemas. */
.rmd-seccion--destacada {
	background-color: color-mix(in srgb, currentColor 5%, transparent);
}

.rmd-titulo {
	position: relative;
	margin: 0 0 1.1rem;
	padding-bottom: .65rem;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	line-height: 1.15;
}

/* Separador de color bajo cada titulo de seccion. */
.rmd-titulo::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 44px;
	height: 4px;
	border-radius: 999px;
	background: var(--rmd-acento);
}

.rmd-cta .rmd-titulo::after {
	left: 50%;
	transform: translateX(-50%);
}

.rmd-bajada {
	margin: 0 0 1.25rem;
	opacity: .72;
}

/* ---------- hero ---------- */

.rmd-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	border-bottom: 1px solid var(--rmd-borde);
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

/* Cuando hay video, el hero pasa a ser un banner de fondo: alto fijo y el
   texto se superpone en blanco fijo sobre el velo oscuro, sin importar el
   esquema del sitio. Misma logica de excepcion que la placa de los logos. */
.rmd-hero--video {
	min-height: min(70vh, 620px);
	padding-block: 0;
	color: #fff;
}

.rmd-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.rmd-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .68) 100%);
}

.rmd-hero__media video,
.rmd-hero__media iframe {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border: 0;
	pointer-events: none;
}

.rmd-hero__contenido {
	position: relative;
	z-index: 1;
	padding-block: clamp(2.5rem, 6vw, 4rem);
}

.rmd-hero__kicker {
	margin: 0 0 .85rem;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rmd-acento);
}

.rmd-hero__title {
	margin: 0 0 .85rem;
	font-size: clamp(2.1rem, 6vw, 4rem);
	line-height: 1.05;
	letter-spacing: -.02em;
}

.rmd-hero__lead {
	max-width: 62ch;
	margin: 0;
	font-size: clamp(1rem, 1.9vw, 1.2rem);
	opacity: .78;
}

.rmd-hero--video .rmd-hero__lead {
	opacity: .92;
}

/* ---------- tarjetas ---------- */

.rmd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.rmd-card {
	overflow: hidden;
	border: 1px solid var(--rmd-borde);
	border-radius: var(--rmd-radio);
	background-color: var(--rmd-superficie);
	transition: transform .18s ease, border-color .18s ease;
}

.rmd-card:hover {
	transform: translateY(-3px);
	border-color: var(--rmd-acento);
}

.rmd-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.rmd-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: color-mix(in srgb, currentColor 8%, transparent);
}

.rmd-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rmd-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.25rem;
}

.rmd-card__title {
	margin: 0 0 .6rem;
	font-size: 1.1rem;
	line-height: 1.3;
}

.rmd-card__excerpt {
	flex: 1;
	margin: 0 0 1rem;
	font-size: .93rem;
	opacity: .72;
}

.rmd-card__more {
	font-size: .85rem;
	font-weight: 600;
	color: var(--rmd-acento);
}

.rmd-mas {
	margin-top: 1.25rem;
}

.rmd-mas a {
	color: var(--rmd-acento);
	font-weight: 600;
	text-decoration: none;
}

.rmd-mas a:hover {
	text-decoration: underline;
}

/* ---------- texto largo ---------- */
/* Mismo ancho de caja que el resto de las secciones (rmd-wrap): antes el
   texto largo quedaba mas angosto que las tarjetas de arriba. */

.rmd-texto p {
	margin: 0 0 1.15rem;
	line-height: 1.7;
}

.rmd-texto > p:first-of-type {
	font-size: 1.08rem;
}

.rmd-subtitulo {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--rmd-acento);
}

.rmd-desprende {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
}

.rmd-desprende a {
	display: inline-block;
	padding: .55rem 1.1rem;
	border: 1px solid var(--rmd-borde);
	border-radius: 999px;
	color: inherit;
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease;
}

.rmd-desprende a:hover {
	border-color: var(--rmd-acento);
	color: var(--rmd-acento);
}

/* ---------- lineas de trabajo ---------- */

.rmd-lineas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.rmd-linea {
	padding: 1.4rem;
	border: 1px solid var(--rmd-borde);
	border-radius: var(--rmd-radio);
	background-color: var(--rmd-superficie);
}

.rmd-linea h3 {
	margin: 0 0 .6rem;
	font-size: 1.02rem;
	line-height: 1.3;
}

.rmd-linea p {
	margin: 0;
	font-size: .93rem;
	line-height: 1.6;
	opacity: .78;
}

.rmd-linea--ancha {
	grid-column: 1 / -1;
	border-color: var(--rmd-acento);
}

/* ---------- donde estamos ---------- */

.rmd-donde {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 1.75rem;
	align-items: center;
}

.rmd-donde p {
	line-height: 1.7;
}

.rmd-donde__mapa img {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 860px) {
	.rmd-donde {
		grid-template-columns: 1fr;
	}
}

/* ---------- buscador de medios ---------- */

.rmd-buscador {
	position: relative;
	max-width: 360px;
	margin: 0 0 1.75rem;
}

.rmd-buscador input {
	width: 100%;
	padding: .7rem 1rem .7rem 2.4rem;
	border: 1px solid var(--rmd-borde);
	border-radius: 999px;
	background-color: var(--rmd-superficie);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: .85rem center;
	background-size: 16px;
	color: inherit;
	font-size: .95rem;
	font-family: inherit;
}

.rmd-buscador input:focus {
	outline: 2px solid var(--rmd-acento);
	outline-offset: 1px;
}

.rmd-buscador input::placeholder {
	color: currentColor;
	opacity: .55;
}

.rmd-buscador__contador {
	display: block;
	margin-top: .5rem;
	font-size: .8rem;
	opacity: .6;
}

/* ---------- logos de los medios ---------- */

.rmd-logos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rmd-logo__placa {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	padding: 1.1rem;
	overflow: hidden;
	border: 1px solid var(--rmd-borde);
	border-radius: var(--rmd-radio);
	/* Placa blanca fija: los logos vienen disenados para fondo claro y en el
	   esquema oscuro varios se volvian ilegibles. La sombra (siempre negra, a
	   proposito) es lo que le da relieve en claro, donde la placa ya no
	   contrasta con el fondo de la seccion. */
	background-color: #fff;
	color: #111;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Sin web cargada: se ve pero no se puede clickear, ya no cae a una nota interna. */
div.rmd-logo__placa {
	opacity: .6;
	cursor: default;
}

a.rmd-logo__placa::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 2px var(--rmd-acento);
	opacity: 0;
	transition: opacity .2s ease;
}

a.rmd-logo__placa:hover,
a.rmd-logo__placa:focus-visible {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

a.rmd-logo__placa:hover::after,
a.rmd-logo__placa:focus-visible::after {
	opacity: 1;
}

.rmd-logo img {
	max-width: 100%;
	max-height: 62%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.rmd-logo__texto {
	font-size: .85rem;
	font-weight: 700;
	line-height: 1.25;
}

.rmd-logos__vacio {
	margin: 1rem 0 0;
	opacity: .65;
}

@media (prefers-reduced-motion: reduce) {
	.rmd-logo__placa {
		transition: none;
	}
}

/* ---------- llamadas y formulario ---------- */

.rmd-cta {
	text-align: center;
}

.rmd-boton {
	display: inline-block;
	margin-top: .75rem;
	padding: .8rem 1.6rem;
	border-radius: var(--cs-button-border-radius, 999px);
	background-color: var(--cs-color-button, var(--rmd-acento));
	color: var(--cs-color-button-contrast, #fff);
	font-weight: 600;
	text-decoration: none;
}

.rmd-boton:hover {
	background-color: var(--cs-color-button-hover, var(--rmd-acento));
	color: var(--cs-color-button-hover-contrast, #fff);
}

.rmd-form {
	margin-top: 1.25rem;
}
