body.ssa {
  position: fixed;
  top: 0;
  overflow: hidden;
}

body.ssa #swipebox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9009 !important;
  overflow-y: scroll;
  overflow-x: hidden;
}

body.ssa #swipebox-container {
  height: 87vh;
}

body.ssa #swipebox-close {
  right: 0;
}

body.ssa #swipebox-arrows {
  width: 100%;
}

body.ssa #swipebox-next {
  margin-right: 12px;
}

body.ssa .social_links {
  display: none;
}

body.ssa #swipebox-container #swipebox-slider .slide img {
  max-height: 77vh !important;
}

#single_gallery_rp {
  float: left;
  width: 100%;
  min-height: 100vh;
  position: relative;
  left: 0;
  bottom: 0;
  z-index: 9001;
  background: #f8f8ee;
  padding: 0 10px 20px 10px;
  color: #000;
}

#single_gallery_rp .posts {
  padding-top: 45px;
}

#load_gallery_posts {
  float: left;
  width: 100%;
  width: 100%;
  clear: left;
  text-align: center;
}

#load_gallery_posts a {
  display: inline-block;
  padding: 5px 20px;
  margin: 20px 0;
  line-height: 31px;
  position: relative;
  border: 1px solid #e5125c;
  color: #e5125c;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  text-transform: uppercase;
}

#load_gallery_posts a:hover {
  background: #e5125c;
  color: #fff;
}

#single_gallery_rp .top {
  float: left;
  background: #f8f8ee;
  width: 100%;
  position: relative;
  z-index: 9;
  padding: 15px 0;
  text-align: center;
}

#single_gallery_rp.fixed .top {
  position: fixed;
  top: 0;
  left: 0;
  padding: 15px 10px;
  width: 100%;
}

#single_gallery_rp .ssa_back,
#single_gallery_rp .top > span {
  color: #000;
  font-size: 18px;
  text-transform: uppercase;
}

#single_gallery_rp .ssa_back {
  float: left;
  font-size: 13px;
  text-transform: uppercase;
  margin-top: 5px;
}

#single_gallery_rp.fixed .ssa_back {
  position: absolute;
  left: 10px;
}

.ssa #swipebox-slider .slide {
  padding-right: 0;
}

.ssa #swipebox-bottom-bar {
  width: 100%;
}

.ssa #swipebox-prev {
  margin-left: 12px;
}

/* #single_gallery_rp.fixed {
  padding-top: 40px;
} */

.gallery_cat_post:hover {
  background: #eee;
  border-radius: 6px;
}

.gallery_cat_post h4 {
  display: block;
  margin: 5px;
  font-size: 16px;
  color: #010101;
  font-weight: 600;
  line-height: 125%;
}

.gallery_cat_post img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.gallery_cat_post .date {
  display: inline-block;
  margin: 5px 0 0 5px;
  color: #000;
  text-shadow: none;
}

.gallery_cat_post.gallery_ads {
  min-width: 296px;
  text-align: center;
}

.gallery_cat_post.gallery_ads img {
  width: auto;
  display: inline-block;
}

.gallery_cat_post.gallery_ads > div {
  display: inline-block;
}

.gallery_cat_post.gallery_ads > h6 {
  display: block;
  margin-bottom: 10px;
  text-align: center;
  font-size: 15px;
}

.gallery_cat_post .pr {
    position: absolute;
    top: -2px;
    left: 16px;
    width: 36px;
    height: 41px;
    background: #ef1f4d;
    opacity: 0.8;
    color: #fff;
    text-align: center;
    line-height: 46px;
    font-size: 20px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.88);
}

.gallery_cat_post:hover .pr {
  opacity: 1;
}

.ssa #swipebox-title {
  width: 100%;
}

.ssa #swipebox-bottom-bar {
  position: absolute;
  top: 50vh;
}

/* .single_gallery_sidebar {
  display: none;
} */

