* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/*-----------------------------------------------------------------------------------*/
/*  Spalten fürs Demo -> bei Concrete5 mit dem Layout-Tool machen?
/*-----------------------------------------------------------------------------------*/

.col3 {
    display: block;
}

.col3 > div,
.col3 > a {
    width: 100%;
    padding: 0px 0px 20px 0px;
}

@media (min-width: 768px) {
    .col3 {
        display: -webkit-flex;
        display: -moz-flex;
        display: -ms-flex;
        display: -o-flex;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;

        /* Hide Gaps of Grid */
        overflow: hidden;
        margin-left: -10px;
        margin-right: -10px;
    }

    .col3 > div,
    .col3 > a {
        width: 50%;
        padding: 0px 10px 20px 10px;
    }
    
}

@media (min-width: 980px) {
    .col3 > div,
    .col3 > a {
        width: 33%;
        padding: 0px 10px 20px 10px;
    }
    
}


/* 
------------------------------------------------------------------------------------
CSS für animierten Teaser-Block. Beschreibungstext blendet beim darüberfahren ein.

Bildformat Ziel: 3:2 -> 800x533 px oder 1000x667 oder 1600x1067
Per CSS-Maske und Object-Fit versuche ich falsche Bilder optimal zu zentrieren.
Der Container mit der Klasse '.wbox-teaser-animated' kann eine Link <a> oder Div sein.

Todo:
√ Abstände zwischen den Cols
√ Mobile
- Object-Fit klappt nicht so wirklich. Siehe Panorama.
- Automatische Höhe anhand des Contents für die Animation?
√ Das ganze braucht einen Link (geht jetzt)
------------------------------------------------------------------------------------
*/

/* Ist einfach der Container. In meinem Beispiel steuert die übergeordnete Ebene .col3 die Grösse */
.wbox-teaser-animated {

}

.wbox-teaser-animated-inner {
    width: 100%;
    position: relative;
    background-color: transparent;
    
    /* Box mit korrekten Seitenverhältnis via Padding und Null Höhe */
    /* https://css-tricks.com/aspect-ratio-boxes/ */
    height: 0;
    padding-top: 66.6666%;
    overflow: hidden;
}

.wbox-teaser-animated-inner h3 {
    padding: 0 0 10px 0;
    margin: 0;
}

.wbox-teaser-animated-inner p {
    padding: 0 0 10px 0;
    margin: 0;
}

.wbox-teaser-animated .wbox-teaser-animated-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 0;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    
    /* Erstellt eine "Basisgrösse" für das Bild im Container */
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.wbox-teaser-animated .wbox-teaser-animated-image img {
    width: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: center;
    object-position: center;
    
}

.wbox-teaser-animated .wbox-teaser-animated-content {
    background: rgba(255,255,255,0.9);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 100px;
    height: auto;
    padding: 20px 20px 10px 20px;
    color: #252525;
    -webkit-transition: 0.3s all ease-in-out;
    -o-transition: 0.3s all ease-in-out;
    transition: 0.3s all ease-in-out;  
}

.wbox-teaser-animated .wbox-teaser-animated-content .content-fade {
    opacity: 0;
    overflow: hidden;
    max-height: 0;
    -webkit-transition: 0.3s all ease-in-out;
    -o-transition: 0.3s all ease-in-out;
    transition: 0.3s all ease-in-out;  
  
}

.wbox-teaser-animated:hover .wbox-teaser-animated-content .content-fade {
    opacity: 1;
    height: auto;
    max-height: 200px;
    -webkit-transition: 0.3s all ease-in-out;
    -o-transition: 0.3s all ease-in-out;
    transition: 0.3s all ease-in-out;        
}

.wbox-teaser-animated:hover .wbox-teaser-animated-content {
    -webkit-transition: 0.3s all ease-in-out;
    -o-transition: 0.3s all ease-in-out;
    transition: 0.3s all ease-in-out;  
    max-height: 200px;
}


