/* ==========================================================================
   BanglaTrick — Q&A Listing Page
   ========================================================================== */

/* ---------- Hero ---------- */
.bt-qa-list-wrap {
	padding: 24px 16px 48px;
}

.bt-qa-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding: 28px 28px;
	background: linear-gradient(135deg, var(--primary), var(--primary-hover));
	border-radius: 16px;
	color: white;
	margin-bottom: 28px;
	box-shadow: 0 8px 24px rgba(22, 119, 255, 0.2);
}

.bt-qa-hero-content {
	flex: 1;
	min-width: 0;
}

.bt-qa-hero-title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 6px;
	color: white;
	line-height: 1.2;
}
@media (min-width: 768px) {
	.bt-qa-hero-title { font-size: 2.25rem; }
}

.bt-qa-hero-sub {
	font-size: 1rem;
	margin: 0 0 14px;
	opacity: 0.92;
	line-height: 1.5;
}

.bt-qa-hero-stats {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	font-size: 0.875rem;
	opacity: 0.95;
}
.bt-qa-hero-stats strong {
	font-weight: 700;
	font-size: 1rem;
}

.bt-qa-hero-btn {
	background: white !important;
	color: var(--primary) !important;
	padding: 12px 24px !important;
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	flex-shrink: 0;
}
.bt-qa-hero-btn:hover {
	background: rgba(255, 255, 255, 0.92) !important;
	color: var(--primary-hover) !important;
}

@media (max-width: 640px) {
	.bt-qa-hero {
		padding: 22px 20px;
	}
	.bt-qa-hero-btn {
		width: 100%;
		text-align: center;
	}
}

/* ---------- Layout ---------- */
.bt-qa-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}
@media (min-width: 900px) {
	.bt-qa-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
}
.bt-qa-main {
	min-width: 0;
}

/* ---------- Filter Bar ---------- */
.bt-qa-filterbar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 24px;
}
.bt-qa-search {
	flex: 1;
	min-width: 220px;
	position: relative;
}
.bt-qa-search svg {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
	pointer-events: none;
}
.bt-qa-search input {
	width: 100%;
	padding: 10px 14px 10px 38px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.9375rem;
	font-family: inherit;
	background: var(--background);
}
.bt-qa-search input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}
.bt-qa-filterbar select {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.875rem;
	font-family: inherit;
	background: var(--background);
	min-width: 130px;
	cursor: pointer;
}
.bt-qa-filterbar select:focus {
	outline: none;
	border-color: var(--primary);
}

/* ---------- Section ---------- */
.bt-qa-section {
	margin-bottom: 32px;
}
.bt-qa-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--border);
}
.bt-qa-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.0625rem;
	font-weight: 700;
	margin: 0;
	color: var(--heading);
}
.bt-qa-section-title svg {
	color: var(--primary);
}
.bt-qa-section-note {
	font-size: 0.8125rem;
	color: var(--muted);
}

