/**
 * Products / Services / Contents shared hub design.
 *
 * Scope is .nbc-hub only. Home and detail pages keep their existing cards.
 */

.nbc-hub {
	--nbc-hub-ink: #0f172a;
	--nbc-hub-muted: #475569;
	--nbc-hub-line: color-mix(in srgb, var(--nt-color-primary) 14%, #cbd5e1);
	--nbc-hub-soft: #f7faff;
	--nbc-hub-blue: #edf5ff;
	color: var(--nbc-hub-ink);
}

.nbc-hub__hero {
	padding-block: clamp(56px, 8vw, 104px);
	background:
		radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.22), transparent 34%),
		linear-gradient(135deg, #eef4ff 0%, #f8fbff 52%, #e9fbff 100%);
}

.nbc-hub__hero-inner {
	display: grid;
	gap: 0;
	max-width: 980px;
}

.nbc-hub__hero .nt-eyebrow {
	margin: 0 0 14px;
}

.nbc-hub__hero .nt-page-hero__title {
	max-width: 900px;
	margin: 0;
	font-size: clamp(2rem, 4.4vw, 4.25rem);
	line-height: 1.08;
	letter-spacing: -0.04em;
	text-wrap: balance;
	word-break: auto-phrase;
}

.nbc-hub__hero .nt-page-hero__lead {
	max-width: 760px;
	margin: 22px 0 0;
	color: var(--nbc-hub-muted);
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	line-height: 1.9;
}

.nbc-hub__switcher {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	width: fit-content;
	margin-top: 34px;
	padding: 6px;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(10px);
}

.nbc-hub__switcher-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 18px;
	border-radius: 999px;
	color: var(--nbc-hub-muted);
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.nbc-hub__switcher-link:hover,
.nbc-hub__switcher-link:focus-visible {
	color: var(--nt-color-primary);
	background: rgba(37, 99, 235, 0.08);
}

.nbc-hub__switcher-link.is-current {
	color: #fff;
	background: var(--nt-color-primary);
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.nbc-hub__metrics {
	padding-block: clamp(28px, 4vw, 52px);
	background: #fff;
}

.nbc-hub__metric-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--nbc-hub-line);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.055);
	overflow: hidden;
}

.nbc-hub__metric {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: clamp(22px, 3vw, 34px);
	border-right: 1px solid var(--nbc-hub-line);
}

.nbc-hub__metric:last-child {
	border-right: 0;
}

.nbc-hub__metric-value,
.nbc-hub__metric dt,
.nbc-hub__metric-note {
	margin: 0;
}

.nbc-hub__metric-value {
	order: -1;
	color: var(--nt-color-primary);
	font-size: clamp(1.65rem, 2.8vw, 2.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.035em;
}

.nbc-hub__metric dt {
	margin-top: 10px;
	font-size: 0.96rem;
	font-weight: 800;
}

.nbc-hub__metric-note {
	margin-top: 6px;
	color: var(--nbc-hub-muted);
	font-size: 0.82rem;
	line-height: 1.55;
}

.nbc-hub__list {
	padding-block: clamp(64px, 9vw, 116px);
	background: var(--nbc-hub-blue);
}

.nbc-hub__section-head {
	max-width: 780px;
	margin: 0 auto clamp(34px, 5vw, 56px);
	text-align: center;
}

.nbc-hub__section-head .nt-eyebrow {
	margin-bottom: 14px;
}

.nbc-hub__section-head h2 {
	margin: 0;
	font-size: clamp(1.7rem, 3vw, 2.65rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.nbc-hub__section-head > p:last-child {
	margin: 18px auto 0;
	color: var(--nbc-hub-muted);
	line-height: 1.85;
}

.nbc-hub__list .nbc-card-filters {
	justify-content: center;
	margin-bottom: clamp(28px, 4vw, 42px);
}

.nbc-hub__list .nbc-card-filter {
	min-height: 40px;
	padding-inline: 1.05em;
	background: rgba(255, 255, 255, 0.72);
}

.nbc-hub__list .nbc-card-filter.is-active {
	background: var(--nt-color-primary);
}

.nbc-hub__list .nt-grid {
	align-items: stretch;
	gap: clamp(18px, 2.4vw, 28px);
}

.nbc-hub__list .nt-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid rgba(148, 163, 184, 0.22);
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.075);
}

.nbc-hub__list .nt-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: stretch;
}

.nbc-hub__list .nt-card__title {
	font-size: clamp(1.16rem, 1.8vw, 1.42rem);
	line-height: 1.35;
	text-wrap: balance;
}

.nbc-hub__list .nt-card__excerpt {
	line-height: 1.72;
}

.nbc-card__facts {
	display: grid;
	gap: 0;
	margin: 20px 0 0;
	padding: 0;
	border: 1px solid rgba(148, 163, 184, 0.24);
	border-radius: 14px;
	background: rgba(248, 250, 252, 0.78);
	overflow: hidden;
}

