/* =================================
   Category Page Styles
   ================================= */

.category-page-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

/* Category Header */
.category-header {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2rem;
	align-items: start;
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 2px solid var(--color-border);
}

.category-header-content {
	flex: 1;
}

.category-breadcrumb {
	margin-bottom: 1rem;
}

.category-parent-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #007ACC;
	text-decoration: none;
	font-weight: 600;
	padding: 0.5rem 1rem;
	background: rgba(0, 122, 204, 0.08);
	border-radius: 6px;
	transition: all 0.3s ease;
}

.category-parent-link:hover {
	background: rgba(0, 122, 204, 0.15);
	transform: translateX(-3px);
	text-decoration: none;
}

html.dark-theme .category-parent-link {
	color: #FDB913;
	background: rgba(253, 185, 19, 0.08);
}

html.dark-theme .category-parent-link:hover {
	background: rgba(253, 185, 19, 0.15);
}

.category-title {
	font-size: 2.5rem;
	font-weight: 800;
	margin: 0 0 1rem 0;
	color: var(--color-primary);
	line-height: 1.2;
}

.category-description {
	font-size: 1.1rem;
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin-top: 1rem;
}

.category-image {
	width: 100%;
	max-width: 300px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.category-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Category Submenu */
.category-submenu-wrapper {
	position: relative;
	margin-bottom: 3rem;
}

.category-submenu-scroll {
	position: relative;
	overflow: hidden;
}

.category-submenu {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	padding: 1rem 0;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: var(--color-primary) transparent;
}

.category-submenu::-webkit-scrollbar {
	height: 6px;
}

.category-submenu::-webkit-scrollbar-track {
	background: transparent;
}

.category-submenu::-webkit-scrollbar-thumb {
	background: var(--color-primary);
	border-radius: 3px;
}

.category-submenu::-webkit-scrollbar-thumb:hover {
	background: var(--color-accent);
}

.submenu-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	background: rgba(0, 0, 0, 0.08);
	color: var(--color-text-primary);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 24px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	cursor: pointer;
}

html.dark-theme .submenu-pill {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.12);
}

.submenu-pill:hover {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
	text-decoration: none;
}

.submenu-pill.is-active {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
	box-shadow: 0 4px 16px rgba(0, 122, 204, 0.3);
	text-decoration: none;
}

html.dark-theme .submenu-pill.is-active {
	background: #FDB913;
	color: #1a1a1a;
	border-color: #FDB913;
	box-shadow: 0 4px 16px rgba(253, 185, 19, 0.3);
}

.submenu-pill i {
	font-size: 1rem;
}

.submenu-all {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
	flex-shrink: 0;
	text-decoration: none;
}

html.dark-theme .submenu-all {
	background: #FDB913;
	color: #1a1a1a;
	border-color: #FDB913;
}

/* Scroll buttons (mobile) */
.submenu-scroll-left,
.submenu-scroll-right {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: var(--color-primary);
	color: white;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 122, 204, 0.2);
}

html.dark-theme .submenu-scroll-left,
html.dark-theme .submenu-scroll-right {
	background: #FDB913;
	color: #1a1a1a;
	box-shadow: 0 2px 8px rgba(253, 185, 19, 0.2);
}

