.related-posts {
    display: flex;
    border-top: 1px solid var(--text-color);
    text-align: center;
}

.related-card {
    display: block;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: calc(3.75vw * var(--scale)) calc(5vw * var(--scale)) calc(3.75vw * var(--scale)) calc(5vw * var(--scale));
    color: var(--text-color);
    text-decoration: none;
    height: 100%;
}

.related-posts h2 {
    margin-bottom: auto;
}

.related-card:nth-child(2) {
    border-left: 1px solid var(--text-color);
}

.related-card-image-wrapper {
    margin-top: calc(1.65vw * var(--scale));
    margin-bottom: calc(1.65vw * var(--scale));
    height: calc(8.25vw * var(--scale));
    width: calc(8.25vw * var(--scale));
    border: 1px solid var(--text-color);
    overflow: hidden;
}

.related-card-button {
    position: absolute;
    top: calc(1.25vw * var(--scale));
    right: calc(1.25vw * 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);
}

/* Styles for extra large desktop */
@media (min-width: 1920px) {
    .related-card {
        padding: calc(5vw * var(--scale)) calc(8vw * var(--scale));
    }

    .related-card-button {
        top: calc(1.75vw * var(--scale));
        right: calc(1.75vw * var(--scale));
    }

    .related-card-image-wrapper {
        height: calc(18vw * var(--scale));
        width: calc(18vw * var(--scale));
    }
}

/* Styles for tablet */
@media (max-width: 991px) {
    .related-card {
        padding: 44px 16px;
    }

    .related-card-image-wrapper {
        margin-top: 21px;
        margin-bottom: 16px;
        height: calc(9vw * var(--scale));
        width: calc(9vw * var(--scale));
    }

    .related-card-button {
        top: 15px;
        right: 15px;
    }
    
    .related-card:hover figure, 
    .related-card:hover .placeholder-svg {
        scale: 1;
    }
    
    .related-card:hover .vertical-line,
    .related-card:hover .horizontal-line {
        transform: rotateZ(0deg);
    }
}

/* Styles for mobile */
@media (max-width: 479px) {
    .related-posts {
        flex-direction: column-reverse;
        border-top: none;
    }

    .related-card {
        padding: 44px 16px;
        border-top: 1px solid var(--text-color);
    }

    .related-card-image-wrapper {
        margin-top: 18px;
        margin-bottom: 13px;
        height: calc(25vw * var(--scale));
        width: calc(25vw * var(--scale));
    }

    .related-card-button {
        top: 12px;
        right: 12px;
    }

    .previous-post {
        width: 100%;
    }
    
    .next-post {
        width: 100%;
        border-left: none;
    }
}