/**
 * fanpage.site — Dedicated Niche Ad Landing Pages (`niche.css`)
 * Mobile-first conversion architecture for:
 * 1. `.fp-niche--clinic`   (Spa · Nha khoa · Phòng khám)
 * 2. `.fp-niche--interior` (Nội thất · Thiết kế Thi công · Xưởng & Showroom)
 */

/* Homepage Niche Spotlight Bar */
.fp-niche-spotlight {
	margin-top: 28px;
	padding: 28px;
	border-radius: var(--fp-radius-lg);
	background: var(--fp-dark);
	color: #ffffff;
	display: grid;
	grid-template-columns: 0.82fr 1.18fr;
	gap: 28px;
	align-items: center;
}

.fp-niche-spot-intro .fp-kicker {
	color: #ff9578;
}

.fp-niche-spot-intro .fp-kicker::before {
	background: #ff9578;
}

.fp-niche-spot-intro h3 {
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.32;
	color: #ffffff;
}

.fp-niche-spot-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.fp-niche-spot-card {
	display: grid;
	grid-template-columns: 112px 1fr;
	gap: 14px;
	align-items: center;
	padding: 10px;
	border-radius: 12px;
	background: var(--fp-dark-card);
	border: 1px solid var(--fp-dark-line);
	transition: transform 0.18s ease, border-color 0.18s ease;
}

.fp-niche-spot-card:hover {
	transform: translateY(-2px);
	border-color: var(--fp-accent);
}

.fp-niche-spot-card img {
	width: 112px;
	height: 92px;
	border-radius: 8px;
	object-fit: cover;
}

.fp-niche-spot-card small {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #9ba4b8;
}

.fp-niche-spot-card strong {
	display: block;
	font-size: 15px;
	font-weight: 800;
	color: #ffffff;
	margin: 3px 0 5px;
}

.fp-niche-spot-card span {
	font-size: 12.5px;
	font-weight: 600;
	color: #ff9578;
}

/* ==========================================================================
   Niche Page Tokens
   ========================================================================== */
html {
	max-width: 100%;
	overflow-x: clip;
}

body.fp-niche-page {
	--fpn-tone: #0e6b56;
	--fpn-tint: #eaf6f2;
	--fpn-canvas: #f5f7f6;
	background: var(--fpn-canvas);
	max-width: 100%;
	overflow-x: clip;
}

body.fp-niche--interior {
	--fpn-tone: #8f3d19;
	--fpn-tint: #faefe9;
	--fpn-canvas: #f7f4ee;
}

/* Distraction-Free Sticky Ad Landing Header */
.fpn-hero-grid > *,
.fpn-pain-grid > *,
.fpn-pillar-row > *,
.fpn-samples-box > *,
.fpn-case-pair > *,
.fpn-pkg-grid > *,
.fpn-lead-grid > * {
	min-width: 0;
}
.fpn-header {
	position: sticky;
	top: 0;
	z-index: 920;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--fp-line);
}

.fpn-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
}

.fpn-brand-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fpn-vertical-pill {
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--fpn-tint);
	color: var(--fpn-tone);
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.fpn-quick-nav {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--fp-ink-soft);
}

.fpn-quick-nav a {
	white-space: nowrap;
}

.fpn-quick-nav a:hover {
	color: var(--fpn-tone);
}

.fpn-switch-link {
	padding: 5px 10px;
	border-radius: 6px;
	background: var(--fp-paper);
	border: 1px solid var(--fp-line);
	font-size: 12.5px;
	font-weight: 700;
}

.fpn-header-cta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.fpn-zalo-top {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 12px;
	border-radius: 7px;
	background: #0068ff;
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 800;
}

/* ==========================================================================
   1. Niche Hero (Above-the-fold optimized)
   ========================================================================== */
.fpn-hero {
	padding: 46px 0 62px;
	background: var(--fp-surface);
	border-bottom: 1px solid var(--fp-line);
}

.fpn-hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 44px;
	align-items: center;
}

.fpn-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 6px;
	background: var(--fpn-tint);
	color: var(--fpn-tone);
	font-size: 12.5px;
	font-weight: 800;
}

.fpn-hero-title {
	margin: 16px 0 14px;
	font-size: clamp(1.9rem, 3.5vw, 2.85rem);
	font-weight: 800;
	line-height: 1.22;
	letter-spacing: -0.028em;
	color: var(--fp-ink);
}

.fpn-hero-title em {
	font-style: normal;
	color: var(--fpn-tone);
	box-shadow: inset 0 -0.32em 0 var(--fpn-tint);
}

.fpn-hero-sub {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.65;
	color: var(--fp-muted);
}

.fpn-kpi-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 24px;
}

.fpn-kpi-box {
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--fpn-canvas);
	border: 1px solid var(--fp-line);
}

