/* ==========================================================================
   attacmadrid.org - archives (category; later tag/author/search)
   'list' style: chronological rows + sticky sidebar · 'cards' style: visual grid.
   ========================================================================== */

/* Section band ------------------------------------------------------------------ */
.cat-hero {
	padding: clamp(18px, 2.5vw, 28px) 0 clamp(28px, 4vw, 44px);
	background:
		linear-gradient(90deg, rgb(0 0 0 / 0.16), transparent 60%),
		var(--cat, var(--color-dark-panel));
	color: rgb(255 255 255 / 0.9);
}
.cat-hero.has-lead { padding-bottom: clamp(72px, 9vw, 120px); }
.cat-hero .breadcrumbs ol, .cat-hero .breadcrumbs a { color: rgb(255 255 255 / 0.78); }
.cat-hero .breadcrumbs [aria-current], .cat-hero .breadcrumbs a:hover { color: #fff; }
.cat-hero .breadcrumbs li + li::before { color: rgb(255 255 255 / 0.5); }
.cat-hero :focus-visible { outline-color: #fff; }
.cat-hero__kicker { display: inline-block; margin-bottom: 8px; color: #fff; opacity: 0.85; text-decoration: none; }
a.cat-hero__kicker:hover { text-decoration: underline; }
.cat-hero__title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
	margin: 0 0 14px;
	color: #fff;
	font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.25rem);
	line-height: 1.02;
	letter-spacing: -0.025em;
}
.cat-hero__page { color: rgb(255 255 255 / 0.75); font-family: var(--font-sans); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; }
.cat-hero__desc { max-width: 66ch; color: rgb(255 255 255 / 0.92); font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.55; }
.cat-hero__desc p { margin: 0; }
.cat-hero__stats { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 14px 0 0; color: rgb(255 255 255 / 0.8); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.cat-hero__stats > span + span::before { content: "\00B7"; margin: 0 10px; }
.cat-hero__topics { margin: 20px 0 0; }
.cat-hero .chip { background: transparent; border-color: rgb(255 255 255 / 0.4); color: #fff; }
.cat-hero .chip:hover, .cat-hero .chip[aria-current] { background: #fff; border-color: #fff; color: var(--cat); }
.cat-hero--compact { padding-bottom: 22px; }
.cat-hero--compact .cat-hero__title { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); margin-bottom: 0; }

/* Lead story: white panel pulled up over the band. */
.cat-lead { position: relative; margin-top: clamp(-96px, -7vw, -52px); }
.card--cat-lead { gap: 0; background: var(--color-surface); box-shadow: 0 10px 30px rgb(22 24 28 / 0.12); }
.card--cat-lead .card__media { border-radius: 0; }
.card--cat-lead .card__body { gap: 10px; padding: clamp(18px, 3vw, 36px); }
.card--cat-lead .card__title { font-size: var(--fs-2xl); line-height: 1.08; }
.card--cat-lead .card__excerpt { max-width: 60ch; font-size: var(--fs-md); }
@media (min-width: 900px) {
	.card--cat-lead { flex-direction: row; align-items: stretch; }
	.card--cat-lead .card__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 380px; }
	.card--cat-lead .card__body { justify-content: center; border-left: 6px solid var(--cat, var(--color-accent)); }
}

/* Generic archives / search (no section colour): dark band. */
.search-page .cat-hero, .cat-page:not([style]) .cat-hero { --cat: var(--color-dark-panel); }

/* Body ----------------------------------------------------------------------------- */
.cat-body { padding-block: clamp(28px, 4vw, 48px); }
.cat-main { container-type: inline-size; min-width: 0; }
.cat-layout.has-aside { display: grid; gap: var(--gap-lg); }
@media (min-width: 1024px) {
	.cat-layout.has-aside { grid-template-columns: minmax(0, 1fr) 300px; column-gap: clamp(32px, 4vw, 56px); }
	.cat-aside { align-self: stretch; }
	.cat-aside__sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1280px) { .cat-layout.has-aside { grid-template-columns: minmax(0, 1fr) 320px; } }

/* Cards style grid: 1 → 2 → 3 → 4 columns (16 = 4 × 4 on desktop). */
.cat-grid { display: grid; gap: clamp(20px, 2.5vw, 32px) var(--gap); }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat-grid .card__title { font-size: var(--fs-md); }
.cat-layout.has-aside .cat-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.cat-main__title {
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--color-text);
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Sidebar ------------------------------------------------------------------------- */
.side-box + .side-box { margin-top: 32px; }
.side-box__title {
	margin: 0 0 10px;
	padding-top: 12px;
	border-top: 3px solid var(--color-text);
	font-size: var(--fs-lg);
}
.side-box { padding: 0 0 4px; }
.side-list--sections a { align-items: center; }
.side-list--sections a span::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	background: var(--cat);
	vertical-align: 1px;
}
.side-list--sections .icon { color: var(--color-muted); }
.side-list--sections a:hover .icon { color: var(--cat); }
.side-list { margin: 0; padding: 0; list-style: none; }
.side-list a {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: var(--rule);
	color: var(--color-text);
	font-weight: 500;
	text-decoration: none;
}
.side-list a:hover { color: var(--cat, var(--color-accent)); }
.side-list a[aria-current] { color: var(--cat, var(--color-primary)); font-weight: 700; }
.side-list__count { color: var(--color-muted); font-family: var(--font-mono); font-size: 13px; }
.side-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.cat-body .pagination { margin-top: 40px; }

/* Search filters --------------------------------------------------------------------------------- */
.search-filters { display: grid; gap: 12px; margin-top: 20px; max-width: 980px; }
.search-filters__q input {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	background: var(--color-surface);
	border: 2px solid transparent;
	border-radius: var(--radius);
	color: var(--color-text);
	font-size: var(--fs-md);
}
.search-filters__q input:focus { outline: none; border-color: var(--color-text); }
.search-filters__field { margin: 0; }
.search-filters__field label { display: block; margin-bottom: 4px; color: rgb(255 255 255 / 0.85); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.search-filters__field select { width: 100%; height: 44px; padding: 0 10px; background: var(--color-surface); border: 1px solid transparent; border-radius: var(--radius); color: var(--color-text); }
.search-filters__submit { margin: 0; align-self: end; }
.search-filters__submit .btn { width: 100%; min-height: 44px; background: var(--color-accent); }
.search-filters__submit .btn:hover { background: #fff; color: var(--color-text); }
@media (min-width: 768px) {
	.search-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
	.search-filters__q { grid-column: 1 / -1; }
}
.empty-state--big { padding: 28px; }
.empty-state--big p { margin: 0 0 12px; }
.archive-main { max-width: 880px; }

/* 404 ------------------------------------------------------------------------------------------- */
.not-found__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.not-found__title { margin: 6px 0 12px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.not-found__text { color: var(--color-body); font-size: var(--fs-md); }
.not-found__search { margin: 20px 0; }
.not-found__search .search-form { margin: 0; }
