/* *, *:after, *:before { -webkit-box-sizing: border-box; box-sizing: border-box; } // required */

.grid {
	position: relative;	
	padding: 0;
	max-width: 100%;
}

/* Common style */
.grid figure {
	position: relative;
	float: left;
	overflow: hidden;	
	min-width: 100%;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	cursor: pointer;
}

.grid figure img {
	position: relative;
	display: block;
	min-height: 100%;
	max-width: 100%;
}

.grid figure figcaption {
	padding: 2em;
	color: #fff;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.grid figure figcaption::before,
.grid figure figcaption::after {
	pointer-events: none;
}

.grid figure figcaption,
.grid figure figcaption > a {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Anchor will cover the whole item by default */
.grid figure figcaption > a {
	z-index: 1000;
	text-indent: 200%;
	white-space: nowrap;
	font-size: 0;
	opacity: 0;
}

.grid figure h4 {	
	font-weight: bold;
}

/* Individual effects */
figure.effect {
    background: -webkit-linear-gradient(180deg, #8D0E54 0%, #480A2D 40%, #1A1A1A 100%);
	background: linear-gradient(180deg, #8D0E54 0%, #480A2D 40%, #1A1A1A 100%);
    }

figure.effect img {
	opacity: 0.9;    
    display: block;
    -webkit-transition: 1s;
    transition: 1s;
}

figure.effect figcaption {
	padding: 3em;
	background-color: rgba(72, 10, 45, 0.3);
	-webkit-transition: background 0.55s;
	transition: background 0.55s;
}

figure.effect figcaption::before {
	position: absolute;
	top: 30px;
	right: 30px;
	bottom: 30px;
	left: 30px;	
	content: '';
}

figure.effect:hover figcaption::before {
	opacity: 1;
}
figure.effect:hover figcaption {
	background-color: rgba(72, 10, 45, 0);
}

figure.effect:hover img {
	opacity: 0.9;
    transform: scale(1.2); 
}   

/* masonry */
.masonry-wrapper {margin: 0; padding:0;}
.masonry {
  display: flex;
  width: 100%;
}
.masonry--h {
  flex-flow: row wrap;
}
.masonry--v {
  flex-flow: column wrap;
  max-height: 2000px;
}

.masonry--h,
.masonry--v {
  margin-left: -8px; /* Adjustment for the gutter */
  counter-reset: brick;
}

.masonry-brick {
  overflow: hidden;
  margin: 0 0 8px 8px;  /* Some Gutter */
  background-color: #333;
  color: white;
  position: relative;
}

.masonry-brick:after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 500;
  transform: translate(-50%, -50%);
  counter-increment: brick;
  content: counter(brick);
  transition: font-size .25s, opacity .25s ease-in-out;
  font-weight: 700;
  opacity: .5;
  font-size: 1.25em;
}

.masonry-brick:hover:after {
  font-size: 2.25em;
  opacity: 1;
}

.masonry-brick--h {
  flex: auto;
  height: 350px;
  min-width: 150px;
}

@media only screen and (min-width: 1024px) {
  /* Horizontal masonry bricks on desktop-sized screen */
  .masonry-brick--h:nth-child(4n+1) {
    width: 250px;
  }
  .masonry-brick--h:nth-child(4n+2) {
    width: 325px;
  }
  .masonry-brick--h:nth-child(4n+3) {
    width: 180px;
  }
  .masonry-brick--h:nth-child(4n+4) {
    width: 380px;
  }

  /* Adjusting vertical masonry height on desktop-sized screen */
  .masonry--v {
    max-height: 1600px;
  }

  /* Vertical masonry bricks on desktop-sized screen */
  .masonry-brick--v {
    width: 33.33333%;
  }
}

@media only screen and (max-width: 1023px) and (min-width: 768px) {
  /* Horizontal masonry bricks on tabled-sized screen */
  .masonry-brick--h:nth-child(4n+1) {
    width: 200px;
  }
  .masonry-brick--h:nth-child(4n+2) {
    width: 250px;
  }
  .masonry-brick--h:nth-child(4n+3) {
    width: 120px;
  }
  .masonry-brick--h:nth-child(4n+4) {
    width: 280px;
  }

  /* Adjusting vertical masonry height on tablet-sized screen */
  .masonry--v {
    max-height: 2000px;
  }

  /* Vertical masonry bricks on tablet-sized screen */
  .masonry-brick--v {
    width: 50%;
  }
}

.masonry-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  filter: brightness(70%);
}

.shadow-hover {
  box-shadow: 1px 5px 14px rgba(0,0,0,0.2);
  transition: box-shadow 0.3s ease-in-out;
}
.shadow-hover:hover {
  box-shadow: 1px 8px 20px rgba(0,0,0,0.25);
  transition: box-shadow 0.3s ease-in-out;
}

.scale {
    width:100%;
    display: inline-block;
    overflow: hidden;    
   }
   .scale img {
    width:100%;
    max-width:100%;
    height:100%;
    min-height:100%;    
    transition: 1s;
    display: block;
   }
   .scale img:hover {
    transform: scale(1.2); 
   }

/* arrow to top */
#top {
    position: fixed;
    bottom: 10px;
    right: 40px;
    width: 33px;
    height: 33px;    
    background: rgba(0, 0, 0, .7);
    color: rgba(255, 255, 255, .6);
    text-align: center;
    z-index: 10000;
    border-radius: 50%;
    display:flex;
    justify-content:center;
    align-items:center;
}
@media (max-width:768px){
#top {right: auto; left:20px; bottom:35px;}
}

#top a {color: rgba(255, 255, 255, .6);}
#top a:hover {color: rgba(255, 255, 255, .9);}

/* scrollbar */
/*Убрать полосу прокрутки у элемента*/
.element::-webkit-scrollbar {
  width: 0;
}
.scrollnews {  
  display:flex;
  flex-wrap:nowrap;  
  overflow-x: auto;  
}
.scrollnews::-webkit-scrollbar {
  height:5px;  
  border-radius:10px;
  background-color: #FFF;
}
.scrollnews::-webkit-scrollbar-thumb {   
  border-radius:10px;
  background-color: #2c53a6;
}
.scrollnews::-webkit-scrollbar-track:horizontal {   
  background-color: white;
  border-radius:10px;
}
.scrolling-card {flex: 0 0 auto; margin-bottom:10px;}