/**
 * Contenido single alojamiento — ritmo vertical Figma 6501:21537.
 *
 * Espaciado base entre bloques vecinos: 24px (sin depender solo de margin en <p>).
 * Tras H2 de sección → primer bloque: 36px. Nuevo H2: 100px (clamp en móvil).
 */

body.single-alojamiento main > .wp-block-columns,
.post-type-alojamiento .editor-styles-wrapper main > .wp-block-columns {
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

body.single-alojamiento main .booking-card-sticky,
.post-type-alojamiento .editor-styles-wrapper .booking-card-sticky {
	max-width: 416px;
	width: 100%;
	margin-inline: auto;
	box-sizing: border-box;
}

@media (min-width: 783px) {

	body.single-alojamiento main .booking-card-sticky,
	.post-type-alojamiento .editor-styles-wrapper .booking-card-sticky {
		margin-left: auto;
		margin-right: 0;
	}
}

body.single-alojamiento main .wp-block-post-content,
body.single-alojamiento main .single-alojamiento-house-rules,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules {
	--mwm-aloj-section-gap: clamp(48px, 10vw, 100px);
	--mwm-aloj-after-h2: 36px;
	--mwm-aloj-stack-gap: 24px;
	--mwm-aloj-after-h3: 16px;
}

/* Sin márgenes por defecto del core que sumen al gap */
body.single-alojamiento main .wp-block-post-content > *,
body.single-alojamiento main .single-alojamiento-house-rules > *,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > *,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Separación uniforme entre bloques consecutivos (corrige grupo+p, amenities+p, etc.) */
body.single-alojamiento main .wp-block-post-content > * + *,
body.single-alojamiento main .single-alojamiento-house-rules > * + *,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > * + *,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > * + * {
	margin-block-start: var(--mwm-aloj-stack-gap);
}

body.single-alojamiento main .wp-block-post-content > * + h2.wp-block-heading,
body.single-alojamiento main .single-alojamiento-house-rules > * + h2.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > * + h2.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > * + h2.wp-block-heading {
	margin-block-start: var(--mwm-aloj-section-gap);
}

body.single-alojamiento main .wp-block-post-content > h2.wp-block-heading + *,
body.single-alojamiento main .single-alojamiento-house-rules > h2.wp-block-heading + *,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > h2.wp-block-heading + *,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > h2.wp-block-heading + * {
	margin-block-start: var(--mwm-aloj-after-h2);
}

body.single-alojamiento main .wp-block-post-content > * + h3.wp-block-heading,
body.single-alojamiento main .single-alojamiento-house-rules > * + h3.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > * + h3.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > * + h3.wp-block-heading {
	margin-block-start: var(--mwm-aloj-after-h2);
}

body.single-alojamiento main .wp-block-post-content > h3.wp-block-heading + *,
body.single-alojamiento main .single-alojamiento-house-rules > h3.wp-block-heading + *,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > h3.wp-block-heading + *,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > h3.wp-block-heading + * {
	margin-block-start: var(--mwm-aloj-after-h3);
}

body.single-alojamiento main .single-alojamiento-house-rules,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules {
	margin-top: var(--mwm-aloj-section-gap);
}

/* Último párrafo antes de rejilla de chips: un poco más de aire (Figma ~36px desde bloque de texto) */
body.single-alojamiento main .wp-block-post-content > p + .wp-block-nerjavillas-amenidades,
body.single-alojamiento main .wp-block-post-content > p + .wp-block-nerjavillas-clon-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > p + .wp-block-nerjavillas-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > p + .wp-block-nerjavillas-clon-amenidades {
	margin-block-start: var(--mwm-aloj-after-h2);
}

body.single-alojamiento main .wp-block-post-content > .wp-block-nerjavillas-icon-text + .wp-block-nerjavillas-amenidades,
body.single-alojamiento main .wp-block-post-content > .wp-block-nerjavillas-clon-icon-text + .wp-block-nerjavillas-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-nerjavillas-icon-text + .wp-block-nerjavillas-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-nerjavillas-clon-icon-text + .wp-block-nerjavillas-amenidades {
	margin-block-start: var(--mwm-aloj-after-h2);
}

/* Tipografía párrafos */
body.single-alojamiento main .wp-block-post-content > p,
body.single-alojamiento main .single-alojamiento-house-rules > p,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > p,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules > p {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--foreground);
}

