/* ==========================================================================
   BanglaTrick — Q&A Homepage Section
   ========================================================================== */

.bt-qa-home-section {
	margin: 32px 0;
}

.bt-qa-home-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--primary);
	flex-wrap: wrap;
}

.bt-qa-home-head-left {
	min-width: 0;
	flex: 1;
}

.bt-qa-home-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: var(--heading);
	display: flex;
	align-items: center;
	gap: 8px;
}
.bt-qa-home-title svg {
	color: var(--primary);
	flex-shrink: 0;
}

.bt-qa-home-subtitle {
	font-size: 0.875rem;
	color: var(--muted);
	margin: 0;
	line-height: 1.4;
}

.bt-qa-home-view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: var(--primary-soft);
	color: var(--primary);
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, transform 0.15s;
	white-space: nowrap;
	flex-shrink: 0;
}
.bt-qa-home-view-all:hover {
	background: var(--primary);
	color: white;
	transform: translateX(2px);
}
.bt-qa-home-view-all svg {
	transition: transform 0.15s;
}
.bt-qa-home-view-all:hover svg {
	transform: translateX(2px);
}

/* ---------- Grid ---------- */
.bt-qa-home-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
@media (min-width: 720px) {
	.bt-qa-home-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------- Card ---------- */
.bt-qa-home-card {
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px 16px;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.bt-qa-home-card:hover {
	border-color: var(--primary);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
	transform: translateY(-2px);
}

.bt-qa-home-card-top {
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr) 44px;
	gap: 12px;
	align-items: flex-start;
}
@media (max-width: 480px) {
	.bt-qa-home-card-top {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.bt-qa-home-card-stats {
		flex-direction: row !important;
		gap: 10px !important;
		justify-content: flex-start !important;
		width: 100%;
		align-items: stretch;
	}
	.bt-qa-home-stat {
		flex: 1;
	}
	.bt-qa-home-card-votes {
		flex-direction: row !important;
		justify-content: flex-start !important;
		gap: 8px !important;
	}
}

/* ---------- Stats column ---------- */
.bt-qa-home-card-stats {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: stretch;
	text-align: center;
	min-width: 0;
	width: 68px;
}
.bt-qa-home-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 6px 4px;
	background: var(--surface);
	border-radius: 6px;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}
.bt-qa-home-stat strong {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--heading);
	line-height: 1;
	font-family: var(--font-heading);
}
.bt-qa-home-stat span {
	display: block;
	font-size: 0.625rem;
	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-home-stat.has-answers {
	background: #ecfdf5;
}
.bt-qa-home-stat.has-answers strong {
	color: #065f46;
}

/* ---------- Content column ---------- */
.bt-qa-home-card-content {
	min-width: 0;
}
.bt-qa-home-card-title {
	font-size: 0.9375rem;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.35;
	color: var(--heading);
}
.bt-qa-home-card-title a {
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bt-qa-home-card-title a:hover {
	color: var(--primary);
}

.bt-qa-home-card-excerpt {
	font-size: 0.8125rem;
	color: var(--muted);
	margin: 0 0 8px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

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

.bt-qa-home-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 0.6875rem;
	color: var(--muted);
}
.bt-qa-home-author {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
}
.bt-qa-home-author:hover span {
	color: var(--primary);
}
.bt-qa-home-avatar {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	object-fit: cover;
}
.bt-qa-home-time {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

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

/* ---------- Empty ---------- */
.bt-qa-home-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 32px 20px;
	background: var(--surface);
	border-radius: 12px;
	border: 1px dashed var(--border);
	font-size: 0.875rem;
	color: var(--muted);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.bt-qa-home-header {
		align-items: flex-start;
	}
	.bt-qa-home-view-all {
		font-size: 0.8125rem;
		padding: 6px 12px;
	}
}