.fpn-kpi-box strong {
	display: block;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.15;
	color: var(--fpn-tone);
	font-variant-numeric: tabular-nums;
}

.fpn-kpi-box small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--fp-muted);
}

.fpn-hero-cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.fpn-hero-media {
	position: relative;
	border-radius: var(--fp-radius-lg);
	overflow: hidden;
	border: 1px solid var(--fp-line);
	box-shadow: var(--fp-shadow-md);
	aspect-ratio: 16 / 11.2;
	background: #1b212e;
}

.fpn-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fpn-hero-media figcaption {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(18, 22, 31, 0.82);
	backdrop-filter: blur(6px);
	color: #f8fafc;
	font-size: 12px;
	line-height: 1.45;
}

/* ==========================================================================
   2. Sections, Pain-vs-Solution Diagnostic & 3-Pillar Funnel
   ========================================================================== */
.fpn-section {
	padding: 76px 0;
}

.fpn-sec-head {
	max-width: 720px;
	margin-bottom: 38px;
}

.fpn-sec-head h2 {
	margin: 0;
	font-size: clamp(1.65rem, 2.8vw, 2.3rem);
	font-weight: 800;
	line-height: 1.26;
	letter-spacing: -0.02em;
	color: var(--fp-ink);
}

.fpn-sec-head.is-light h2 {
	color: #ffffff;
}

.fpn-pain-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.fpn-pain-card {
	border-radius: var(--fp-radius-md);
	overflow: hidden;
	background: var(--fp-surface);
	border: 1px solid var(--fp-line);
	box-shadow: var(--fp-shadow-sm);
	display: grid;
}

.fpn-pain-bad {
	padding: 20px 22px;
	background: #fcfaf7;
	border-bottom: 1px dashed var(--fp-line-strong);
}

.fpn-pain-good {
	padding: 20px 22px;
	background: var(--fp-surface);
}

.fpn-state-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 9px;
	border-radius: 5px;
	font-size: 11.5px;
	font-weight: 800;
	margin-bottom: 8px;
}

.fpn-state-tag.is-bad {
	background: #fee2e2;
	color: #991b1b;
}

.fpn-state-tag.is-good {
	background: var(--fpn-tint);
	color: var(--fpn-tone);
}

.fpn-state-tag .fp-icon {
	width: 14px;
	height: 14px;
}

.fpn-pain-card p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
}

.fpn-pain-bad p {
	color: var(--fp-muted);
}

.fpn-pain-good p {
	color: var(--fp-ink);
	font-weight: 500;
}

/* 3-Pillar Alternating Rows */
.fpn-pillars {
	background: var(--fp-surface);
	border-top: 1px solid var(--fp-line);
	border-bottom: 1px solid var(--fp-line);
}

.fpn-pillar-stack {
	display: grid;
	gap: 36px;
}

.fpn-pillar-row {
	display: grid;
	grid-template-columns: 0.95fr 1.05fr;
	gap: 38px;
	align-items: center;
	padding: 24px;
	border-radius: var(--fp-radius-lg);
	background: var(--fpn-canvas);
	border: 1px solid var(--fp-line);
}

.fpn-pillar-row.is-reverse {
	grid-template-columns: 1.05fr 0.95fr;
}

.fpn-pillar-row.is-reverse .fpn-pillar-photo {
	order: 2;
}

.fpn-pillar-photo {
	position: relative;
	border-radius: var(--fp-radius-md);
	overflow: hidden;
	aspect-ratio: 16 / 11;
	background: #1b212e;
}

.fpn-pillar-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fpn-pillar-photo figcaption {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(18, 22, 31, 0.8);
	color: #f1f5f9;
	font-size: 11.5px;
}

.fpn-step-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 5px;
	background: var(--fpn-tint);
	color: var(--fpn-tone);
	font-size: 12px;
	font-weight: 800;
	margin-bottom: 10px;
}

.fpn-pillar-body h3 {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--fp-ink);
}

.fpn-pillar-body > p {
	margin: 0 0 18px;
	font-size: 15px;
	color: var(--fp-muted);
}

.fpn-pillar-body .fp-checklist {
	margin-bottom: 0;
}

/* Sample Keywords & Compliant Ad Hooks */
.fpn-samples-box {
	margin-top: 36px;
	padding: 28px;
	border-radius: var(--fp-radius-lg);
	background: var(--fp-surface);
	border: 1.5px solid var(--fp-line-strong);
	display: grid;
	grid-template-columns: 0.92fr 1.08fr;
	gap: 32px;
}

.fpn-samples-col h3 {
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16.5px;
	font-weight: 800;
	color: var(--fp-ink);
}

.fpn-samples-col h3 .fp-icon {
	color: var(--fpn-tone);
}

