/**
 * Archive, blog index, search and 404: the page frame and the parts of the
 * archive templates (patterns archive-hero, archive-list, search-list).
 *
 * Frame: full-width content area so color sections can span the viewport.
 * Hero: .archive-hero-section > .archive-hero (label, h1 archive title,
 *   p.archive-description, nav.category-filter from [applari_category_filter])
 * List: a post-list (post-list.css, --featured on the first page) and
 *   nav.post-pagination from [applari_pagination].
 * Pagination: the same look also for a GB Query Loop's own pagination
 *   (.gb-query-loop-pagination), e.g. a post-list on a normal page.
 * Search: h1.search-title + p.search-count from [applari_search_title].
 */

.archive .site-content,
.blog .site-content,
.search .site-content {
    padding: 0;
}

.archive .site.grid-container,
.blog .site.grid-container,
.search .site.grid-container {
    max-width: 100%;
}

/* ---------- Hero ---------- */

.gb-container.color-section.archive-hero-section {
    padding-top: 56px;
    padding-bottom: 48px;
}

.archive-hero {
    max-width: var(--article-wide-width, 1080px);
}

.archive-label {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-clr);
}

.archive-title {
    margin: 0 0 16px;
    font-size: var(--h1-size);
    text-wrap: balance;
}

.archive-description {
    max-width: 640px;
    margin: 0 0 24px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.category-filter-link {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    transition: background-color var(--transition-speed) var(--transition-timing-function),
                border-color var(--transition-speed) var(--transition-timing-function),
                color var(--transition-speed) var(--transition-timing-function);
}

.category-filter-link:hover {
    border-color: var(--accent-clr);
    color: var(--accent-clr);
}

.category-filter-link[aria-current="page"] {
    border-color: var(--accent-clr);
    background-color: var(--accent-clr);
    color: var(--bg-clr);
}

/* ---------- Pagination ----------
   One look for two markups: core's get_the_posts_pagination
   ([applari_pagination] on the archive templates) and a GB Query Loop's own
   pagination (.gb-query-loop-pagination: GB buttons for previous, next and
   the page numbers; the current page is a span.gb-block-is-current). The
   loop selectors carry .gb-container so they outrank GB's per-button padding
   and the theme's button looks (the filled button, btn-no-bg, the disabled
   span.gb-button). Leave btn-no-bg off the loop's pagination buttons. */

.post-pagination {
    margin-top: 48px;
}

.post-pagination .nav-links,
.gb-container.gb-query-loop-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.post-pagination .page-numbers,
.gb-container.gb-query-loop-pagination .gb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
    text-decoration: none;
    opacity: 1;
    transition: background-color var(--transition-speed) var(--transition-timing-function);
}

.post-pagination a.page-numbers:hover,
.gb-container.gb-query-loop-pagination a.gb-button:hover {
    background-color: color-mix(in srgb, var(--accent-clr) 12%, transparent);
    color: inherit;
}

.post-pagination .page-numbers.current,
.gb-container.gb-query-loop-pagination .gb-block-is-current {
    background-color: var(--accent-clr);
    color: var(--bg-clr);
    cursor: default;
}

.post-pagination .page-numbers.dots {
    min-width: 0;
    padding: 0 4px;
}

.post-pagination .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ---------- Search ---------- */

.search-title {
    margin: 0 0 8px;
    font-size: var(--h2-size);
    text-wrap: balance;
}

.search-query {
    color: var(--accent-clr);
}

.search-count {
    margin: 0 0 40px;
    opacity: 0.8;
}
