/**
 * ThoughtsWorld — Categories, Topics & Collections Stylesheet (assets/css/category.css)
 *
 * Dedicated modular stylesheet for:
 * - Categories & Topics Directory (taxonomy.php, archive-tw_collection.php)
 * - Category Cards Grid (.tw-category-grid, .tw-category-card)
 * - Curated Collections Archive & Cards (.tw-collection-grid, .tw-collection-card)
 * - Mood & Theme Explorer (.tw-mood-explorer)
 * - Sliding Filter Drawer & Trigger Toolbar (.tw-filter-bar, .tw-filter-drawer)
 *
 * @package Thoughts_World
 */

.tw-category-grid,
.tw-topic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin-bottom: 48px;
}

.tw-category-card {
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-radius: 20px;
	padding: 26px 22px;
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	color: #0F172A;
	box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	overflow: hidden;
}

.tw-category-card:hover {
	transform: translateY(-3px);
	border-color: #0968E5;
	box-shadow: 0 12px 28px -4px rgba(9, 104, 229, 0.12);
}

.tw-category-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: #EFF6FF;
	color: #0968E5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.tw-category-card:hover .tw-category-card__icon {
	background: #0968E5;
	color: #FFFFFF;
}

.tw-category-card__name {
	font-size: 1.1rem;
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 3px 0;
	line-height: 1.3;
}

.tw-category-card__count {
	font-size: 0.82rem;
	font-weight: 700;
	color: #64748B;
}

/* Curated Collections Grid & Cards */
.tw-collection-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 28px;
	margin-bottom: 48px;
}

.tw-collection-card {
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.05);
	transition: all 0.25s ease;
	display: flex;
	flex-direction: column;
}

.tw-collection-card:hover {
	transform: translateY(-4px);
	border-color: #0968E5;
	box-shadow: 0 16px 36px -6px rgba(9, 104, 229, 0.12);
}

.tw-collection-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
}

.tw-collection-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.tw-collection-card:hover .tw-collection-card__img {
	transform: scale(1.05);
}

.tw-collection-card__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.tw-collection-card__title {
	font-size: 1.25rem;
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 8px 0;
}

.tw-collection-card__desc {
	font-size: 0.94rem;
	line-height: 1.6;
	color: #475569;
	margin: 0 0 16px 0;
	flex: 1;
}

/* Responsive Adaptations */
@media (max-width: 768px) {
	.tw-category-grid,
	.tw-topic-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.tw-collection-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}
