﻿
/* ==========================================
   KHELMART AUTHOR ARTICLES
   Modern Editorial Design
   ========================================== */

.km-author-latest {
    width: 100%;
    margin: 36px 0 0;
    padding: 32px 0 10px;
    border-top: 1px solid #e8edf4;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

/* SECTION HEADER */

.km-author-latest-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.km-author-eyebrow {
    display: inline-block;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.km-author-latest-heading h2 {
    margin: 0 0 8px;
    color: #14243b;
    font-size: clamp(23px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.km-author-latest-heading p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.km-author-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 11px 17px;
    border: 1px solid #dce6f5;
    border-radius: 9px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}

    .km-author-view-all:hover {
        background: #eaf2ff;
        border-color: #b9d2fa;
    }

/* ARTICLE GRID */

.km-author-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* ARTICLE CARD */

.km-author-blog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    background: #fff;
    border: 1px solid #e5ebf3;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(20, 40, 70, .025);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .km-author-blog-card:hover {
        transform: translateY(-4px);
        border-color: #cdddf5;
        box-shadow: 0 12px 28px rgba(20, 40, 70, .09);
    }

/* ARTICLE IMAGE */

.km-author-blog-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

    .km-author-blog-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease;
    }

.km-author-blog-card:hover .km-author-blog-image img {
    transform: scale(1.035);
}

/* ARTICLE CONTENT */

.km-author-blog-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 21px 22px;
}

    .km-author-blog-body time {
        display: block;
        margin-bottom: 11px;
        color: #718096;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.4;
    }

    .km-author-blog-body h3 {
        margin: 0 0 20px;
        color: #17253a;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.5;
        letter-spacing: -0.15px;
    }

        .km-author-blog-body h3 a {
            color: inherit;
            text-decoration: none;
            transition: color .2s ease;
        }

            .km-author-blog-body h3 a:hover {
                color: #2563eb;
            }

/* READ ARTICLE LINK */

.km-author-read-more {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 8px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s ease;
}

    .km-author-read-more:hover {
        color: #1746a2;
    }

/* TABLET */

@media (max-width: 900px) {
    .km-author-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .km-author-blog-body {
        padding: 18px;
    }
}

/* MOBILE */

@media (max-width: 600px) {

    .km-author-latest {
        margin-top: 26px;
        padding-top: 25px;
    }

    /* MOBILE HEADER ALIGNMENT */

    .km-author-latest-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
        /* NEW: Move heading content inward */
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

        .km-author-latest-heading h2 {
            font-size: 21px;
            line-height: 1.35;
            letter-spacing: -0.4px;
            overflow-wrap: break-word;
            padding-left: 8px;
        }

        .km-author-latest-heading p {
            font-size: 13px;
            line-height: 1.6;
        }

    .km-author-view-all {
        padding: 10px 15px;
    }

    /* MOBILE BLOG CARDS */

    .km-author-blog-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .km-author-blog-image {
        aspect-ratio: 16 / 9;
    }

    .km-author-blog-body {
        padding: 17px;
    }

        .km-author-blog-body h3 {
            font-size: 16px;
            margin-bottom: 16px;
        }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .km-author-blog-card,
    .km-author-blog-image img,
    .km-author-view-all,
    .km-author-read-more {
        transition: none;
    }
}
