/**
 * FixSteel Wisdom — tips archive (/tips/).
 * Glass / metal industrial aesthetic — readable hierarchy.
 */

.fsp-wisdom {
	--feg-blue: #172554;
	--fsp-wisdom-blue: #1e40af;
	--fsp-wisdom-blue-hi: #93c5fd;
	--fsp-wisdom-orange: #f97316;
	--fsp-wisdom-gold: #ffcc00;
	--fsp-wisdom-ink: #f1f5f9;
	--fsp-wisdom-body: #d8e0ea;
	--fsp-wisdom-muted: #a8b6c8;
	--fsp-wisdom-line: rgba(226, 232, 240, 0.2);
	--fsp-wisdom-glass: rgba(10, 16, 32, 0.82);
	--fsp-wisdom-glass-hi: rgba(23, 37, 84, 0.62);
	--fsp-wisdom-metal: linear-gradient(160deg, rgba(71, 85, 105, 0.42) 0%, rgba(15, 23, 42, 0.9) 52%, rgba(30, 64, 175, 0.34) 100%);
	--fsp-wisdom-read: 44rem;
}

body.fsp-wisdom {
	margin: 0;
	background: transparent;
	color: var(--fsp-wisdom-ink);
	overflow-x: clip;
	max-width: 100%;
}

.fsp-wisdom-shell {
	max-width: none;
	margin: 0 auto;
	padding: 0;
	font-family: 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, sans-serif;
	color: var(--fsp-wisdom-ink);
	line-height: 1.7;
	background: transparent;
}

/* ── Hero ─────────────────────────────────────────────── */

.fsp-wisdom-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	background:
		linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.08) 50%, transparent 100%),
		radial-gradient(ellipse 70% 55% at 78% 0%, rgba(30, 64, 175, 0.36) 0%, transparent 55%),
		radial-gradient(ellipse 45% 40% at 8% 85%, rgba(249, 115, 22, 0.16) 0%, transparent 50%),
		linear-gradient(165deg, #0a1020 0%, #111827 42%, var(--feg-blue) 100%);
	color: #f8fafc;
	border-bottom: 2px solid rgba(255, 204, 0, 0.9);
	text-align: center;
}

.fsp-wisdom-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(
			-12deg,
			transparent,
			transparent 11px,
			rgba(148, 163, 184, 0.035) 11px,
			rgba(148, 163, 184, 0.035) 12px
		);
	pointer-events: none;
}

.fsp-wisdom-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 920px;
	margin-inline: auto;
	padding: 2.85rem 1.5rem 2.5rem;
	box-sizing: border-box;
}

.fsp-wisdom-hero__brand {
	margin: 0 0 0.65rem;
	font-size: 0.92rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: var(--fsp-wisdom-gold);
	text-shadow: 0 0 18px rgba(255, 204, 0, 0.22);
	text-transform: none;
}

.fsp-wisdom-hero__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.85rem, 3.6vw, 2.35rem);
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -0.01em;
	color: #fff;
}

.fsp-wisdom-hero__lead {
	margin: 0 auto;
	max-width: 38rem;
	line-height: 1.8;
	font-size: 1rem;
	color: #d2dbe8;
}

/* ── Board / toolbar ──────────────────────────────────── */

.fsp-wisdom-board {
	max-width: 980px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3.75rem;
	box-sizing: border-box;
}

.fsp-wisdom-toolbar {
	display: flex;
	flex-direction: column;
	gap: 1.05rem;
	margin-bottom: 1.65rem;
}

.fsp-wisdom-search input {
	width: 100%;
	min-height: 50px;
	border: 1px solid var(--fsp-wisdom-line);
	padding: 0.7rem 1.05rem;
	font-size: 0.98rem;
	border-radius: 6px;
	background: var(--fsp-wisdom-glass);
	color: var(--fsp-wisdom-ink);
	backdrop-filter: blur(12px) saturate(1.15);
	-webkit-backdrop-filter: blur(12px) saturate(1.15);
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fsp-wisdom-search input::placeholder {
	color: var(--fsp-wisdom-muted);
}

.fsp-wisdom-search input:focus {
	outline: none;
	border-color: rgba(255, 204, 0, 0.6);
	box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.14);
}

