.ce-media{
	text-align: center;

	& .responsive-video {
		video {
			width: 100%;

			&.vl-wide {
				width: 100%
			}
		}
	}
}
.ce-right {
	&.ce-intext {
		.ce-gallery {
			&.yt-gallery,
			&.img-gallery {
				@media screen and (max-width: 600px) {
					margin-left: 0;
				}
			}
		}
		.ce-column {
			&.yt-column,
			&.img-column {
				width: 100%;
			}
		}
	}
}
.ce-left {
	&.ce-intext {
		.ce-column {
			&.yt-column,
			&.img-column {
				width: 100%;
				margin-right: 0 !important;

				@media screen and (min-width: 1024px) {
					margin-right: 20px !important;
				}
			}
		}
	}
}
.ce-center {
	&.ce-above,
	&.ce-below {
		.ce-gallery {
			&.yt-gallery,
			&.img-gallery {
				margin: 0 auto;

				.ce-outer,
				.ce-inner {
					float: none;
					position: unset;
					right: auto;

					.ce-column {
						&.yt-column,
						&.img-column {
							float: none;
						}
					}
				}
			}
		}
	}
}

.ce-gallery{
	figure,img{
		margin: 0 auto;
	}

	img{
		width: 100%;
		height: auto;
	}

	&.yt-gallery,
	&.img-gallery {
		width: 100%;

		@media screen and (min-width: 1024px) {
			width: 50%;
		}
	}
}

.ce-border img, .ce-border iframe{
	border: none;
	padding: inherit;
}

.ce-border{
	.ce-media{
		position: relative;
	}

	picture{
		position: relative;
	}

	figcaption{
		position: relative;
	}
}

.ce-left .ce-gallery,
.ce-right .ce-gallery,
.ce-intext.ce-left .ce-gallery,
.ce-intext.ce-right .ce-gallery,
.ce-column{
	float: none;
	margin-left: 0;
	margin-right: 0;

	picture{
		width: 100%;
		img{
			width: 100%;
		}
	}
}

@include breakpoint($mobile-m){
	.ce-left .ce-gallery,
	.ce-intext.ce-left .ce-gallery{
		float: left;
		margin-left: 0;
		margin-right: 15px;
	}

	.ce-right .ce-gallery,
	.ce-intext.ce-right .ce-gallery{
		float: right;
		margin-left: 15px;
		margin-right: 0;
	}
}

.ce-row{
	margin-bottom: 0;
}

figcaption{
	font-size: 80%;
	line-height: 120%;
	text-align: center;
}

.ce-textpic, .ce-nowrap .ce-bodytext{
	overflow: visible;
}


.ce-above,
.ce-below{

	.ce-media{
		&:after{
			content: normal;
		}
	}

	.ce-column{
		margin-bottom: 15px;
	}

	.ce-gallery[data-ce-columns="6"],
	.ce-gallery[data-ce-columns="5"]{
		.ce-column{
			@include float-span(6);

			&:nth-child(2n+2){
				@include float-span(6, 'last');
			}
		}

		@include breakpoint($mobile-m){
			.ce-column{
				@include float-span(4);

				&:nth-child(2n+2){
					@include float-span(4);
				}

				&:nth-child(3n+3){
					@include float-span(4, 'last');
				}
			}
		}

		@include breakpoint($mobile-l){
			.ce-column{
				@include float-span(2);

				&:nth-child(2n+2){
					@include float-span(2);
				}

				&:nth-child(3n+3){
					@include float-span(2);
				}

				&:nth-child(6n+6){
					@include float-span(2, 'last');
				}
			}
		}
	}

	.ce-gallery[data-ce-columns="4"],
	.ce-gallery[data-ce-columns="3"]{
		.ce-column{
			@include float-span(6);

			&:nth-child(2n+2){
				@include float-span(6, 'last');
			}
		}

		@include breakpoint($mobile-m){
			.ce-column{
				@include float-span(3);

				&:nth-child(2n+2){
					@include float-span(3);
				}

				&:nth-child(4n+4){
					@include float-span(3, 'last');
				}
			}
		}
	}

	.ce-gallery[data-ce-columns="2"]{
		.ce-column{
			@include float-span(6);

			&:nth-child(2n+2){
				@include float-span(6, 'last');
			}
		}
	}
}
