/* ==========================================================================
# Image Gallery - begin
========================================================================== */

/* Image Gallery Grid - begin
========================================================================== */

.qodef-image-gallery {

	.qodef-image-gallery-grid.qodef-gallery-columns-2 {

		.qodef-gallery-image {

			@include phone-portrait {
				width: 100%;
			}

		}

	}

	.qodef-image-gallery-grid.qodef-gallery-columns-3 {

		.qodef-gallery-image {

			@include ipad-portrait {
				width: 50%;


				&:nth-child(2n+1) {
					clear: both;
				}

				&:nth-child(3n+1) {
					clear: none;
				}

			}

			@include phone-portrait {
				width: 100%;
				margin-right: 0;
			}

		}

	}

	.qodef-image-gallery-grid.qodef-gallery-columns-4 {

		.qodef-gallery-image {

			@include ipad-landscape {
				width: 33.3333%;

				&:nth-child(3n+1) {
                                    clear: both;
				}

				&:nth-child(4n+1) {
                                    clear: none;
				}
			}

			@include ipad-portrait {
				width: 50%;

				&:nth-child(2n+1) {
					clear: both;
				}
				
				&:nth-child(3n+1) {
					clear: none;
				}

			}

			@include phone-portrait {
				width: 100%;
			}

		}

	}

	.qodef-image-gallery-grid.qodef-gallery-columns-5 {

		.qodef-gallery-image {

			@include laptop-landscape {
				width: 25%;

				&:nth-child(4n+1) {
					clear: both;
				}

				&:nth-child(5n+1) {
					clear: none;
				}

			}

			@include ipad-landscape {
				width: 33.3333%;

				&:nth-child(3n+1) {
					clear: both;
				}

				&:nth-child(4n+1) {
					clear: none;
				}

			}

			@include ipad-portrait {
				width: 50%;

				&:nth-child(2n+1) {
					clear: both;
				}

				&:nth-child(3n+1) {
					clear: none;
				}
			}

			@include phone-portrait {
				width: 100%;
			}

		}

	}

}

/* Image Gallery Grid - end
========================================================================== */

/* Image Gallery Slider - begin
========================================================================== */

@media only screen and (max-width: $phone-landscape) {
	.qodef-image-gallery,
	.qodef-image-gallery-defined-height {
		height:auto !important;
	}
}

/* Image Gallery Slider - end
========================================================================== */

/* ==========================================================================
# Image Gallery - end
========================================================================== */