/* ==========================================================================
   CATEGORY ARCHIVE STYLES (category.php)
   ========================================================================== */

/* CAT HERO */
.cat-hero {
    min-height: 60vh;
    padding-top: var(--nav-h);
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-bottom: 5rem;
}

.cat-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(160, 69, 26, .15) 0%, transparent 55%), linear-gradient(160deg, #1A1208 0%, #0E0B06 100%);
    z-index: -1;
}

html.light .cat-hero .hero-bg {
    background: radial-gradient(ellipse at 70% 40%, rgba(212, 162, 76, .15) 0%, transparent 55%), linear-gradient(160deg, var(--surface) 0%, var(--sand) 100%);
}

.cat-hero .hero-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(20vw, 30vw, 40vw);
    font-weight: 900;
    font-style: italic;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-ghost);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    text-transform: uppercase;
}

.cat-hero-content {
    position: relative;
    z-index: 5;
    padding: 0 3rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.breadcrumb {
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .8rem;
}

.breadcrumb span {
    color: var(--text-muted);
    opacity: 0.6;
}

.cat-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 900;
    line-height: .9;
    color: var(--text);
    margin-bottom: 2rem;
    letter-spacing: -.02em;
}

.cat-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}

.cat-subtitle {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: -.5rem;
    margin-bottom: 1.5rem;
    opacity: .85;
}

.cat-desc {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 600px;
}

.post-count {
    display: inline-block;
    margin-top: 2rem;
    padding: .4rem .8rem;
    border: 1px solid var(--border);
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}

/* FILTER STRIP */
.filter-strip {
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 3rem;
    position: sticky;
    top: 0;
    /* Adjusted to sit below nav if needed, or stick to top */
    z-index: 400;
    backdrop-filter: blur(10px);
    transition: background 0.4s ease;
}

.main-nav+.cat-hero+.filter-strip {
    /* If nav is fixed, filter strip needs top offset */
    top: 4.3rem;
}

.filter-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
}

.filter-list::-webkit-scrollbar {
    display: none;
}

.filter-link {
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .3s;
    white-space: nowrap;
}

.filter-link.active,
.filter-link:hover {
    color: var(--accent);
}

/* ARCHIVE GRID */
.archive-main {
    background: var(--bg);
    padding: 5rem 0;
    /* Remove horizontal padding from wrapper */
    transition: background 0.4s ease;
}

.archive-in {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 5rem;
    padding: 0 3rem;
    /* Apply horizontal padding to inner grid instead */
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* POST CARDS */
.post-card,
.post-card--featured {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card--featured {
    grid-column: 1 / -1;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}

.post-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--surface);
    overflow: hidden;
    position: relative;
}

.post-card--featured .post-thumb {
    aspect-ratio: 21/9;
}

.post-thumb::after {
    display: none;
}

html.light .post-thumb::after {
    display: none;
}

.post-card:hover .post-thumb-img {
    transform: scale(1.05);
}

.post-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.25, .46, .45, .94);
    opacity: 1;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}

.post-meta span {
    color: var(--text-muted);
    opacity: 0.6;
}

.post-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text);
    text-decoration: none;
    transition: color .3s;
}

.post-card:hover .post-title {
    color: var(--accent);
}

.post-excerpt {
    font-family: 'IM Fell English', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 650px;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.post-footer .read-time {
    font-size: .75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.post-footer .read-time::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

/* SIDEBAR WIDGETS */
.sidebar .widget-title {
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar .widget-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.about-widget {
    background: var(--surface);
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.about-text {
    font-family: 'IM Fell English', serif;
    font-size: .95rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pop-item {
    display: flex;
    gap: 1.2rem;
    text-decoration: none;
    align-items: center;
}

.pop-num {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent);
    opacity: .7;
}

.pop-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.3;
    transition: color .3s;
}

.pop-item:hover .pop-title {
    color: var(--accent);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.tag-cloud .tag-link {
    font-size: .55rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .4rem .8rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    transition: all .3s;
}

.tag-cloud .tag-link:hover {
    border-color: var(--accent);
    color: var(--bg);
    background: var(--accent);
}

/* PAGINATION */
.pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding-top: 5rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.pag-btn {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    transition: color .3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pag-btn:hover {
    color: var(--accent);
}

.pag-progress {
    width: 150px;
    height: 1px;
    background: var(--border);
    position: relative;
}

.pag-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 35%;
    background: var(--accent);
}

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
    .archive-in {
        grid-template-columns: 1fr;
        gap: 5rem;
    }

    .sidebar {
        border-top: 1px solid var(--border);
        padding-top: 5rem;
    }
}

@media (max-width: 768px) {
    .cat-hero {
        padding-bottom: 3rem;
    }

    .cat-hero-content {
        padding: 0 1.5rem;
    }

    .cat-title {
        font-size: 3.5rem;
    }

    .archive-main {
        padding: 4rem 1.5rem;
    }

    .filter-strip {
        padding: 1rem 1.5rem;
        top: 3.5rem;
        /* Adjusted for smaller nav height on mobile */
    }
}