.blogwall-settings() {
    @blogwall-border-color: #E6E6E6;
    @blogwall-background-color: #FFF;
    @blogwall-star-color: #FFB300;
    @blogwall-border-width: 1px;
    @blogwall-cell-height: 210px;
    @blogwall-cell-focus-color: #2b9aff;
    @blogwall-cell-focus-bxshadow: inset 0 0 0 4px fade(@blogwall-cell-focus-color, 20%);

    @blogwall-padding-micro: 16px;
    @blogwall-padding-mili: 24px;
    @blogwall-padding-base: 40px;

    @blogwall-screen-breakpoint-1: 576px;
    @blogwall-screen-breakpoint-2: 992px;
    @blogwall-screen-breakpoint-3: 1200px;
    @blogwall-screen-breakpoint-4: 1600px;
}

.blogwall {
    .blogwall-settings();

    border-style: solid;
    border-color: @blogwall-border-color;
    border-width: 0;

    &:before,
    &:after {
        content:"";
        display:block;
    }

    &:after {
        clear:both;
    }

    &-item {
        position: relative;
        overflow: hidden;
        padding: @blogwall-padding-mili;
        background-color: @blogwall-background-color;

        @media (min-width: @blogwall-screen-breakpoint-1) {
            padding-left: @blogwall-padding-base;
            padding-right: @blogwall-padding-base;
            padding-bottom: @blogwall-padding-micro;
        }

        &-star {
            position: absolute;
            top: 0;
            right: 0;
            padding: @blogwall-padding-micro;
            color: @blogwall-star-color;
        }
    }

    &-gridcell {
        box-sizing: border-box;
        border-style: inherit;
        border-width: @blogwall-border-width;
        border-top-color: transparent;
        border-left-color: transparent;
        border-right-color: transparent;
        border-bottom-color: inherit;
        transition: box-shadow 0.3s, border-color 0.3s, z-index 0s;
        z-index: 0;

        &:first-child {
            border-top-color: inherit;
        }

        &:hover {
            position: relative;
            z-index: 1;
            border-color: @blogwall-cell-focus-color;
            //box-shadow: @blogwall-cell-focus-bxshadow;
            transition: box-shadow 0s, border-color 0s, z-index 0s;
        }


        @media (min-width: @blogwall-screen-breakpoint-1) {
            float: left;
            width: ~"calc(50% + @{blogwall-border-width})";
            height: (@blogwall-cell-height + @blogwall-border-width);
            margin-left: -@blogwall-border-width;
            margin-top: -@blogwall-border-width;
            border-color: inherit;
        }

        @media (min-width: @blogwall-screen-breakpoint-2) {
            width: ~"calc(33.333% + @{blogwall-border-width})";
        }

        @media (min-width: @blogwall-screen-breakpoint-3) {
            width: ~"calc(25% + @{blogwall-border-width})";
        }

        @media (min-width: @blogwall-screen-breakpoint-4) {
            width: ~"calc(20% + @{blogwall-border-width})";
        }

        &-promo {
            @media (min-width: @blogwall-screen-breakpoint-1) {
                width: ~"calc(100% + @{blogwall-border-width})";
                height: auto;
            }

            @media (min-width: @blogwall-screen-breakpoint-2) {
                width: ~"calc(66.666% + @{blogwall-border-width})";
                height: (@blogwall-cell-height * 3 + @blogwall-border-width);
            }

            @media (min-width: @blogwall-screen-breakpoint-3) {
                width: ~"calc(50% + @{blogwall-border-width})";
            }

            @media (min-width: @blogwall-screen-breakpoint-4) {
                width: ~"calc(40% + @{blogwall-border-width})";
            }
        }
    }

    &-date {
        display: inline-block;
    }

    &-link {
        display: block;
    }

    &-fauxlink {
        position: relative;

        &:hover &--overlay {
            border-color: fade(@blogwall-cell-focus-color, 20%);
            box-shadow: @blogwall-cell-focus-bxshadow;
        }

        &--overlay {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: 1;
            display: block;
            border-width: @blogwall-border-width;
            border-style: solid;
            border-color: transparent;
            border-radius: 0;

            &:focus {
                border-color: @blogwall-cell-focus-color;
                box-shadow: @blogwall-cell-focus-bxshadow;
            }
        }

        [role="link"],
        a:not(.blogwall-fauxlink--overlay) {
            position: relative;
            z-index: 2;
        }

        &:hover {
            .blogwall-link {
                text-decoration-line: underline;
            }
        }
    }

    &-readable-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        border: 0;
    }

    @supports (display: grid) {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(@blogwall-cell-height, auto);

        @media (min-width: @blogwall-screen-breakpoint-1) {
            grid-template-columns: 1fr 1fr;
        }

        @media (min-width: @blogwall-screen-breakpoint-2) {
            grid-template-columns: repeat(3, 1fr);
        }

        @media (min-width: @blogwall-screen-breakpoint-3) {
            grid-template-columns: repeat(4, 1fr);
        }

        @media (min-width: @blogwall-screen-breakpoint-4) {
            grid-template-columns: repeat(5, 1fr);
        }

        &:before,
        &:after {
            content: none;
        }

        &-gridcell {
            float: none;
            width: auto;
            height: auto;

            &-promo {
                @media (min-width: @blogwall-screen-breakpoint-1) {
                    grid-column: span 2;
                    grid-row:    span 1;
                }

                @media (min-width: @blogwall-screen-breakpoint-2) {
                    grid-column: span 2;
                    grid-row:    span 3;
                }
            }
        }
    }
}
