/* Post card: el_post_card() in functions/helpers.php (Post List section, Programme Grid module). */
.el-post-card {
    --el-card-radius: clamp(24px, calc(24px + 8 * (100vw - 1280px) / 640), 32px);
    --el-card-pad: clamp(20px, calc(20px + 4 * (100vw - 1280px) / 640), 24px);
    display: flex;
    flex-direction: column;
    border-radius: var(--el-card-radius);
    background: #e5eaee;
}

.el-post-card-media {
    position: relative;
    aspect-ratio: 716 / 507;
    overflow: hidden;
    border-radius: var(--el-card-radius);
    background: #cfd8e0; /* shows until a featured image is set */
}

.el-post-card-media > a {
    display: block;
    height: 100%;
}

.el-post-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.el-post-card:hover .el-post-card-media img {
    transform: scale(1.03);
}

.el-post-card-tag {
    position: absolute;
    bottom: clamp(12px, calc(12px + 4 * (100vw - 1280px) / 640), 16px);
    left: var(--el-card-pad);
    padding: 3px 14px;
    border: 1px solid #b9c6d3;
    border-radius: 999px;
    background: var(--el-color-white);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--el-color-blue-dark);
}

.el-post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--el-card-pad) var(--el-card-pad) calc(var(--el-card-pad) + 8px);
}

/* Blog posts: author · date · reading time, each with an icon. */
.el-post-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.4;
    color: var(--el-color-muted);
}

.el-post-card-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.el-post-card-meta li + li::before {
    content: "\00b7";
    margin: 0 10px;
    color: #a3adb7;
}

.el-post-card-meta svg {
    flex: none;
    color: var(--el-color-orange);
}

/* h3 in the outline; sized like the design (larger on the first row). */
.el-post-card-title {
    margin: 0;
    font-size: clamp(28px, calc(28px + 12 * (100vw - 1280px) / 640), 40px);
    line-height: 1.05;
}

.el-post-card-title a {
    color: var(--el-color-heading);
}

.el-post-card-text {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--el-color-muted);
}

/* Programme cards: labelled "For" and "Covers" lines instead of the excerpt. */
.el-post-card-lines {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--el-color-muted);
}

.el-post-card-lines dt {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--el-color-orange);
}

.el-post-card-lines dd {
    margin: 2px 0 0;
}

/* Button sits at the bottom so the buttons in a row line up. */
.el-post-card-body > :nth-last-child(2) {
    margin-bottom: 24px;
}

.el-post-card-btn {
    margin-top: auto;
}

@media (max-width: 991px) {
    .el-post-card-title {
        font-size: 26px;
    }
}
