/*
 * t33 Archive family — blog index, archives, search, 404
 * Loaded only on those contexts (deps: t33-theme), so nothing
 * here needs body-class scoping.
 */

/* ------------------------------------------------------------------
 * Layout — main + card grid (grid overlaps the hero bottom)
 * ------------------------------------------------------------------ */
.t33-archive-main {
	/* Same max container as the homepage "Latest articles" section —
	   keeps cards a sane width on large monitors */
	max-width: var(--container-max-width, 1280px);
	margin: 0 auto;
	padding: 0 24px 90px;
}

.t33-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
	margin-top: -60px;
	position: relative;
	z-index: 5;
}

@media (max-width: 1024px) {
	.t33-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.t33-archive-grid {
		grid-template-columns: minmax(0, 1fr);
		margin-top: -40px;
	}
}

/* ------------------------------------------------------------------
 * Cards (internals — title, excerpt, date, media zoom — come
 * from t33-theme.css)
 * ------------------------------------------------------------------ */
.t33-card {
	background: var(--t33-paper);
	border: 1px solid #edf0f6;
	border-radius: var(--t33-radius);
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(7, 11, 26, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.t33-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--t33-shadow-lift);
}

.t33-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
}

.t33-card .t33-card-media img {
	height: 200px;
}

.t33-card-media--empty {
	display: block;
	height: 200px;
	background: linear-gradient(160deg, var(--t33-navy-3), var(--t33-navy-1));
}

/* ------------------------------------------------------------------
 * Pagination — parent outputs nav.pagination > .nav-links > ul.page-numbers
 * ------------------------------------------------------------------ */
.t33-archive-main nav.pagination {
	margin-top: 48px;
}

.t33-archive-main .nav-links ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.t33-archive-main ul.page-numbers li {
	display: inline-flex;
	margin: 0;
}

.t33-archive-main .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	padding: 10px 16px;
	border-radius: 999px;
	background: #fff;
	border: 1.5px solid #e3e7ef;
	font-weight: 700;
	color: var(--t33-ink);
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.t33-archive-main a.page-numbers:hover {
	border-color: var(--t33-cyan);
	color: #0a90ae;
}

.t33-archive-main .page-numbers.current {
	background: linear-gradient(120deg, #0a90ae, #2bc8e8);
	color: #fff;
	border: none;
	box-shadow: 0 6px 18px rgba(43, 200, 232, 0.35);
}

.t33-archive-main .page-numbers.dots {
	background: transparent;
	border: none;
	box-shadow: none;
}

/* ------------------------------------------------------------------
 * Hero search — same glass pill treatment as the homepage hero
 * ------------------------------------------------------------------ */
.t33-hero-search {
	max-width: 520px;
	margin: 26px auto 0;
}

.t33-hero-search .search-form {
	position: relative;
	display: flex;
	margin: 0;
}

.t33-hero-search .search-field {
	width: 100%;
	background: rgba(255, 255, 255, 0.08);
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	color: #fff;
	font-size: 1rem;
	padding: 16px 60px 16px 26px;
	transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.t33-hero-search .search-field::placeholder {
	color: rgba(232, 238, 252, 0.55);
}

.t33-hero-search .search-field:focus {
	outline: none;
	border-color: var(--t33-cyan);
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 0 0 4px rgba(43, 200, 232, 0.18);
}

.t33-hero-search .search-submit {
	position: absolute;
	right: 7px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(120deg, #0a90ae, var(--t33-cyan));
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.t33-hero-search .search-submit:hover {
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 6px 18px rgba(43, 200, 232, 0.5);
}

/* ------------------------------------------------------------------
 * Empty state (search with no results)
 * ------------------------------------------------------------------ */
.t33-empty {
	max-width: 680px;
	margin: -40px auto 0;
	position: relative;
	z-index: 5;
	background: var(--t33-paper);
	border-radius: var(--t33-radius);
	box-shadow: var(--t33-shadow);
	padding: 48px;
	text-align: center;
}

.t33-empty-title {
	color: var(--t33-ink);
	font-size: 1.4rem;
	font-weight: 900;
	margin: 0 0 10px;
}

.t33-empty-text {
	color: var(--t33-ink-soft);
	margin: 0;
}

.t33-empty-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

/* ------------------------------------------------------------------
 * 404 extras (inside the dark hero)
 * ------------------------------------------------------------------ */
.t33-404-actions {
	margin: 22px 0;
}

.t33-404-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

/* Chips sit on the dark hero — lighten them */
.t33-page-hero .t33-chip {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.18);
	color: #dbe6fb;
}

.t33-page-hero .t33-chip:hover {
	border-color: var(--t33-cyan);
	color: var(--t33-cyan);
}

/* ------------------------------------------------------------------
 * 404: hero flows straight into the dark footer (no white band)
 * ------------------------------------------------------------------ */
.error404 .t33-archive-main {
	padding: 0;
}

.error404 .site-footer.t33-footer {
	margin-top: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
