/* ==========================================================================
   Aviagame — post listings: the blog (home.php), category archives,
   search results and the author page's publication grid.

   All of them render structure/archive.php + structure/post-card.php, so the
   card and the grid are defined once here.

   STATE: structure only — the old visual layer is gone.
   ========================================================================== */

.aviagame-archive { padding-block: 32px 64px; }

.aviagame-archive__head { margin-bottom: 24px; }
.aviagame-archive__head > * + * { margin-top: 12px; }

.aviagame-archive__title {
	margin: 0;
	font-size: clamp(28px, 4.4vw, 44px);
	line-height: 1.15;
}

.aviagame-archive__lead { max-width: 780px; color: var(--aviagame-ink-2); }

.aviagame-archive__empty { color: var(--aviagame-muted); }

/* --- Category chips ------------------------------------------------------- */

.aviagame-archive__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

.aviagame-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 14px;
	border: 1px solid var(--aviagame-line);
	border-radius: 999px;
}

.aviagame-chip.is-current {
	background: var(--aviagame-red);
	color: var(--aviagame-ink);
	border-color: transparent;
}

.aviagame-chip__count { font-size: 12px; opacity: .7; }

/* --- The grid -------------------------------------------------------------
   The newest entry on page one takes two columns and lays its image beside the
   copy; every other entry is a tile. */

.aviagame-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--aviagame-gap);
}

.aviagame-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--aviagame-line);
	border-radius: var(--aviagame-radius-lg);
	background: var(--aviagame-card);
}

.aviagame-post-card__media { display: block; }

.aviagame-post-card__img {
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.aviagame-post-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	padding: 20px;
}

.aviagame-post-card__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.aviagame-post-card__term {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid var(--aviagame-line);
	border-radius: 999px;
	font-size: 12px;
}

.aviagame-post-card__title { margin: 0; font-size: 19px; line-height: 1.3; }
.aviagame-post-card__link { transition: color .18s ease; }
.aviagame-post-card__link:hover { color: var(--aviagame-red); }

.aviagame-post-card__excerpt { margin: 0; color: var(--aviagame-ink-2); }

.aviagame-post-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
	font-size: 13px;
	color: var(--aviagame-muted);
}

/* The lead card ------------------------------------------------------------ */

.aviagame-post-card--lead {
	grid-column: span 2;
	flex-direction: row;
}

.aviagame-post-card--lead .aviagame-post-card__media {
	flex: 0 0 50%;
	max-width: 50%;
}

.aviagame-post-card--lead .aviagame-post-card__img {
	aspect-ratio: auto;
	min-height: 100%;
}

.aviagame-post-card--lead .aviagame-post-card__body { padding: 28px; }
.aviagame-post-card--lead .aviagame-post-card__title { font-size: clamp(22px, 2.6vw, 28px); }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1023px) {
	.aviagame-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.aviagame-archive { padding-block: 24px 48px; }

	.aviagame-post-grid { grid-template-columns: minmax(0, 1fr); }

	.aviagame-post-card--lead {
		grid-column: auto;
		flex-direction: column;
	}

	.aviagame-post-card--lead .aviagame-post-card__media {
		flex: none;
		max-width: none;
	}

	.aviagame-post-card--lead .aviagame-post-card__img { aspect-ratio: 16 / 9; min-height: 0; }
	.aviagame-post-card--lead .aviagame-post-card__body { padding: 20px; }
}
