/*
 * Inhaltselement "Zielgruppen-Teaser" (Startseite)
 * ------------------------------------------------
 * Rendert \App\View\Cell\ZielgruppenTeaserCell.
 *
 * Werte wie in jobfinder.css aus webroot/less/variables.less abgelesen und
 * ausgeschrieben, weil das LESS im Projekt nicht mehr kompiliert wird und
 * CSS-Variablen wegen IE11 ausscheiden.
 *
 *   @brand-primary   #00305D
 *   @brand-secondary #264f75
 *   @gray-lighter    #f1f1f1
 *   @gray-dark       #333333
 *   @font-size-base  15px    @font-size-h3 19px
 *
 * Die Schaltflaeche teilt sich die Optik mit .jobfinder-submit - beide
 * Elemente nutzen bewusst dieselbe Hauptaktion in Navy.
 */

.zg-teaser {
    margin-bottom: 40px;
}

/* Flexbox sorgt fuer gleich hohe Kacheln, unabhaengig von der Textmenge */
.zg-teaser-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.zg-teaser-spalte {
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 20px;
}

.zg-teaser-kachel {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    border: 1px solid #f1f1f1;
    background-color: #ffffff;
}

/* Kopfbereich */
.zg-teaser-head {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-height: 140px;
    padding: 12px 20px;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

.zg-teaser-kachel--primaer .zg-teaser-head {
    background-color: #00305d;
}

.zg-teaser-kachel--sekundaer .zg-teaser-head {
    background-color: #264f75;
}

.zg-teaser-head-text {
    position: relative;
    z-index: 2;
}

.zg-teaser-kicker {
    display: block;
    font-size: 15px;
    line-height: 1.428571429;
}

.zg-teaser-titel {
    display: block;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

/*
 * Kopfbild. Es fuellt den gesamten Kopfbalken, die Beschriftung liegt
 * darueber.
 *
 * Bewusst kein `object-fit: cover` - das versteht der IE11 nicht, und der
 * ist noch im Zielkorridor. Stattdessen wird das Bild ueber min-width und
 * min-height aufgezogen und aus seiner Mitte heraus zurueckgeschoben. Das
 * ergibt dieselbe Wirkung und laeuft ab IE10.
 *
 * Ist kein Bild hinterlegt, entfaellt das Element ersatzlos und der
 * Kopfbereich zeigt wie bisher nur die farbige Flaeche.
 */
/*
 * <picture> ist von Haus aus ein Inline-Element und wuerde im Kopfbereich
 * eine Zeilenbox samt Leerraum erzeugen. Als Blockbox ohne Inhalt im
 * Normalfluss - das Bild ist absolut positioniert - bleibt es hoehenlos.
 */
.zg-teaser-head picture {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.zg-teaser-bild {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
}

/*
 * Farbschleier zwischen Bild und Schrift.
 *
 * Beide Motive sind im oberen Bereich hell; ohne Schleier waere die weisse
 * Beschriftung dort nicht lesbar. Die Deckkraft ist so gewaehlt, dass das
 * Motiv erkennbar bleibt und die weisse Schrift auch an der hellsten Stelle
 * des Motivs die 4,5:1 aus WCAG 2.1 AA erreicht - nachgemessen, nicht
 * geschaetzt. Der sekundaere Ton #264f75 ist heller und braucht dieselbe
 * Deckkraft, sonst bleibt er bei 3,6:1 haengen.
 *
 * Nur dort, wo tatsaechlich ein Bild liegt - sonst wuerde der Schleier die
 * ohnehin navyfarbene Flaeche ein zweites Mal abdunkeln.
 */
.zg-teaser-head--bild:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 48, 93, 0.76);
}

.zg-teaser-kachel--sekundaer .zg-teaser-head--bild:after {
    background-color: rgba(38, 79, 117, 0.76);
}

/* Textblock */
.zg-teaser-body {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    padding: 20px;
    color: #333333;
    font-size: 15px;
    line-height: 1.428571429;
}

.zg-teaser-ueberschrift {
    margin: 0 0 10px;
    color: #00305d;
    font-size: 19px;
    font-weight: 700;
}

.zg-teaser-unterueberschrift {
    margin: 0 0 12px;
    font-weight: 700;
}

.zg-teaser-einleitung {
    margin: 0 0 15px;
    text-align: left;
}

.zg-teaser-liste {
    margin: 0;
    padding-left: 20px;
}

.zg-teaser-liste > li {
    margin-bottom: 6px;
}

/* Schaltflaeche, Optik identisch zu .jobfinder-submit */
.zg-teaser-aktion {
    padding: 0 20px 20px;
    text-align: right;
}

a.zg-teaser-button {
    display: inline-block;
    min-width: 220px;
    padding: 6px 12px;
    border: 1px solid #002a52;
    border-radius: 0;
    background-color: #00305d;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.428571429;
    text-align: center;
    transition: background-color 200ms;
}

a.zg-teaser-button:hover,
a.zg-teaser-button:focus {
    background-color: #264f75;
    color: #ffffff;
    text-decoration: none;
}

@media screen and (max-width: 767px) {
    .zg-teaser-row {
        display: block;
    }

    .zg-teaser-spalte {
        display: block;
    }

    a.zg-teaser-button {
        width: 100%;
        min-width: 0;
    }
}
