/*!
 * Wagtail Gridder
 *
 * A Bootstrap enabled layout for the Wagtail CMS. Grid Items are
 * created within categories and displayed on a Grid Index Page.
 * The JavaScript libraries Gridder and MixItUp are included.
 *
 * url: https://github.com/wharton/wagtailgridder
 */

.gridder {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.gridder:after {
    content: '';
    display: table;
    clear: both;
}

/**
 * Gridder List
 * ------------
 * Card Layout
 */

.gridder-list {
    width: 100%;
    display: none;
    zoom: 1;
    cursor: pointer;
    position: relative;
    margin: 0 0 20px 7px;
    vertical-align: top;
}

@media (min-width: 768px) {
    .gridder-list {
        width: 48%;
    }
}

@media (min-width: 1024px) {
    .gridder-list {
        width: 32%;
    }
}

@media (min-width: 1200px) {
    .gridder-list {
        width: 24%;
    }
}

.gridder-list .gridder-thumb {
    display: block;
}

.gridder-list .gridder-thumb .overlay {
    width: 100%;
    padding: 10px 0;
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    background: #aaa;
    color: #000;
    opacity: 0;
}

.gridder-list .gridder-thumb .overlay span {
    font-weight: 11px;
    display: block;
}

.gridder-list img {
    /* TODO: fix image stretching on smaller devices */
    width: 100%;
}

.gridder-list.first {
    margin-left: 0;
}

.gridder-list.selectedItem {
    margin-bottom: 25px;
    top: 10px;
}

.gridder-list.selectedItem:after {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 14px 17px 14px;
    border-color: transparent transparent #222 transparent;
    display: block;
    position: absolute;
    bottom: -2px;
    left: 45%;
    margin-bottom: -20px;
}

.gridder-list:hover .overlay {
    opacity: 0.8;
}

/* List Wrappers */
.gridder-list .gl-wrap {
    height: 440px;
    position: relative;
    background: #fff;
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.5s ease;

}

.gridder-list .gl-wrap:hover,
.gridder-list .gl-wrap:focus {
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.gridder-list .gl-wrap:active {
    -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.gridder-list .gl-wrap .btn-block,
.gridder-list .gl-wrap .moreevents {
    position: relative;
    bottom: 0;
}

/**
 * Gridder Show
 * ------------
 * Expanded Content
 */

.gridder-show {
    position: relative;
    background: #222;
    float: left;
    padding: 0;
    color: #fff;
    overflow: hidden;
    width: 98.9%;
    top: 0;
    left: 6px;
    margin-bottom: 10px;
}

.gridder-show:after {
    content: ".";
    display: block;
    height: 0;
    overflow: hidden;
}

.gridder-show .gridder-padding {
    padding: 15px 60px 15px 60px;
}

.gridder-show .detail-img {
    float: left;
    width: 100%;
    margin: 0 0 15px;
}

@media (min-width: 1024px) {
    .gridder-show .detail-img {
        width: 30%;
        margin: 0 25px;
    }
}

.gridder-show .content-img {
    height: 200px;
    background-repeat: no-repeat;
}

@media (min-width: 1024px) {
    .gridder-show .content-img {
        height: 350px;
        background-repeat: no-repeat;
    }
}

.gridder-show .detail-content {
    width: 100%;
    text-align: left;
}

@media (min-width: 1024px) {
    .gridder-show .detail-content {
        float: left;
        width: 64%;
    }
}

/* For video; hack to make embeds responsive. */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    padding-top: 25px;
    height: 0;
    margin: 0 auto;
}

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

/* Hidden Content Holders */
.gridder-content {
    display: none;
}


/* Expanded Content */
.gridder-expanded-content {
    padding-left: 10px;
    padding-right: 10px;
}

/* NOTE: hack to remove negative margins -- .row's typically should contain .col's */
.gridder-expanded-content > .row {
    margin-left: 0;
    margin-right: 0;
}

/* Navigation - Arrows */
.gridder-nav {
    font-size: 0;
    color: #686868;
    transition: none;
}

.gridder-nav:hover,
.gridder-nav:active,
.gridder-nav:focus {
    color: #fff;
}

.gridder-nav.prev:before,
.gridder-nav.next:before {
    width: 40px;
    height: 99px;
    font-size: 40px;
    position: absolute;
    top: 50%;
    cursor: pointer;
}

.gridder-nav.prev:before {
    content: "\25C0";
    left: 15px;
}

.gridder-nav.next:before {
    content: "\25b6";
    right: 20px;
}

/* Navigation - Close Button */
.gridder-close {
    width: 25px;
    height: 25px;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 0;
}

.gridder-close::before,
.gridder-close::after {
    content: '';
    position: absolute;
    width: 100%;
    top: 50%;
    right: 3%;
    height: 2px;
    background: #686868;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.gridder-close::after {
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.gridder-close:hover::before,
.gridder-close:hover::after {
    background: #fff;
}


/**
 * wagtailgridder
 * --------------
 * Additional Page Styles
 */

#wg-content-container {
    margin-top: 20px;
}

/* Top Hero Section */
#wg-hero {
    margin-bottom: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

#wg-hero .container {
    position: relative;
}

#wg-hero .row,
#wg-hero [class*="col-"] {
    margin-bottom: 0;
}

