/** ***********************
 * @file ricc.fsc.textmedia.css
 * @brief 
 * @author Clemens Riccabona, Riccabona eSolutions, <https://www.Riccabona.IT/>
 * @copyright All rights reserved
 *********************** **/


.ce-gallery,
.ce-gallery * {
    max-width: 100%;
}

.ce-gallery {
    height: auto !important;
}

.ce-intext .ce-gallery {
    max-width: 55%;
}

/* .ce-gallery .ce-outer,
.ce-gallery .ce-inner {
    width: 100%;
} */

/** make videos responsive **/
.ce-responsive-video .ce-outer,
.ce-responsive-video .ce-inner {
    width: 100%;
}

.responsive-video {
    position: relative;
    /** set 16:9 video size **/
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.responsive-video figure.video {
    /** reset figure positioning for videos ... **/
    position: static;
}

.responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/** @TODO: overthink this issue, we do not use tables anymore, maybe we have to kick IE10, and partially also IE11 **/
@media screen and (-ms-high-contrast: active),
screen and (-ms-high-contrast: none) {

    /* IE10+ specific styles */
    * {
        table-layout: fixed;
    }

    .riccStartPage .ce-gallery figure {
        display: inline-block !important;
    }
}

.ce-gallery figcaption {
    width: 100% !important;
    hyphens: auto;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    font-size: 0.9rem;
}

/** Special approach for having image similar to TYPO3 CSC, but resizable **/
.ce-gallery .ce-row {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;

    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    box-orient: horizontal;
    flex-direction: row;

    -webkit-box-pack: center;
    -moz-box-pack: center;
    box-pack: center;
    justify-content: center;

    -webkit-box-align: center;
    -moz-box-align: center;
    box-align: center;
    align-items: center;

    align-items: stretch;
    width: 100%;
}

.ce-gallery .ce-column {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    box-flex: 1;

    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
}

.ce-gallery figure {
    display: block !important;
    height: 100%;
    object-fit: cover;
    position: relative;
}

.ce-gallery a {
    display: block;
    height: 100%;
    object-fit: cover;
}

.ce-gallery img {
    object-fit: cover;
    /* height: 100%; */
    /* width: 100%; */
}

.ce-gallery figcaption {
    display: block !important;
    position: absolute;
    bottom: 0px;
    background: rgba(8, 29, 88, 0.7);
    color: #FFFFFF;
    padding: 2px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-height: 20%;
    -moz-transition: 2s;
    -ms-transition: 2s;
    -o-transition: 2s;
    -webkit-transition: 2s;
    transition: 2s;
}

.ce-gallery figcaption:hover {
    white-space: normal;
    max-height: 100%;
}

figure.video:hover figcaption.video-caption {
    z-index: -1;
}

/** just do not break on ipads and the like in portrait mode
@media screen and (max-width: 640px) {
  .ce-gallery .ce-row {
    flex-wrap: wrap;
    margin-bottom: 0px;
  }
  .ce-gallery .ce-column {
    flex: 1 1 50%;
    padding-bottom:10px;
    margin-right: 0px;
  }
  .ce-gallery .ce-column:nth-child(2n) figure {
    margin-left:10px;
  }
}
**/
@media screen and (max-width: 530px) {
    .ce-gallery .ce-row {
        flex-wrap: wrap;
        margin-bottom: 0px;
    }

    .ce-gallery .ce-column {
        flex: 1 1 100%;
        padding-bottom: 10px;
        margin-right: 0px;
    }

    .ce-gallery .ce-column figure.image img {
        width: 100%;
    }

    .ce-gallery .ce-column:nth-child(2n) figure {
        margin-left: 0px;
    }
}


/** EOF **/