/* ===== Blog Card Components ===== */
/* Shared styles for blog cards used across the site */

/* ===== Base Card ===== */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.blog-card a {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

/* ===== Featured Card (Text + Image Split) ===== */
.blog-card--featured {
    min-height: 280px;
}

.blog-card--featured a {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

/* Text Section (Left half) */
.blog-card--featured .card__text {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.blog-card--featured .card__category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 12px;
}

.blog-card--featured .card__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.blog-card--featured .card__date {
    font-size: 12px;
    color: #aaa;
}

.blog-card--featured .card__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.blog-card--featured .card__avatar,
.blog-card--featured .card__author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card--featured .card__author-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
}

/* Image Section (Right half) */
.blog-card--featured .card__image {
    position: relative;
    overflow: hidden;
    padding: 12px;
}

.blog-card--featured .card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 280px;
    border-radius: var(--radius-lg, 12px);
}

.blog-card--featured .card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    border-radius: var(--radius-lg, 12px);
}

/* ===== Small Card with Hover Effect ===== */
.blog-card--small {
    min-height: 280px;
    position: relative;
    cursor: pointer;
}

.blog-card--small a {
    display: block;
    height: 100%;
    position: relative;
}

/* Background image container */
.blog-card--small .card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.blog-card--small .card__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Overlay (color can be customized via inline style or additional class) */
.blog-card--small .card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

/* Card inner content */
.blog-card--small .card__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px;
}

/* Category - Normal state */
.blog-card--small .card__category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #888;
    margin-bottom: 10px;
    transition: all 0.4s ease;
}

/* Title - Normal state */
.blog-card--small .card__title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
    transition: color 0.4s ease;
}

/* Footer with date and thumbnail */
.blog-card--small .card__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

/* Date - Normal state */
.blog-card--small .card__date {
    font-size: 12px;
    color: #aaa;
    transition: color 0.4s ease;
}

/* Thumbnail - Normal state */
.blog-card--small .card__thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    transition: opacity 0.4s ease;
}

/* ===== HOVER STATE ===== */
.blog-card--small:hover .card__bg-img {
    opacity: 1;
}

.blog-card--small:hover .card__overlay {
    opacity: 1;
}

/* Thumbnail on hover - hidden */
.blog-card--small:hover .card__thumb {
    opacity: 0;
}

/* ===== Responsive ===== */
@media (max-width: 800px) {
    .blog-card--featured a {
        grid-template-columns: 1fr;
    }

    .blog-card--featured .card__image {
        order: -1;
    }

    .blog-card--featured .card__img {
        min-height: 200px;
    }

    .blog-card--small {
        min-height: 240px;
    }
}

@media (max-width: 550px) {
    .blog-card--small {
        min-height: 220px;
    }
}