﻿
/*--------[Основная разметка блоков]------------*/

.g_fon{
    width: 100%;
    height:100%;
    position: fixed;
    background: rgba(2,2,2,0.5);
		backdrop-filter: blur(5px);
    top: 0px;
    left: 0px;
    z-index: 9999999999999999;
    display:none;
	overflow-x:hidden;
	overflow-y: scroll;
    display: flex;
    justify-content: center;
    align-items: center;
}
.g_pos{
	/*display: table;*/
	z-index: 9;
	border-radius: 3px;
	margin: 0 auto;
}
.g_frame{
    background: rgba(255,255,255,0);
	border: none; 
	border-radius: 3px;	
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
	overflow: hidden;
	z-index: 6;
}
.g_frame_image{
	border-radius: 3px;
	background-size: cover;
	overflow: hidden;
	
	position: relative;
	background: radial-gradient(#000000ab, #615c54);
}
.g_frame_image::before {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: "Font Awesome 5 Free";
    content: "\f03e";
    display: inline-block;
    padding-right: 3px;
    vertical-align: middle;
    font-weight: 900;
    font-size: 4rem;
    transform: translate(-50%, -50%);
    color: #bbb7a7;
		z-index: 1;
		
		animation-duration: 1s;
		animation-name: fadeInOut;
		animation-direction: alternate;
		animation-iteration-count: infinite;

}
.g_img{    
	position: relative;
	border: none; 
	/*opacity: 0;*/
	cursor: pointer;
	/*width: 100%;*/
	max-width: 90vw;
	max-height: 90vh;
	display: block;
	z-index: 9;
}
.g_f_title{
    	padding: 3px 5px 5px 5px;
	font-size: 12px;
	color: #555;
	background: #fff;
}
.g_i_num{
	color: #999;
}
span.g_p_title{
    display:none;
}
.g_space{
    height: 20px;
	border: #000 solid 1px;
}
.g_prev{
  position: fixed;
	top:0;
	left: 0;	
	width: 50%;
	height: 100%;
	z-index: 2;
	color: #ddd;
	font-size: 100px;
	cursor: pointer;
}

.g_close{
    position: fixed;
	top:0;
	right: 0;
	width: 50%;
	height: 100%;
	z-index: 2;
	font-size: 100px;
	cursor: pointer;
}
.g_close:hover .g_close_cross{
	color: #555;
}
.no_select {
user-select: none;
-o-user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
}

/*----------*/
.gallery{
	display: flex;
	flex-wrap: wrap;
	margin: 0 calc(-1 * var(--padding-small));
	justify-content: center;
  align-items: center;
  align-content: center;
  overflow: auto;
}
.gallery .break{
	width: 100%;
}
a.gallery_item{
	position: relative;
	display: block;
	min-height: 100px;
	min-width: 100px;
	background: #795548a6;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	flex-basis: 9rem;
	/*flex-grow: 1;*/
	flex-shrink: 1;	
	border-radius: var(--radius-small);
	overflow: hidden;
	/*box-shadow: 0 0 10px rgba(0,0,0,0.5), inset 0 0 60px rgb(121 85 72 / 41%);
	border: solid 14px #ddd;*/
	padding: 0;
	margin: var(--padding-small);
	/*border-image: url(/tmp/teatr_a/imgs/border.jpg) 14 14 14 14 repeat;*/
	transform: perspective(400px) translateZ(0px);
	transition: transform .2s ease-in-out, box-shadow .3s ease-in-out;	
}
a.square{
	max-width: 20rem;
	flex-grow: 1;
}
a.gallery_item.big{
	flex-basis: 10rem;
  max-width: none;
}
a.gallery_item.med{
	flex-basis: 7rem;	
}
a.gallery_item.reward{	
		flex-basis: 150px;
		/*flex-basis: 9rem;*/
		background: none;
		flex-grow: 0;
}
a.gallery_item.nogrow{
		flex-grow: 0;
}
a.gallery_item.mono{
	flex-grow: 0;
	flex-basis: auto;
	display: grid;
	align-content: center;
	justify-content: center;
	/*max-width: 50vh;*/
	max-height: 80vh;
}
a.gallery_item img{	
		display: block;
}
a.gallery_item.mono img{
	    max-height: 80vh;
    /* height: 70%; */
    width: auto;
}
a.square::after{
	content: "";
	display: block;
  padding-bottom: 100%;
}
a.gallery_item:hover{
	transform: perspective(400px) translateZ(.2rem);
	box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23), inset 0 0 0 rgba(0,0,0,0.5);
	
	z-index: 9;
}

a.gallery_item.invisible::after{
	background: #999999dd;
}
a.gallery_item.invisible img{
	opacity: 0.2;
}
.g_prev::before{
	content: "←";
	position: absolute;
	top: 0;
	left: .2em;
  font-size: 5rem;
	margin-top: -0.2em;
}
.g_close::before{
	content: "×";
	position: absolute;
	top: 0em;
	right: 0.4em;
	font-size: 4rem;
}
.g_prev::before,
.g_close::before{
	color: #bebebe;
	text-shadow: 0 1px 3px #000000;
	opacity: 0.2;
	transition: opacity .2s .1s, color .2s .1s;
}
.g_prev:hover::before,
.g_close:hover::before{
	color: #bebebe;
	opacity: 1;
}


.show {
	animation: fadeIn ease-in-out .2s;
	animation-fill-mode: forwards;
}
.hide {
	animation: fadeOut ease-in-out .2s;
	animation-fill-mode: forwards;
}
.scaleIn{
	animation: fadeScaleIn ease-in-out .2s;
	animation-fill-mode: forwards;
}
.scaleOut{
	animation: fadeScaleOut ease-in-out .2s;
	animation-fill-mode: forwards;
}
@keyframes fadeIn {
	0% {opacity:0; display: flex;}
	100% {opacity:1;}
}
@keyframes fadeOut {
	0% {opacity:1;}
	100% {opacity:0; display: none; }
}
@keyframes fadeScaleIn {
	0% {opacity:0; display: flex; transform: scale(0.9);}
	100% {opacity:1; transform: scale(1);}
}
@keyframes fadeScaleOut {
	0% {opacity:1;; transform: scale(1);}
	100% {opacity:0; display: none; transform: scale(0.9);}
}

@keyframes fadeInOut {
  from  {
    opacity: 1;
  }

  to {
    opacity: 0.3;
  }
}