/* Blog index + archives: card grid. Brand colors come from --pColor / --aColor (Theme Options).
   #page is kept for the theme's layout hooks; the id in the selector beats its mobile #page padding reset. */
#page.pv-blog {
    --pv-ink: #1c2733;
    --pv-muted: #5b6673;
    --pv-line: #e3e8ee;
    --pv-surface: #ffffff;
    --pv-tint: #f3f7fb;
    --pv-radius: 14px;
    --pv-shadow: 0 1px 2px rgba(16, 38, 64, .06), 0 4px 14px rgba(16, 38, 64, .06);
    --pv-shadow-hover: 0 2px 4px rgba(16, 38, 64, .08), 0 18px 40px rgba(16, 38, 64, .14);
    --pv-ease: cubic-bezier(.16, 1, .3, 1);

    float: none;
    width: auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2.5rem, 2rem + 2vw, 4rem) 16px clamp(3.5rem, 3rem + 3vw, 6rem);
    box-sizing: border-box;
}

.pv-blog__intro {
    max-width: 46rem;
    margin: 0 0 clamp(1.75rem, 1.4rem + 1.2vw, 2.75rem);
    color: var(--pv-muted);
    font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem);
    line-height: 1.6;
}

.pv-blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.pv-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    background: var(--pv-surface);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
    transition: transform .35s var(--pv-ease), box-shadow .35s var(--pv-ease);
}

.pv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pv-shadow-hover);
}

.pv-card:focus-within {
    outline: 3px solid var(--pColor, #0358a6);
    outline-offset: 3px;
}

.pv-card__media {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--pv-tint);
}

.pv-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--pv-ease);
}

.pv-card:hover .pv-card__media img {
    transform: scale(1.04);
}

.pv-card__placeholder {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, var(--pv-tint), #dde8f3);
}

.pv-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem 1.5rem 1.4rem;
    border-top: 3px solid var(--pColor, #0358a6);
}

.pv-card__cat {
    margin: 0 0 .6rem;
    color: var(--aColor, #d33434);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.pv-card__title {
    margin: 0 0 .75rem;
    font-size: clamp(1.25rem, 1.15rem + .35vw, 1.45rem);
    line-height: 1.3;
    text-transform: none;
}

.pv-card__title a {
    color: var(--pv-ink);
    text-decoration: none;
    transition: color .2s ease;
}

/* Whole card is clickable through the title link. */
.pv-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pv-card:hover .pv-card__title a,
.pv-card__title a:focus-visible {
    color: var(--pColor, #0358a6);
}

.pv-card__title a:focus-visible {
    outline: none;
}

.pv-card__excerpt {
    margin: 0 0 1.25rem;
    color: var(--pv-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.pv-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--pv-line);
    color: var(--pv-muted);
    font-size: .88rem;
}

.pv-card__more {
    color: var(--pColor, #0358a6);
    font-weight: 700;
}

.pv-card__arrow {
    display: inline-block;
    transition: transform .3s var(--pv-ease);
}

.pv-card:hover .pv-card__arrow {
    transform: translateX(4px);
}

.pv-blog__empty {
    padding: 3rem 1.5rem;
    color: var(--pv-muted);
    text-align: center;
    background: var(--pv-tint);
    border-radius: var(--pv-radius);
}

.pv-blog .pagination,
.pv-blog .navigation {
    margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

/* Lead card: first post on page 1 spans the row, image beside the text. */
@media (min-width: 900px) {
    .pv-card--featured {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    }

    .pv-card--featured .pv-card__media {
        aspect-ratio: auto;
        min-height: 340px;
    }

    .pv-card--featured .pv-card__body {
        justify-content: center;
        padding: clamp(2rem, 1.5rem + 1.5vw, 3rem);
        border-top: 0;
        border-left: 4px solid var(--pColor, #0358a6);
    }

    .pv-card--featured .pv-card__title {
        font-size: clamp(1.6rem, 1.2rem + 1vw, 2.15rem);
    }

    .pv-card--featured .pv-card__excerpt {
        font-size: 1.08rem;
    }

    .pv-card--featured .pv-card__meta {
        margin-top: .5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pv-card,
    .pv-card__media img,
    .pv-card__arrow {
        transition: none;
    }

    .pv-card:hover,
    .pv-card:hover .pv-card__media img,
    .pv-card:hover .pv-card__arrow {
        transform: none;
    }
}
