/* ============================================================
   NicheCalculators — /calculators/ archive page styles
   Add to your theme's style.css or enqueue as a separate file.
   Scoped under .nc-archive to avoid conflicts.
   ============================================================ */

/* ── Layout wrapper ───────────────────────────────────────── */

.nc-archive {
    padding: 3rem 1.25rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.nc-archive__inner {
    width: 100%;
}

/* ── Hero ─────────────────────────────────────────────────── */

.nc-archive__hero {
    margin-bottom: 2rem;
}

.nc-archive__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.nc-archive__subtitle {
    font-size: 1rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* ── Category filter pills ────────────────────────────────── */

.nc-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2.5rem;
}

.nc-filter__btn {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nc-filter__btn:hover {
    border-color: #999;
    color: #1a1a1a;
}

.nc-filter__btn.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* ── Category group section ───────────────────────────────── */

.nc-group {
    margin-bottom: 3rem;
}

.nc-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 1.25rem;
}

.nc-group__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    margin: 0;
    line-height: 1.3;
}

.nc-group__title:hover {
    text-decoration: underline;
}

.nc-group__count {
    font-size: 0.8125rem;
    color: #888;
    margin-right: auto;
}

.nc-group__view-all {
    font-size: 0.8125rem;
    color: #555;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nc-group__view-all:hover {
    color: #1a1a1a;
}

.nc-group__view-all svg {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.nc-group__view-all:hover svg {
    transform: translateX(2px);
}

/* ── Card grid ────────────────────────────────────────────── */

.nc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* ── Calculator card ──────────────────────────────────────── */

.nc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nc-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nc-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}

.nc-card__title a {
    color: #1a1a1a;
    text-decoration: none;
}

.nc-card__title a:hover {
    text-decoration: underline;
}

.nc-card__excerpt {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
    flex: 1;
    /* Clamp to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nc-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    margin-top: 4px;
}

.nc-card__cta:hover {
    text-decoration: underline;
}

.nc-card__cta svg {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.nc-card__cta:hover svg {
    transform: translateX(2px);
}

/* ── Pagination ───────────────────────────────────────────── */

.nc-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2.5rem;
}

.nc-archive .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #555;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.nc-archive .page-numbers:hover {
    border-color: #aaa;
    color: #1a1a1a;
}

.nc-archive .page-numbers.current {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.nc-archive .page-numbers.dots {
    border: none;
    color: #aaa;
}

/* ── Empty state ──────────────────────────────────────────── */

.nc-empty {
    font-size: 0.9375rem;
    color: #888;
    padding: 2rem 0;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 600px) {
    .nc-archive {
        padding: 2rem 1rem 3rem;
    }

    .nc-grid {
        grid-template-columns: 1fr;
    }

    .nc-group__view-all {
        display: none;
    }

    .nc-filter__btn {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}