.fpn-kw-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fpn-kw-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 13px;
	border-radius: 999px;
	background: var(--fpn-canvas);
	border: 1px solid var(--fp-line);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--fp-ink);
}

.fpn-kw-chip i {
	font-style: normal;
	font-size: 12px;
}

.fpn-hook-list {
	display: grid;
	gap: 12px;
}

.fpn-hook-item {
	padding: 13px 16px;
	border-radius: 10px;
	background: var(--fpn-canvas);
	border-left: 3px solid var(--fpn-tone);
}

.fpn-hook-item strong {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fpn-tone);
	margin-bottom: 4px;
}

.fpn-hook-item p {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--fp-ink-soft);
}

/* ==========================================================================
   4. Verified Niche Case Studies & Packages
   ========================================================================== */
.fpn-cases {
	background: var(--fp-dark);
	color: #ffffff;
}

.fpn-case-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.fpn-case-item {
	border-radius: var(--fp-radius-lg);
	overflow: hidden;
	background: var(--fp-dark-card);
	border: 1px solid var(--fp-dark-line);
	display: flex;
	flex-direction: column;
}

.fpn-case-img {
	aspect-ratio: 16 / 9.5;
	overflow: hidden;
}

.fpn-case-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fpn-case-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.fpn-case-content h3 {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 800;
	color: #ffffff;
}

.fpn-case-content p {
	margin: 0 0 18px;
	font-size: 14.5px;
	color: #b4bccd;
}

.fpn-case-stats {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--fp-dark-line);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.fpn-case-stats b {
	display: block;
	font-size: 19px;
	font-weight: 800;
	color: #ff9578;
	font-variant-numeric: tabular-nums;
}

.fpn-case-stats small {
	font-size: 12px;
	color: #9ba4b8;
}

/* Packages */
.fpn-packages {
	background: var(--fpn-canvas);
}

.fpn-pkg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	align-items: stretch;
}

.fpn-pkg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 28px 26px;
	border-radius: var(--fp-radius-lg);
	background: var(--fp-surface);
	border: 1.5px solid var(--fp-line);
}

.fpn-pkg-card.is-popular {
	border-color: var(--fpn-tone);
	box-shadow: var(--fp-shadow-md);
}

.fpn-pkg-badge {
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 5px;
	background: var(--fpn-tint);
	color: var(--fpn-tone);
	font-size: 11.5px;
	font-weight: 800;
	margin-bottom: 10px;
}

.fpn-pkg-card h3 {
	margin: 0 0 6px;
	font-size: 19.5px;
	font-weight: 800;
	color: var(--fp-ink);
}

.fpn-pkg-for {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: var(--fp-muted);
}

.fpn-pkg-price {
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--fp-line);
}

.fpn-pkg-price b {
	display: block;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--fp-ink);
	font-variant-numeric: tabular-nums;
}

.fpn-pkg-price span {
	font-size: 12.5px;
	color: var(--fp-muted);
}

.fpn-pkg-card .fp-btn {
	margin-top: auto;
}

.fpn-pkg-note {
	margin: 20px 0 0;
	font-size: 13.5px;
	color: var(--fp-muted);
}

/* ==========================================================================
   5. 10-Second Thumb-Friendly Mobile Lead Form
   ========================================================================== */
.fpn-lead {
	background: var(--fp-dark);
	color: #ffffff;
}

.fpn-lead-grid {
	display: grid;
	grid-template-columns: 0.94fr 1.06fr;
	gap: 44px;
	align-items: start;
}

.fpn-lead-copy h2 {
	margin: 0 0 14px;
	font-size: clamp(1.7rem, 2.8vw, 2.25rem);
	font-weight: 800;
	line-height: 1.26;
	color: #ffffff;
}

.fpn-lead-copy > p {
	margin: 0 0 28px;
	font-size: 15.5px;
	color: #b4bccd;
}

.fpn-lead-copy strong {
	color: #ffffff;
}

.fpn-form-box {
	padding: 30px;
	border-radius: var(--fp-radius-lg);
	background: var(--fp-surface);
	color: var(--fp-ink);
	box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}

.fpn-form-box h3 {
	margin: 0 0 4px;
	font-size: 21px;
	font-weight: 800;
}

.fpn-form-sub {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: var(--fp-muted);
}

.fpn-chip-group {
	display: grid;
	gap: 8px;
}

.fpn-chip-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--fp-ink);
}

.fpn-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fpn-chip {
	min-height: 40px;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1.5px solid var(--fp-line-strong);
	background: var(--fpn-canvas);
	color: var(--fp-ink-soft);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.14s ease;
}

.fpn-chip:hover {
	border-color: var(--fpn-tone);
}

.fpn-chip.is-selected {
	background: var(--fpn-tone);
	border-color: var(--fpn-tone);
	color: #ffffff;
}

