//
// WordPress Gallery
//

.qazana-image-gallery {

	.gallery-item {
		display: inline-block;
		text-align: center;
		vertical-align: top;
		width: 100%;
		max-width: 100%;
		margin: 0 auto;

		img {
			margin: 0 auto;
		}

		.gallery-caption {
			margin: 0;
		}
	}

	@media (min-width: $screen-md-min) {

		.gallery-columns- {

			&2 .gallery-item {
				max-width: 50%;
			}

			&3 .gallery-item {
				max-width: 33.33%;
			}

			&4 .gallery-item {
				max-width: 25%;
			}

			&5 .gallery-item {
				max-width: 20%;
			}

			&6 .gallery-item {
				max-width: 16.666%;
			}

			&7 .gallery-item {
				max-width: 14.28%;
			}

			&8 .gallery-item {
				max-width: 12.5%;
			}

			&9 .gallery-item {
				max-width: 11.11%;
			}

			&10 .gallery-item {
				max-width: 10%;
			}
		}
	}

	// Responsive mode
	@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {

		// All selectors needed for some themes and plugins
		.gallery.gallery-columns- {

			&2,
			&3,
			&4,
			&5,
			&6,
			&7,
			&8,
			&9,
			&10 {

				.gallery-item {
					max-width: 50%;
				}
			}
		}
	}

	@media (max-width: $screen-xs-max) {

		// All selectors needed for some themes and plugins
		.gallery.gallery-columns- {

			&2,
			&3,
			&4,
			&5,
			&6,
			&7,
			&8,
			&9,
			&10 {

				.gallery-item {
					max-width: 100%;
				}
			}
		}
	}
}
