/**
 * Trang Công cụ (template-cong-cu.php)
 *
 * @package nguyen-ha-bang
 */

.nhb-tools {
	background: #fdfbf7;
	color: #1e293b;
	font-family: var(--nhb-font, "Montserrat", sans-serif);
}

/* ==========================================================================
   Section 1: Hero Công cụ (.nhb-tools-hero)
   ========================================================================== */

.nhb-tools-hero {
	position: relative;
	background-color: #f8f3ea;
	background-image: var(--nhb-tools-hero-bg);
	background-size: cover;
	background-position: right center;
	background-repeat: no-repeat;
	padding: 26px 0 34px;
	border-bottom: 1px solid rgba(218, 198, 168, 0.35);
	overflow: hidden;
}

.nhb-tools-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1366px;
	margin-inline: auto;
	padding-inline: 58px;
}

/* --- Breadcrumbs -------------------------------------------------------- */
.nhb-tools-hero__crumbs {
	margin-bottom: 22px;
}

.nhb-tools-hero__crumbs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 500;
	color: #6b7280;
}

.nhb-tools-hero__crumbs-list a {
	color: #646d82;
	text-decoration: none;
	transition: color 0.2s ease;
}

.nhb-tools-hero__crumbs-list a:hover {
	color: #2c107a;
}

.nhb-tools-hero__crumbs-sep {
	color: #9ca3af;
	font-size: 15px;
	line-height: 1;
}

/* --- Left Hero Content -------------------------------------------------- */
.nhb-tools-hero__content {
	max-width: 720px;
}

.nhb-tools-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #d97c14;
}

.nhb-tools-hero__eyebrow-mark {
	position: relative;
	display: inline-block;
	width: 16px;
	height: 12px;
	flex-shrink: 0;
}

.nhb-tools-hero__eyebrow-mark::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	bottom: 1px;
	width: 2px;
	background: #d97c14;
	border-radius: 1px;
}

.nhb-tools-hero__eyebrow-mark::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
	background: #d97c14;
	border-radius: 1px;
}

.nhb-tools-hero__title {
	margin: 0 0 18px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(34px, 3.85vw, 52px);
	font-weight: 800;
	line-height: 1.17;
	letter-spacing: -0.01em;
}

.nhb-tools-hero__title-primary {
	display: block;
	color: #291073;
}

.nhb-tools-hero__title-accent {
	display: block;
	color: #d47a16;
	margin-top: 2px;
}

.nhb-tools-hero__desc {
	margin: 0;
	max-width: 685px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.66;
	color: #3f4b66;
}

/* --- 4 Feature Items ---------------------------------------------------- */
.nhb-tools-hero__features {
	list-style: none;
	margin: 34px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.nhb-tools-hero__feat {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.nhb-tools-hero__feat-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 32%, #fffdf8 0%, #fceed8 72%, #f7e1be 100%);
	border: 1.5px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 6px 18px rgba(185, 118, 30, 0.11);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.nhb-tools-hero__feat-icon svg {
	width: 34px;
	height: 34px;
}

.nhb-tools-hero__feat-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nhb-tools-hero__feat-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #291073;
	margin-bottom: 3px;
}

.nhb-tools-hero__feat-desc {
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.4;
	color: #525d76;
}

/* ==========================================================================
   Section 2: Bộ lọc & Lưới 9 Công cụ + Banner CTA (.nhb-tools-catalog)
   ========================================================================== */

.nhb-tools-catalog {
	padding: 26px 0 36px;
	background: #fdfbf7;
}

.nhb-tools-catalog__inner {
	width: 100%;
	max-width: 1366px;
	margin-inline: auto;
	padding-inline: 58px;
}

/* --- Filter Tabs -------------------------------------------------------- */
.nhb-tools-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}

.nhb-tools-tab {
	appearance: none;
	border: 1px solid #e7e4ef;
	background: #ffffff;
	color: #291073;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	padding: 14px 26px;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(41, 16, 115, 0.03);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nhb-tools-tab:hover {
	border-color: #cfc6ea;
	transform: translateY(-1px);
}