.fpn-submit-btn {
	min-height: 52px;
	font-size: 15.5px;
}

.fpn-privacy-note {
	display: block;
	text-align: center;
	font-size: 12px;
	color: var(--fp-muted);
}

/* ==========================================================================
   6. Maximum Smartphone Optimization (<= 980px & <= 640px)
   ========================================================================== */
@media (max-width: 1024px) {
	.fp-niche-spotlight,
	.fpn-hero-grid,
	.fpn-pillar-row,
	.fpn-pillar-row.is-reverse,
	.fpn-samples-box,
	.fpn-lead-grid {
		grid-template-columns: 1fr;
	}
	.fpn-pillar-row.is-reverse .fpn-pillar-photo {
		order: 0;
	}
	.fpn-quick-nav {
		display: none;
	}
	.fpn-pkg-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 680px) {
	.fp-niche-spotlight {
		padding: 22px 18px;
	}
	.fp-niche-spot-cards,
	.fpn-pain-grid,
	.fpn-case-pair {
		grid-template-columns: 1fr;
	}
	.fp-niche-spot-card {
		grid-template-columns: 90px 1fr;
	}
	.fp-niche-spot-card img {
		width: 90px;
		height: 82px;
	}

	/* Compact Mobile Ad Header — strictly fits 360px-390px with zero overflow */
	.fpn-header-inner {
		min-height: 56px;
		gap: 6px;
	}
	.fpn-vertical-pill {
		display: none;
	}
	.fpn-header .fp-logo {
		gap: 8px;
	}
	.fpn-header .fp-logo-mark {
		width: 34px;
		height: 34px;
		font-size: 14.5px;
	}
	.fpn-header .fp-logo-text b,
	.fpn-header .fp-logo-text i {
		font-size: 17px;
	}
	.fpn-header .fp-logo-text small {
		display: none;
	}
	.fpn-zalo-top {
		min-height: 34px;
		padding: 0 10px;
		font-size: 12px;
	}
	.fpn-header .fp-btn--sm {
		padding: 8px 11px;
		font-size: 12px;
	}
	.fpn-badge {
		white-space: normal;
		line-height: 1.35;
	}

	/* Mobile Hero: Photo + Headline + 3 Compact KPIs + Full-Width Thumb CTA */
	.fpn-hero {
		padding: 24px 0 38px;
	}
	.fpn-hero-grid {
		gap: 22px;
	}
	.fpn-hero-title {
		font-size: 26px;
		line-height: 1.24;
		margin: 12px 0 10px;
	}
	.fpn-hero-sub {
		font-size: 15px;
		line-height: 1.58;
		margin-bottom: 18px;
	}
	.fpn-kpi-strip {
		gap: 7px;
		margin-bottom: 18px;
	}
	.fpn-kpi-box {
		padding: 10px 8px;
		text-align: center;
	}
	.fpn-kpi-box strong {
		font-size: 17px;
	}
	.fpn-kpi-box small {
		font-size: 11px;
		line-height: 1.25;
	}
	.fpn-hero-cta-group {
		flex-direction: column;
		gap: 9px;
	}
	.fpn-hero-cta-group .fp-btn {
		width: 100%;
		min-height: 50px;
	}

	.fpn-section {
		padding: 50px 0;
	}
	.fpn-pillar-row {
		padding: 16px;
		gap: 18px;
	}
	.fpn-pillar-body h3 {
		font-size: 18.5px;
	}
	.fpn-samples-box {
		padding: 20px 16px;
		gap: 24px;
	}
	.fpn-kw-chip {
		font-size: 12.5px;
		padding: 7px 11px;
		white-space: normal;
	}
	.fpn-case-content,
	.fpn-pkg-card {
		padding: 20px 18px;
	}

	/* Prevent iOS Safari input auto-zoom (16px minimum font-size on inputs!) */
	.fpn-form-box {
		padding: 22px 18px;
	}
	.fpn-form-box input,
	.fp-form input,
	.fp-form select,
	.fp-form textarea {
		font-size: 16px !important;
		min-height: 48px;
	}
	.fpn-chips {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.fpn-chip {
		min-height: 44px;
		font-size: 13px;
		padding: 8px 10px;
		text-align: center;
	}

	/* Safe-area support for iPhone Home Indicator on sticky mobile bar */
	.fp-mobile-bar {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	body.fp-theme {
		padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}
}

/* Header ngách: không để nhãn ngách đè lên menu khi màn hình hẹp hơn 1600px. */
.fpn-brand-group, .fpn-header-cta { flex-shrink: 0; }
@media (max-width: 1599px) {
	.fpn-vertical-pill { display: none; }
}
@media (max-width: 1279px) {
	.fpn-switch-link { display: none; }
}
