/*
 * @package themecentury
 * @subpackage slain
 * @since 1.0.0
 */

/*--------------------------------------------------------------
12.0 Default Gallery
--------------------------------------------------------------*/

.gallery {
  margin-bottom: 10px;
  overflow: hidden;
  list-style: none !important;
}

.gallery-caption,
.wp-caption-text {
  padding: 10px;
  border-width: 1px;
  border-style: solid;
  border-top: 0;
}

.gallery-item {
  display: inline-block;
  vertical-align: top;
  padding: 0 !important;
  margin-right: 5px;
  margin-bottom: 5px; 
  text-align: center;
}

.gallery-columns-1 .gallery-item {
  float: none !important;
  width: 100%;
}

.gallery-columns-2 .gallery-item {
  width: -webkit-calc((100% - (5px * 1)) / 2 - 1px);
  width: calc((100% - (5px * 1)) / 2 - 1px);
}

.gallery-columns-3 .gallery-item {
  width: -webkit-calc((100% - (5px * 2)) / 3 - 1px);
  width: calc((100% - (5px * 2)) / 3 - 1px);
}

.gallery-columns-4 .gallery-item {
  width: -webkit-calc((100% - (5px * 3)) / 4 - 1px);
  width: calc((100% - (5px * 3)) / 4 - 1px);
}

.gallery-columns-5 .gallery-item {
  width: -webkit-calc((100% - (5px * 4)) / 5 - 1px);
  width: calc((100% - (5px * 4)) / 5 - 1px);
}

.gallery-columns-6 .gallery-item {
  width: -webkit-calc((100% - (5px * 5)) / 6 - 1px);
  width: calc((100% - (5px * 5)) / 6 - 1px);
}

.gallery-columns-7 .gallery-item {
  width: -webkit-calc((100% - (5px * 6)) / 7 - 1px);
  width: calc((100% - (5px * 6)) / 7 - 1px);
}

.gallery-columns-8 .gallery-item {
  width: -webkit-calc((100% - (5px * 7)) / 8 - 1px);
  width: calc((100% - (5px * 7)) / 8 - 1px);
}

.gallery-columns-9 .gallery-item {
  width: -webkit-calc((100% - (5px * 8)) / 9 - 1px);
  width: calc((100% - (5px * 8)) / 9 - 1px);
}

.gallery-columns-2 .gallery-item:nth-child(2n+2),
  .gallery-columns-3 .gallery-item:nth-child(3n+3),
  .gallery-columns-4 .gallery-item:nth-child(4n+4),
  .gallery-columns-5 .gallery-item:nth-child(5n+5),
  .gallery-columns-6 .gallery-item:nth-child(6n+6),
  .gallery-columns-7 .gallery-item:nth-child(7n+7),
  .gallery-columns-8 .gallery-item:nth-child(8n+8),
  .gallery-columns-9 .gallery-item:nth-child(9n+9) {
    margin-right: 0 !important;
  }

  .gallery-columns-2 .gallery-item:nth-child(2n+2) + li,
  .gallery-columns-3 .gallery-item:nth-child(3n+3) + li,
  .gallery-columns-4 .gallery-item:nth-child(4n+4) + li,
  .gallery-columns-5 .gallery-item:nth-child(5n+5) + li,
  .gallery-columns-6 .gallery-item:nth-child(6n+6) + li,
  .gallery-columns-7 .gallery-item:nth-child(7n+7) + li,
  .gallery-columns-8 .gallery-item:nth-child(8n+8) + li,
  .gallery-columns-9 .gallery-item:nth-child(9n+9) + li {
    clear: both;
  }