/**
 * Front page hero (wp-block-cover.mwm-hero)
 *
 * Full viewport minus WP admin bar; content clears fixed header + offset.
 * --mwm-hero-offset: use 35rem here if the design literally requires it (default 3.5rem).
 */

.mwm-hero {
	position: relative !important;
}

/* Same intent as margin-top: header row + extra rhythm, without a blank gap above the image */
.mwm-hero.wp-block-cover .wp-block-cover__inner-container {
	--mwm-hero-offset: 35px;

	box-sizing: border-box;
	padding-top: calc(var(--mwm-header-height) + var(--mwm-hero-offset));
	padding-bottom: var(--wp--preset--spacing--70);
	/*
	 * 100vh suele ser MÁS alto que la ventana visible en móvil (incluye hueco de UI del navegador).
	 * svh = viewport “pequeño” (mejor primer pintado); dvh = dinámico (sigue barras al scroll).
	 * Declaraciones en cascada: el navegador usa la última que entienda.
	 */
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)) !important;
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px)) !important;
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)) !important;
	display: flex;
	flex-direction: column;
}

.mwm-hero.wp-block-cover .wp-block-cover__inner-container .wp-block-group {
	width: 100%;
}

.mwm-hero.wp-block-cover .wp-block-cover__inner-container>.wp-block-group {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.mwm-hero.wp-block-cover h1.wp-block-heading {
	margin-top: 0;
}

@media (max-width: 1023px) {
	.mwm-hero.wp-block-cover .wp-block-cover__inner-container {
		--mwm-hero-offset: 2rem;

		padding-top: calc(var(--mwm-header-height) + var(--mwm-hero-offset));
	}
}

/*
 * Hero páginas Alquiler / Venta: sin imagen de fondo (color sólido foreground); mismo alto que portada.
 * Título H1 con escala heading-2, bloque alineado a la izquierda; columnas texto/imagen 416px; imagen con radio maqueta.
 */
.mwm-hero--alquiler.wp-block-cover .hero-form__title,
.mwm-hero--venta.wp-block-cover .hero-form__title {
	max-width: 856px;
	line-height: 1.2;
	text-align: left;
	margin-left: 0;
	margin-right: auto;
}

/* Template HTML sin clases is-layout-* del editor: blockGap solo funciona con flex/grid */
.mwm-hero--alquiler .hero-form__intro.wp-block-group,
.mwm-hero--venta .hero-form__intro.wp-block-group {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mwm-hero--alquiler .hero-form__row.wp-block-columns,
.mwm-hero--venta .hero-form__row.wp-block-columns {
	justify-content: space-between;
}

.mwm-hero--alquiler .hero-form__image img,
.mwm-hero--venta .hero-form__image img {
	border-radius: 12px;
}

/*
 * Taxonomía tipo_propiedad — Figma 6501:21134
 * Migas arriba; fila inferior: título accent (416px) + descripción tertiary.
 */
.mwm-hero--alquiler.mwm-hero--tax.wp-block-cover .wp-block-cover__inner-container > .hero-tax__shell,
.mwm-hero--alquiler.mwm-hero--tax.wp-block-cover .wp-block-cover__inner-container > .wp-block-group.hero-tax__shell,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax.wp-block-cover .wp-block-cover__inner-container > .hero-tax__shell,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax.wp-block-cover .wp-block-cover__inner-container > .wp-block-group.hero-tax__shell {
	width: 100%;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__inner,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__inner {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--70, 80px);
	width: 100%;
	min-height: 0;
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__body,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__body {
	width: 100%;
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__row.wp-block-columns,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__row.wp-block-columns {
	justify-content: space-between;
	align-items: center;
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__row > .wp-block-column:first-child,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__row > .wp-block-column:first-child {
	flex-basis: 416px !important;
	max-width: 416px;
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__label,
.mwm-hero--alquiler.mwm-hero--tax .wp-block-query-title.hero-tax__label,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__label,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .wp-block-query-title.hero-tax__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__description,
.mwm-hero--alquiler.mwm-hero--tax .wp-block-term-description.hero-tax__description,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__description,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .wp-block-term-description.hero-tax__description {
	margin: 0;
	line-height: 1.4;
	color: var(--wp--preset--color--tertiary);
}

.mwm-hero--alquiler.mwm-hero--tax .hero-tax__description p,
.mwm-hero--alquiler.mwm-hero--tax .wp-block-term-description.hero-tax__description p,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__description p,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .wp-block-term-description.hero-tax__description p {
	margin: 0;
	line-height: 1.4;
	color: var(--wp--preset--color--tertiary);
}

@media (max-width: 1023px) {

	.mwm-hero--alquiler.mwm-hero--tax .hero-tax__row > .wp-block-column:first-child,
	.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--tax .hero-tax__row > .wp-block-column:first-child {
		flex-basis: 100% !important;
		max-width: 100%;
	}
}

/*
 * Guía El Capistrano — Figma 6501:21274
 * Título itálica; imagen 636× máx. 445px de alto con recorte.
 */
.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__title em,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__title em {
	font-style: italic;
}

/* Figma 6501:21285 — fila texto + imagen: misma altura de columna, contenido pegado abajo (items-end). */
.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row.wp-block-columns,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row.wp-block-columns {
	align-items: stretch;
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 0;
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__description,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__description {
	width: 100%;
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__description > p:last-child,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__description > p:last-child {
	margin-bottom: 0;
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column:last-child,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column:last-child {
	flex-basis: 636px !important;
	flex-grow: 0;
	flex-shrink: 0;
	max-width: min(100%, 636px);
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image {
	overflow: hidden;
	border-radius: 12px;
	width: 100%;
	max-width: 636px;
	max-height: 445px;
	margin-top: 0;
	margin-bottom: 0;
	margin-left: auto;
	margin-right: 0;
}

.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image img,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image img {
	width: 135%;
	max-width: none;
	max-height: 445px;
	height: auto;
	display: block;
	border-radius: 0;
	transform: translate3d(-14%, 0, 0);
}

@media (max-width: 1023px) {

	.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column,
	.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column {
		justify-content: flex-start;
	}

	.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column:last-child,
	.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__row > .wp-block-column:last-child {
		flex-basis: 100% !important;
		max-width: 100%;
	}

	.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image,
	.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image {
		margin-left: 0;
		max-width: 100%;
	}

	.mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image img,
	.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--capistrano-guide .hero-form__image img {
		width: 100%;
		transform: none;
	}
}

/*
 * Instalaciones — Figma 6501:21319 (metadata): frame 1366; márgenes 35px; bloque contenido 1296px;
 * titular + eyebrow ancho 856px centrados (1296 − 856 = 220px a cada lado). Gap migas→intro 20px.
 */
.mwm-hero--alquiler.mwm-hero--instalaciones.wp-block-cover .wp-block-cover__inner-container > .wp-block-group,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones.wp-block-cover .wp-block-cover__inner-container > .wp-block-group {
	justify-content: flex-start;
	gap: 20px;
	box-sizing: border-box;
	padding-left: 35px;
	padding-right: 35px;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .hero-form__intro,
.mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__body,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .hero-form__intro,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__body {
	width: 100%;
	max-width: 1296px;
	margin-left: auto;
	margin-right: auto;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .hero-form__intro,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .hero-form__intro {
	align-self: stretch;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__body,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__copy,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__copy {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	box-sizing: border-box;
	width: 100%;
	max-width: 856px;
	margin-left: auto;
	margin-right: auto;
	min-height: 0;
	padding-bottom: 100px;
	text-align: center;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__eyebrow,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__eyebrow {
	margin-top: 0;
	margin-bottom: 0;
	width: 100%;
}

.mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__title,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .mwm-hero-instalaciones__title {
	margin-top: 0;
	margin-bottom: 0;
	width: 100%;
	text-wrap: balance;
}

/* Migas: color explícito sobre secondary (Figma #2C2321). */
.mwm-hero--alquiler.mwm-hero--instalaciones .nerjavillas-breadcrumbs,
.editor-styles-wrapper .mwm-hero--alquiler.mwm-hero--instalaciones .nerjavillas-breadcrumbs {
	color: var(--wp--preset--color--foreground);
	--wp--style--color--link: var(--wp--preset--color--foreground);
}
