/* ── Archive page styles ─────────────────────────────────────────────────── */

/* ── Critical: override gen.css `nav { position: fixed }` ────────────────── *
 * gen.css uses a bare `nav` selector with position:fixed which hits every    *
 * <nav> on the page including .arc-breadcrumb inside the hero and the        *
 * category strip inside feed-header. These must all be static/relative.      *
 * ─────────────────────────────────────────────────────────────────────────── */
nav.arc-breadcrumb,
nav.fh-cat-inner {
    position: static !important;
    top: auto !important;
    width: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    z-index: auto !important;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.arc-hero {
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #0f766e);
    color: #fff;
    padding: 2.5rem 0 2rem;
}

.arc-hero__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Breadcrumb */
.arc-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.arc-breadcrumb a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: color .2s;
}

.arc-breadcrumb a:hover { color: #fff; }
.arc-breadcrumb span    { color: rgba(255,255,255,.4); }

/* Title block */
.arc-hero__title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.arc-hero__label {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.arc-hero__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.arc-hero__desc {
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    margin-top: .5rem;
    max-width: 520px;
}

.arc-hero__count {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    color: rgba(255,255,255,.9);
    white-space: nowrap;
    align-self: flex-start;
}

.arc-hero__count #arcCountNum {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

/* Search bar */
.arc-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 760px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
    overflow: hidden;
}

.arc-search-icon {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 1rem;
    flex-shrink: 0;
}

.arc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #111;
    padding: 1rem 0;
    background: transparent;
    min-width: 0; /* prevent overflow on small screens */
}

.arc-search-clear {
    padding: .5rem .75rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: .95rem;
    flex-shrink: 0;
}

.arc-search-clear:hover { color: #374151; }

.arc-search-btn {
    padding: .85rem 1.5rem;
    background: linear-gradient(135deg, #000, #1e40af);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.arc-search-btn:hover { opacity: .88; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.arc-layout {
    max-width: 1400px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.arc-sidebar {
    position: sticky;
    /*
     * top offset accounts for:
     *  - feed-header top bar  ≈ 60px
     *  - feed-header cat strip ≈ 42px
     *  - small breathing gap   ≈ 12px
     * Adjust if your header height differs.
     */
    top: 124px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.arc-sidebar__close-row {
    display: none;
}

.arc-sidebar__card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
}

.arc-sidebar__heading {
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.arc-sidebar__heading i { color: #64748b; font-size: .85rem; }

/* Active filter chips */
#arcActiveFilters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* Don't render the container if empty */
#arcActiveFilters:empty { display: none; }

.arc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    color: #1d4ed8;
    cursor: pointer;
    transition: background .15s;
}

.arc-filter-chip:hover { background: #dbeafe; }
.arc-filter-chip i { font-size: .7rem; }

/* Form controls */
.arc-form-group { margin-bottom: 1rem; }
.arc-form-group:last-child { margin-bottom: 0; }

.arc-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.arc-select {
    width: 100%;
    padding: .6rem .85rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s;
    outline: none;
    color: #111;
}

.arc-select:focus { border-color: #1e40af; }

/* Category list */
.arc-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.arc-cat-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    font-size: .88rem;
    color: #374151;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.arc-cat-link:hover,
.arc-cat-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.arc-cat-icon { font-size: 1rem; }

/* Tag cloud */
.arc-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.arc-tag-chip {
    padding: .35rem .85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: .8rem;
    color: #475569;
    text-decoration: none;
    transition: all .2s;
    font-weight: 500;
}

.arc-tag-chip:hover,
.arc-tag-chip.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

/* ── Main / Results ──────────────────────────────────────────────────────── */
.arc-main { min-width: 0; }

/* Toolbar */
.arc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.arc-filter-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s;
    font-family: 'Inter', sans-serif;
}

.arc-filter-toggle:hover { border-color: #000; }

.arc-toolbar__info {
    font-size: .88rem;
    color: #64748b;
    margin-left: auto;
}

/* Skeleton loader */
.arc-skeletons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.arc-skeleton {
    height: 280px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: arcShimmer 1.4s infinite;
    border-radius: 14px;
}

@keyframes arcShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Results grid */
.arc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Result card */
.arc-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    border: 1px solid #f1f5f9;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.arc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
}

.arc-card__thumb {
    height: 170px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.arc-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.arc-card__badges {
    position: absolute;
    top: .75rem;
    right: .75rem;
    display: flex;
    gap: .35rem;
    flex-direction: column;
    align-items: flex-end;
}

.arc-badge {
    padding: .25rem .7rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    background: rgba(0,0,0,.72);
    color: #fff;
    letter-spacing: .03em;
}

.arc-badge--premium   { background: linear-gradient(135deg, #b45309, #d97706); }
.arc-badge--video     { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.arc-badge--audio     { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.arc-badge--protected { background: rgba(180,83,9,.85); }

.arc-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.arc-card__category {
    font-size: .78rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.arc-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.arc-card__excerpt {
    font-size: .85rem;
    color: #64748b;
    line-height: 1.55;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.arc-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid #f1f5f9;
    font-size: .8rem;
    color: #94a3b8;
    gap: .5rem;
}

.arc-card__author {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}

.arc-card__author span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arc-card__avatar {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.arc-card__views {
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Empty state */
.arc-empty {
    text-align: center;
    padding: 5rem 2rem;
}

.arc-empty__icon { font-size: 4rem; margin-bottom: 1rem; }

.arc-empty h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: .75rem;
}

.arc-empty p { color: #64748b; margin-bottom: 1.5rem; }

.arc-empty__btn {
    display: inline-block;
    padding: .75rem 1.75rem;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: opacity .2s;
}

.arc-empty__btn:hover { opacity: .82; }

/* Pagination */
.arc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.arc-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
    color: #374151;
}

.arc-page-btn:hover          { border-color: #000; background: #000; color: #fff; }
.arc-page-btn.active         { background: #000; color: #fff; border-color: #000; }
.arc-page-btn:disabled       { opacity: .4; cursor: not-allowed; }
.arc-page-btn:disabled:hover { background: #fff; color: #374151; border-color: #e5e7eb; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .arc-layout {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .arc-layout {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin-top: 1.5rem;
    }

    .arc-hero__inner { padding: 0 1rem; }

    /* Sidebar becomes a full-screen slide-in panel on mobile */
    .arc-sidebar {
        position: fixed;
        inset: 0;
        top: 0;           /* override sticky top on mobile */
        z-index: 500;
        background: #fff;
        overflow-y: auto;
        padding: 1.5rem;
        transform: translateX(-100%);
        transition: transform .3s ease;
    }

    .arc-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0,0,0,.2);
    }

    .arc-sidebar__close-row {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 1rem;
    }

    .arc-sidebar__close {
        background: none;
        border: none;
        font-size: .9rem;
        font-weight: 600;
        cursor: pointer;
        color: #374151;
        display: flex;
        align-items: center;
        gap: .4rem;
        font-family: 'Inter', sans-serif;
    }

    .arc-filter-toggle { display: flex; }

    .arc-search-btn span { display: none; }

    .arc-grid,
    .arc-skeletons {
        grid-template-columns: 1fr;
    }

    .arc-hero__title { font-size: 1.5rem; }

    .arc-hero__count {
        align-self: auto;
        width: 100%;
        text-align: center;
    }
}