/* ==========================================================================
   ABrandão 27a — posts.css  (loaded on lists only: home, archives, search, 404)
   Post listing styles: editorial (default), cards, compact, grid.
   ========================================================================== */

/* ---------- Archive header ---------- */
.archive-header {
	margin-bottom: calc(var(--a27-post-gap) * .8);
	padding-bottom: calc(var(--a27-post-gap) * .6);
	border-bottom: var(--a27-border-w) solid var(--a27-border);
}
.archive-kicker {
	display: flex; align-items: center; gap: .45em; margin: 0 0 .3em;
	font-family: var(--a27-font-meta); font-size: var(--a27-meta-size);
	font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	color: var(--a27-link);
}
.archive-kicker .a27-icon { width: 1.25em; height: 1.25em; }
.archive-title { margin: 0; font-size: calc(var(--a27-h1) * 1.1); line-height: 1.02; }
.archive-description { margin-top: .8em; color: var(--a27-text-2); max-width: 62ch; }
.archive-description p:last-child { margin-bottom: 0; }
.archive-page { margin: .6em 0 0; font-family: var(--a27-font-meta); font-size: var(--a27-meta-size); color: var(--a27-muted); }

/* ---------- Shared entry parts ---------- */
.entry--list { position: relative; }
.entry-title {
	margin: 0;
	font-size: calc(var(--a27-h2) * 1.15);
	line-height: 1.05;
}
.entry-title a { color: var(--a27-primary); display: inline; }
/* Classic hover: the dark half turns blue when hovering the post */
.entry--list:hover .entry-title .tt-first,
.entry-title a:focus-visible .tt-first { color: var(--a27-primary); }

.entry-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1.1em;
	margin-top: .55em;
	font-family: var(--a27-font-meta); font-size: var(--a27-meta-size);
	color: var(--a27-muted);
}
.entry-meta .meta-item { display: inline-flex; align-items: center; gap: .4em; }
.entry-meta a { color: inherit; }
.entry-meta a:hover { color: var(--a27-link); }
.sticky-label { color: var(--a27-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .9em; }

.entry-thumb { margin: 18px 0 20px; }
.entry-thumb a { display: block; overflow: hidden; border-radius: var(--a27-radius); background: var(--a27-surface-alt); }
.entry-thumb img {
	display: block; width: 100%; height: auto;
	aspect-ratio: var(--a27-thumb-ratio);
	object-fit: cover;
	transition: filter .45s var(--a27-ease), transform .6s var(--a27-ease);
}

.entry-body { display: flex; gap: 18px; align-items: flex-start; }
.entry-summary { flex: 1; min-width: 0; color: var(--a27-text-2); }
.entry-summary p { margin: 0 0 .6em; }
.entry-summary p:last-child { margin-bottom: 0; }

/* Classic calendar date badge */
.date-badge {
	flex: none;
	display: flex; flex-direction: column; align-items: center;
	min-width: 52px; padding: 2px 14px 2px 0; margin-top: 3px;
	border-right: 1px solid var(--a27-border);
	color: var(--a27-text-2);
	font-family: var(--a27-font-meta);
	line-height: 1;
	text-align: center;
}
.db-month { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--a27-link); }
.db-day { font-family: var(--a27-font-heading); font-size: 30px; line-height: 1.05; margin: 3px 0 2px; color: var(--a27-secondary); }
.db-year { font-size: 11px; color: var(--a27-muted); letter-spacing: .04em; }
.date-badge:hover .db-day { color: var(--a27-primary); }