/* Aunque el contenido viejo lleve clase has-heading-3-font-size, los h2 deben verse como h2. */
body.single-alojamiento main .wp-block-post-content h2.wp-block-heading,
body.single-alojamiento main .single-alojamiento-house-rules h2.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content h2.wp-block-heading,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules h2.wp-block-heading {
	font-size: var(--wp--preset--font-size--heading-2) !important;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/*
 * Subtítulos tipo Normas (h3 + accent + medium): Google Sans Flex (body), no Minion del h3 global.
 */
body.single-alojamiento main .wp-block-post-content h3.wp-block-heading.has-accent-color.has-medium-font-size,
body.single-alojamiento main .single-alojamiento-house-rules h3.wp-block-heading.has-accent-color.has-medium-font-size,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content h3.wp-block-heading.has-accent-color.has-medium-font-size,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules h3.wp-block-heading.has-accent-color.has-medium-font-size {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 400;
	font-size: 1rem !important;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin-top: 36px;
	margin-bottom: 24px;
}

/* Grupos lista check: hueco entre filas si el tema no inyecta gap */
body.single-alojamiento main .wp-block-post-content .wp-block-group.is-layout-flex.is-vertical,
body.single-alojamiento main .single-alojamiento-house-rules .wp-block-group.is-layout-flex.is-vertical,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content .wp-block-group.is-layout-flex.is-vertical,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules .wp-block-group.is-layout-flex.is-vertical {
	gap: 16px;
}

/* Grupos sin clase flex (contenido antiguo): espacio entre hijos del grupo */
body.single-alojamiento main .wp-block-post-content .wp-block-group:not(.is-layout-flex) > .wp-block-group__inner-container,
body.single-alojamiento main .single-alojamiento-house-rules .wp-block-group:not(.is-layout-flex) > .wp-block-group__inner-container,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content .wp-block-group:not(.is-layout-flex) > .wp-block-group__inner-container,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules .wp-block-group:not(.is-layout-flex) > .wp-block-group__inner-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

body.single-alojamiento main .wp-block-post-content > .wp-block-image,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-image {
	margin-block: var(--mwm-aloj-after-h2);
}

body.single-alojamiento main .wp-block-post-content > .wp-block-image:first-child,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-image:first-child {
	margin-block-start: 0;
}

/* Callout de cama extra: caja con líneas superior/inferior y remates laterales. */
body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color {
	position: relative;
	margin-left: 1rem;
	margin-right: 1rem;
	padding-left: 18px !important;
	padding-right: 18px !important;
}

body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::before,
body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::after,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::before,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::after {
	content: "";
	position: absolute;
	top: 18px;
	bottom: 18px;
	width: 1px;
	background-color: var(--wp--preset--color--secondary);
}

body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::before,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::before {
	left: -1rem;
}

body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::after,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color::after {
	right: -1rem;
}

body.single-alojamiento main .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color > p,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content > .wp-block-group.has-quaternary-color.has-text-color > p {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--quaternary);
}

/* Grid cunas/camas por edad (mwm-benefits-grid--bed-options dentro de normas). */
body.single-alojamiento main .single-alojamiento-house-rules .mwm-benefits-grid--bed-options,
.post-type-alojamiento .editor-styles-wrapper .single-alojamiento-house-rules .mwm-benefits-grid--bed-options {
	margin-top: var(--mwm-aloj-stack-gap);
}

/* Chips amenidades: más separación al pasar a segunda línea */
body.single-alojamiento main .wp-block-post-content .wp-block-nerjavillas-amenidades,
body.single-alojamiento main .wp-block-post-content .wp-block-nerjavillas-clon-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content .wp-block-nerjavillas-amenidades,
.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content .wp-block-nerjavillas-clon-amenidades {
	row-gap: 12px;
	column-gap: 8px;
}

@media (max-width: 782px) {

	body.single-alojamiento main .wp-block-post-content,
	.post-type-alojamiento .editor-styles-wrapper .wp-block-post-content {
		--mwm-aloj-section-gap: clamp(40px, 12vw, 72px);
	}
}
