
:root {
  --cell-width: 182px;
  --cell-flex-basis: 190px;
  --cell-height: 110px;
  --cell-margin-top: 60px;
  --cell-margin-bottom: 15px;
  --cell-margin-horizontal: 12.5px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.honeycomb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  transform: translateY(calc(0.25 * var(--cell-height)));
}

.honeycomb-cell {
  flex: 0 1 var(--cell-flex-basis);
  max-width: var(--cell-width);
  height: var(--cell-height);
  margin: var(--cell-margin-top) var(--cell-margin-horizontal) var(--cell-margin-bottom);
  position: relative;
  padding: 0.5em;
  text-align: center;
  z-index: 1;
}

.honeycomb-cell__title {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-hyphens: auto;
      -ms-hyphens: auto;
          hyphens: auto;
  word-break: break-word;
  text-transform: uppercase;
  color: #fff;
  font-weight: 600;
  font-size: 1em;
  opacity: 0;
  transition: opacity 350ms;
}

.honeycomb-cell__title > small {
  font-weight: 300;
  margin-top: 0.25em;
}

.honeycomb-cell__image {
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}

.honeycomb-cell::before, .honeycomb-cell::after {
  content: "";
}

.honeycomb-cell::before, .honeycomb-cell::after, .honeycomb-cell__image {
  top: -50%;
  left: 0;
  width: 100%;
  height: 200%;
  display: block;
  position: absolute;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
          clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: -1;
}

.honeycomb-cell::before {
  background: #fff;
  transform: scale(1.055);
}

.honeycomb-cell::after {
  background: #003c68;
  opacity: 0;
  transition: opacity 350ms;
}

.honeycomb-cell:hover .honeycomb-cell__title {
  opacity: 1;
}

.honeycomb-cell:hover::before {
  /* background: #ff9c33; */
  background: transparent;
}

.honeycomb-cell:hover::after {
  opacity: 0.5;
}

.honeycomb__placeholder {
  display: none;
  opacity: 0;
  width: var(--cell-width);
  margin: 0 var(--cell-margin-horizontal);
}

@media (max-width: 550px) {
  .honeycomb {
    max-width: 100%;
    overflow: hidden;
  }
  .honeycomb-cell {
    margin: calc(0.5 * var(--cell-height) + var(--cell-margin-horizontal)) calc(1.5 * var(--cell-margin-horizontal));
  }
}

@media (max-width: 380px) {
  :root {
    --cell-width: 140px;
    --cell-flex-basis: 145px;
    --cell-height: 85px;
    --cell-margin-top: 45px;
    --cell-margin-bottom: 12px;
    --cell-margin-horizontal: 6px;
  }
  .honeycomb-cell__title {
    font-size: 0.75em;
  }
}

@media (min-width: 550px) and (max-width: 825px) {
  .honeycomb-cell:nth-child(3n) {
    margin-right: calc(50% - var(--cell-width) / 2);
    margin-left: calc(50% - var(--cell-width) / 2);
  }

  .honeycomb__placeholder:nth-child(3n+5) {
    display: block;
  }
}

@media (min-width: 825px) and (max-width: 1100px) {
  .honeycomb-cell:nth-child(5n+4) {
    margin-left: calc(50% - (var(--cell-width) + 2 * var(--cell-margin-horizontal)));
  }

  .honeycomb-cell:nth-child(5n+5) {
    margin-right: calc(50% - (var(--cell-width) + 2 * var(--cell-margin-horizontal)));
  }

  .honeycomb__placeholder:nth-child(5n),
.honeycomb__placeholder:nth-child(5n+3) {
    display: block;
  }
}

@media (min-width: 1100px) {
  .honeycomb-cell:nth-child(7n+5) {
    margin-left: calc(50% - (1.5 * var(--cell-width) + 2 * var(--cell-margin-horizontal)));
  }

  .honeycomb-cell:nth-child(7n+7),
.honeycomb-cell:nth-child(7n+5):nth-last-child(2) {
    margin-right: calc(50% - (1.5 * var(--cell-width) + 2 * var(--cell-margin-horizontal)));
  }

  .honeycomb__placeholder:nth-child(7n+7),
.honeycomb__placeholder:nth-child(7n+9),
.honeycomb__placeholder:nth-child(7n+11) {
    display: block;
  }
}