.nhb-tools-tab.is-active {
	background: linear-gradient(135deg, #2d0f78 0%, #3d1899 100%);
	border-color: #2d0f78;
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(45, 15, 120, 0.22);
}

/* --- 3x3 Tool Cards Grid ------------------------------------------------ */
.nhb-tools-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px 21px;
}

.nhb-tools-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #f2eee7;
	border-radius: 16px;
	padding: 3px;
	box-shadow: 0 10px 28px rgba(38, 17, 106, 0.055);
	transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.nhb-tools-card:hover {
	transform: translateY(-4px);
	border-color: #e4d9f5;
	box-shadow: 0 16px 36px rgba(38, 17, 106, 0.1);
}

.nhb-tools-card__media {
	position: relative;
	width: 100%;
	height: 164px;
	border-radius: 13px 13px 4px 4px;
	overflow: hidden;
	background: #1e2436;
}

.nhb-tools-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.38s ease;
}

.nhb-tools-card:hover .nhb-tools-card__media img {
	transform: scale(1.035);
}

.nhb-tools-card__badge {
	position: absolute;
	top: 10px;
	left: 11px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	height: 36px;
	padding: 0 18px;
	border-radius: 999px;
	background: linear-gradient(180deg, #fffdf9 0%, #f9eedb 100%);
	box-shadow: 0 4px 12px rgba(20, 14, 38, 0.18);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	color: #9e4b10;
}

.nhb-tools-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 19px 16px;
}

.nhb-tools-card__title {
	margin: 0 0 8px;
	font-family: var(--nhb-font, "Montserrat", sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #291073;
}

.nhb-tools-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.nhb-tools-card__title a:hover {
	color: #d47a16;
}

.nhb-tools-card__desc {
	margin: 0 0 18px;
	font-size: 13.8px;
	font-weight: 400;
	line-height: 1.56;
	color: #46526d;
}

.nhb-tools-card__foot {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 4px;
}

.nhb-tools-card__meta {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	min-width: 0;
}

.nhb-tools-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 500;
	color: #47526c;
}

.nhb-tools-card__meta-item svg {
	width: 18px;
	height: 18px;
	color: #dd8218;
	flex-shrink: 0;
}

.nhb-tools-card__meta-sep {
	width: 1px;
	height: 16px;
	background: #e4e1ec;
	flex-shrink: 0;
}

.nhb-tools-card__btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, #de871c 0%, #c66b0a 100%);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(206, 114, 14, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nhb-tools-card__btn svg {
	width: 20px;
	height: 20px;
	transition: transform 0.2s ease;
}

.nhb-tools-card__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(206, 114, 14, 0.36);
	filter: brightness(1.04);
}

.nhb-tools-card__btn:hover svg {
	transform: translateX(2px);
}

/* --- Middle CTA Banner -------------------------------------------------- */
.nhb-tools-cta {
	position: relative;
	margin-top: 34px;
	padding: 24px 36px 24px 26px;
	border-radius: 16px;
	background: linear-gradient(95deg, #fbf0dc 0%, #fdf6ea 48%, #faebd3 100%);
	border: 1px solid #f3e2c7;
	box-shadow: 0 10px 28px rgba(180, 118, 34, 0.07);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	overflow: hidden;
}

.nhb-tools-cta__waves {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 48%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

.nhb-tools-cta__waves svg {
	width: 100%;
	height: 100%;
	display: block;
}

.nhb-tools-cta__left {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 22px;
	min-width: 0;
}

.nhb-tools-cta__leaf {
	width: 68px;
	height: 74px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nhb-tools-cta__leaf img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.nhb-tools-cta__text {
	min-width: 0;
}

.nhb-tools-cta__title {
	margin: 0 0 6px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(21px, 2.05vw, 27px);
	font-weight: 800;
	line-height: 1.25;
	color: #291073;
}

.nhb-tools-cta__desc {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: #4a556e;
}

.nhb-tools-cta__right {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
}

.nhb-tools-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: 12px;
	background: linear-gradient(135deg, #de871c 0%, #c66b0a 100%);
	color: #ffffff;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(198, 107, 10, 0.26);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nhb-tools-cta__btn svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.nhb-tools-cta__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(198, 107, 10, 0.34);
	filter: brightness(1.04);
	color: #ffffff;
}

.nhb-tools-cta__btn:hover svg {
	transform: translateX(3px);
}

/* ==========================================================================
   Section 3: Cách thức hoạt động (.nhb-tools-how)
   ========================================================================== */

.nhb-tools-how {
	padding: 20px 0 68px;
	background: #fdfbf7;
}

.nhb-tools-how__inner {
	width: 100%;
	max-width: 1366px;
	margin-inline: auto;
	padding-inline: 58px;
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.38fr);
	align-items: center;
	gap: 36px 44px;
}

.nhb-tools-how__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #d97c14;
}

.nhb-tools-how__eyebrow-mark {
	position: relative;
	display: inline-block;
	width: 15px;
	height: 11px;
	flex-shrink: 0;
}

.nhb-tools-how__eyebrow-mark::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	bottom: 1px;
	width: 2px;
	background: #d97c14;
	border-radius: 1px;
}

