/* Hexagons */

#hexGrid {
  padding-left: 0px;
  overflow: hidden;
  width: 85%;
  margin: 0 auto;
  font-size: 15px;
  transform: rotate(90deg);
}

#hexGrid:after {
  content: "";
  display: block;
  clear: both;
}

.hex {
  position: relative;
  list-style-type: none;
  float: left;
  overflow: hidden;
  visibility: hidden;
  outline: 1px solid transparent;  /* fix for jagged edges in FF on hover transition */
  transform: rotate(-60deg) skewY(30deg) ;
}

.hex * {
  position: absolute;
  visibility: visible;
  outline: 1px solid transparent;  /* fix for jagged edges in FF on hover transition */
}

.hexIn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
  overflow: hidden;
  transform: skewY(-30deg) rotate(60deg);
  padding: 10px;
  transition: all 0.3s ease;
}

.hexIn:hover{
  /* background-color: #d20e2f; */
  background-color: #F0405D;
}

.hexIn.color_1:hover{
  background-color: #F98946;
}

.hexIn img{
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.hexIn:hover img{
  transform: rotateY(360deg);
}

.hexIn img{
    width: 50px;
    height: 50px;
    position: relative;
    margin-bottom: 10px;
}

.hexIn p{
  position: relative;
  margin-bottom: 0;
  font-weight: 600;
  width: 150px;
  color: #ffffff;
}

.hexIn p.word_break{
  max-width: 95px;
}

.hexIn .rotate{
  transform: rotate(270deg);
}

/*** HEX CONTENT **********************************************************************/

/*** SPACING AND SIZING *****************************************************************/

@media (min-width:461px) {  /* <- 2-3  hexagons per row */
  .hex {
    width: 32.666%;    /* = (100-2) / 3 */
    padding-bottom: 37.720%;    /* =  width / sin(60) */
  }
  .hex:nth-child(5n+1),
  .hex:nth-child(5n+2) {
    transform: translateX(50%) rotate(-60deg) skewY(30deg);
  }
  .hex:nth-child(5n+3),
  .hex:nth-child(5n+4),
  .hex:nth-child(5n+5) {
    margin-top: -8.564%;
    margin-bottom: -8.564%;
  }
  .hex:nth-child(5n+2),
  .hex:nth-child(5n+4) {
    margin-right: 1%;
    margin-left: 1%;
  }
  .hex:nth-child(5n+1) {
    margin-left: 0.5%;
  }
  .hex:nth-child(5n+3),
  .hex:nth-child(5n+6) {
    clear: left;
  }
}

@media (max-width: 460px) {  /* <- 1-2  hexagons per row */
  .hex {
    width: 49.5%;    /* = (100-1) / 2 */
    padding-bottom: 57.158%;    /* =  width / sin(60) */
  }
  .hex:nth-child(3n+1) {
    transform: translateX(50%) rotate(-60deg) skewY(30deg);
  }
  .hex:nth-child(3n+2),
  .hex:nth-child(3n+3) {
    margin-top: -13.423%;
    margin-bottom: -13.423%;
  }
  .hex:nth-child(3n+1) {
    margin-left: 0.5%
  }
  .hex:nth-child(3n+3) {
    margin-left: 1%;
  }
  .hex:nth-child(3n+2),
  .hex:nth-child(3n+4) {
    clear: left;
  }
}

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