/*
 * Blog card (.pcard). The image is always shown whole, never cropped: it sits in a 16:9 frame (most posts are 16:9) with
 * object-fit: contain, and anything that is not 16:9 gets a blurred copy of itself behind it instead of black bars.
 */
.pcard {
    --pcard-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eceef5;
    border-radius: var(--pcard-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 23, 43, .04), 0 10px 30px rgba(20, 23, 43, .06);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease;
}
.pcard:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--brand-rgb, 212, 20, 120), .35);
    box-shadow: 0 2px 4px rgba(20, 23, 43, .05), 0 24px 50px rgba(20, 23, 43, .14);
}

/* ---- image ---- */
.pcard-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #14172b;
    isolation: isolate;
}
.pcard-media::before {               /* blurred copy of the same image fills any space the whole image leaves */
    content: "";
    position: absolute;
    inset: -24px;
    background: var(--img) center / cover no-repeat;
    filter: blur(24px) saturate(1.15) brightness(.8);
    z-index: -1;
}
.pcard-media img {
    position: absolute;          /* out of the flow so a large image can never stretch its column */
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .6s ease;
}
.pcard:hover .pcard-media img { transform: scale(1.025); }

/* ---- body ---- */
.pcard-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 24px 20px;
}
:root body .pcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 12px;
    font-size: var(--fs-small, 14px);
    line-height: 1.4;
    color: #7a8196;
}
.pcard-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pcard-meta i { color: var(--brand, #d41478); font-size: 1em; }

:root body .pcard-title {
    margin: 0 0 10px;
    font-size: var(--fs-h5, 18px);
    font-weight: var(--fw-heading, 700);
    line-height: var(--lh-card, 1.35);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pcard-title a { color: #14172b; text-decoration: none; transition: color .25s ease; }
.pcard:hover .pcard-title a, .pcard-title a:hover { color: var(--brand, #d41478); }

:root body .pcard-excerpt {
    margin: 0 0 18px;
    font-size: var(--fs-body, 16px);
    line-height: var(--lh-body, 1.7);
    color: #5b6475;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- footer (always pinned to the bottom so cards in a row line up) ---- */
.pcard-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eef0f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pcard-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pcard-avatar {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand, #d41478), #7c3aed);
    color: #fff; font-weight: 700; font-size: 14px;
}
:root body .pcard-name {
    font-size: var(--fs-small, 14px);
    font-weight: var(--fw-strong, 600);
    color: #3b4160;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:root body .pcard-more {
    flex: none;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: var(--fs-small, 14px);
    font-weight: var(--fw-heading, 700);
    color: var(--brand, #d41478);
    text-decoration: none;
}
.pcard-more .arrow {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--brand-rgb, 212, 20, 120), .1);
    color: var(--brand, #d41478);
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.pcard:hover .pcard-more .arrow { background: var(--brand, #d41478); color: #fff; transform: translateX(3px); }

@media (max-width: 575px) {
    .pcard { --pcard-radius: 16px; }
    .pcard-body { padding: 18px 18px 16px; }
}