.submenu-scroll-left:hover,
.submenu-scroll-right:hover {
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.submenu-scroll-left {
	left: 0;
}

.submenu-scroll-right {
	right: 0;
}

@media (max-width: 768px) {
	.submenu-scroll-left.visible,
	.submenu-scroll-right.visible {
		display: flex;
	}
}

/* Category Content */
.category-content {
	margin-top: 2rem;
}

/* Featured Post Section */
.featured-post-section {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	margin-bottom: 3rem;
	transition: all 0.3s ease;
	min-height: 280px;
}

html.dark-theme .featured-post-section {
	background: #1a1a1a;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.featured-post-section:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 120, 212, 0.15);
}

html.dark-theme .featured-post-section:hover {
	box-shadow: 0 8px 24px rgba(253, 185, 19, 0.15);
}

.featured-post-image {
	width: 40%;
	flex-shrink: 0;
	overflow: hidden;
	background: var(--color-bg-secondary);
}

.featured-post-image a {
	display: flex;
	width: 100%;
	height: 100%;
}

.featured-post-thumbnail,
.featured-post-image .pattern {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.featured-post-section:hover .featured-post-thumbnail {
	transform: scale(1.05);
}

.featured-post-content {
	width: 60%;
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.featured-post-badge {
	display: inline-block;
	margin-bottom: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.02em;
}

.featured-post-title {
	margin: 0 0 1rem 0;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.3;
}

.featured-post-title a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

.featured-post-title a:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.featured-post-meta {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
	color: var(--color-text-secondary);
}

.featured-post-reading-time {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.featured-post-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-primary);
	text-decoration: none;
	font-weight: 700;
	padding-bottom: 0.25rem;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
	width: fit-content;
}

.featured-post-link:hover {
	border-bottom-color: var(--color-primary);
	transform: translateX(4px);
	text-decoration: none;
}

/* Responsive featured post */
@media (max-width: 768px) {
	.featured-post-section {
		flex-direction: column;
		margin-bottom: 2rem;
		min-height: auto;
	}

	.featured-post-image {
		width: 100%;
		height: 220px;
	}

	.featured-post-content {
		width: 100%;
		padding: 1.5rem;
	}

	.featured-post-title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.featured-post-section {
		border-radius: 12px;
		margin-bottom: 1.5rem;
	}

	.featured-post-image {
		height: 180px;
	}

	.featured-post-content {
		padding: 1rem;
	}

	.featured-post-title {
		font-size: 1.25rem;
		margin-bottom: 0.75rem;
	}

	.featured-post-meta {
		gap: 1rem;
		margin-bottom: 1rem;
		font-size: 0.85rem;
	}

	.featured-post-link {
		font-size: 0.9rem;
	}
}


.category-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
}

.post-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

html.dark-theme .post-card {
	background: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 122, 204, 0.15);
}

html.dark-theme .post-card:hover {
	box-shadow: 0 8px 24px rgba(253, 185, 19, 0.15);
}

.post-card-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: var(--color-bg-secondary);
}

.post-card-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.post-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail {
	transform: scale(1.05);
}

.post-card-content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.post-card-title {
	margin: 0 0 1rem 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
}

.post-card-title a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

.post-card-title a:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.post-card-meta {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: var(--color-text-secondary);
}

.post-date {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.post-card-excerpt {
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin-bottom: 1rem;
	flex: 1;
}

.post-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-primary);
	text-decoration: none;
	font-weight: 600;
	padding-bottom: 0.25rem;
	border-bottom: 2px solid transparent;
	transition: all 0.3s ease;
}

.post-card-link:hover {
	border-bottom-color: var(--color-primary);
	transform: translateX(4px);
	text-decoration: none;
}

/* Pagination */
.category-pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--color-border);
}

.category-pagination a,
.category-pagination span {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	text-decoration: none;
	transition: all 0.3s ease;
	color: var(--color-text-primary);
}

/* === Mobile card layout additions === */
.post-card-badge {
	display: inline-block;
	margin-bottom: 0.5rem;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.02em;
}