.fsp-wisdom-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-start;
}

.fsp-wisdom-chip {
	min-height: 38px;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--fsp-wisdom-line);
	background: rgba(15, 23, 42, 0.62);
	color: var(--fsp-wisdom-ink);
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fsp-wisdom-chip:hover {
	border-color: rgba(59, 130, 246, 0.5);
	color: #fff;
}

.fsp-wisdom-chip.is-active,
.fsp-wisdom-chip[aria-pressed='true'] {
	background: linear-gradient(135deg, #0f1a3a 0%, var(--fsp-wisdom-blue) 100%);
	border-color: rgba(148, 163, 184, 0.5);
	color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ── Shared industrial glyph plate ────────────────────── */

.fsp-wisdom-glyph {
	display: block;
	flex-shrink: 0;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.fsp-wisdom-featured__glyph,
.fsp-wisdom-card__glyph {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 3.65rem;
	height: 3.65rem;
	margin-block-start: 0.1rem;
	border-radius: 5px;
	border: 1.5px solid rgba(255, 204, 0, 0.55);
	background:
		linear-gradient(145deg, rgba(255, 204, 0, 0.22) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(30, 64, 175, 0.35) 100%);
	color: var(--fsp-wisdom-gold);
	box-shadow:
		0 4px 14px rgba(2, 6, 23, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.18),
		inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.fsp-wisdom-featured__glyph .fsp-wisdom-glyph,
.fsp-wisdom-card__glyph .fsp-wisdom-glyph {
	width: 1.85rem;
	height: 1.85rem;
}

/* Category accent plates */
.fsp-wisdom-featured[data-cat='installers'] .fsp-wisdom-featured__glyph,
.fsp-wisdom-card[data-cat='installers'] .fsp-wisdom-card__glyph {
	color: #fb923c;
	border-color: rgba(249, 115, 22, 0.65);
	background:
		linear-gradient(145deg, rgba(249, 115, 22, 0.28) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(124, 45, 18, 0.4) 100%);
}

.fsp-wisdom-featured[data-cat='sellers'] .fsp-wisdom-featured__glyph,
.fsp-wisdom-card[data-cat='sellers'] .fsp-wisdom-card__glyph {
	color: #93c5fd;
	border-color: rgba(59, 130, 246, 0.6);
	background:
		linear-gradient(145deg, rgba(59, 130, 246, 0.28) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(30, 64, 175, 0.45) 100%);
}

.fsp-wisdom-featured[data-cat='cabin'] .fsp-wisdom-featured__glyph,
.fsp-wisdom-card[data-cat='cabin'] .fsp-wisdom-card__glyph {
	color: #e2e8f0;
	border-color: rgba(226, 232, 240, 0.45);
	background:
		linear-gradient(145deg, rgba(203, 213, 225, 0.22) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(71, 85, 105, 0.45) 100%);
}

.fsp-wisdom-featured[data-cat='factory'] .fsp-wisdom-featured__glyph,
.fsp-wisdom-card[data-cat='factory'] .fsp-wisdom-card__glyph {
	color: #60a5fa;
	border-color: rgba(30, 64, 175, 0.7);
	background:
		linear-gradient(145deg, rgba(30, 64, 175, 0.4) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(23, 37, 84, 0.55) 100%);
}

.fsp-wisdom-featured[data-cat='customers'] .fsp-wisdom-featured__glyph,
.fsp-wisdom-card[data-cat='customers'] .fsp-wisdom-card__glyph {
	color: var(--fsp-wisdom-gold);
	border-color: rgba(255, 204, 0, 0.65);
}

/* ── Featured tip of the day ──────────────────────────── */

.fsp-wisdom-featured {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 1.25rem;
	margin-bottom: 1.75rem;
	padding: 1.5rem 1.5rem 1.45rem;
	border-radius: 6px;
	border: 1px solid rgba(148, 163, 184, 0.32);
	background: var(--fsp-wisdom-metal);
	backdrop-filter: blur(16px) saturate(1.15);
	-webkit-backdrop-filter: blur(16px) saturate(1.15);
	box-shadow:
		0 16px 40px rgba(2, 6, 23, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
	overflow: hidden;
}

.fsp-wisdom-featured::before {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 3px;
	background: linear-gradient(180deg, var(--fsp-wisdom-gold), var(--fsp-wisdom-orange));
}

.fsp-wisdom-featured.is-hidden {
	display: none;
}

.fsp-wisdom-featured__body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: var(--fsp-wisdom-read);
}

.fsp-wisdom-featured__badge {
	display: inline-block;
	margin: 0 0 0.6rem;
	padding: 0.22rem 0.6rem;
	border-radius: 2px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #0f172a;
	background: var(--fsp-wisdom-gold);
	border: 1px solid rgba(15, 23, 42, 0.15);
}

.fsp-wisdom-featured__cat {
	margin: 0 0 0.4rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--fsp-wisdom-blue-hi);
}

.fsp-wisdom-featured__title {
	margin: 0 0 0.55rem;
	font-size: clamp(1.18rem, 2.4vw, 1.38rem);
	line-height: 1.65;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.fsp-wisdom-featured__summary {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.85;
	color: var(--fsp-wisdom-body);
}

/* ── Tip list (full-width rectangular cards) ──────────── */

.fsp-wisdom-list-label {
	margin: 0 0 0.95rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--fsp-wisdom-muted);
}

.fsp-wisdom-grid {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fsp-wisdom-card {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 1.15rem;
	width: 100%;
	padding: 1.2rem 1.3rem;
	border-radius: 5px;
	border: 1px solid var(--fsp-wisdom-line);
	background: var(--fsp-wisdom-glass);
	backdrop-filter: blur(12px) saturate(1.1);
	-webkit-backdrop-filter: blur(12px) saturate(1.1);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.fsp-wisdom-card:hover {
	border-color: rgba(148, 163, 184, 0.45);
	box-shadow:
		0 12px 30px rgba(2, 6, 23, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	transform: translateY(-1px);
}

.fsp-wisdom-card.is-hidden {
	display: none;
}

.fsp-wisdom-card.is-featured-dup {
	display: none;
}

.fsp-wisdom-card__body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: var(--fsp-wisdom-read);
}

.fsp-wisdom-card__cat {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 800;
	color: var(--fsp-wisdom-blue-hi);
	letter-spacing: 0.02em;
}

.fsp-wisdom-card__title {
	margin: 0 0 0.45rem;
	font-size: clamp(1.08rem, 2vw, 1.2rem);
	line-height: 1.7;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.fsp-wisdom-card__summary {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.85;
	color: var(--fsp-wisdom-body);
}

.fsp-wisdom-empty {
	padding: 1.6rem 1.1rem;
	text-align: center;
	color: var(--fsp-wisdom-muted);
	border-radius: 5px;
	border: 1px dashed var(--fsp-wisdom-line);
	background: rgba(15, 23, 42, 0.45);
}

@media (max-width: 640px) {
	.fsp-wisdom-hero__inner {
		padding: 2.15rem 1.1rem 1.9rem;
	}

	.fsp-wisdom-board {
		padding: 1.45rem 1rem 3.1rem;
	}

	.fsp-wisdom-featured,
	.fsp-wisdom-card {
		gap: 0.85rem;
		padding: 1.1rem 1rem;
	}

	.fsp-wisdom-featured__glyph,
	.fsp-wisdom-card__glyph {
		width: 3.15rem;
		height: 3.15rem;
	}

	.fsp-wisdom-featured__glyph .fsp-wisdom-glyph,
	.fsp-wisdom-card__glyph .fsp-wisdom-glyph {
		width: 1.6rem;
		height: 1.6rem;
	}

	.fsp-wisdom-featured__title {
		font-size: 1.12rem;
	}

	.fsp-wisdom-card__title {
		font-size: 1.05rem;
	}
}
