/*
 * Licensed under http://www.apache.org/licenses/LICENSE-2.0
 * Attribution notice: by Daniel Schwarz in 2019
 *
 * Filename: dynamicgrid.css
 * Purpose: Control the behaviour of the grid resp. tile view of the start page of the https://badw.de
 */

/* The main container resp. the parent container of the three tiles */
.badw-press-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
}

/* The children of the parent container. There the images will be positioned */
.block-div {
    position: relative;
    width: 240px;
    height: 240px;
    margin-bottom: 3em;
}

/*
 * The two sides of a tile, the front which is always visible and the back which is only shown,
 * when the user hovers the tile
 */
.pic-front {
    position: absolute;
    z-index: 3;
}

.pic-back {
    position: absolute;
    z-index: 1;
}

/*
 * The figure tag. The img tags and the figcaptions are direct children of these
 */
.block-div figure {
    width: 100%;
    height: 100%;
    margin: 0;
    display: table;
}

/* The class for the images resp img-tags itself */
.front, .back{
    width: 100%;
    height: 240px;
}

/* The figcaption block */
.figcaption--block {
    display: table-caption;
    caption-side: bottom;
    margin-top: -0.5em !important;
}


/* Media screen settings for smaller devices */
@media screen and (max-width: 1280px) {
    .block-div {
        width: 220px;
        height: 220px;
    }
}

/* For small devices we don't use flexbox. We use a block display with auto margins to center the tiles*/
@media screen and (max-width: 519px) {
    .badw-press-container {
        display: inherit;
    }
    .block-div {
        width: 220px;
        height: 220px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* The animation effects */
.pic-front:hover {
    animation: hide normal forwards linear 1s;
}

@keyframes hide {
    from {
        opacity: 1.0;
    }

    to {
        opacity: 0.0;
    }
}

/* Set the description style underneath the tiles eg. Podcast, Newsletter etc.*/
.c-figcaption-span--large {
    font-family: 'notosans-regular' !important;
    display: inline-block;
    color: #3F5FAC;
    font-size: 16px;
    font-style: normal !important;
}