.post-reading-time {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

@media (max-width: 640px) {
	.post-card {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		border-radius: 20px;
		padding: 0;
	}

	.post-card-image {
		width: 38%;
		height: auto;
		border-top-left-radius: 20px;
		border-bottom-left-radius: 20px;
		border-top-right-radius: 0;
		border-bottom-right-radius: 0;
		overflow: hidden;
		background: var(--color-bg-secondary);
		display: flex;
	}

	.post-card-image a,
	.post-thumbnail,
	.pattern {
		height: 100%;
		width: 100%;
	}

	.post-card-content {
		width: 62%;
		padding: 1rem 1.25rem;
		gap: 0.25rem;
		justify-content: center;
	}

	.post-card-title {
		font-size: 1rem;
		line-height: 1.3;
		margin: 0.25rem 0 0.5rem 0;
	}

	.post-card-excerpt {
		font-size: 0.9rem;
		color: var(--color-text-secondary);
		display: none;
	}

	.post-card-link {
		display: none;
	}
}

.category-pagination a:hover {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
	text-decoration: none;
}

.category-pagination .current {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

html.dark-theme .category-pagination .current {
	background: #FDB913;
	color: #1a1a1a;
	border-color: #FDB913;
}

/* No posts message */
.no-posts-message {
	text-align: center;
	padding: 4rem 2rem;
}

.no-posts-message i {
	font-size: 3rem;
	color: var(--color-primary);
	margin-bottom: 1rem;
	opacity: 0.5;
}

.no-posts-message h2 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.no-posts-message p {
	color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
	.category-header {
		grid-template-columns: 1fr;
	}

	.category-header-content {
		order: 2;
	}

	.category-image {
		order: 1;
		max-width: 100%;
	}

	.category-title {
		font-size: 1.75rem;
	}

	.category-posts {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 1rem;
	}

	.submenu-pill {
		padding: 0.65rem 1rem;
		font-size: 0.85rem;
	}
}

@media (max-width: 480px) {
	.category-page-wrapper {
		padding: 1rem 0.5rem;
	}

	.category-header {
		gap: 1rem;
		margin-bottom: 2rem;
	}

	.category-title {
		font-size: 1.5rem;
	}

	.category-posts {
		grid-template-columns: 1fr;
	}

	.post-card-content {
		padding: 1rem;
	}

	.submenu-pill span {
		display: none;
	}

	.submenu-pill {
		padding: 0.65rem;
		justify-content: center;
	}
}
/* =================================
   Related Posts Section
   ================================= */

.related-posts-section {
	max-width: 1200px;
	margin: 4rem auto 0;
	padding: 3rem 1rem 0;
	border-top: 2px solid var(--color-border);
}

.related-posts-title {
	font-size: 2rem;
	font-weight: 800;
	margin-bottom: 2rem;
	color: var(--color-text-primary);
}

html.dark-theme .related-posts-title {
	color: white;
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
}

/* Related Post Card */
.related-post-card {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	min-height: 280px;
}

.related-post-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

html.dark-theme .related-post-card {
	background: var(--fluent-grey-160);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-theme .related-post-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.related-post-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.related-post-badge {
	display: inline-block;
	padding: 0.35rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: transparent;
	transition: all 0.3s ease;
}

.related-post-badge.text-fluent-blue-60 {
	color: var(--fluent-blue-60);
}

.related-post-badge.text-fluent-orange-40 {
	color: var(--fluent-orange-40);
}

.related-post-badge.text-fluent-teal-40 {
	color: var(--fluent-teal-40);
}

.related-post-badge.text-fluent-green-30 {
	color: var(--fluent-green-30);
}

.related-post-badge.text-fluent-yellow-40 {
	color: var(--fluent-yellow-40);
}

.related-post-badge.text-fluent-red-30 {
	color: var(--fluent-red-30);
}

.related-post-badge.text-fluent-magenta-20 {
	color: var(--fluent-magenta-20);
}

.related-post-badge.text-fluent-purple-40 {
	color: var(--fluent-purple-40);
}

html.dark-theme .related-post-badge {
	opacity: 0.9;
}

.related-post-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	flex-grow: 1;
}

.related-post-title a {
	color: var(--color-text-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

.related-post-title a:hover {
	color: var(--fluent-blue-60);
}

html.dark-theme .related-post-title a {
	color: white;
}

html.dark-theme .related-post-title a:hover {
	color: var(--fluent-blue-40);
}

.related-post-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: 0.875rem;
	color: var(--color-text-secondary);
	margin-top: auto;
}

.related-post-reading-time {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-text-secondary);
}

html.dark-theme .related-post-reading-time {
	color: var(--fluent-grey-70);
}

.related-post-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--fluent-blue-60);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	transition: all 0.3s ease;
	width: fit-content;
}

.related-post-link:hover {
	color: var(--fluent-blue-80);
	gap: 0.75rem;
}

html.dark-theme .related-post-link {
	color: var(--fluent-blue-40);
}

html.dark-theme .related-post-link:hover {
	color: var(--fluent-blue-30);
}

.related-post-link svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	transition: transform 0.3s ease;
}

.related-post-link:hover svg {
	transform: translateX(3px);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
	.related-posts-section {
		margin: 2.5rem auto 0;
		padding: 2rem 1rem 0;
	}

	.related-posts-title {
		font-size: 1.75rem;
		margin-bottom: 1.5rem;
	}

	.related-posts-grid {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
		gap: 1.5rem;
	}

	.related-post-card {
		padding: 1.5rem;
		min-height: auto;
	}
}

/* Responsive - Mobile */
@media (max-width: 640px) {
	.related-posts-section {
		margin: 2rem auto 0;
		padding: 1.5rem 1rem 0;
	}

	.related-posts-title {
		font-size: 1.5rem;
		margin-bottom: 1.25rem;
	}

	.related-posts-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.related-post-card {
		padding: 1.25rem;
	}

	.related-post-title {
		font-size: 1.1rem;
	}

	.related-post-link {
		font-size: 0.9rem;
	}
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
	.related-posts-title {
		font-size: 1.25rem;
	}

	.related-post-card {
		padding: 1rem;
		gap: 1rem;
	}

	.related-post-title {
		font-size: 1rem;
	}

	.related-post-meta {
		font-size: 0.8rem;
	}
}