@import "../var";

#newsroomSection {
    min-height: 100vh;
    overflow: hidden;
}

.post-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    a {
        display: block;
        margin: .25em;
        span {
            display: block;
            padding: .5em 1em;
            border-radius: 2em;
            white-space: nowrap;
            opacity: .6;
            line-height: 1;
            transition: opacity 300ms, background 300ms, color 300ms;
        }
        @media screen and (hover: hover) {
            &:hover {
                span {
                    opacity: 1;
                }
            }
        }
        &.active {
            span {
                background: #000;
                color: #fff;
                opacity: 1;
            }
        }
    }
}

.news-sticky-posts {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: to-rem(30px);
    grid-row-gap: to-rem(60px);
}

.news-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: to-rem(30px);
    grid-row-gap: to-rem(60px);
    @media screen and (max-width: $breakpoint-mobile) {
        grid-template-columns: repeat(1, 1fr);
    }
}
.news-loop-item {
    &.hide {
        display: none;
    }
    a {
        display: block;
    }
    .__tb {
        margin-bottom: to-rem(20px);
        overflow: hidden;
        border: 1px solid rgba(0,0,0,0.1);
        transition: box-shadow 600ms $easeInOutQuint;

        img {
            display: block;
            width: 100%;
            height: auto;
            aspect-ratio: 16/9;
            object-fit: cover;
            transition: transform 1000ms $easeInOutQuint;
            box-sizing: border-box;
        }
    }

    .__title {
        font-weight: 700;
        line-height: 1.2;
        max-width: 820px;
    }
    .__excerpt {
        font-weight: 500;
        line-height: 1.4;
        margin-top: .5em;
        max-width: 820px;
    }
    .__meta {
        display: flex;
        margin-top: to-rem(20px);
        line-height: 1;
        .__category {
            margin-right: .5em;
            display: block;
        }
        .__date {
            display: block;
        }
    }
    @media screen and (hover: hover) {
        &:hover {
            .__tb {
                box-shadow: 0px 0px 1.25rem rgba(0, 0, 0, 0.2);
                border: 1px solid rgba(0, 0, 0, 0.2);

                img {
                    transform: scale(1.075);
                }
            }
        }
    }
}


.single {
    .__img {
        img {
            display: block;
            width: 100%;
            height: auto;
        }
    }

    .__meta {
        display: flex;
        justify-content: center;
        .__category {
            margin-right: .5em;
            display: block;
        }
        .__date {
            display: block;
        }
    }



    .__post-nav {
        display: flex;
        justify-content: space-between;
        gap: 1.5em;
        border-top: 1px solid rgba(0,0,0,.5);
        padding-top: 1em;
        .__prev,
        .__next {
            max-width: 33%;
            display: flex;
            gap: .5em;
            @media screen and (hover: hover) {
                &:hover {
                    opacity: 1;
                }
            }
        }
    }
}

.__post-content {
    a {
        text-decoration: underline;
    }

    h1,
    h2,
    h3,
    h4 {
        margin-bottom: .4em;
    }


    p {
        margin-bottom: 1rem;
        &+h1,
        &+h2,
        &+h3,
        &+h4 {
            margin-top: 2.4rem;
        }
    }

    img {
        max-width: 100%;
        height: auto;
    }

}