.alignnone {
	float: none !important;
	margin-bottom: 1.5em;
	clear: both;
}

.has-text-align-center,
.textcenter {
	text-align: center;
}

.has-text-align-right,
.textright {
	text-align: right;
}

.alignright {
	float: right;
	margin: 0 0 0 1.5em;
	text-align: right;
}

.alignleft {
	float: left;
	margin: 0 1.5em 0 0;
	text-align: left;
}

.aligncenter {
	display: block;
	margin: 1em auto;
	text-align: center;
	clear: both;
}

a img.alignright {
	float:right;
	margin: 0 0 20px 25px;
}

a img.alignnone {
	margin: 0px;
}

a img.alignleft {
	float:left;
	margin: 0 1.5em 1.5em 0;
}

a img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto
}

img.alignleft {
	margin: 0 1.5em 1.5em 0;
}

img.alignright {
	margin: 0 0 1.5em 1.5em;
}

img.aligncenter {
	display: block;
	margin: 0 auto;
}

img.alignnone {
	margin: 0;
}

p + .alignfull
p + .alignwide {
	margin-top: 30px;
	margin-bottom: 30px;
}

body.has-blocks:not(.fl-builder) {
	.the-content-parent {
		& > * {
			margin-left: auto;
			margin-right: auto;
			max-width: var( --vamtam-site-max-width );

			&.alignfull,
			&.alignwide {
				max-width: none;
			}

			&.wp-block-gallery,
			&.vgblk-rw-wrapper > .wp-block-gallery {
				display: flex;
				padding: 0;

				&:not(.alignleft):not(.alignright):not(.aligncenter):not(.alignfull):not(.alignwide) {
					margin-left: 0;
					margin-right: 0;
				}
			}
		}

		[class*="wp-block"] {
			&.alignfull,
			&.alignwide {
				margin-top: 1em auto;
			}
		}
	}
}

.wp-block-gallery ul {
	margin-left: 0;
	margin-right: 0;
	display: flex;
}

.wp-block-latest-posts.is-grid {
	padding-left: 0 !important;
	margin-left: auto !important;
	margin-right: auto !important;

	li {
		border-top: 2px solid var( --vamtam-accent-color-4 );
		padding-top: 20px;

		a {
			.vamtam-font( h3- );
		}
	}
}

.wp-caption {
	max-width: 100%;
	clear: both;

	a {
		border: var( --vamtam-no-border-link );
	}
}

.wp-caption .wp-caption-text,
.entry-caption,
.gallery-caption {
	margin-top: 10px;
	text-align: center;

	.vamtam-font(em-);
	color: var( --vamtam-em-color );
}

.wp-smiley,
.wp-smiley * {
	border: 0px !important;
}

.sticky, .gallery-caption, .bypostauthor { outline: none;}

.blocks-gallery-item figcaption {
	left: 0;
	right: 0;
	width: auto !important;
	margin-bottom: 0;
	box-sizing: border-box;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
	line-height: 2;
	width: 100%;
	margin: 0 0 1.5em;
}

caption,
th,
td {
	font-weight: normal;
	text-align: left;
}

caption {
	font-size: 16px;
	margin: 20px 0;
}

table {
	border: 0;
}

thead th {
	border: 0;
	border-bottom: 2px solid #bbb;
	padding-bottom: 0.5em;
}

th {
	padding: 0.4em;
	text-align: left;
	font-weight: 500;
	border: 0;
	line-height: 2;
}

td {
	border: none;
	padding: 8px 0px 8px 0;
	line-height: 2;
}

tr {
	border: 0;
	border-bottom: 1px solid #eee;
}

th:first-child,
td:first-child {
	padding-left: 0;
}

th:last-child,
td:last-child {
	padding-right: 0;
}

dl {
	margin: 0 20px;
}

dt {
	font-weight: bold;
}

dd {
	margin: 0 0 10px;
}

address {
	font-style: italic;
	margin: 0 0 24px;
}

var, cite {
	font-style: italic;
}

.wp-block-separator {
	margin: 1.65em auto;

	&:not(.is-style-dots):not(.is-style-wide) {
		max-width: 100px !important;
	}
}

.alignleft,
.alignright {
	&.vamtam-wp-block-cover-wrapper {
		width: 30%;
	}
}

.wp-block-cover {
	margin-top: 50px !important;
	margin-bottom: 50px !important;
}