/* ---------- Featured Section ---------- */
.bt-qa-featured-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}
@media (min-width: 720px) {
	.bt-qa-featured-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1024px) {
	.bt-qa-featured-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---------- Hots Section ---------- */
.bt-qa-hots-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ---------- Recent Section ---------- */
.bt-qa-recent-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ==========================================================================
   Question Card
   ========================================================================== */

.bt-qa-card {
	position: relative;
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.bt-qa-card:hover {
	border-color: var(--primary);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.bt-qa-card-body {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr) 48px;
	gap: 14px;
	padding: 16px;
	align-items: flex-start;
}
@media (max-width: 640px) {
	.bt-qa-card-body {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.bt-qa-card-stats {
		flex-direction: row !important;
		gap: 10px !important;
		width: 100%;
		align-items: stretch;
	}
	.bt-qa-stat {
		flex: 1;
		padding: 8px 6px;
	}
	.bt-qa-stat span {
		font-size: 0.625rem;
	}
	.bt-qa-card-votes {
		flex-direction: row !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px !important;
	}
}

/* Stats strip */
.bt-qa-card-stats {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
	text-align: center;
	min-width: 0;
	width: 92px;
}
.bt-qa-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px 4px;
	background: var(--surface);
	border-radius: 8px;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}
.bt-qa-stat strong {
	font-size: 1rem;
	font-weight: 700;
	color: var(--heading);
	line-height: 1;
	font-family: var(--font-heading);
}
.bt-qa-stat span {
	display: block;
	font-size: 0.6875rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	line-height: 1.2;
}
.bt-qa-stat.has-answers {
	background: #ecfdf5;
	padding: 8px 4px;
}
.bt-qa-stat.has-answers strong {
	color: #065f46;
}

/* Content */
.bt-qa-card-content {
	min-width: 0;
}

.bt-qa-card-title {
	font-size: 1.0625rem;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.35;
	color: var(--heading);
}
.bt-qa-card-title a {
	color: inherit;
	text-decoration: none;
}
.bt-qa-card-title a:hover {
	color: var(--primary);
}

.bt-qa-card-excerpt {
	font-size: 0.875rem;
	color: var(--muted);
	margin: 0 0 10px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bt-qa-card-tags-row {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.bt-qa-card-cat {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 9px;
	background: var(--primary-soft);
	color: var(--primary);
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.15s;
}
.bt-qa-card-cat:hover {
	background: var(--primary);
	color: white;
}
.bt-qa-card-tag {
	font-size: 0.75rem;
	padding: 3px 9px;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--muted);
	border-radius: 4px;
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s;
}
.bt-qa-card-tag:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.bt-qa-card-meta {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	font-size: 0.75rem;
	color: var(--muted);
}
.bt-qa-card-author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
}
.bt-qa-card-author:hover .bt-qa-card-author-name {
	color: var(--primary);
}
.bt-qa-card-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
}
.bt-qa-card-author-name {
	font-weight: 600;
	color: var(--heading);
}
.bt-qa-card-author-pts {
	font-size: 0.6875rem;
	color: var(--muted);
	background: var(--surface);
	padding: 1px 6px;
	border-radius: 3px;
}
.bt-qa-card-time,
.bt-qa-card-comments {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Votes */
.bt-qa-card-votes {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.bt-qa-vote-btn {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	color: #64748b;
	cursor: pointer;
	transition: all 0.15s;
	padding: 0;
	flex-shrink: 0;
}
.bt-qa-vote-btn svg {
	width: 16px;
	height: 16px;
	stroke-width: 2.5;
	display: block;
}
.bt-qa-vote-btn:hover:not(:disabled) {
	color: var(--primary);
	border-color: var(--primary);
	background: var(--primary-soft);
}
.bt-qa-vote-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	background: #f1f5f9;
	color: #94a3b8;
}
.bt-qa-vote-btn.is-active {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
}
.bt-qa-vote-btn.is-active svg {
	stroke-width: 2.8;
}
.bt-qa-vote-btn[data-vote="down"].is-active {
	background: #ef4444;
	border-color: #ef4444;
}
.bt-qa-vote-count {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--heading);
	font-family: var(--font-heading);
	min-width: 24px;
	text-align: center;
	line-height: 1;
}

/* Login note */
.bt-qa-card-login-note {
	padding: 8px 16px;
	background: var(--surface);
	border-top: 1px solid var(--border);
	font-size: 0.75rem;
	color: var(--muted);
	text-align: center;
}
.bt-qa-card-login-note a {
	color: var(--primary);
	text-decoration: underline;
}

/* ==========================================================================
   FEATURED Card variant
   ========================================================================== */
.bt-qa-card-featured {
	border-color: #f59e0b;
	background: linear-gradient(180deg, #fffbeb 0%, var(--background) 25%);
}
.bt-qa-card-featured-ribbon {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	position: absolute;
	top: 0;
	right: 16px;
	background: #f59e0b;
	color: white;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 0 0 6px 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	z-index: 2;
}
.bt-qa-card-featured .bt-qa-card-body {
	grid-template-columns: 1fr;
	padding: 22px 18px 18px;
}
.bt-qa-card-featured .bt-qa-card-stats {
	flex-direction: row;
	gap: 10px;
	justify-content: flex-start;
	margin-bottom: 4px;
	width: 100%;
}
.bt-qa-card-featured .bt-qa-card-stats .bt-qa-stat {
	flex: 0 0 auto;
	min-width: 80px;
	padding: 8px 10px;
}
.bt-qa-card-featured .bt-qa-card-votes {
	position: absolute;
	bottom: 16px;
	right: 16px;
	flex-direction: row;
	gap: 6px;
	align-items: center;
}
.bt-qa-card-featured .bt-qa-card-title {
	font-size: 1.125rem;
}

/* ==========================================================================
   HOTS Card variant
   ========================================================================== */
.bt-qa-card-hots {
	border-left: 3px solid #ef4444;
}
.bt-qa-card-hots .bt-qa-card-rank {
	position: absolute;
	top: 12px;
	right: 14px;
	font-size: 1.5rem;
	font-weight: 800;
	color: rgba(239, 68, 68, 0.15);
	font-family: var(--font-heading);
	line-height: 1;
	pointer-events: none;
}
.bt-qa-card-hots.bt-qa-card-rank-1 {
	border-left-color: #f59e0b;
}
.bt-qa-card-hots.bt-qa-card-rank-1 .bt-qa-card-rank {
	color: rgba(245, 158, 11, 0.25);
}
.bt-qa-card-hots.bt-qa-card-rank-2 {
	border-left-color: #94a3b8;
}
.bt-qa-card-hots.bt-qa-card-rank-2 .bt-qa-card-rank {
	color: rgba(148, 163, 184, 0.25);
}

/* ==========================================================================
   RECENT Card variant (default)
   ========================================================================== */
.bt-qa-card-recent {
	background: var(--background);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.bt-qa-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}
@media (min-width: 900px) {
	.bt-qa-sidebar {
		position: sticky;
		top: 90px;
		align-self: start;
		max-height: calc(100vh - 110px);
		overflow-y: auto;
	}
}

.bt-qa-tax-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.bt-qa-tax-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 0.875rem;
	color: var(--text);
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.bt-qa-tax-list a:hover,
.bt-qa-tax-list a.is-active {
	background: var(--primary-soft);
	color: var(--primary);
}
.bt-qa-tax-count {
	font-size: 0.75rem;
	color: var(--muted);
	background: var(--surface);
	padding: 1px 7px;
	border-radius: 10px;
}
.bt-qa-tax-list a.is-active .bt-qa-tax-count {
	background: var(--primary);
	color: white;
}

.bt-qa-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.bt-qa-tag-cloud-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	font-size: 0.8125rem;
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.bt-qa-tag-cloud-item:hover,
.bt-qa-tag-cloud-item.is-active {
	border-color: var(--primary);
	color: var(--primary);
	background: var(--primary-soft);
}
.bt-qa-tag-cloud-item .bt-qa-tax-count {
	background: transparent;
	color: inherit;
	padding: 0;
	font-size: 0.6875rem;
	opacity: 0.7;
}

.bt-qa-cta {
	text-align: center;
}