.nbc-card__facts > div {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 10px;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nbc-card__facts > div:last-child {
	border-bottom: 0;
}

.nbc-card__facts dt,
.nbc-card__facts dd {
	margin: 0;
}

.nbc-card__facts dt {
	color: var(--nbc-hub-muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.nbc-card__facts dd {
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.45;
}

.nbc-card__offer {
	margin: 12px 0 0;
	color: var(--nbc-hub-muted);
	font-size: 0.8rem;
	line-height: 1.6;
}

.nbc-hub__list .nt-card .wp-block-buttons {
	align-items: stretch;
	margin-top: auto;
	padding-top: 22px;
}

.nbc-hub__list .nt-card .wp-block-button {
	flex: 1 1 140px;
}

.nbc-hub__list .nt-card .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 7px;
	font-size: clamp(0.75rem, 0.9vw, 0.82rem);
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
}

.nbc-hub__list .nt-card.is-preparing .nt-card__body {
	opacity: 1;
}

.nbc-hub__list .nt-card.is-preparing::after {
	inset: 14px 14px auto auto;
	width: auto;
	height: auto;
	padding: 7px 10px;
	border: 1px solid rgba(148, 163, 184, 0.36);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
	color: var(--nbc-hub-ink);
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1;
}

.nbc-hub--product .nbc-card__facts {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(15, 23, 42, 0.18);
}

.nbc-hub--product .nbc-card__facts > div {
	border-bottom-color: rgba(255, 255, 255, 0.16);
}

.nbc-hub--product .nbc-card__facts dt,
.nbc-hub--product .nbc-card__offer {
	color: rgba(255, 255, 255, 0.76);
}

.nbc-hub--product .nbc-card__facts dd {
	color: #fff;
}

.nbc-hub--service .nt-card {
	border-top: 4px solid var(--nt-color-primary);
}

.nbc-hub--content .nt-card__thumb {
	background: #e2e8f0;
}

.nbc-hub--content .nt-card.is-preparing .nt-card__thumb {
	filter: grayscale(0.8);
	opacity: 0.7;
}

.nbc-hub__guide {
	padding-block: clamp(64px, 9vw, 112px);
	background: var(--nbc-hub-soft);
}

.nbc-hub__guide-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2.4vw, 28px);
}

.nbc-hub__guide-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: clamp(24px, 3vw, 34px);
	border: 1px solid var(--nbc-hub-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.nbc-hub__guide-card .nt-eyebrow {
	margin: 0 0 14px;
}

.nbc-hub__guide-card h3 {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.45;
}

.nbc-hub__guide-card > p:not(.nt-eyebrow) {
	margin: 14px 0 0;
	color: var(--nbc-hub-muted);
	font-size: 0.94rem;
	line-height: 1.75;
}

.nbc-hub__guide-card > a {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin-top: auto;
	padding-top: 22px;
	color: var(--nt-color-primary);
	font-weight: 700;
	text-underline-offset: 0.2em;
}

.nbc-hub__contact {
	padding-block: clamp(52px, 7vw, 88px);
	background: var(--nbc-hub-soft);
}

.nbc-hub__contact .nt-cta {
	text-align: center;
}

.nbc-hub__contact .nt-eyebrow {
	margin-top: 0;
}

.nbc-hub__contact .nt-cta__actions {
	justify-content: center;
}

@media (max-width: 900px) {
	.nbc-hub__metric-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nbc-hub__metric:nth-child(2) {
		border-right: 0;
	}

	.nbc-hub__metric:nth-child(-n + 2) {
		border-bottom: 1px solid var(--nbc-hub-line);
	}
}

@media (max-width: 700px) {
	.nbc-hub__hero {
		padding-block: 46px 54px;
	}

	.nbc-hub__hero .nt-page-hero__title {
		font-size: clamp(1.9rem, 9vw, 2.7rem);
	}

	.nbc-hub__hero .nt-page-hero__lead {
		line-height: 1.75;
	}

	.nbc-hub__switcher {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		width: 100%;
		border-radius: 18px;
	}

	.nbc-hub__switcher-link {
		min-width: 0;
		padding-inline: 8px;
		font-size: 0.8rem;
		white-space: nowrap;
	}

	.nbc-hub__metric-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nbc-hub__metric,
	.nbc-hub__metric:nth-child(2) {
		border-right: 0;
		border-bottom: 1px solid var(--nbc-hub-line);
	}

	.nbc-hub__metric:last-child {
		border-bottom: 0;
	}

	.nbc-hub__list .nbc-card-filters {
		justify-content: flex-start;
		flex-wrap: nowrap;
		margin-inline: calc(var(--nt-space-4, 16px) * -1);
		padding-inline: var(--nt-space-4, 16px);
		overflow-x: auto;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.nbc-hub__list .nbc-card-filter {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.nbc-hub__guide-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nbc-card__facts > div {
		grid-template-columns: 48px minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nbc-hub__switcher-link {
		transition: none;
	}
}
