﻿.list-news {
    display: flex;
    margin:-30px 0 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;

    .loading {
        position: absolute;
        top: 0;
        bottom: 70px;
        margin: auto 30px;
    }

    .msg-box {
        width: 100%;
        margin: 0 15px;
        align-self: flex-start;
    }

    li{
        .flex(12);
        padding:0 15px;
        margin-top:30px;
    }

    & + .btn {
        margin: 30px auto 0;
    }
    
    @media screen{
        @media (max-width:469px){
            &.at-home{
                margin-top:0;
            }
        }

        @media (min-width:570px){
            &.by-row,
            &.by-column {
                li{
                    .flex(6);
                }
            }
        }

        @media (min-width:570px) and (max-width:879px){
             &.by-column {
                li:last-child{
                    display:none;
                }
            }
        }

        @media (min-width:880px){
            &.by-row,
            &.by-column {
                li{
                    .flex(4);
                }
            }
        }

        @media (min-width:1170px){
            &.at-home {
                flex-wrap:unset;

                li {
                    width: 400px;
                    flex-basis:400px;
                    flex-grow:0;
                    flex-shrink:0;
                }
            }
        }
    }
}

.news-link {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width:370px;
    align-items: flex-start;

    .img {
        display: block;
        max-width: 100%;
    }

    .date {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 70px;
        height: 70px;
        text-align: center;
        text-transform: uppercase;
        font-size: 14px;
        line-height: .8em;
        background-color: @color-dblue;
        color: @color-dblue;
        transition:.3s color,.3s background-color;
        
        span {
            font-weight: 900;
            line-height: .8em;
            font-size: 30px;
            margin-bottom: 9px;
            display: block;
        }
    }

    .title {
        margin: 15px 0 0 15px;
        font-weight: 500;
        line-height: 1.1em;
        width: ~'calc(100% - 85px)';
        max-height:3.3em;
        overflow:hidden;
    }

    &:not(:hover){
        .date{
            color: @color-white !important;
        }
    }

    &:hover{
        .date{
            background:@color-white !important;
        }
    }
}