/**
 * Theme T&B — Resources Styles
 *
 * Styles for the Resources CPT (tb_resource) archive and single pages.
 * Follows the Design System defined in 04A-Design-System.md
 * and Design Tokens in 04B-Design-Tokens.md.
 *
 * @package ThemeTB
 * @version 2.0.0
 * @since   2.0.0
 */

/* ==========================================================================
   Resources Archive
   ========================================================================== */

.tb-resources-archive {
	padding: var(--tb-space-8) 0;
}

.tb-resources-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
	gap: var(--tb-space-6);
}

/* ==========================================================================
   Resource Card
   ========================================================================== */

.tb-resource-card {
	background: var(--tb-surface);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-lg);
	padding: var(--tb-space-6);
	transition: box-shadow var(--tb-transition-base), transform var(--tb-transition-base);
	display: flex;
	flex-direction: column;
	gap: var(--tb-space-3);
}

.tb-resource-card:hover {
	box-shadow: var(--tb-shadow-md);
	transform: translateY( -2px );
}

.tb-resource-card__icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tb-primary-light);
	border-radius: var(--tb-radius-md);
	color: var(--tb-primary);
}

.tb-resource-card__title {
	font-size: var(--tb-text-lg);
	font-weight: var(--tb-font-semibold);
	color: var(--tb-text-primary);
	margin: 0;
	line-height: var(--tb-leading-snug);
}

.tb-resource-card__title a {
	color: inherit;
	text-decoration: none;
}

.tb-resource-card__title a:hover {
	color: var(--tb-primary);
}

.tb-resource-card__excerpt {
	font-size: var(--tb-text-sm);
	color: var(--tb-text-secondary);
	line-height: var(--tb-leading-relaxed);
	margin: 0;
	flex: 1;
}

.tb-resource-card__meta {
	display: flex;
	align-items: center;
	gap: var(--tb-space-2);
	font-size: var(--tb-text-xs);
	color: var(--tb-text-muted);
}

.tb-resource-card__category {
	display: inline-flex;
	align-items: center;
	padding: var(--tb-space-1) var(--tb-space-2);
	background: var(--tb-bg-subtle);
	border-radius: var(--tb-radius-full);
	font-size: var(--tb-text-xs);
	color: var(--tb-text-secondary);
	text-decoration: none;
}

.tb-resource-card__category:hover {
	background: var(--tb-primary-light);
	color: var(--tb-primary);
}

/* ==========================================================================
   Resource Single
   ========================================================================== */

.tb-resource-single {
	max-width: var(--tb-content-width);
	margin: 0 auto;
	padding: var(--tb-space-8) var(--tb-space-4);
}

.tb-resource-single__header {
	margin-bottom: var(--tb-space-8);
}

.tb-resource-single__title {
	font-size: var(--tb-text-3xl);
	font-weight: var(--tb-font-bold);
	color: var(--tb-text-primary);
	margin-bottom: var(--tb-space-4);
}

.tb-resource-single__content {
	line-height: var(--tb-leading-relaxed);
	color: var(--tb-text-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media ( max-width: 768px ) {
	.tb-resources-grid {
		grid-template-columns: 1fr;
	}

	.tb-resource-single__title {
		font-size: var(--tb-text-2xl);
	}
}
