//
// WordPress Gallery
//

.elementor-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;
		}
	}

	figure  {
		img {
			display: block;
		}

		figcaption {
			width: 100%;
		}
	}

	.gallery-spacing-custom & {
		.gallery-icon {
			padding: 0; // Reset Style for some themes
		}
	}

	@media (min-width: $screen-mobile-next) {

		.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: 480px) and (max-width: $screen-mobile-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: 479px) {

		// 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%;
				}
			}
		}
	}
}
