/* =============================================================
   post-card.css
   Horizontal post card: thumbnail left, content right.
   ============================================================= */

/* ---- Loop wrapper ---- */
.ql-posts-loop {
    display: flex;
    flex-direction: column;
}

/* ---- Single card ---- */
.ql-post-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0;
    border: 1px solid #D5D6DC;
    border-radius: 8px;
    background: #FFFFFF;
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ql-post-card:hover {
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
}

/* ---- Thumbnail ---- */
.ql-card-img-wrap {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    align-self: stretch;
    height: 100%;
}

.ql-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ql-post-card:hover .ql-card-img {
    transform: scale(1.04);
}

.ql-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef1f7 0%, #dde4ef 100%);
}

/* ---- Card body ---- */
.ql-card-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ---- Category tag ---- */
.ql-post-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2D2E74;
    color: #FFFFFF !important;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    text-decoration: none !important;
    transition: opacity 0.2s;
    align-self: flex-start;
}

.ql-post-tag:link,
.ql-post-tag:visited,
.ql-post-tag:hover,
.ql-post-tag:focus,
.ql-post-tag:active {
    background: #2D2E74 !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

.ql-post-tag:hover,
.ql-post-tag:focus {
    opacity: 0.85;
    color: #FFFFFF !important;
}

/* ---- Title ---- */
.ql-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #111;
}

.ql-card-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.ql-card-title a:link,
.ql-card-title a:visited {
    color: #2D2E74 !important;
}

.ql-card-title a:hover,
.ql-card-title a:focus,
.ql-card-title a:active {
    color: #1a3c6e !important;
    text-decoration: none !important;
}

/* ---- Excerpt ---- */
.ql-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #45474B;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .ql-post-card {
        grid-template-columns: 240px 1fr;
    }

    .ql-card-img {
        height: 170px;
    }
}

@media (max-width: 640px) {
    .ql-post-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ql-card-img-wrap {
        order: -1;
    }

    .ql-card-img {
        height: 220px;
        width: 100%;
    }

    .ql-card-body {
        padding: 16px;
    }

    .ql-card-title {
        font-size: 18px;
    }
}
