/* Hexagons */
#hexGrid {
  overflow: hidden;
  width: 90%;
  margin: 0 auto;
  padding: 0.866% 0;
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
}

#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(-30deg) skewY(30deg) translatez(-1px);
}

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

.hexIn {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
  overflow: hidden;
  transform: skewY(-30deg) rotate(60deg);
}


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

.hex img {
  left: -100%;
  right: -100%;
  width: auto;
  height: 100%;
  margin: 0 auto;
}

.hex h1,
.hex p {
  margin: 0;
  width: 102%;
  left: -1%;  /* prevent line on the right where background doesn't cover image */
  padding: 5%;
  box-sizing: border-box;
/*  background-color: rgba(0, 128, 128, 0.8);*/
  font-weight: 300;
/*  transition: transform .2s ease-out, opacity .3s ease-out;*/
  transform: rotate(-30deg) skewY(0deg) translatez(-1px);
}

.hex h1 {
  padding-top: 80%;
  font-size: 1.2em;
  z-index: 1;
/*  transform: translateY(-100%) translatez(-1px);*/
}

.hex h1:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 45%;
  width: 10%;
  text-align: center;
  border-bottom: 1px solid #fff;
}

.hex p {
  top: 50%;
  padding-bottom: 50%;
  transform: translateY(100%) translatez(-1px);
}
.hexcontentbruchers{
  position: absolute;
  content: "";
  clip-path: circle(50% at 50% 50%);
  height: 133px;
  width: 132px;
  background: url(../images/book-library-with-open-textbookone.png) no-repeat 50% 50%;
  z-index: 51;
  left: 0;
  right: 0;
  margin: auto;
  margin-top: 20%;
  margin-left:22%;
}


/*** HOVER EFFECT  **********************************************************************/

.hexIn:hover h1, .hexIn:focus h1, .hexIn:hover p, .hexIn:focus p {
  transform: rotate(-30deg) skewY(0deg) translateY(0%) translatez(-1px);
}


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

@media (min-width:1001px) {  /* <- 2-3  hexagons per row */
  .hex {
    width: 20.25%;    /* = (100-2) / 3 */
    padding-bottom: 23.07%;    /* =  width / sin(60) */
  }
  .hex:nth-child(5n+1),
  .hex:nth-child(5n+2) {
    transform: translateX(50%) rotate(-30deg) skewY(30deg);
  }
  .hex img {
      transform: rotate(-30deg);
  }
  .hex:nth-child(1)
  {
    margin-left:10.5%;
    margin-bottom: -20%;
  }
  .hex:nth-child(2)
  {
    margin-left:17%;
    margin-bottom: -12%;
  }
  .hex:nth-child(3)
  {
    margin-left:2%;
    margin-bottom: -9%;
  }
  .hex:nth-child(6)
  {
    margin-left:10.5%;
    margin-top: -13%;
  }
  .hex:nth-child(7)
  {
    margin-left:17%;
    margin-top: -13%;
  }
  .hex:nth-child(5n+4),
  .hex:nth-child(5n+5)
  {
    margin-left:17%;
  }
/*
  .hex:nth-child(5n+3),
  .hex:nth-child(5n+4),
  .hex:nth-child(5n+5) {
    margin-top: -4.564%;
    margin-bottom: -4.564%;
    margin-left:10%;
  }
  .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: 1000px) {  /* <- 1-2  hexagons per row */
  .hex {
    width: 39.5%;    /* = (100-1) / 2 */
    padding-bottom: 47.158%;    /* =  width / sin(60) */
    transform: translateX(50%) rotate(-60deg) skewY(30deg);
  }
  .hex img {
      transform: rotate(0deg);
  }
.hex h1 {
  padding-top: 80%;
  font-size: 1.5em;
  z-index: 1;
  transform: rotate(0deg);
}
  .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(1) {
    margin-left: 10%;
    margin-bottom:2%;
  }
  .hex:nth-child(2) {
    margin-left: -10%;
  }
  .hex:nth-child(4) {
    margin-left: 11%;
    margin-top:2%;
    margin-bottom:2%;
  }
  .hex:nth-child(5) {
    margin-left: -8%;
  }
  .hex:nth-child(7) {
    margin-left: 13%;
    margin-top:2%;
    margin-bottom:2%;
  }
  .hex:nth-child(3n+2),
  .hex:nth-child(3n+4) {
    clear: left;
  }
.hexcontentbruchers{
  position: absolute;
  content: "";
  clip-path: circle(50% at 50% 50%);
  height: 153px;
  width: 152px;
  background: url(../images/book-library-with-open-textbookone.png) no-repeat 50% 50%;
  z-index: 51;
  left: 0;
  right: 0;
  margin: auto;
  margin-top: 20%;
}
}

@media (max-width: 1000px) {
  .hex h1 {
    padding-top: 70%;
    font-size: 1.0em;
    z-index: 1;
  /*  transform: translateY(-100%) translatez(-1px);*/
  }
  .contentbruchers{
    height: 53px;
    width: 52px;
  }
}

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

/* End Hexagons */


.hexclippathadd{
  position: relative;
}
