.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: center;
    align-items: center;
    padding: calc(7.5vw * var(--scale)) calc(10vw * var(--scale)) calc(7.5vw * var(--scale)) calc(10vw * var(--scale));
    color: var(--background-color);
    text-decoration: none;
    height: calc(50vw - 36px);
}

.related-card h2,
.related-card .big-text {
    color: var(--background-color) !important;
}

.related-posts h2 {
    margin-bottom: calc(1.11vw * var(--scale));
}

.related-card:nth-child(2) {
    border-left: 1px solid var(--text-color);
}

.related-card-image-wrapper {
    overflow: hidden;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
}

.related-card-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: black;
    opacity: 0.3;
}

.related-card .big-text,
.related-card h2 {
    position: relative;
    z-index: 2;
}

.related-card-button {
    z-index: 2;
    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 .vertical-line,
.related-card .horizontal-line {
    background-color: var(--background-color) !important;
}

.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(10vw * var(--scale)) calc(16vw * var(--scale));
        height: calc(50vw - (5vw * var(--scale)));
    }

    .related-card-button {
        top: calc(3.5vw * var(--scale));
        right: calc(3.5vw * var(--scale));
    }
}

/* Styles for tablet */
@media (max-width: 991px) {
    .related-card {
        padding: 88px 32px;
        height: 50vw;
    }
    
    .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);
    }
}

/* Styles for mobile */
@media (max-width: 479px) {
    .related-posts {
        flex-direction: column-reverse;
        border-top: none;
    }

    .related-card {
        height: 100vw;
        padding: 88px 32px;
        border-top: 1px solid var(--text-color);
    }
    
    .related-card-button {
        top: 24px;
        right: 24px;
    }

    .previous-post {
        width: 100%;
    }
    
    .next-post {
        width: 100%;
        border-left: none;
    }
}