#reference-items .img-thumbnail {
    margin-bottom: 15px;
}

#reference-filter-form {
    background-color: #f0f1f5;
    padding: 20px;
    margin-bottom: 35px;
    border-radius: 4px;
}

#reference-filter-form label.control-label {
display: block;
float: none;
width: 100%;
}

#reference-filter-form #edit-reset {
margin-top: 10px;
}
#full-width #reference-items .img-thumbnail {
margin: 0;
}


figure {
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
}

figure:hover figcaption {
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
    filter: alpha(opacity=100);
    opacity: 1;
    top: 0;
}

figcaption {
  position: absolute; 
  /* position: relative; */

  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: rgb(0,0,0,0.75);
  color: #fff;
}

figure img {
  -webkit-transition: all 1.5s;
  -moz-transition: all 1.5s;
  -o-transition: all 1.5s;
  -ms-transition: all 1.5s;
  transition: all 1.5s;
  /* -webkit-transition-delay: .5s;
  -moz-transition-delay: .5s;
  -o-transition-delay: .5s;
  -ms-transition-delay: .5s;
  transition-delay: .5s; */
}

/* figure:hover img {
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -o-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
} */

figcaption h3 {
    font-family: 'Open sans';
    font-weight: 400;
    color: #f3b204;
    padding: 10px 20px;
    margin-bottom: 0;
    position: relative;
    right: 100%;
    margin-top: 37px;
    font-size: 30px;
}

figcaption p {
    font-family: 'Open sans';
    padding: 10px 20px;
    margin-bottom: 0;
    margin-top: 20px;
    position: relative;
    /* left: 100%; */
    font-size: 20px;
}

figure:hover h3,figure:hover p {
    left: 0;
}

figcaption a { 
  color: #fff;

  text-decoration: none; 
}

figcaption a:hover {
  color: #eeeeee;
  text-decoration: none;    
}

/* Denys */

input.visually-hidden {
	position: absolute!important;
	width: 1px!important; 
	height: 1px!important; 
	padding: 0!important;
	
	border: 0!important;
	clip: rect(1px, 1px, 1px, 1px)!important;
	clip: rect(1px 1px 1px 1px)!important;

	overflow: hidden!important;
}

.reference-filter-counter {
  display: none;
}


#reference .filter-title {
  display: none;
  margin-bottom: 50px;

  text-align: center;
}

#edit-category-filter {
  position: relative;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.category-label {
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
}

.label-checkbox-anim {
  position: absolute;
  top: 7px;
  left: 0px;

  display: inline-block;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  margin-right: 10px;

  background: white;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  vertical-align: middle;
  
  transition: border 0.3s ease;
}

#reference .category-label i.icon {
  color: transparent;
  
  opacity: 0.2;
  
  transition: opacity 0.3s 0.1s ease;
  -webkit-text-stroke: 3px rgba(0, 0, 0, 0.5);
}

#reference .form-checkbox:checked + .category-label i.icon {
  color: #ffffff;
  
  opacity: 0.2;
  
  transition: opacity 0.3s 0.1s ease;
  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.5);
}

#reference .checkbox-wrapper:hover i.icon {
  color: #009ee0;
  
  opacity: 1;
  
  transition: opacity 0.3s 0.1s ease;
  -webkit-text-stroke: 3px rgba(0, 158, 224, 0.6);
}

#reference .checkbox-wrapper:hover .label-checkbox-anim {
  border: 5px solid rgba(255, 255, 255, 0.2);
}

.form-checkbox:focus + .category-label .label-checkbox-anim {
  box-shadow: 0 0 0 3px rgba(0, 158, 224, 0.5);
}

.form-checkbox:checked + .category-label .checkbox-wrapper:hover .label-checkbox-anim,
.form-checkbox:checked:focus + .category-label .label-checkbox-anim {
  box-shadow: 0 0 0 4px #4f4c4c;

  transition: 0.4s;
}

.form-checkbox:checked + .category-label .label-checkbox-anim {
  -webkit-animation: check 0.5s cubic-bezier(0.895, 0.03, 0.685, 0.22) forwards;
          animation: check 0.5s cubic-bezier(0.895, 0.03, 0.685, 0.22) forwards;
}

.form-checkbox:checked + .category-label .label-checkbox-anim .icon {
  opacity: 1;
  -webkit-transform: scale(0);
          transform: scale(0);
  -webkit-animation: icon 0.3s cubic-bezier(1, 0.008, 0.565, 1.65) 0.1s 1 forwards;
          animation: icon 0.3s cubic-bezier(1, 0.008, 0.565, 1.65) 0.1s 1 forwards;

  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.5);
}

