/* ==========================================================================
   Edy London: Blog posts page (home.php)
   Hero, post cards (template-parts/blog/card.php, large + small), the
   "Featured Posts" sidebar and the numbered pagination.
   The breadcrumb list rules come from services-archive.css.
   Breakpoints: 1024px (tablet), 767px (mobile).
   ========================================================================== */

/* ---------- Hero: light cream band with breadcrumb and title */
.el-blog-hero {
    background: var(--el-cream);
}

.el-blog-hero .el-wrap {
    padding-block: var(--el-hero-top) clamp(56px, 7vw, 104px);
}

.el-blog-hero__title {
    font-size: clamp(56px, 8vw, 110px);
}

/* ---------- Layout: posts + "Featured Posts" sidebar */
.el-blog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}

.el-blog__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 40px);
}

/* ---------- Post card (large): cards in a row share the same height and
   "Read more" sits at the bottom, so the links line up whatever the
   length of the title or excerpt. */
.el-blog-card--large {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.el-blog-card--large .el-blog-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
}

.el-blog-card--large .el-blog-card__more {
    margin-top: auto;
}

.el-blog-card__img {
    display: block;
    overflow: hidden;
    background: var(--el-blush);
}

.el-blog-card--large .el-blog-card__img {
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
}

.el-blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.el-blog-card__img:hover img,
.el-blog-card:hover .el-blog-card__img img {
    transform: scale(1.03);
}

.el-blog-card__date {
    display: block;
    font-size: 13px;
    color: var(--el-text);
}

.el-blog-card__title {
    margin: 6px 0 10px;
    font-family: var(--el-serif);
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 400;
    line-height: 1.15;
    color: var(--el-ink);
}

.el-blog-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.el-blog-card__title a:hover {
    color: var(--el-sage);
}

.el-blog-card__excerpt {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
}

.el-blog-card__more {
    font-size: 14px;
}

/* ---------- "Featured Posts" sidebar with small cards */
.el-blog-featured {
    position: sticky;
    top: 110px;
    padding: 28px;
    background: var(--el-cream);
}

.el-blog-featured__title {
    margin: 0 0 20px;
    font-family: var(--el-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--el-ink);
}

.el-blog-featured__list {
    display: grid;
    gap: 20px;
}

.el-blog-card--small {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.el-blog-card--small .el-blog-card__img {
    aspect-ratio: 1;
}

.el-blog-card--small .el-blog-card__title {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.2;
}

/* ---------- Pagination (the_posts_pagination) */
.el-blog-pagination {
    margin-top: clamp(48px, 6vw, 72px);
    padding-top: 28px;
    border-top: 1px solid var(--el-line);
}

.el-blog-pagination .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.el-blog-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.el-blog-pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--el-line);
    border-radius: var(--el-radius);
    font-size: 14px;
    color: var(--el-ink);
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s;
}

.el-blog-pagination a.page-numbers:hover {
    border-color: var(--el-sage);
    color: var(--el-sage);
}

.el-blog-pagination .page-numbers.current {
    border-color: var(--el-ink);
    background: var(--el-ink);
    color: #fff;
}

.el-blog-pagination .page-numbers.dots {
    border-color: transparent;
}

/* ---------- Tablet: sidebar below the posts */
@media (max-width: 1024px) {
    .el-blog__layout {
        grid-template-columns: 1fr;
    }

    .el-blog-featured {
        position: static;
    }

    .el-blog-featured__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Mobile: one column everywhere */
@media (max-width: 767px) {
    .el-blog__grid,
    .el-blog-featured__list {
        grid-template-columns: 1fr;
    }

    .el-blog-featured {
        padding: 22px;
    }

    /* Pagination stays on one row, the next arrow included: the buttons
       shrink evenly when space is short. */
    .el-blog-pagination .nav-links {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .el-blog-pagination .page-numbers {
        flex: 0 1 44px;
        min-width: 0;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .el-blog-card__img img {
        transition: none;
    }
}
