.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 48px 48px 48px !important;
    justify-items: center;

    @media screen and ( max-width: 1024px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media screen and ( max-width: 499px) {
        grid-template-columns: repeat(1, 1fr);
    }
}

.ebook-article {
    width: 100%;
    cursor: pointer;
    position: relative;

    @media screen and ( max-width: 1024px) {
        width: 350px;
    }

    @media screen and ( max-width: 800px) {
        width: 100%;
    }

}

.related-books {
    background-color: #2f202d;
    margin-top: 64px;
    margin-bottom: 35px;
    padding: 0 !important;

    @media screen and ( max-width: 1024px) {
        margin-top: 32px;
    }
}

.ebook-thumbnail {
    width: 100%;
}

.featured-banner {
    background-color: #D4A773;
    margin-top: 35px;
    display: flex;
    flex-direction: row;
    color: #2F202D;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    padding: 32px 32px 76px;

    @media screen and ( max-width: 768px) {
        padding: 32px 16px !important;
    }

    @media screen and ( max-width: 374px) {
        padding: 16px !important;
    }
}

.ebook-featured-thumbnail {
    width: 300px;
    margin-right: 20px;
    align-self: center;
    height: 100%;

    @media screen and ( max-width: 768px) {
        margin-right: 12px;
    }

    @media screen and ( max-width: 600px) {
        width: 200px;
    }

    @media screen and ( max-width: 550px) {
        display: none;
    }
}

.featured-body {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.featured-body > h4 {
    @media screen and ( max-width: 374px) {
        /*font-size: 24px !important;*/
    }
}

.featured-body > h2 {
    font-size: 28px;
    font-weight: 600;
    text-wrap: balance;

    @media screen and ( max-width: 700px) {
        font-size: 22px !important;
    }
}

.featured-button {
    width: 100%;
    margin-top: auto;
    border-radius: 8px;
    padding: 12px;
    background-color: #2F202D;
    color: #D4A773;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-button:focus {
    outline: none;
}

.featured-button::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    opacity: 0;
    width: 0;
    height: 0;
    background-image: url("/img/fast-forward.svg");
    background-size: contain;
    background-repeat: no-repeat;
    transition: opacity 0.2s ease, width  0.2s ease;

    @media screen and ( max-width: 1023px) {
        opacity: 0 !important;
    }
}

.featured-button:hover::after {
    opacity: 1;
    width: 1rem;
    height: 1rem;
    transition: opacity 0.2s ease;

    @media screen and ( max-width: 1023px) {
        width: 0 !important;
        height: 0 !important;
    }
}

.featured-banner::before {
    position: absolute;
    padding: 6px;
    height: 46px;
    width: 110px;
    content: url("/img/logo-mini.png");
    bottom: 0;
    right: -32px;
    background-color: #2f202d;
    transform: rotate(136deg);

    @media screen and ( max-width: 768px) {
        opacity: 0 !important;
    }
}

.featured-banner::after {
    content: '';
    z-index: -1;
    position: absolute;
    padding: 12px;
    height: 20px;
    bottom: 0;
    right: 0;
    background-color: #2f202d;

    @media screen and ( max-width: 768px) {
        opacity: 0 !important;
    }
}

.badge.featured {
    background-color: #2f202d;
    color: white;
    width: fit-content;
    align-self: center;
    font-size: 18px;
}