

#hexGrid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    overflow: hidden;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    list-style-type: none;
}

.hex {
    position: relative;
    visibility:hidden;
    outline:1px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hex::after{
    content:'';
    display:block;
    padding-bottom: 86.602%;  /* =  100 / tan(60) * 1.5 */
}
.hexIn{
    position: absolute;
    width:96%;
    padding-bottom: 110.851%; /* =  width / sin(60) */
    margin:0 2%;
    overflow: hidden;
    visibility: hidden;
    outline:1px solid transparent; /* fix for jagged edges in FF on hover transition */
    -webkit-transform: rotate3d(0,0,1,-60deg) skewY(30deg);
    -ms-transform: rotate3d(0,0,1,-60deg) skewY(30deg);
    transform: rotate3d(0,0,1,-60deg) skewY(30deg);
}
.hexIn * {
    position: absolute;
    visibility: visible;
    outline:1px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hexLink {
    display:block;
    width: 100%;
    height: 100%;
    text-align: center;
    color: #fff;
    overflow: hidden;
    -webkit-transform: skewY(-30deg) rotate3d(0,0,1,60deg);
    -ms-transform: skewY(-30deg) rotate3d(0,0,1,60deg);
    transform: skewY(-30deg) rotate3d(0,0,1,60deg);
}

/*** HEX CONTENT **********************************************************************/
.hex img {
    left: -100%;
    right: -100%;
    width: auto;
    height: 100%;
    margin: 0 auto;
    -webkit-transform: rotate3d(0,0,0,0deg);
    -ms-transform: rotate3d(0,0,0,0deg);
    transform: rotate3d(0,0,0,0deg);
}

.hexDiv {
    width: 100%;

    box-sizing:border-box;
    background-color: rgba(0, 128, 128, 0.8);
    font-weight: 300;
    -webkit-transition:  -webkit-transform .2s ease-out, opacity .3s ease-out;
    transition:          transform .2s ease-out, opacity .3s ease-out;
}
.hexDiv {
    padding-top:10%;
    height: 100%;
    margin: 0;
    z-index: 1;
    -webkit-transform:translate3d(0,-100%,0);
    -ms-transform:translate3d(0,-100%,0);
    transform:translate3d(0,-100%,0);
}




/*** HOVER EFFECT  **********************************************************************/
.hexLink:hover .hexDiv, .hexLink:focus .hexDiv{
    -webkit-transform:translate3d(0,0,0);
    -ms-transform:translate3d(0,0,0);
    transform:translate3d(0,0,0);
}

/*** HEXAGON SIZING AND EVEN ROW INDENTATION *****************************************************************/

@media(max-width:550px){
    .hexTitle{
        position: initial;
        width:100%;
        font-size: 16px;
        margin:4vw 0 0 0 !important;
    }
    .hexContent{
        font-size: 9px;
        line-height: 110%;

    }

}

@media(min-width:551px) and (max-width:767px){
    .hexTitle{
        position: initial;
        width:100%;
        font-size: 17px;
        margin:5vw 0 3vw 0 !important;
    }
    .hexContent{
        font-size: 10px;
        line-height: 120%;

    }

}

@media (min-width:768px) and (max-width:1023px){
    .hexTitle{
        position: initial;
        width:100%;
        font-size: 18px;
        margin:3vmin 0 0 0 !important;
    }
    .hexContent{
        font-size: 9px;
        line-height: 110%;

    }

}

@media (min-width:1024px) and (max-width:1279px){

    .hexTitle{
        position: initial;
        width:100%;
        font-size: 20px;
        margin:1.5vmin 0 0 0 !important;
    }
    .hexContent{
        font-size: 13px;
        line-height: 110%;

    }
}

@media (min-width:1280px)and (max-width:1439px){

    .hexTitle{
        position: initial;

        width:100%;
        font-size: 30px;
        margin:3vmin 0 0 0 !important;
    }
    .hexContent{
        font-size: 15px;
        line-height: 120%;

    }
}
@media (min-width:1440px){

    .hexTitle{
        position: initial;

        width:100%;
        font-size: 33px;
        margin:3vmin 0 0 0 !important;
    }
    .hexContent{
        font-size: 17px;
        line-height: 120%

    }
}



@media (min-width:768px) { /* <- 3-2  hexagons per row */
    #hexGrid{
        padding-bottom: 7.4%;
        width:70%;
    }
    .hex {
        width: 33.333%; /* = 100 / 3 */
    }
    .hex:nth-child(5n+4){ /* first hexagon of even rows */
        margin-left:16.666%;  /* = width of .hex / 2  to indent even rows */
    }


}

@media (max-width: 767px) { /* <- 2-1  hexagons per row */
    #hexGrid{
        padding-bottom: 11.2%;
        width:100%;
    }
    .hex {
        width: 50%; /* = 100 / 3 */
    }
    .hex:nth-child(3n+1){ /* first hexagon of even rows */
        margin-left:25%;  /* = width of .hex / 2  to indent even rows */
    }

}

@media (max-width: 400px) {
    #hexGrid {
        font-size: 13px;
    }
}

