.imd-core-home {
	--imd-home-gap: clamp(12px, 1.5vw, 20px);
	display: grid;
	gap: var(--imd-home-gap);
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
	padding: 0 0 clamp(8px, 1vw, 14px);
	overflow: clip;
	background: var(--imd-surface, #fff);
	color: var(--imd-ink, #16191c);
	font-family: var(--imd-font-body, Aileron, Arial, sans-serif);
}

.imd-core-home *,
.imd-core-home *::before,
.imd-core-home *::after { box-sizing: border-box; }

.imd-core-home__section {
	width: min(calc(100% - clamp(20px, 4vw, 56px)), 1440px);
	min-width: 0;
	margin-inline: auto;
}

.imd-core-home__section--hero { width: 100%; }

.imd-core-home :where(h1, h2, h3) {
	font-family: var(--imd-font-heading, ODUDA, Aileron, Arial, sans-serif);
	font-weight: 600;
}

.imd-core-home :where(p, a, button, input, select, textarea, label, strong, small) {
	font-family: var(--imd-font-body, Aileron, Arial, sans-serif);
}

.imd-core-home .inm-beneficios,
.imd-core-home .inmps,
.imd-core-home .imdir2,
.imd-core-home .impaths2,
.imd-core-home .im-member-cta,
.imd-core-home .im-services,
.imd-core-home .im-discount,
.imd-core-home .im-legal-check,
.imd-core-home .im-trust {
	--accent: #d72a2b !important;
	--im-red: #d72a2b !important;
}

.imd-core-home :where(.inm-beneficios__header, .inmps__header, .im-member-cta__content) h2 {
	font-family: var(--imd-font-heading, ODUDA, Aileron, Arial, sans-serif) !important;
	font-size: clamp(31px, 3.5vw, 48px) !important;
	font-weight: 600 !important;
	letter-spacing: -.035em !important;
	line-height: 1.03 !important;
}

.imd-core-home :where(.imdir2__header, .impaths2__header, .im-services__head, .im-discount__content, .im-legal-check__copy) h2 {
	font-family: var(--imd-font-heading, ODUDA, Aileron, Arial, sans-serif) !important;
	font-size: clamp(27px, 2.45vw, 36px) !important;
	font-weight: 600 !important;
	letter-spacing: -.03em !important;
	line-height: 1.04 !important;
}

.imd-core-home :where(.inm-beneficios__intro, .inmps__header > p, .im-member-cta__copy) {
	font-size: clamp(14px, 1.2vw, 17px) !important;
	line-height: 1.55 !important;
}

.imd-core-home :where(.imdir2__intro, .impaths2__intro, .im-discount__content > p:not(.im-discount__eyebrow), .im-legal-check__description) {
	font-size: clamp(12px, 1vw, 14px) !important;
	line-height: 1.5 !important;
}

.imd-core-home :where(.im-services__eyebrow, .im-discount__eyebrow, .im-legal-check__eyebrow, .inm-beneficios__eyebrow, .inmps__eyebrow, .imdir2__eyebrow, .impaths2__eyebrow, .im-member-cta__eyebrow) {
	color: #d72a2b !important;
	font-family: var(--imd-font-body, Aileron, Arial, sans-serif) !important;
	font-size: clamp(10px, .85vw, 12px) !important;
	font-weight: 800 !important;
	letter-spacing: .07em !important;
	text-transform: uppercase !important;
}

.imd-core-home :where(.im-services__all, .im-discount__button, .im-legal-check__cta, .im-member-cta__button) {
	min-height: 44px;
	font-family: var(--imd-font-body, Aileron, Arial, sans-serif) !important;
	font-size: 13px !important;
	font-weight: 900 !important;
}

.imd-core-home__dual {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(330px, 2fr);
	gap: var(--imd-home-gap);
	align-items: stretch;
}

.imd-core-home__dual > div,
.imd-core-home__service-grid > div { min-width: 0; }

.imd-core-home__service-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 16px var(--imd-home-gap);
	align-items: stretch;
}

.imd-core-home__services { grid-row: 1 / 3; }
.imd-core-home__discount { grid-column: 2; grid-row: 1; }
.imd-core-home__legal { grid-column: 2; grid-row: 2; }

.imd-core-home .imd-core-home__service-grid .imd-core-home__services .im-services,
.imd-core-home .imd-core-home__service-grid .imd-core-home__discount .im-discount,
.imd-core-home .imd-core-home__service-grid .imd-core-home__legal .im-legal-check {
	width: 100%;
	height: 100% !important;
	min-height: 0;
	margin: 0 !important;
}

/* La lista absorbe la altura útil: no queda una franja vacía bajo el servicio 11. */
.imd-core-home .imd-core-home__service-grid .im-services__grid {
	flex: 1 1 auto;
	grid-template-rows: repeat(6, minmax(82px, 1fr));
	align-content: stretch;
}

.imd-core-home__service-grid :where(.im-discount__content, .im-legal-check__copy) {
	min-height: 0;
}

.imd-core-home__service-grid :where(.im-discount, .im-legal-check) {
	overflow: hidden;
}

.imd-core-home__section--trust { margin-top: 2px; }

body.imd-core-home-page :where(.page-header, .entry-header, .entry-title) { display: none; }
body.imd-core-home-page :where(.site-main, .entry-content, article.page) { max-width: none; }
body.imd-core-home-page .entry-content { margin: 0; }

body.imd-core-home-page {
	--content-vertical-spacing: 0px !important;
	background: var(--imd-surface, #fff) !important;
}

body.imd-core-home-page :where(#main-container, #main, #primary, .site-main, .content-area, .ct-container-full, [data-content="normal"], [data-vertical-spacing], article.page, .entry-content) {
	background-color: var(--imd-surface, #fff) !important;
}

body.imd-core-home-page :where(#main,#primary,.site-main,.content-area,.ct-container-full,[data-content="normal"],article.page,.entry-content) {
	width: 100% !important;
	max-width: none !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.imd-core-home-page .imd-ph-shell {
	padding-bottom: 0 !important;
	background: inherit;
}

/* Los bloques inferiores reservan su espacio sin calcular pintura fuera de pantalla. */
@supports (content-visibility: auto) {
	.imd-core-home__section--benefits,
	.imd-core-home__section--mortgage,
	.imd-core-home__section--network,
	.imd-core-home__section--memberships,
	.imd-core-home__section--services,
	.imd-core-home__section--trust {
		content-visibility: auto;
		contain-intrinsic-block-size: auto 640px;
	}
}

/* The hero owns its geometry in home-hero.css. Only theme integration lives here. */
body.imd-core-home-page #main > .ct-container-full > article.page > .hero-section { display: none; }
body.imd-core-home-page .entry-content > .imd-core-home { margin-block-start: 0; }

html[data-theme="dark"] .imd-core-home,
html[data-imd-color-scheme="dark"] .imd-core-home,
html.inmudescuentos-site-dark .imd-core-home,
html.imh-site-dark .imd-core-home {
	background: var(--imd-surface, #16191c);
}

html[data-theme="dark"] body.imd-core-home-page,
html[data-theme="dark"] body.imd-core-home-page :where(#main-container, #main, #primary, .site-main, .content-area, .ct-container-full, [data-content="normal"], [data-vertical-spacing], article.page, .entry-content),
html.inmudescuentos-site-dark body.imd-core-home-page,
html.inmudescuentos-site-dark body.imd-core-home-page :where(#main-container, #main, #primary, .site-main, .content-area, .ct-container-full, [data-content="normal"], [data-vertical-spacing], article.page, .entry-content),
html.imh-site-dark body.imd-core-home-page,
html.imh-site-dark body.imd-core-home-page :where(#main-container, #main, #primary, .site-main, .content-area, .ct-container-full, [data-content="normal"], [data-vertical-spacing], article.page, .entry-content) {
	background-color: #16191c !important;
}

@media (max-width: 980px) {
	.imd-core-home__dual { grid-template-columns: 1fr; }
	.imd-core-home__service-grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}
	.imd-core-home__services,
	.imd-core-home__discount,
	.imd-core-home__legal {
		grid-column: 1;
		grid-row: auto;
	}
	.imd-core-home .imd-core-home__service-grid .imd-core-home__services .im-services,
	.imd-core-home .imd-core-home__service-grid .imd-core-home__discount .im-discount,
	.imd-core-home .imd-core-home__service-grid .imd-core-home__legal .im-legal-check { height: auto !important; }
	.imd-core-home .imd-core-home__service-grid .im-services__grid {
		flex: none;
		grid-template-rows: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.imd-core-home *,
	.imd-core-home *::before,
	.imd-core-home *::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