.entry-footer {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px;
	margin-top: 20px;
}
.entry-terms { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.entry-terms:empty { display: none; }
.read-more {
	display: inline-flex; align-items: center; gap: .4em;
	margin-left: auto;
	font-family: var(--a27-font-meta); font-size: var(--a27-meta-size); font-weight: 600;
	color: var(--a27-link);
	white-space: nowrap;
}
.read-more .a27-icon { transition: transform .2s var(--a27-ease); }
.read-more:hover .a27-icon { transform: translateX(3px); }

/* ---------- Editorial (default): classic stacked listing ---------- */
.post-list--editorial .entry--list,
.post-list--compact .entry--list {
	padding-block: var(--a27-post-gap);
	border-top: var(--a27-border-w) solid var(--a27-border);
}
.post-list--editorial .entry--list:first-child,
.post-list--compact .entry--list:first-child { border-top: 0; padding-top: 0; }
/* Light frame recalls the old bordered thumbnails */
.post-list--editorial .entry-thumb a { padding: 5px; background: var(--a27-surface); border: 1px solid var(--a27-border); }
.post-list--editorial .entry-thumb img { border-radius: max(0px, calc(var(--a27-radius) - 3px)); }

/* ---------- Cards ---------- */
.post-list--cards { display: grid; gap: calc(var(--a27-post-gap) * .6); }
.post-list--cards .entry--list {
	padding: clamp(20px, 3vw, 32px);
	background: var(--a27-surface);
	border: var(--a27-border-w) solid var(--a27-border);
	border-radius: calc(var(--a27-radius) * 1.5);
	transition: border-color .2s, box-shadow .25s var(--a27-ease);
}
.no-borders .post-list--cards .entry--list { box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px -16px rgba(0,0,0,.2); }
.post-list--cards .entry--list:hover { border-color: color-mix(in srgb, var(--a27-primary) 35%, var(--a27-border)); box-shadow: 0 10px 30px -20px rgba(0,0,0,.25); }

/* ---------- Compact: thumbnail left ---------- */
@media (min-width: 640px) {
	.post-list--compact .entry--list.has-thumb,
	.post-list--compact .entry--list:has(.entry-thumb--placeholder) {
		display: grid;
		grid-template-columns: clamp(180px, 30%, 260px) minmax(0, 1fr);
		grid-template-areas: "thumb header" "thumb body" "thumb footer";
		grid-template-rows: auto auto 1fr;
		column-gap: 28px;
	}
	.post-list--compact .entry-header { grid-area: header; }
	.post-list--compact .entry-thumb { grid-area: thumb; margin: 4px 0 0; }
	.post-list--compact .entry-body { grid-area: body; margin-top: 10px; }
	.post-list--compact .entry-footer { grid-area: footer; align-self: end; }
}
.post-list--compact .entry-title, .post-list--grid .entry-title { font-size: var(--a27-h3); }
.post-list--compact .entry-thumb img,
.post-list--grid .entry-thumb img { aspect-ratio: 16/10; }
.post-list--compact .entry-footer { margin-top: 14px; }
.post-list--compact .term-list--tags { display: none; }

/* ---------- Grid ---------- */
.post-list--grid { display: grid; gap: var(--a27-post-gap) 32px; }
@media (min-width: 640px) { .post-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-list--grid .entry--list { display: flex; flex-direction: column; }
.post-list--grid .entry-thumb { order: -1; margin: 0 0 16px; }
.post-list--grid .entry-footer { margin-top: auto; padding-top: 16px; }
.post-list--grid .entry-summary { font-size: .95em; }
.post-list--grid .term-list--tags { display: none; }

/* Placeholder for posts without a featured image (compact / grid) */
.entry-thumb--placeholder a {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	aspect-ratio: 16/10;
	background:
		radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--a27-primary) 14%, transparent), transparent 60%),
		var(--a27-primary-tint);
	color: var(--a27-primary);
	border: 1px solid color-mix(in srgb, var(--a27-primary) 15%, var(--a27-border));
}
.entry-thumb--placeholder .a27-icon { width: 34px; height: 34px; stroke-width: 1.4; }
.entry-thumb--placeholder span { font-family: var(--a27-font-heading); font-size: 22px; color: var(--a27-secondary); }

/* ---------- Image hover effects (hover-capable devices only) ---------- */
@media (hover: hover) {
	.thumb-fx-desaturate .entry-thumb img { filter: grayscale(.9) contrast(.95); }
	.thumb-fx-desaturate .entry--list:hover .entry-thumb img { filter: none; }
	.thumb-fx-zoom .entry--list:hover .entry-thumb img { transform: scale(1.035); }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	.entry-title { font-size: calc(var(--a27-h2) * 1.0); }
	.entry-body { gap: 14px; }
	.date-badge { min-width: 44px; padding-right: 12px; }
	.db-day { font-size: 26px; }
	.entry-footer { flex-direction: column; align-items: flex-start; }
	.read-more { margin-left: 0; }
}

/* ---------- Empty results / 404 ---------- */
.no-results { text-align: center; max-width: 640px; margin: 0 auto; padding-block: 24px; }
.no-results-icon { margin: 0; color: var(--a27-primary); }
.no-results-icon .a27-icon { width: 44px; height: 44px; stroke-width: 1.4; }
.no-results-title { font-size: var(--a27-h1); margin: .3em 0 .4em; }
.no-results p { color: var(--a27-text-2); }
.no-results .search-form { max-width: 460px; margin: 24px auto; }
.no-results .error-code {
	margin: 0; font-family: var(--a27-font-heading); font-size: clamp(96px, 20vw, 180px); line-height: .9;
	color: var(--a27-primary-soft);
	-webkit-text-stroke: 1px color-mix(in srgb, var(--a27-primary) 40%, transparent);
	letter-spacing: .02em;
}
.topics { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--a27-border); }
.topics-title { margin: 0 0 14px; font-family: var(--a27-font-meta); font-size: var(--a27-meta-size); text-transform: uppercase; letter-spacing: .1em; color: var(--a27-muted); font-weight: 600; }
.topics .term-list { justify-content: center; }
@media (max-width: 640px) {
	.post-list--editorial .entry-thumb img, .post-list--cards .entry-thumb img { min-height: 128px; }
}
