/*
 * Tag Archive Styles
 * ------------------
 * Everything in this file is scoped under .hetc-tag-archive, which only
 * exists on /tag/ pages (see tag.php). Nothing here can leak onto other
 * templates, and no parent-theme selectors are touched or overridden
 * globally.
 */

.hetc-tag-archive {
	--hetc-max-width: 1200px;
	--hetc-gap: 32px;
	--hetc-radius: 12px;
	--hetc-text: #1f2328;
	--hetc-text-muted: #6b7280;
	--hetc-border: #e5e7eb;
	--hetc-surface: #ffffff;
	--hetc-bg: #f7f8fa;
	--hetc-accent: #2563eb;
	--hetc-accent-contrast: #ffffff;

	box-sizing: border-box;
	background: var(--hetc-bg);
	padding-bottom: 64px;
}

.hetc-tag-archive *,
.hetc-tag-archive *::before,
.hetc-tag-archive *::after {
	box-sizing: inherit;
}

/* ---------- Hero / header ---------- */

.hetc-tag-hero {
	background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
	padding: 56px 24px 48px;
	color: #f9fafb;
}

.hetc-tag-hero__inner {
	max-width: var(--hetc-max-width);
	margin: 0 auto;
	text-align: center;
}

.hetc-tag-hero__label {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 12px;
}

.hetc-tag-hero__title {
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.2;
	font-weight: 800;
	margin: 0 0 12px;
	color: #ffffff;
}

.hetc-tag-hero__description {
	max-width: 640px;
	margin: 0 auto 16px;
	color: #d1d5db;
	font-size: 16px;
	line-height: 1.6;
}

.hetc-tag-hero__description p {
	margin: 0;
}

.hetc-tag-hero__count {
	margin: 0;
	font-size: 14px;
	color: #9ca3af;
}

.hetc-tag-hero__count strong {
	color: #f9fafb;
}

/* ---------- Content wrapper ---------- */

.hetc-tag-content {
	max-width: var(--hetc-max-width);
	margin: 0 auto;
	padding: 48px 24px 0;
}

/* ---------- Card grid ---------- */

.hetc-tag-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--hetc-gap);
}

.hetc-tag-card {
	display: flex;
	flex-direction: column;
	background: var(--hetc-surface);
	border: 1px solid var(--hetc-border);
	border-radius: var(--hetc-radius);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hetc-tag-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.hetc-tag-card__thumb {
	display: block;
	aspect-ratio: unset
	overflow: hidden;
	background: var(--hetc-bg);
}

.hetc-tag-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.hetc-tag-card:hover .hetc-tag-card__thumb img {
	transform: scale(1.05);
}

.hetc-tag-card__thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.hetc-tag-card__initial {
	font-size: 40px;
	font-weight: 800;
	color: #9ca3af;
	text-transform: uppercase;
}

.hetc-tag-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px 22px 24px;
}

.hetc-tag-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--hetc-text-muted);
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hetc-tag-card__cat {
	padding: 2px 10px;
	border-radius: 999px;
	background: #eff6ff;
	color: var(--hetc-accent);
	font-weight: 600;
}

.hetc-tag-card__title {
	font-size: 19px;
	line-height: 1.35;
	font-weight: 700;
	margin: 0 0 10px;
}

.hetc-tag-card__title a {
	color: var(--hetc-text);
	text-decoration: none;
}

.hetc-tag-card__title a:hover {
	color: var(--hetc-accent);
}

.hetc-tag-card__excerpt {
	color: var(--hetc-text-muted);
	font-size: 14.5px;
	line-height: 1.6;
	margin-bottom: 16px;
	flex-grow: 1;
}

.hetc-tag-card__excerpt p {
	margin: 0;
}

.hetc-tag-card__readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--hetc-accent);
	text-decoration: none;
	margin-top: auto;
}

.hetc-tag-card__readmore span {
	transition: transform 0.2s ease;
}

.hetc-tag-card__readmore:hover span {
	transform: translateX(3px);
}

/* ---------- Empty state ---------- */

.hetc-tag-empty {
	text-align: center;
	padding: 64px 24px;
	color: var(--hetc-text-muted);
	background: var(--hetc-surface);
	border: 1px dashed var(--hetc-border);
	border-radius: var(--hetc-radius);
}

/* ---------- Pagination ---------- */

.hetc-tag-pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--hetc-border);
}

.hetc-tag-pagination a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 8px;
	background: var(--hetc-surface);
	border: 1px solid var(--hetc-border);
	color: var(--hetc-text);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hetc-tag-pagination a:hover {
	background: var(--hetc-accent);
	border-color: var(--hetc-accent);
	color: var(--hetc-accent-contrast);
}

.hetc-tag-pagination__arrow {
	font-size: 16px;
	line-height: 1;
}

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

/* Tablets */
@media (max-width: 1024px) {
	.hetc-tag-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hetc-tag-hero {
		padding: 48px 20px 40px;
	}

	.hetc-tag-content {
		padding: 40px 20px 0;
	}
}

/* Large phones / small tablets */
@media (max-width: 680px) {
	.hetc-tag-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.hetc-tag-hero {
		padding: 40px 16px 32px;
	}

	.hetc-tag-hero__title {
		font-size: 26px;
	}

	.hetc-tag-content {
		padding: 32px 16px 0;
	}

	.hetc-tag-pagination {
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
		text-align: center;
	}

	.hetc-tag-pagination a {
		justify-content: center;
		width: 100%;
	}
}

/* Small phones */
@media (max-width: 380px) {
	.hetc-tag-card__body {
		padding: 16px 16px 20px;
	}

	.hetc-tag-hero__title {
		font-size: 22px;
	}
}
