/**
 * Category & Archive (Chuyên Mục Bài Viết) Stylesheet
 * Scoped strictly to .a-cat-page to prevent any conflicts with other pages
 *
 * @package Flatsome Child
 */

/* Main Container */
.a-cat-page {
	width: 100%;
	background: #f8fafc;
	min-height: 80vh;
}

.a-cat-page *,
.a-cat-page *::before,
.a-cat-page *::after {
	box-sizing: border-box;
}

.a-cat-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 36px 20px 80px 20px;
}

/* Breadcrumbs */
.a-cat-breadcrumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13.5px;
	color: #64748b;
	margin-bottom: 22px;
	line-height: 1.4;
}

.a-cat-breadcrumbs a {
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s ease;
}

.a-cat-breadcrumbs a:hover {
	color: #2563eb;
}

.a-cat-breadcrumbs .a-bc-sep {
	color: #cbd5e1;
	font-size: 12px;
}

.a-cat-breadcrumbs .a-bc-current {
	color: #0f172a;
	font-weight: 600;
}

/* 2-Column Grid Layout */
.a-cat-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 350px;
	gap: 40px;
	align-items: start;
}

/* Left Column: Post List */
.a-cat-main-col {
	min-width: 0;
	width: 100%;
}

.a-cat-posts-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

/* Single Post Card */
.a-cat-post-card {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 24px;
	background: #ffffff;
	border-radius: 5px;
	border: 1px solid #eef2f6;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
	padding: 18px;
	transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
		border-color 0.28s ease;
	position: relative;
	margin-bottom: 0px !important;
}

.a-cat-post-card:hover {
	border-color: #cbd5e1;
}

/* Card Thumbnail */
.a-cat-post-thumb-wrap {
	flex: 0 0 260px;
	width: 260px;
	height: 180px;
	border-radius: 10px;
	overflow: hidden;
	background: #0f172a;
	position: relative;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.a-cat-post-thumb-link {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.a-cat-post-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.a-cat-post-card:hover .a-cat-post-thumb-img {
	transform: scale(1.05);
	filter: brightness(1.05);
}

.a-cat-post-thumb-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0d1527 0%, #152238 100%);
	color: #475569;
}

.a-cat-post-thumb-fallback svg {
	width: 32px;
	height: 32px;
	stroke: currentColor;
	opacity: 0.6;
}

/* Card Content */
.a-cat-post-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 4px 6px 4px 0;
}

.a-cat-post-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Meta Top */
.a-cat-post-meta-top {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: #64748b;
}

.a-cat-post-date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 500;
}

.a-cat-calendar-icon {
	width: 13px;
	height: 13px;
	stroke: #64748b;
	flex-shrink: 0;
}

.a-cat-meta-sep {
	color: #cbd5e1;
	font-size: 12px;
}

.a-cat-post-author {
	color: #475569;
	font-weight: 500;
}

/* Card Title */
.a-cat-post-title {
	font-family: inherit;
	font-size: 18.5px;
	font-weight: 700;
	line-height: 1.38;
	margin: 0;
	color: #0f172a;
	word-break: break-word;
}

