
figure[data-has-hover]{
    overflow:hidden;
    position: relative;
    text-align: center;
}

figure[data-has-hover]:hover>img.hoverimage,figure[data-has-hover]>a:hover>img.hoverimage{
    opacity: 1!important;
}

figure[data-has-hover]:hover>img:not(.hoverimage),figure[data-has-hover]>a:hover>img:not(.hoverimage){
    opacity: 0;
}

figure[data-has-hover] img{
    display: inline-block!important;
    transition: all 0.4s;
    -o-transition: all 0.4s;
    -moz-transition: all 0.4s;
    -webkit-transition: all 0.4s;
}

figure[data-has-hover] img.hoverimage{
    position: absolute;
    width: auto!important;
    height: auto!important;
    max-width: 100%!important;
    max-height: 100%!important;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -webkit-transform: translate(-50%,-50%);
    opacity: 0;
}

.ce_hover-box{
    position: relative;
    height: auto;
    margin-top: 0!important;
}

.ce_hover-box::after{
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    display: block;
    border: 2px solid #000;
    pointer-events:none;
    border-color: transparent!important;
}

.ce_hover-box::before{
    content: '';
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    margin-top: 15px;
    margin-bottom: 15px;
}

.ce_hover-box>.content{
    position: absolute;
    /*top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;*/
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*width: 100%;
    height: 100%;*/
    overflow: hidden;
}

.ce_hover-box .image_title{
    position: absolute;
    z-index: 3;
    top: 15px;
    left: 15px;
    margin-top: 0!important;
}
.ce_hover-box .hovercolour, .ce_hover-box .hoverimage{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: 0.4s opacity;
    -o-transition: 0.4s opacity;
    -moz-transition: 0.4s opacity;
    -webkit-transition: 0.4s opacity;
    backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.ce_hover-box .content img{
    width: 100%!important;
    height: auto!important;
    max-width: none!important;
    max-height: none!important;
    min-width: 100%;
    min-height: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -webkit-transform: translate(-50%,-50%);
}

.ce_hover-box:hover .hovercolour, .ce_hover-box:hover .hoverimage{
    opacity: 1;
}

.ce_hover-box .content::before,
.ce_hover-box .content>a::before{
    content: '';
    display: inline-block;
    height: 100%;
    width: 0;
    vertical-align: middle;
    margin-right: -0.3em;
    visibility: hidden;
    opacity: 0;
    text-decoration: none;
}

.ce_hover-box .ce_text, .ce_hover-box .content>a, .ce_hover-box .content>figure{
    position: relative;
    width: 100%;
    display: inline-block;
    vertical-align: middle;
}

.ce_hover-box .content>figure{
    height: 100%;
}

.ce_hover-box .content>a,
.ce_hover-box .content>a:hover{
    height: 100%;
    text-decoration: none;
    color: inherit!important;
}

.ce_hover-box .ce_text{
    padding-left: 15px;
    padding-right: 15px;
}

.ce_hover-box.hover_invisible .content .ce_text,
.ce_hover-box.hover_invisible .content img:not(.hoverimage){
    opacity: 1;
    transition: 0.4s opacity;
    -o-transition: 0.4s opacity;
    -moz-transition: 0.4s opacity;
    -webkit-transition: 0.4s opacity;
}

.ce_hover-box.hover_invisible:hover .content .ce_text,
.ce_hover-box.hover_invisible:hover .content img:not(.hoverimage){
    opacity: 0;
}