/* =============================================================
   NestNooks — archive.css
   Blog archive / category / search template styles.
   Mobile-first. v1.0.0
============================================================= */

.archive-hero {
    background: var(--cream);
    padding: calc(var(--nav-h) + 32px) 0 clamp(28px, 4vw, 44px);
    border-bottom: 1px solid var(--border);
}

.archive-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .archive-hero-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.archive-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    margin-top: 10px;
}

.archive-hero-desc {
    font-size: clamp(0.9rem, 1.7vw, 1rem);
    color: var(--muted);
    line-height: 1.7;
    max-width: 50ch;
    margin-top: 10px;
}

/* Search form */
.archive-search { flex-shrink: 0; }

.archive-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border-2);
    border-radius: var(--r-pill);
    overflow: hidden;
    background: var(--card);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.archive-search-form:focus-within {
    border-color: var(--terra);
    box-shadow: 0 0 0 3px var(--terra-soft);
}

.archive-search-input {
    border: none;
    border-radius: 0;
    background: transparent;
    height: 44px;
    padding: 0 16px;
    min-width: clamp(160px, 30vw, 260px);
    box-shadow: none !important;
}
.archive-search-input:focus { outline: none; box-shadow: none; }

.archive-search-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--terra);
    color: #fff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--dur-fast);
}
.archive-search-btn:hover { background: var(--terra-mid); }

/* Category filter pills */
.archive-filters {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

/* Archive body */
.archive-body {
    padding: clamp(36px, 5vw, 60px) 0 var(--section-pad);
}

/* Featured post */
.featured-post {
    margin-bottom: clamp(28px, 4vw, 48px);
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--r-2xl);
    overflow: hidden;
    transition: box-shadow var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.featured-post:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.featured-post-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .featured-post-link {
        flex-direction: row;
    }
    .featured-post-img { flex: 1.2; }
    .featured-post-body { flex: 1; }
}

.featured-post-img {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--cream-2);
    overflow: hidden;
}

@media (min-width: 768px) {
    .featured-post-img {
        aspect-ratio: auto;
        min-height: 340px;
    }
}

.featured-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease-out); }
.featured-post:hover .featured-post-img img { transform: scale(1.04); }

.featured-post-body {
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.featured-post-title {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
    transition: color var(--dur-fast);
}
.featured-post:hover .featured-post-title { color: var(--terra); }

.featured-post-excerpt {
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
}

.featured-post-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--terra);
    transition: gap var(--dur-fast);
}
.featured-post:hover .featured-post-cta { gap: 12px; }

/* Archive grid */
.archive-grid {
    margin-top: 0;
}

/* Pagination */
.archive-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: clamp(32px, 5vw, 56px);
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-2);
    background: var(--cream);
    border: 1.5px solid var(--border-2);
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
    background: var(--terra);
    color: #fff;
    border-color: var(--terra);
}

.archive-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* No posts state */
.no-posts {
    text-align: center;
    padding: clamp(60px, 10vw, 120px) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.no-posts-icon { font-size: 3rem; }
.no-posts h2 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.no-posts p { color: var(--muted); max-width: 40ch; }