.nhb-tools-how__eyebrow-mark::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	transform: translateY(-50%);
	background: #d97c14;
	border-radius: 1px;
}

.nhb-tools-how__title {
	margin: 0 0 14px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(28px, 3.1vw, 41px);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: #291073;
}

.nhb-tools-how__desc {
	margin: 0;
	max-width: 470px;
	font-size: 15.5px;
	font-weight: 400;
	line-height: 1.62;
	color: #46526d;
}

/* --- 4 Horizontal Steps ------------------------------------------------- */
.nhb-tools-how__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.nhb-tools-how__step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.nhb-tools-how__circle-row {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
}

/* Dashed line connecting steps 1 -> 2 -> 3 -> 4 */
.nhb-tools-how__step:not(:last-child) .nhb-tools-how__circle-row::after {
	content: "";
	position: absolute;
	top: 50%;
	left: calc(50% + 34px);
	width: calc(100% + 16px - 68px);
	border-top: 1.5px dashed #ebb97a;
	transform: translateY(-50%);
	pointer-events: none;
}

.nhb-tools-how__circle {
	position: relative;
	z-index: 2;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: radial-gradient(circle at 36% 32%, #fffdf9 0%, #fceeda 72%, #f8e2c1 100%);
	border: 1.5px solid #ffffff;
	box-shadow: 0 6px 16px rgba(185, 118, 30, 0.11);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	color: #cf6e0f;
}

.nhb-tools-how__step-title {
	margin: 0 0 6px;
	font-family: var(--nhb-font, "Montserrat", sans-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: #291073;
}

.nhb-tools-how__step-desc {
	margin: 0;
	max-width: 170px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.52;
	color: #525d76;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
	.nhb-tools-hero__inner,
	.nhb-tools-catalog__inner,
	.nhb-tools-how__inner {
		padding-inline: 32px;
	}

	.nhb-tools-hero__features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px 24px;
	}

	.nhb-tools-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nhb-tools-how__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.nhb-tools-how__desc {
		max-width: 100%;
	}
}

@media (max-width: 860px) {
	.nhb-tools-hero {
		background-position: left center;
	}

	.nhb-tools-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px;
	}

	.nhb-tools-cta__right,
	.nhb-tools-cta__btn {
		width: 100%;
	}

	.nhb-tools-how__steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}

	.nhb-tools-how__step:not(:last-child) .nhb-tools-how__circle-row::after {
		display: none;
	}
}

@media (max-width: 640px) {
	.nhb-tools-hero__inner,
	.nhb-tools-catalog__inner,
	.nhb-tools-how__inner {
		padding-inline: 20px;
	}

	.nhb-tools-hero__features {
		grid-template-columns: 1fr;
	}

	.nhb-tools-tabs {
		gap: 8px;
	}

	.nhb-tools-tab {
		flex: 1 1 auto;
		text-align: center;
		padding: 12px 16px;
		font-size: 14px;
	}

	.nhb-tools-grid {
		grid-template-columns: 1fr;
	}

	.nhb-tools-cta__left {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.nhb-tools-how__steps {
		grid-template-columns: 1fr;
	}
}