.wp-block-cover-image h2,
.wp-block-cover h2,
.wp-block-cover-image .wp-block-cover-image-text ,
.wp-block-cover .wp-block-cover-text {
	font-size: 2em !important;
	line-height: 1.25 !important;
}

[class*="gallery-columns-"] {
	margin: 0 -5px !important;

	&.gallery-columns-1 .gallery-item { width: percentage((1 / 1)); }

	&.gallery-columns-2 .gallery-item { width: percentage((1 / 2)); }

	&.gallery-columns-3 .gallery-item { width: percentage((1 / 3)); }

	&.gallery-columns-4 .gallery-item { width: percentage((1 / 4)); }

	&.gallery-columns-5 .gallery-item { width: percentage((1 / 5)); }

	&.gallery-columns-6 .gallery-item { width: percentage((1 / 6)); }

	&.gallery-columns-7 .gallery-item { width: percentage((1 / 7)); }

	&.gallery-columns-8 .gallery-item { width: percentage((1 / 8)); }

	&.gallery-columns-9 .gallery-item { width: percentage((1 / 9)); }

	figure.gallery-item {
		padding: 0 5px;
		display: inline-block;
		box-sizing: border-box;
		position: relative;

		&:hover {
			.gallery-caption {
				display: block;
				position: absolute;
				top: 100%;
				left: -40px;
				right: -40px;
				padding: 10px;
				border-radius: var( --vamtam-border-radius );
				background: var( --vamtam-default-bg-color );
				z-index: 10;
				margin: 0;
				box-shadow: 0 0 2px rgba( 0, 0, 0, 0.1 );

				&:before,
				&:after {
					content: "";
					position: absolute;
					top: -10px;
					left: 50%;
					border: 10px solid transparent;
				}

				&:before {
					border-top: 0;
					border-bottom-color: rgba( 0, 0, 0, 0.1 );
					top: -11px;
				}

				&:after {
					border-top: 0;
					border-bottom-color: var( --vamtam-default-bg-color );
				}
			}
		}

		img {
			display: inline-block;
			padding-bottom: 10px;
		}

		.gallery-caption {
			display: none;
		}
	}
}

@media ( max-width: 60px + 160px * 5 ) {
	[class*="gallery-columns-"] {
		figure.gallery-item {
			a, img {
				display: block !important;
				margin: auto;
			}

			&:hover {
				.gallery-caption {
					left: -50%;
					right: -50%;

					&:before,
					&:after {
						display: none;
					}
				}
			}
		}
	}
}

@media ( min-width: 60px + 160px * 4 + 1 ) and ( max-width: 60px + 160px * 5 ) {
	[class*="gallery-columns-"] {
		figure.gallery-item {
			width: percentage(( 1 / 4 )) !important;

			&:hover {
				.gallery-caption {
					left: -50%;
					right: -50%;

					&:before,
					&:after {
						display: none;
					}
				}
			}

			&:nth-child( 4n + 1 ):hover .gallery-caption {
				left: 0;
				right: -100%;
			}

			&:nth-child( 4n ):hover .gallery-caption {
				left: -100%;
				right: 0;
			}
		}
	}
}

@media ( min-width: 60px + 160px * 3 + 1 ) and ( max-width: 60px + 160px * 4 ) {
	[class*="gallery-columns-"] {
		figure.gallery-item {
			width: percentage(( 1 / 3 )) !important;

			&:nth-child( 3n + 1 ):hover .gallery-caption {
				left: 0;
				right: -100%;
			}

			&:nth-child( 3n ):hover .gallery-caption {
				left: -100%;
				right: 0;
			}
		}
	}
}

@media ( min-width: 60px + 160px * 2 + 1 ) and ( max-width: 60px + 160px * 3 ) {
	[class*="gallery-columns-"] {
		figure.gallery-item {
			width: percentage(( 1 / 2 )) !important;

			&:nth-child( 2n + 1 ):hover .gallery-caption {
				left: 0;
				right: -100%;
			}

			&:nth-child( 2n ):hover .gallery-caption {
				left: -100%;
				right: 0;
			}
		}
	}
}

@media ( max-width: 60px + 160px * 2 ) {
	[class*="gallery-columns-"] {
		figure.gallery-item {
			width: 100% !important;

			&:hover .gallery-caption {
				left: 0;
				right: 0;
			}
		}
	}
}
