/**
 * Financial homepage preview — page layout only.
 * Component visuals live in financial-v2.css / existing widget styles.
 */

body.nm-financial-homepage-preview {
	--nm-financial-primary: #06283d;
	--nm-financial-accent: #f5b719;
	--nm-financial-background: #f4f7fa;
	--nm-financial-surface: #fff;
	--nm-financial-text: #12202e;
	--nm-financial-muted: #6b7784;
	--nm-financial-border: #e3e8ee;
	--nm-financial-radius: 10px;
	--nm-financial-container-width: var(--eb-container-max-width, 1400px);
	background: var(--nm-financial-background);
	color: var(--nm-financial-text);
}

body.nm-financial-homepage-preview .nm-fh-shell.e-con > .e-con-inner,
body.nm-financial-homepage-preview .nm-fh-shell > .e-con-inner {
	max-inline-size: min(var(--nm-financial-container-width), 100%);
	margin-inline: auto;
	padding-block: 12px 18px;
	width: 100%;
}

body.nm-financial-homepage-preview .nm-fh-hero > .e-con-inner,
body.nm-financial-homepage-preview .nm-fh-hero.e-con {
	align-items: stretch;
	display: grid !important;
	gap: 1rem;
	grid-template-columns: minmax(240px, 0.24fr) minmax(0, 0.76fr);
	width: 100%;
}

body.nm-financial-homepage-preview .nm-fh-grid > .e-con-inner,
body.nm-financial-homepage-preview .nm-fh-grid.e-con {
	align-items: stretch;
	display: grid !important;
	gap: 1rem;
	grid-template-columns: minmax(220px, 0.25fr) minmax(0, 0.5fr) minmax(220px, 0.25fr);
	width: 100%;
}

body.nm-financial-homepage-preview .nm-fh-secondary > .e-con-inner,
body.nm-financial-homepage-preview .nm-fh-secondary.e-con {
	align-items: stretch;
	display: grid !important;
	gap: 1rem;
	grid-template-columns: minmax(220px, 0.25fr) minmax(0, 0.5fr) minmax(220px, 0.25fr);
	width: 100%;
}

body.nm-financial-homepage-preview .nm-fh-hero__aside,
body.nm-financial-homepage-preview .nm-fh-hero__main,
body.nm-financial-homepage-preview .nm-fh-grid__col,
body.nm-financial-homepage-preview .nm-fh-secondary__col,
body.nm-financial-homepage-preview .nm-fh-secondary > .e-con-inner > .e-con {
	max-width: none !important;
	min-width: 0;
	width: 100% !important;
}

body.nm-financial-homepage-preview .nm-fh-hero__aside,
body.nm-financial-homepage-preview .nm-fh-hero__main,
body.nm-financial-homepage-preview .nm-fh-grid__col,
body.nm-financial-homepage-preview .nm-fh-secondary__col {
	background: transparent;
	border: 0;
	display: flex !important;
	flex-direction: column;
	height: 100%;
	padding: 0;
}

body.nm-financial-homepage-preview .nm-fh-hero__aside > .elementor-element,
body.nm-financial-homepage-preview .nm-fh-hero__main > .elementor-element,
body.nm-financial-homepage-preview .nm-fh-grid__col > .elementor-element,
body.nm-financial-homepage-preview .nm-fh-secondary__col > .elementor-element,
body.nm-financial-homepage-preview .nm-fh-hero__aside .elementor-widget-container,
body.nm-financial-homepage-preview .nm-fh-hero__main .elementor-widget-container,
body.nm-financial-homepage-preview .nm-fh-grid__col .elementor-widget-container,
body.nm-financial-homepage-preview .nm-fh-secondary__col .elementor-widget-container,
body.nm-financial-homepage-preview .nm-fh-hero__aside .nm-fv2,
body.nm-financial-homepage-preview .nm-fh-grid__col .nm-fv2,
body.nm-financial-homepage-preview .nm-fh-secondary__col .nm-fv2 {
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	width: 100%;
}

body.nm-financial-homepage-preview .nm-breaking-news {
	--nm-breaking-label-bg: transparent;
	--nm-breaking-label-color: #d71920;
	--nm-breaking-padding: 6px 10px;
	--nm-breaking-min-height: 42px;
	--nm-breaking-radius: 8px;
	background: #fff;
}

body.nm-financial-homepage-preview .nm-breaking-news__label {
	align-self: center;
	background: transparent;
	color: #d71920;
	gap: 8px;
	min-height: 0;
	padding: 0 6px 0 0;
	text-transform: none;
}

body.nm-financial-homepage-preview .nm-markets--strip {
	background: var(--nm-financial-surface);
	border: 1px solid var(--nm-financial-border);
	border-radius: var(--nm-financial-radius);
}

body.nm-financial-homepage-preview .elementor-widget-nm-category-icon-nav,
body.nm-financial-homepage-preview .elementor-widget-nm-category-icon-nav .elementor-widget-container,
body.nm-financial-homepage-preview .nm-cat-nav {
	inline-size: 100%;
	max-inline-size: 100%;
	width: 100%;
}

body.nm-financial-homepage-preview .nm-newsletter-cta-pro--financial {
	border-radius: var(--nm-financial-radius);
}

@media (max-width: 1024px) {
	body.nm-financial-homepage-preview .nm-fh-hero > .e-con-inner,
	body.nm-financial-homepage-preview .nm-fh-hero.e-con,
	body.nm-financial-homepage-preview .nm-fh-grid > .e-con-inner,
	body.nm-financial-homepage-preview .nm-fh-grid.e-con,
	body.nm-financial-homepage-preview .nm-fh-secondary > .e-con-inner,
	body.nm-financial-homepage-preview .nm-fh-secondary.e-con {
		grid-template-columns: 1fr;
	}

	/* Stacked rows have intrinsic heights; percentage heights collapse the hero. */
	body.nm-financial-homepage-preview :is(.nm-fh-hero__aside, .nm-fh-hero__main, .nm-fh-grid__col, .nm-fh-secondary__col),
	body.nm-financial-homepage-preview :is(.nm-fh-hero__aside, .nm-fh-hero__main, .nm-fh-grid__col, .nm-fh-secondary__col) > .elementor-element,
	body.nm-financial-homepage-preview :is(.nm-fh-hero__aside, .nm-fh-hero__main, .nm-fh-grid__col, .nm-fh-secondary__col) .elementor-widget-container {
		height: auto;
		flex: 0 0 auto;
	}

	body.nm-financial-homepage-preview .nm-fh-hero__main { order: -1; }
	body.nm-financial-homepage-preview .nm-fh-hero__aside .nm-fv2--latest {
		height: auto;
		min-height: 0;
	}
	body.nm-financial-homepage-preview .nm-fh-hero__aside .nm-fv2-btn { margin-block-start: 1rem; }
}

@media (max-width: 767px) {
	body.nm-financial-homepage-preview .nm-fh-shell.e-con { padding-inline: 12px; }
	body.nm-financial-homepage-preview .nm-fh-shell > .e-con-inner {
		padding-inline: 0;
		gap: 14px;
	}
	body.nm-financial-homepage-preview :is(.nm-fh-hero, .nm-fh-grid, .nm-fh-secondary).e-con { padding: 0; gap: 14px; }
	body.nm-financial-homepage-preview .nm-breaking-news__inner { align-items: center; min-height: 44px; padding: 8px; gap: 8px; }
	body.nm-financial-homepage-preview .nm-breaking-news__live { align-self: center; min-height: 24px; background: #fff1f1; color: #be2026; padding: 6px; }
	body.nm-financial-homepage-preview .nm-breaking-news__label { display: none; }
}
