/*
 * Andres Site Core: articles and videos directory pages only.
 */

/* ---------- Hero band ---------- */
.andres-band { padding-block: 72px 48px; background: var(--andres-paper); }
.andres-band__title { font-size: clamp(2.5rem, 1.8rem + 2.6vw, 3.75rem); line-height: 1.05; margin: 0 0 16px; }
.andres-band__intro { font-size: 1.125rem; margin: 0; color: var(--andres-ink); }
.andres-section--dir { padding-top: 40px; }

/* ---------- Filter bar ---------- */
.andres-filter {
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 16px; align-items: end;
	padding: 20px; margin-bottom: 24px;
	background: var(--andres-white); border: 1px solid var(--andres-line); border-radius: 4px;
	position: relative;
}
.andres-filter__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.andres-filter__field label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--andres-muted); }
.andres-filter input[type="search"], .andres-filter select {
	box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px;
	border: 1px solid var(--andres-line); border-radius: 4px; background: var(--andres-paper);
	font: 400 1rem var(--andres-sans); color: var(--andres-ink);
}
.andres-filter input[type="search"]:hover, .andres-filter select:hover { border-color: var(--andres-muted); }
.andres-filter__actions { display: flex; gap: 8px; }
/* With JS the filters apply as you change them; the Apply button stays for keyboard users who submit with Enter. */
.andres-js-dir .andres-filter__apply { position: absolute; left: 0; top: 0; width: 1px; min-height: 0; padding: 0; border: 0; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ---------- Toolbar ---------- */
.andres-dir__toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; font-size: 0.9375rem; }
.andres-dir__count { margin: 0; font-weight: 500; }
.andres-dir__count:focus { outline: none; }
.andres-dir__count:focus-visible { outline: 3px solid var(--andres-accent); outline-offset: 2px; }
.andres-dir__sort { margin: 0; color: var(--andres-muted); }
.andres-dir__sort a { margin-left: 6px; }
.andres-dir.is-loading .andres-dir__results { opacity: 0.55; transition: opacity 150ms ease; }

/* ---------- Grid ---------- */
.andres-grid { display: grid; gap: var(--andres-gutter); list-style: none; margin: 0 0 40px; padding: 0; }
.andres-grid--articles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.andres-grid--videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.andres-grid__item { display: flex; min-width: 0; }
.andres-grid__item > .andres-card { flex: 1; }

/* ---------- Cards ---------- */
.andres-acard { display: flex; flex-direction: column; padding: 22px; }
.andres-card__body { display: flex; flex-direction: column; padding: 20px 22px 22px; flex: 1; }
.andres-vcard { display: flex; flex-direction: column; overflow: hidden; }
.andres-vcard .andres-media { border-radius: 0; }
.andres-card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0 0 10px; font-size: 0.8125rem; color: var(--andres-muted); }
.andres-card__outlet { font-weight: 600; color: var(--andres-ink); }
.andres-card__title { font-size: 1.25rem; line-height: 1.25; margin: 0 0 10px; }
.andres-card__title a { color: var(--andres-navy) !important; text-decoration: none; }
.andres-card__title a:hover { text-decoration: underline; }
.andres-card__channel { margin: 0 0 8px; font-size: 0.875rem; color: var(--andres-muted); }
.andres-card__summary { margin: 0 0 14px; font-size: 0.9375rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.andres-acard .andres-card__summary { -webkit-line-clamp: 2; }
.andres-card__foot { margin: auto 0 0; padding-top: 4px; }
.andres-vcard__label { margin: 4px 0 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--andres-muted); }
.andres-vcard__quote { margin: 0 0 14px; padding-left: 12px; border-left: 2px solid var(--andres-navy); font-size: 0.9375rem; }
.andres-vcard__quote p { margin: 0 0 4px; font-family: var(--andres-serif); font-size: 1.0625rem; color: var(--andres-navy); }
.andres-vcard__quote footer { font-size: 0.8125rem; color: var(--andres-muted); }
.andres-vcard .andres-card__foot { margin-top: auto; }

/* ---------- Pagination ---------- */
.andres-pager__list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.andres-pager__link {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; box-sizing: border-box;
	border: 1px solid var(--andres-line); border-radius: 4px; background: var(--andres-white);
	text-decoration: none !important; color: var(--andres-ink) !important; font-weight: 500;
}
.andres-pager__link:hover { border-color: var(--andres-muted); }
.andres-pager__link.is-current { background: var(--andres-navy); border-color: var(--andres-navy); color: var(--andres-white) !important; }

/* ---------- Empty state ---------- */
.andres-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--andres-muted); border-radius: 4px; background: var(--andres-white); margin-bottom: 40px; }
.andres-empty__title { font-family: var(--andres-serif); font-size: 1.5rem; color: var(--andres-navy); margin: 0 0 8px; }
.andres-empty p:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1025px) {
	.andres-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.andres-filter__field--search { grid-column: 1 / -1; }
	.andres-grid--articles, .andres-grid--videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.andres-band { padding-block: 48px 32px; }
	.andres-filter { grid-template-columns: 1fr; padding: 16px; }
	.andres-grid--articles, .andres-grid--videos { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.andres-filter__actions { flex-direction: column; }
	.andres-filter__actions .andres-btn { width: 100%; }
}

/* ---------- Print: expand every card, print source URLs ---------- */
@media print {
	.andres-filter, .andres-pager, .andres-dir__sort { display: none !important; }
	.andres-grid--articles, .andres-grid--videos { display: block; }
	.andres-grid__item { display: block; margin-bottom: 10pt; }
	.andres-card { border: 1px solid #999; }
	.andres-card__summary { display: block; -webkit-line-clamp: unset; overflow: visible; }
	.andres-poster__title { display: block; -webkit-line-clamp: unset; overflow: visible; }
	.andres-vcard__access summary { display: none; }
}
