/**
 * Layout flexible blocks (.at-blocks--flex) and stiff blocks (.at-blocks--stiff)
 */

.at-blocks {
    margin-left: auto;
    margin-right: auto;
    font-size: .9em;
}

.at-blocks__sectionTitle,
.at-blocks__sectionIntro {
    text-align: left;
}

.at-blocks__sectionIntro {
    margin: 0 auto 50px;
}

.at-blocks__article {
    position: relative;
    box-sizing: border-box;
    margin-bottom: 50px;
}

.at-blocks__imageContainer {
    position: relative;
    padding: 62% 1px 0;
    background-size: cover;
    box-shadow: 0 0px 0px 1px rgba(0, 0, 0, 0.3) inset;
    background-color: #ccc;
    overflow: hidden;
}

.at-blocks__imageContainer--hasIcons:before {
    content: "";
    position: absolute;
    bottom: 0;
    display: block;
    width: 120%;
    height: 75px;
    transform: rotate(-15deg);
    transform-origin: right;
    background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,.50) 100%);
    background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
}

.at-blocks__imageContainer:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1em;
    display: block;
    width: 0;
    border: 10px solid transparent;
    border-bottom-color: #f8f8f8;
}

.at-blocks__icons {
    position: absolute;
    white-space: nowrap;
    display: table;
}

.at-blocks__icons span {
    display: table-cell;
    padding: 0 3px;
}

.at-blocks__icon {
    border-radius: 9px;
}

.at-blocks__articleTitleElement {
    margin-top: 0;
}

.at-blocks li {
    margin-bottom: 0;
}

.at-blocks__linkUrl {
    display: block;
    font-size: 14px;
}

.at-blocks__link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
}

.at-blocks__article:hover .at-blocks__linkUrl {
    color: #d00000;
    text-decoration: underline;
}

/**
 * icons
 */

@media screen and (max-width: 559px) {
    .at-blocks__icons {
        right: 1em;
        margin-top: -89px;
        white-space: nowrap;
        line-height: 0;
        height: 64px;
    }
}

@media screen and (min-width: 560px) {
    .at-blocks__icons {
        bottom: .2em;
        right: .6em;
    }

    .at-blocks__icon {
        width: 2em;
    }
}

/**
 *
 */

@media screen and (max-width: 767px) {
    .at-blocks__article {
        padding-bottom: 0 !important;
    }

    .at-blocks__imageContainer {
        margin-bottom: .8em;
    }

    .at-blocks__articleTitleElement {
        height: auto !important;
        margin-bottom: 0;
        word-break: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

/**
 * grid
 */

@media screen and (min-width: 560px) and (max-width: 767px) {
    .at-blocks__article {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }

    .at-blocks__imageContainer {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex; /** Necessary to vertically align its contents */
        -webkit-box-flex: 0 0 300px;
        -webkit-flex: 0 0 300px;
        -ms-flex: 0 0 300px;
        flex: 0 0 300px;
    }

    .at-blocks__imageContainer + .at-blocks__textContainer {
        padding-left: 1em;
        padding-right: 1em;
    }
}

@media screen and (min-width: 768px) {
    .at-blocks__sectionsContainer {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-flex-wrap: nowrap;
        -ms-flex-wrap: nowrap;
        flex-wrap: nowrap;
    }

    .at-blocks--flex .at-blocks__sectionsContainer {
        -webkit-box-pack: justify;
        -webkit-justify-content: space-between;
        -ms-flex-pack: justify;
        justify-content: space-between;
    }

    .at-blocks--stiff .at-blocks__article {
        -webkit-box-flex: 0;
        -webkit-flex: 0;
        -ms-flex: 0;
        flex: 0;
    }

    .at-blocks__article + .at-blocks__article {
        margin-left: 2%;
    }

    .at-blocks--flex .at-blocks__article {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }

    .at-blocks__article { /** Waarom stond er .at-block in deze selector? */
        margin-bottom: 0;
        background: #fff;
        box-shadow: 0 0px 1px inset;
    }

    .no-flexbox .at-blocks__article {
        display: inline-block;
        width: 31%;
        vertical-align: top;
    }

    .at-blocks__imageContainer:after {
        border-bottom-color: #fff;
    }

    .at-blocks__textContainer {
        padding: 1em;
    }

    .at-blocks__articleTitleElement {
        font-size: 20px;
        color: inherit;
        word-break: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    .at-blocks--2 .at-blocks__article {
        flex-basis: 49%;
    }

    .at-blocks--3 .at-blocks__article {
        flex-basis: 32%;
    }

    .at-blocks--4 .at-blocks__article {
        flex-basis: 24%;
    }
}

@media screen and (min-width: 1295px) {
    .no-flexbox .sidebar .at-blocks__article {
        width: 100%;
    }
}
