/* Concept photo/video gallery — exact port of the legacy Angular
   app-gallery COMPONENT styles, captured from the live ideasfor.events DOM
   (component styles are injected at runtime with _ngcontent attributes, so
   they exist in no shipped .css bundle — which is why this file has no
   counterpart in the ported bundle set and the gallery rendered as a plain
   Bootstrap grid until now).

   The load-bearing idea: every tile is a FIXED-HEIGHT (350px), cover-cropped
   background-image div — tile size never depends on the photo's aspect
   ratio. The Bootstrap-grid rendering this replaces sized tiles by aspect,
   so wide panoramas rendered a fraction of the height they get on the
   legacy site.

   Breakpoints are the legacy component's own (899/599, not Bootstrap's
   768/992): 4-across ≥1200, 3-across ≤1199, 2-across ≤899, 1-across ≤599.
   Rule order matters at small widths — all three max-width rules match at
   ≤599px and the last one wins. */

.gallery-item {
    position: relative;
    min-height: 1px;
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 1200px) {
    .gallery-item {
        width: 25%;
        display: inline-block;
    }
}

@media (max-width: 1199px) {
    .gallery-item {
        width: 33.333%;
        display: inline-block;
    }
}

@media (max-width: 899px) {
    .gallery-item {
        width: 50%;
        display: inline-block;
    }
}

@media (max-width: 599px) {
    .gallery-item {
        width: 100%;
        display: inline-block;
    }
}

.gallery-items-wrapper {
    text-align: center;
}

.gallery-wrapper {
    display: block;
    position: relative;
    width: 100%;
    padding: 5px;
    overflow: hidden;
    float: left;
}

.gallery-item .gallery-wrapper .gallery-thumbnail {
    max-width: 100%;
    width: 100%;
    height: 350px;
    position: relative;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.3s, -webkit-transform 0.3s;
    vertical-align: middle;
    border: 0;
}

.gallery-item .gallery-wrapper .gallery-thumbnail video {
    max-width: 100%;
    width: 100%;
}

.gallery-hover .gallery-source-hover {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.8);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s;
}

.gallery-hover .gallery-source-hover .gallery-source-content {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 25px;
    transition: bottom 0.5s;
}

.gallery-hover:hover .gallery-source-hover {
    opacity: 1;
}

.gallery-hover:hover .gallery-source-hover .gallery-source-content {
    bottom: 45px;
}

.gallery-item h4 {
    margin-top: 0;
    margin-bottom: 0;
    color: #ececec;
    font-size: 1.07em;
    letter-spacing: 3px;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.gallery-item .subheading {
    margin-top: 10px;
    margin-bottom: 0;
    font-family: "Open Sans", Montserrat, "Helvetica Neue", Helvetica, sans-serif;
    letter-spacing: 2.5px;
    color: #999;
    font-size: 0.85em;
    text-transform: uppercase;
    line-height: 1.1;
}

.gallery-hover .gallery-open-btn {
    position: absolute;
    padding-top: 22px;
    width: 60px;
    height: 60px;
    right: 0;
    top: -60px;
    font-size: 15px;
    text-align: center;
    line-height: 0;
    color: #111;
    background: #ececec;
}

.gallery-hover .gallery-open-btn:hover {
    color: #ececec;
    background: #111;
}

.gallery-hover .gallery-open-btn:focus,
.gallery-hover .gallery-open-btn:visited {
    outline: 0;
}

.gallery-wrapper:active .gallery-open-btn,
.gallery-wrapper:hover .gallery-open-btn {
    top: 0;
}

/* A lone video gets a wide tile that sizes to the video's own aspect. */
.gallery-items-wrapper.one-video > .gallery-item {
    width: 66%;
}

.gallery-items-wrapper.one-video > .gallery-item .gallery-thumbnail {
    height: initial;
}