#wg-hero,
.wg-hero-details,
.wg-hero-featured {
    height: 450px;
}

.wg-hero-details,
.wg-hero-featured {
    padding-top: 40px;
    color: #fff;
}

.wg-hero-details .wg-logo {
    display: block;
    margin-bottom: 1em;
}

@media (max-width: 991px) {
    .wg-hero-details {
        padding-top: 20px;
    }

    .wg-hero-details .wg-logo {
        margin-left: auto;
        margin-right: auto;
    }
}

.wg-hero-featured h6 {
    margin-top: 1em;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

/* Featured Tools */
.wg-featured-tool {
    position: relative;
    margin-bottom: 2em;
    border: 4px solid #fff;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.wg-featured-tool a.tool-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.0) 75%);
    text-decoration: none;
    color: #fff;
}

.wg-featured-tool a.tool-overlay:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.wg-featured-tool a.tool-overlay .tool-title span {
    text-shadow: 0 1px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid transparent;
}

.wg-featured-tool a.tool-overlay:hover .tool-title span {
    border-bottom: 1px solid #fff;
}

.wg-featured-tool a.tool-overlay,
.wg-featured-tool a.tool-overlay .tool-title span {
    transition: all 0.5s ease;
}

/* Navbars */
#catalog-views {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 1px;
}

#catalog-views .nav-tabs {
    border-bottom: none;
}

#catalog-views .nav-tabs .nav-item .fa {
    font-size: 14px
}


/**
 * Catalog Tools
 * -------------
 * Card Content Styles
 */

.catalog-tools .main-section .row {
    margin-bottom: 30px;
}

.catalog-tools .catalog-title {
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
}

.catalog-tools .list-group-item {
    margin: 0;
    padding: 0;
    border: 0;
}

.catalog-tools .tool-img {
    height: 125px;
}

.catalog-tools .tool-body {
    position: relative;
    padding: 10px 20px;
}

.catalog-tools .tool-body + .btn-block {
    position: absolute;
    bottom: 0;
}

.catalog-tools .tool-body ul {
    margin-left: 15px;
}

.catalog-tools .tool-body p,
.catalog-tools .tool-body li {
    font-size: 12px;
    line-height: 18px;
}

.catalog-tools .tool-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.catalog-tools .content-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 15px;
}


@media (max-width: 767px) {

    #catalog-views .nav-item {
        display: table-cell;
        width: 50%;
        height: 50px;
        float: none;
        text-align: center;
    }

    #catalog-views .nav-link {
        display: block
    }

    #wg-horizontal-filters {
        display: none;
    }

    #wg-horizontal-filters .btn {
        display: none;
    }


    #wg-vertical-filters {
        display: block;
    }

    #wg-vertical-filters .btn {
        width: 100%
    }

    #wg-grid-item-content {
        padding: 10px 20px 10px 20px
    }
}

@media (min-width: 768px) {
    #wg-horizontal-filters {
        display: block;
    }

    #wg-horizontal-filters .btn {
        margin: 0 !important;
    }

    #wg-vertical-filters {
        display: none;
    }

}