@-webkit-keyframes icon {
  from {
    opacity: 0;
    -webkit-transform: scale(0.3);
            transform: scale(0.3);
  }
  to {
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}

@keyframes icon {
  from {
    opacity: 0;
    -webkit-transform: scale(0.3);
            transform: scale(0.3);
  }
  to {
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}

@-webkit-keyframes check {
  0% {
    width: 1.5em;
    height: 1.5em;
    border-width: 5px;
  }
  10% {
    width: 1.5em;
    height: 1.5em;
    opacity: 0.1;
    background: rgba(0, 0, 0, 0.2);
    border-width: 15px;
  }
  12% {
    width: 1.5em;
    height: 1.5em;
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.1);
    border-width: 0;
  }
  50% {
    width: 2em;
    height: 2em;
    background: #009ee0;
    border: 0;
    opacity: 0.6;
  }
  100% {
    width: 2em;
    height: 2em;
    background: #009ee0;
    border: 0;
    opacity: 1;
  }
}

@keyframes check {
  0% {
    width: 1.5em;
    height: 1.5em;
    border-width: 5px;
  }
  10% {
    width: 1.5em;
    height: 1.5em;
    opacity: 0.1;
    background: rgba(0, 0, 0, 0.2);
    border-width: 15px;
  }
  12% {
    width: 1.5em;
    height: 1.5em;
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.1);
    border-width: 0;
  }
  50% {
    width: 2em;
    height: 2em;
    background: #009ee0;
    border: 0;
    opacity: 0.6;
  }
  100% {
    width: 2em;
    height: 2em;
    background: #009ee0;
    border: 0;
    opacity: 1;
  }
}

#reference {
  position: relative;
}

#edit-reset {
  position: absolute;
  top: 35px;
  right: 25px;

  color: #ffffff;

  background: #8c1718;
}

#reference-filter-form {
  padding: 20px 20px 0;

  background: none;
  border-bottom: 4px solid #f0f1f5;
}

.checkbox-wrapper {
  position: relative;

  padding: 10px 10px 10px 50px;

  cursor: pointer;
}

#reference figure .img-fluid {
  width: 100%;
}


.block-reference .show-detail-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;

  padding: 5px 10px;
  margin: 0 auto 30px!important;

  color: #ffffff;

  background: #8c1718;
  border-radius: 4px;

  transform: translate(-50%);
}

.block-reference .show-detail-btn:hover,
.block-reference .show-detail-btn:focus {
  color: #eeeeee;
}

.block-reference figcaption li {
  text-transform: capitalize;
}

.block-reference p {
  padding: 0;
  margin: 40px auto 0;

  text-align: center;
}

.reference-overlay-img img {
  width: 100%;
  height: auto;
}

.reference-overlay-img {
  max-width: 45%;
  /* height: 54px; */
  margin: 20px auto 0;
}

.page-reference #edit-category-filter .form-item:not(:last-child) {
  margin-right: 50px;
}

.galleries h3 a {
  display:block;
  padding:24px 24px;
  border-radius: 5px;
  background-color: #f0f1f5;
  color: #000;
  text-decoration: none;
  font-weight: 300;
}

.galleries h3 a:hover {
  background-color: #8c1718;
  color: #fff;
}

/* @media (max-width: 575px) {
  #edit-category-filter .category-label {
    justify-content: flex-start;
    margin-left: 50px;
  }

  #edit-category-filter .form-item {
    width: 100%;
  }
} */

.carousel-inner .carousel-item-right.active,
.carousel-inner .carousel-item-next {
  transform: translateX(33.33%);
}

.carousel-inner .carousel-item-left.active, 
.carousel-inner .carousel-item-prev {
  transform: translateX(-33.33%);
}
  
.carousel-inner .carousel-item-right,
.carousel-inner .carousel-item-left{ 
  transform: translateX(0);
}

.carousel-item.active,
.carousel-item-next {
  display: flex!important;
}

/* Custom controls */

.carousel-control-prev,
.carousel-control-next {
  display: flex;
  align-items: center;

  width: 50px!important;
}

.carousel-control-prev {
  left: auto;
  right: 100%;
}

.carousel-control-next {
  left: 100%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 40px;
  height: 40px;

  background: none;
  border: 3px solid #828282;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 4px;
}

.carousel-control-prev-icon {
  transform: rotate(-135deg);
}

.carousel-control-next-icon {
  transform: rotate(45deg);
}

@media (max-width: 767px) {
  #recipeCarousel {
    max-width: 80%;
    margin: 0 auto;
  }

  .carousel-item img {
    min-width: 100%!important;
    /* margin: 0 auto; */
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 20px!important;
    height: 20px!important;
  }

  .carousel-inner .carousel-item-right.active,
  .carousel-inner .carousel-item-next {
    transform: translateX(100%);
  }

  .carousel-inner .carousel-item-left.active, 
  .carousel-inner .carousel-item-prev {
    transform: translateX(-100%);
  }
}

/*  */

.reference-block > .container {
  padding: 0 60px;
}

@media (max-width: 575px) {
  .reference-block > .container {
    padding: 0 30px;
  }
}


.reference-sort {
  align-items: center;
  padding: 40px 0;
}

@media (max-width: 991px) {
  .reference-sort {
    padding: 0;
  }
}

.reference-sort a {
  display: block;
  min-width: 200px;
  padding: 24px 10px;
  margin: 0 50px 20px 0;
  
  font-weight: 400;
  color: #ffffff;
  
  background-color: #000000;
  border: 2px solid #000000;
  border-radius: 4px;
  text-decoration: none!important;
}

.reference-sort a:last-child {
  margin-right: 0;
}

@media (max-width: 575px) {
  .reference-sort {
    flex-direction: column;
  }

  .reference-sort a {
    margin-right: 0;
  }
}

.reference-sort a:hover,
.reference-sort a:focus {
  color: #000000;

  background: none;

}