/* =========================================================
   Blog Index — shared by home.php, archive.php, search.php
   ========================================================= */


/* =========================================================
   Archive Hero
   ========================================================= */

.archive-hero .archive-hero__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.archive-hero__type {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-white);
}

.archive-hero__count {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

/* =========================================================
   Archive body
   ========================================================= */

.archive-body {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* =========================================================
   No posts — improved empty state
   ========================================================= */

.no-posts {
    text-align: center;
    padding: 5rem 0;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.no-posts svg {
    color: var(--color-border);
    margin-bottom: 0.5rem;
}

.no-posts__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.no-posts__desc {
    font-size: 0.9375rem;
    color: var(--color-muted);
    margin: 0 0 0.75rem;
}


/* =========================================================
   Post Grid
   ========================================================= */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1023px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 639px) {
    .post-grid  { grid-template-columns: 1fr; gap: 1.25rem; }
    .archive-body { padding-top: 1.5rem; padding-bottom: 3rem; }
}

.post-grid--related {
    margin-top: 1.5rem;
}

/* =========================================================
   Post Card
   ========================================================= */

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);    /* card = white */
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--color-bg);
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image {
    transform: scale(1.03);
}

.post-card__image--placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-border);
}

.post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 0.5rem;
}

.post-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-muted);     /* secondary on light */
    text-decoration: none;
}

.post-card__category:hover {
    color: var(--color-dark);
    text-decoration: underline;
}

.post-card__title {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0.25rem 0 0;
    color: var(--color-dark);      /* heading on light */
}

.post-card__title a {
    text-decoration: none;
    color: inherit;
}

.post-card__title a:hover {
    opacity: 0.7;
}

.post-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-text);      /* body text on light */
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-muted);     /* secondary on light — date/author */
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.post-card__sep {
    color: var(--color-border);
}

/* =========================================================
   Pagination
   ========================================================= */

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--gradient-accent);
    border-color: transparent;
    color: var(--color-white);
}

.page-numbers.dots {
    border: none;
    background: none;
    pointer-events: none;
}


/* =========================================================
   Search form
   ========================================================= */

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 1.5rem auto 0;
}

.search-form__input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
    background: var(--color-white);
    color: var(--color-text);
}

.search-form__input:focus {
    border-color: var(--color-dark);
}

.search-form__btn {
    white-space: nowrap;
}
