/**
 * GH-C003 — Category Card v1.0
 *
 * The archive component owns grid columns and gaps. This file owns only the
 * navigational category-card presentation.
 */

.gh-category-archive .gh-child-category-card {
	background: var(--gh-color-white);
	border: 1px solid var(--gh-color-border);
	border-radius: var(--gh-category-card-radius);
	color: var(--gh-color-ink);
	display: flex;
	flex-direction: column;
	font-family: var(--gh-font-family);
	overflow: hidden;
	text-decoration: none;
	transition:
		border-color 200ms ease,
		box-shadow 200ms ease,
		transform 200ms ease;
}

.gh-category-archive .gh-child-category-card__media {
	aspect-ratio: var(--gh-category-card-aspect-ratio, 4 / 3);
	background: var(--gh-color-surface);
	display: block;
	overflow: hidden;
	width: 100%;
}

.gh-category-archive .gh-child-category-card__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
	width: 100%;
}

.gh-category-archive .gh-child-category-card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--gh-space-3);
	padding: var(--gh-space-4);
}

.gh-category-archive .gh-child-category-card__name {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--gh-color-ink);
	display: -webkit-box;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	overflow: hidden;
}

.gh-category-archive .gh-child-category-card__meta {
	align-items: center;
	display: flex;
	gap: var(--gh-space-3);
	justify-content: space-between;
	margin-top: auto;
}

.gh-category-archive .gh-child-category-card__count {
	color: var(--gh-color-muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

.gh-category-archive .gh-child-category-card__arrow {
	color: var(--gh-color-primary);
	flex: 0 0 auto;
	font-size: 16px;
	transition: color 200ms ease, transform 200ms ease;
}

.gh-category-archive .gh-child-category-card:hover {
	border-color: var(--gh-color-primary);
	box-shadow: 0 12px 28px rgba(31, 42, 47, 0.1);
	color: var(--gh-color-ink);
	transform: translateY(-3px);
}

.gh-category-archive .gh-child-category-card:hover .gh-child-category-card__media img {
	transform: scale(1.02);
}

.gh-category-archive .gh-child-category-card:hover .gh-child-category-card__arrow {
	color: var(--gh-color-primary-dark);
	transform: translateX(2px);
}

.gh-category-archive .gh-child-category-card:focus-visible {
	border-color: var(--gh-color-focus);
	outline: 3px solid var(--gh-color-focus);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	.gh-category-archive .gh-child-category-card__content {
		gap: var(--gh-space-2);
		padding: 14px;
	}

	.gh-category-archive .gh-child-category-card__name {
		font-size: 14px;
	}

	.gh-category-archive .gh-child-category-card__count {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gh-category-archive .gh-child-category-card,
	.gh-category-archive .gh-child-category-card__media img,
	.gh-category-archive .gh-child-category-card__arrow {
		transition-duration: 0.01ms;
	}
}
