/* ==========================================================
   Dotthemes – Category Archive
   Upload to: /wp-content/themes/YOUR-CHILD-THEME/category-archive.css
   ========================================================== */

.dt-archive {
	--dt-ink: #0e1330;
	--dt-ink-2: #1a2150;
	--dt-accent: #2dd4bf;
	--dt-text: var(--theme-palette-color-4, #1f2437);
	--dt-muted: var(--theme-palette-color-3, #5b6178);
	--dt-surface: var(--theme-palette-color-8, #ffffff);
	--dt-line: rgba(14, 19, 48, 0.1);
	--dt-radius-lg: 28px;
	--dt-radius-md: 18px;
	--dt-radius-sm: 12px;
	--dt-gap: 24px;

	padding-block: 0 72px;
}

.dt-archive a {
	text-decoration: none;
	color: inherit;
}

/* ---------- Shared image behaviour ---------- */
.dt-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dt-thumb-fallback {
	background:
		radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.55), transparent 55%),
		linear-gradient(135deg, var(--dt-ink-2), var(--dt-ink));
}

/* ==========================================================
   HERO (boxed)
   ========================================================== */
.dt-hero {
	position: relative;
	overflow: hidden;
	width: 100%;
	background:
		radial-gradient(600px 300px at 90% -10%, rgba(45, 212, 191, 0.28), transparent 70%),
		radial-gradient(500px 300px at -5% 110%, rgba(99, 102, 241, 0.35), transparent 70%),
		linear-gradient(160deg, var(--dt-ink-2), var(--dt-ink));
	color: #fff;
	margin-bottom: 48px;
	isolation: isolate;
}

/* faint grid texture */
.dt-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}

.dt-hero__inner {
	padding-block: clamp(48px, 7vw, 96px);
	max-width: 820px;
}

.dt-hero__crumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.65);
	margin-bottom: 18px;
}

.dt-hero__crumbs a:hover {
	color: #fff;
}

.dt-hero__title {
	margin: 0 0 14px;
	color: #fff;
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.02em;
	font-weight: 700;
}

.dt-hero__desc {
	max-width: 62ch;
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.78);
}

.dt-hero__desc p {
	margin: 0;
}

.dt-hero__chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 28px 0 0;
	padding: 0;
}

.dt-hero__chips a {
	display: inline-block;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.85);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dt-hero__chips a:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.dt-hero__chips a.is-active {
	background: var(--dt-accent);
	border-color: var(--dt-accent);
	color: var(--dt-ink);
	font-weight: 600;
}

/* ==========================================================
   TOP: Lead post + side list
   ========================================================== */
.dt-top {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	gap: var(--dt-gap);
	margin-bottom: 56px;
}

/* ---------- Lead ---------- */
.dt-lead {
	min-height: 560px;
}

.dt-lead__link {
	position: relative;
	display: block;
	height: 100%;
	min-height: inherit;
	border-radius: var(--dt-radius-lg);
	overflow: hidden;
	background: var(--dt-ink);
}

.dt-lead__media {
	position: absolute;
	inset: 0;
}

.dt-lead__link:hover .dt-thumb-img {
	transform: scale(1.04);
}

.dt-lead__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(8, 11, 30, 0.92) 0%, rgba(8, 11, 30, 0.45) 45%, rgba(8, 11, 30, 0) 75%);
}

.dt-lead__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: clamp(22px, 3.5vw, 40px);
	display: block;
}

.dt-badge {
	display: inline-block;
	padding: 6px 14px;
	margin-bottom: 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	background: var(--dt-accent);
	color: var(--dt-ink);
}

.dt-lead__title {
	margin: 0;
	color: #fff;
	font-size: clamp(26px, 3.2vw, 40px);
	line-height: 1.18;
	letter-spacing: -0.015em;
	font-weight: 700;
	max-width: 24ch;
}

/* ---------- Side list ---------- */
.dt-side {
	display: grid;
	grid-template-rows: repeat(5, 1fr);
	gap: 14px;
}

.dt-side__item a {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	height: 100%;
	padding: 10px;
	border-radius: var(--dt-radius-md);
	background: var(--dt-surface);
	border: 1px solid var(--dt-line);
	transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}

.dt-side__item a:hover {
	border-color: transparent;
	box-shadow: 0 14px 34px -14px rgba(14, 19, 48, 0.28);
	transform: translateY(-2px);
}

.dt-side__media {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: var(--dt-radius-sm);
	overflow: hidden;
}

.dt-side__item a:hover .dt-thumb-img {
	transform: scale(1.08);
}

.dt-side__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--dt-text);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================
   3-COLUMN GRID
   ========================================================== */
.dt-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px var(--dt-gap);
}

.dt-card a {
	display: block;
}

.dt-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--dt-radius-md);
	overflow: hidden;
	margin-bottom: 18px;
	box-shadow: 0 1px 0 var(--dt-line);
}

.dt-card a:hover .dt-thumb-img {
	transform: scale(1.05);
}

.dt-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.32;
	letter-spacing: -0.01em;
	font-weight: 650;
	color: var(--dt-text);
	background-image: linear-gradient(var(--dt-accent), var(--dt-accent));
	background-repeat: no-repeat;
	background-size: 0% 2px;
	background-position: 0 100%;
	display: inline;
	padding-bottom: 2px;
	transition: background-size 0.35s ease;
}

.dt-card a:hover .dt-card__title {
	background-size: 100% 2px;
}

/* ==========================================================
   PAGINATION
   ========================================================== */
.dt-pagination {
	margin-top: 64px;
}

.dt-pagination .nav-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.dt-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 12px;
	font-weight: 600;
	color: var(--dt-text);
	background: var(--dt-surface);
	border: 1px solid var(--dt-line);
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dt-pagination a.page-numbers:hover {
	border-color: var(--dt-ink);
}

.dt-pagination .page-numbers.current {
	background: var(--dt-ink);
	border-color: var(--dt-ink);
	color: #fff;
}

.dt-pagination .screen-reader-text {
	display: none;
}

.dt-empty {
	padding: 60px 0;
	text-align: center;
	color: var(--dt-muted);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
	.dt-top {
		grid-template-columns: 1fr;
	}

	.dt-lead {
		min-height: 440px;
	}

	.dt-side {
		grid-template-rows: none;
	}

	.dt-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.dt-archive {
		--dt-radius-lg: 20px;
		padding-block: 0 48px;
	}

	.dt-lead {
		min-height: 360px;
	}

	.dt-side__item a {
		grid-template-columns: 104px minmax(0, 1fr);
		gap: 14px;
	}

	.dt-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.dt-card__title {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dt-archive * {
		transition: none !important;
	}
}