.a-cat-post-title a {
	color: #0f172a;
	text-decoration: none !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.a-cat-post-card:hover .a-cat-post-title a {
	color: #2563eb;
}

/* Card Excerpt */
.a-cat-post-excerpt {
	margin: 0;
}

.a-cat-post-excerpt p {
	font-size: 14px;
	color: #64748b;
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Card Footer / Read More */
.a-cat-post-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.a-cat-read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #2563eb;
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.a-cat-read-more:hover {
	color: #1d4ed8;
}

.a-cat-arrow-icon {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Numeric Pagination */
.a-cat-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.a-cat-pagination .page-numbers {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.a-cat-pagination .page-numbers li {
	margin: 0;
	padding: 0;
}

.a-cat-pagination .page-numbers a,
.a-cat-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #334155;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.a-cat-pagination .page-numbers a:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #2563eb;
}

.a-cat-pagination .page-numbers .current {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff !important;
}

.a-cat-pagination .page-numbers .dots {
	border: none;
	background: transparent;
	color: #94a3b8;
}

.a-cat-pagination svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

/* Empty State */
.a-cat-empty {
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid #eef2f6;
	padding: 48px 24px;
	text-align: center;
}

.a-cat-empty svg {
	width: 48px;
	height: 48px;
	stroke: #94a3b8;
	margin-bottom: 14px;
}

.a-cat-empty h3 {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.a-cat-empty p {
	font-size: 14px;
	color: #64748b;
	margin: 0 0 20px 0;
}

.a-cat-empty-btn {
	display: inline-flex;
	align-items: center;
	background: #2563eb;
	color: #ffffff !important;
	font-size: 13.5px;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s;
}

.a-cat-empty-btn:hover {
	background: #1d4ed8;
}

/* Right Column: Sidebar */
.a-cat-sidebar-col {
	width: 100%;
}

.a-cat-sidebar-inner {
	position: sticky;
	top: 90px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Sidebar Recent Posts Widget (Dark Tech Signature Widget) */
.a-sidebar-recent-posts {
	background: #ffffff;
	border-radius: 5px;
	border: 1px solid #eef2f6;
	padding: 22px 20px;
	width: 100%;
}

.a-sidebar-widget-header {
	margin-bottom: 12px;
}

.a-sidebar-widget-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #3b82f6;
	line-height: 1.3;
}

.a-sidebar-post-list {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.a-sidebar-post-item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.a-sidebar-post-item:first-child {
	padding-top: 4px;
}

.a-sidebar-post-thumb {
	flex: 0 0 88px;
	width: 88px;
	height: 58px;
	border-radius: 4px;
	overflow: hidden;
	background: #0d1527;
	position: relative;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.a-sidebar-post-thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.a-sidebar-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, filter 0.35s ease;
}

.a-sidebar-post-item:hover .a-sidebar-thumb-img {
	transform: scale(1.06);
	filter: brightness(1.08);
}

.a-sidebar-thumb-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0d1527 0%, #152238 100%);
	color: #475569;
}

.a-sidebar-thumb-fallback svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
	opacity: 0.6;
}

.a-sidebar-post-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.a-sidebar-post-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.38;
}

.a-sidebar-post-title a {
	color: #000;
	text-decoration: none !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
	transition: color 0.2s ease;
}

.a-sidebar-post-item:hover .a-sidebar-post-title a {
	color: #60a5fa;
}

.a-sidebar-post-date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	color: #64748b;
	line-height: 1;
}

.a-sidebar-calendar-icon {
	width: 12px;
	height: 12px;
	stroke: #64748b;
	flex-shrink: 0;
}

.a-sidebar-widget-footer {
	margin-top: 4px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.a-sidebar-view-all {
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-decoration: none !important;
	color: #3b82f6;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: none;
	line-height: 1;
	transition: color 0.2s ease;
}

.a-sidebar-view-all:hover {
	color: #60a5fa;
}

.a-sidebar-view-all svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	transition: transform 0.25s ease;
}

.a-sidebar-view-all:hover svg {
	transform: translateX(4px);
}

/* Categories Widget */
.a-sidebar-categories {
	background: #ffffff;
	border-radius: 5px;
	border: 1px solid #eef2f6;
	padding: 22px 20px;
}

.a-sidebar-categories .a-sidebar-widget-title {
	color: #0f172a;
	padding-bottom: 10px;
}

.a-sidebar-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.a-sidebar-cat-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px dashed #e2e8f0;
}

.a-sidebar-cat-item:last-child {
	border-bottom: none;
}

.a-sidebar-cat-item a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 8px;
	border-radius: 6px;
	text-decoration: none !important;
	color: #334155;
	font-size: 16px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.a-sidebar-cat-item a:hover {
	color: #2563eb;
	background: #f8fafc;
}

.a-sidebar-cat-item.active a {
	background: #2563eb;
	color: #ffffff !important;
	font-weight: 600;
}

.a-cat-count {
	background: #f1f5f9;
	color: #64748b;
	font-size: 11.5px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 12px;
	transition: all 0.2s ease;
}

.a-sidebar-cat-item a:hover .a-cat-count {
	background: #2563eb;
	color: #ffffff;
}

.a-sidebar-cat-item.active .a-cat-count {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

/* Responsive */
@media (max-width: 992px) {
	.a-cat-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.a-cat-sidebar-inner {
		position: static;
	}
}

@media (max-width: 680px) {
	.a-cat-container {
		padding: 20px 14px 60px 14px;
	}

	.a-cat-hero {
		padding: 22px 18px;
	}

	.a-cat-hero-title {
		font-size: 24px;
	}

	.a-cat-post-card {
		flex-direction: column;
		gap: 14px;
		padding: 14px;
	}

	.a-cat-post-thumb-wrap {
		flex: none;
		width: 100%;
		height: 190px;
		min-height: auto;
	}

	.a-cat-post-title {
		font-size: 17px;
	}

	.a-cat-post-content {
		padding: 0;
	}
}