/* The News and Case Study pages (category-news.php, category-case-study.php).
   This file holds what they share with each other and with the Articles page:
   the title and intro, the filter, photo frames, the red arrow link and the
   page numbers. news.css and case-study.css hold each page's own layout.

   Everything is scoped to .vx-archive. The Customizer sets its own font on
   every div, span, a and li; a class beats those element rules, so the page
   keeps Mulish (loaded on every page by chrome/chrome.css). */

.vx-archive {
    --vx-ink: #1D1D1B;
    --vx-body: #404041;
    --vx-muted: #666666;
    --vx-rule: #E7E5E2;
    --vx-light: #F6F6F6;
    --vx-red: #E30621;
    --vx-red-dark: #B31D2F;
    --vx-font: 'Mulish', 'Helvetica Neue', Arial, sans-serif;
    --vx-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --vx-max: 1180px;
    --vx-gutter: clamp(20px, 5vw, 56px);
    background: #fff;
    color: var(--vx-body);
    font-family: var(--vx-font);
    -webkit-font-smoothing: antialiased;
    padding-bottom: clamp(64px, 8vw, 120px);
}
.vx-archive * {
    box-sizing: border-box;
    font-family: var(--vx-font);
}
.vx-archive ::selection {
    background: var(--vx-red);
    color: #fff;
}
.vx-archive a:focus-visible {
    outline: 2px solid var(--vx-red);
    outline-offset: 4px;
}
.vx-archive img {
    display: block;
    max-width: 100%;
}
.vx-inner {
    max-width: calc(var(--vx-max) + 2 * var(--vx-gutter));
    margin: 0 auto;
    padding: 0 var(--vx-gutter);
}

/* ---------- Title and intro ---------- */
.vx-head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(24px, 5vw, 80px);
    align-items: end;
    padding: clamp(56px, 8vw, 112px) 0 clamp(32px, 4vw, 48px);
}
.vx-head__title {
    margin: 0;
    font-size: clamp(44px, 6.4vw, 84px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--vx-ink);
}
/* The category description, with the red bar Arham approved for the archive
   pages on 25 Nov 2026. */
.vx-head__intro {
    max-width: 48ch;
    padding-left: 22px;
    border-left: 3px solid var(--vx-red);
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.65;
    color: var(--vx-body);
}
.vx-head__intro p {
    margin: 0;
}

/* ---------- Filter: words, the current one underlined in red ---------- */
.vx-filter {
    padding: 24px 0;
    border-bottom: 1px solid var(--vx-rule);
}
.vx-filter__list {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.vx-filter__list::-webkit-scrollbar {
    display: none;
}
.vx-filter__link {
    display: block;
    padding: 6px 0 8px;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--vx-muted);
    text-decoration: none;
    transition: border-color 200ms ease-out, color 200ms ease-out;
}
.vx-filter__link:hover {
    color: var(--vx-ink);
    border-bottom-color: rgba(227, 6, 33, 0.45);
}
.vx-filter__link[aria-current="page"] {
    color: var(--vx-ink);
    border-bottom-color: var(--vx-red);
}

/* ---------- Shared pieces ---------- */
.vx-frame {
    display: block;
    overflow: hidden;
    background: #ECEAE7;
}
.vx-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--vx-ease);
}
a:hover .vx-frame img {
    transform: scale(1.04);
}
.vx-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--vx-red);
}
.vx-date {
    font-size: 13px;
    color: var(--vx-muted);
    font-variant-numeric: tabular-nums;
}
/* Titles take a red underline when their link is hovered. */
.vx-hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    text-decoration-color: transparent;
    transition: text-decoration-color 250ms ease-out;
}
a:hover .vx-hover {
    text-decoration-color: var(--vx-red);
}
/* "Read the ..." with its arrow in a small red square. */
.vx-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--vx-red-dark);
}
.vx-more svg {
    box-sizing: content-box;
    width: 16px;
    height: 16px;
    padding: 6px;
    background: var(--vx-red);
    color: #fff;
    transition: transform 300ms var(--vx-ease);
}
a:hover .vx-more svg {
    transform: translateX(4px);
}

/* ---------- Page numbers ---------- */
.vx-pages {
    display: flex;
    justify-content: center;
    margin-top: clamp(56px, 7vw, 96px);
    padding-top: 32px;
    border-top: 1px solid var(--vx-rule);
}
.vx-pages .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.vx-pages .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--vx-rule);
    font-size: 14px;
    color: var(--vx-ink);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: border-color 200ms ease-out;
}
.vx-pages a.page-numbers:hover {
    border-color: var(--vx-ink);
}
.vx-pages .page-numbers.current {
    background: var(--vx-red);
    border-color: var(--vx-red);
    color: #fff;
}
.vx-pages .page-numbers.dots {
    border-color: transparent;
}
.vx-pages .page-numbers svg {
    width: 16px;
    height: 16px;
}
.vx-pages .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ---------- Nothing to show ---------- */
.vx-empty {
    padding: clamp(56px, 8vw, 96px) 0;
    text-align: center;
}
.vx-empty__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--vx-ink);
}
.vx-empty a {
    color: var(--vx-red-dark);
    font-weight: 700;
}

@media (max-width: 760px) {
    .vx-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 20px;
    }
    .vx-filter {
        margin-right: calc(-1 * var(--vx-gutter));
    }
    .vx-filter__list {
        padding-right: var(--vx-gutter);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vx-archive * {
        transition: none !important;
    }
}
