.fgallery {
	width: 100%;
	max-width: 500px;
	border: 1px solid currentColor;
	margin: 0px auto 20px auto;
	cursor: pointer;
	color: transparent;
}

.fgallery-outer {
	height: 0px;
	padding-bottom: 100%;
	position: relative;
}

.fgallery-inner {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
}

.fgallery-grid {
	display: flex;
	flex: 1;
	height: 100%;
	width: 100%;
}

.fgallery-grid-horizontal {
	flex-direction: row;
}

.fgallery-grid-vertical {
	flex-direction: column;
}

.fgallery-grid-item {
	flex: 1;
	border: 1px solid currentColor;
	position: relative;
	overflow: hidden;
}

.fgallery-grid-item-2 {
	flex: 2;
}

.fgallery-grid .fgallery-grid-vertical > .fgallery-grid-item {
	border-left: 0;
	border-right: 0;
}

.fgallery-grid .fgallery-grid-vertical > .fgallery-grid-item:first-child {
	border-top: 0;
}

.fgallery-grid .fgallery-grid-vertical > .fgallery-grid-item:last-child {
	border-bottom: 0;
}

.fgallery-grid .fgallery-grid-horizontal > .fgallery-grid-item {
	border-top: 0;
	border-bottom: 0;
}

.fgallery-grid .fgallery-grid-horizontal > .fgallery-grid-item:first-child {
	border-left: 0;
}

.fgallery-grid .fgallery-grid-horizontal > .fgallery-grid-item:last-child {
	border-right: 0;
}

.fgallery-item {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
}

.fgallery-item::before {
	content: '';
	left: 0;
	top: 0;
	display: block;
	width: 100%;
	height: 100%;
	z-index: 99;
	cursor: pointer;
}

.fgallery-item[data-count]::before {
	background: rgba(0, 0, 0, 0.3);
}

.fgallery-item[data-count]::after {
	content: attr(data-count);
	color: #fff;
	font-family: 'Segoe UI Historic', 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 32px;
	font-weight: 600;
	position: absolute;
	z-index: 100;
	left: 20px;
	right: 20px;
	text-align: center;
	top: 50%;
	transform: translateY(-50%);
}

.fgallery-item-image {
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.fgallery-item-video video {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
