/* 
 ---------------------------------
 |   LAST UPDATED: 2026-04-13    |
 ---------------------------------
 */

/* VIEWPORT HEADNOTE: Standard boundaries 1024, 768–1023, ≤767. min-width 1920px is a desktop tier, not a standard boundary. max-width 479px is not tied to our device viewport sizes; used for small-mobile refinement only. */

/* ========================================================================
   VIEWPORT-AGNOSTIC (base styles)
   ======================================================================== */
.related-posts {
    container-type: inline-size;
    container-name: related-rail;
    display: flex;
    border-top: 1px solid var(--text-color-lower-opac);
    text-align: center;
}

.related-card {
    display: flex;
    width: 100%;
    position: relative;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: calc(2.5vw * var(--scale)) calc(3vw * var(--scale));
    color: var(--text-color);
    text-decoration: none;
    height: 100%;
}

.related-card h2 {
    font-size: calc(28px * var(--scale)) !important;
    padding-top: calc(0.6rem * var(--scale));
    padding-bottom: calc(0.3rem * var(--scale));
    margin-bottom: 0;
}

.related-posts h2 {
    margin-bottom: auto;
}

.related-card:nth-child(2) {
    border-left: 1px solid var(--text-color-lower-opac);
}

.related-card-image-wrapper {
    margin-top: calc(1.5vw * var(--scale));
    margin-bottom: calc(1.5vw * var(--scale));
    height: calc(30vw * var(--scale));
    width: calc(30vw * var(--scale));
    max-width: 380px;
    max-height: 380px;
    border: none;
    overflow: hidden;
}

.related-card-image-wrapper figure {
    width: 100%;
    height: 100%;
    margin: 0;
}

.related-card-image-wrapper figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-image-wrapper .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card-image-wrapper .placeholder svg {
    width: 60%;
    height: 60%;
}

.related-card-button {
    position: absolute;
    top: calc(2.5vw * var(--scale));
    right: calc(2.5vw * var(--scale));
}

/* .related-card:hover figure, 
.related-card:hover .placeholder-svg {
    scale: 1.05;
} */

.related-card:hover .vertical-line,
.related-card:hover .horizontal-line {
    transform: rotateZ(90deg);
}

.previous-post {
    width: 50%;
}

.next-post {
    width: 50%;
    border-left: 1px solid var(--text-color-lower-opac);
}





/* ========================================================================
   1. DESKTOP (1024px+; 1920px tier)
   ======================================================================== */
@media (min-width: 1920px) {
    .related-card {
        padding: calc(4vw * var(--scale)) calc(6vw * var(--scale));
    }

    .related-card-button {
        top: calc(3.5vw * var(--scale));
        right: calc(3.5vw * var(--scale));
    }

    .related-card-image-wrapper {
        height: calc(20vw * var(--scale));
        width: calc(20vw * var(--scale));
    }
}





@container related-rail (max-width: 48rem) {
    .related-card {
        padding: 48px 24px;
    }

    .related-card-image-wrapper {
        margin-top: 24px;
        margin-bottom: 20px;
        height: calc(40vw * var(--scale));
        width: calc(40vw * var(--scale));
        max-width: 280px;
        max-height: 280px;
    }

    .related-card-button {
        top: 30px;
        right: 30px;
    }

    .related-card:hover figure,
    .related-card:hover .placeholder-svg {
        scale: 1;
    }

    .related-card:hover .vertical-line,
    .related-card:hover .horizontal-line {
        transform: rotateZ(0deg);
    }
}





@container related-rail (max-width: 30rem) {
    .related-posts {
        flex-direction: column-reverse;
        border-top: none;
    }

    .related-card {
        padding: 36px 24px;
        border-top: 1px solid var(--text-color);
    }

    .related-card-image-wrapper {
        margin-top: 20px;
        margin-bottom: 16px;
        height: calc(55vw * var(--scale));
        width: calc(55vw * var(--scale));
        max-width: none;
        max-height: none;
    }

    .related-card-button {
        top: 24px;
        right: 24px;
    }

    .previous-post {
        width: 100%;
    }

    .next-post {
        width: 100%;
        border-left: none;
    }
}