.grid-sizer {
  width: 10px;
}

.gallery_cat_post {
  float: left;
  width: calc(16.66% - 4px);
  min-width: 270px;
  margin: 5px 0;
  padding: 8px;
}

.gallery_cat_post.size_5,
.masonry .item.size_5 {
  width: calc(20% - 4px);
  border-radius: 8px;
  /* box-shadow: 0 1px 6px rgba(0,0,0,.3); */
  background-color: white;
}

.gallery_cat_post.size_4,
.masonry .item.size_4 {
  width: calc(25% - 4px);
  border-radius: 8px;
  /* box-shadow: 0 1px 6px rgba(0,0,0,.3); */
  background-color: white;
  height: auto;
}

.gallery_cat_post.size_3,
.masonry .item.size_3 {
  width: calc(33.33% - 4px);
}

.gallery_cat_post.size_2,
.masonry .item.size_2 {
  width: calc(50% - 4px);
  min-width: auto;
  padding: 3px;
  margin: 2px 0;
}

.gallery_cat_post.size_1,
.masonry .item.size_1 {
  width: 100%;
  min-width: auto;
  padding: 3px;
  margin: 2px 0;
}

/* grid - 420x370 */
.grid_1 img {
  max-height: 280px;
}
.grid_2 img {
  max-height: 380px;
}
.grid_3 img {
  max-height: 320px;
}
.grid_4 img {
  max-height: 230px;
}
.grid_5 img {
  max-height: 250px;
}
.grid_6 img {
  max-height: 300px;
}
.grid_7 img {
  max-height: 600px;
}
.grid_8 img {
  max-height: 250px;
}
.grid_9 img {
  max-height: 340px;
}
.grid_10 img {
  max-height: 300px;
}

/* NEW code */
#category_gallery_sa {
  float: left;
  width: 100%;
  padding: 0 12px;
}

#category_gallery_sa .posts {
  float: left;
  width: 100%;
}

#category_gallery_sa h4 {
  float: left;
  width: 100%;
  margin: 20px 0;
  color: #000;
  font-size: 18px;
  text-transform: uppercase;
  text-align: center;
}

.back-to-top {
  position: fixed;
  display: none;
  background: #e94c3c;
  color: #fff;
  width: 44px;
  height: 44px;
  text-align: center;
  font-size: 28px;
  right: 15px;
  bottom: 15px;
  z-index: 11;
  line-height: 42px;
}

.single-post #load_gallery_posts a {
  display: none;
}

/* .masonry {
  column-count: 4;
  column-gap: 10;
}

.masonry .item {
  position: relative;
  counter-increment: item-counter;
  margin-bottom: 20px;
}

.masonry .item img {
  display: block;
  width: 100%;
  height: auto;
	border-radius: 12px;
}

.masonry .item span {
	line-height: 110%;
	color: #000;
	font-size: 14px;
}

.masonry .item a:hover span {
	text-decoration: underline;
} */


.masonry {
  float: left;
  width: 100%;
  display: block;
}

.masonry .item {
  float: left;
  margin: 5px 0;
  padding: 8px;
  box-shadow: none;
}

.masonry .item img {
  display: block;
  width: 100%;
  height: auto;
	border-radius: 12px;
}

.masonry .item span {
	line-height: 110%;
	color: #000;
	font-size: 14px;
}

.masonry .item a:hover span {
	text-decoration: underline;
}

#load_gallery_thumbnails {
  float: left;
  width: 100%;
  clear: left;
}

#gallery_section .col-sm-12 {
  flex-basis: 100%;
  max-width: 100%;
}

body.single-post #category_gallery_sa,
body.single-post #gallery_section .col-sm-12 {
  padding: 0;  
}

@media (max-width: 1024px) {
  .masonry {
    column-count: 3;
  }
}

@media  (max-width: 48em) {
  .masonry {
    column-count: 2;
  }
}
