.figure,
.listing {
	padding: 0.9em;
	border: 3px solid #6D4294;
	background: #fff;
	margin: 0 auto 1em;
}

.figure img {
	margin: 0 auto;
	display: block;
	max-width: 100%;
}

.figure figcaption,
.listing figcaption {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 0.8em;
	padding: .5em;
	text-align: center;
	color: #fff;
	background: #6D4294;
}

.figure-left {
	float: left;
	margin: 0 1em .5em 0;
	width: -webkit-min-content;
	width: -moz-min-content;
	width: min-content;
}

.figure-right {
	float: right;
	margin: 0 0 .5em 1em;
	width: -webkit-min-content;
	width: -moz-min-content;
	width: min-content;
}

.figure-right img,
.figure-left img {
	max-width: 300px; /* Adjust if necessary */
}

@media (max-width: 767px) {
	.figure-left,
	.figure-right {
		float: none;
		margin: 0 0 1em 0;
		width: 100%;
	}

	.figure img {
		max-width: 100%;
	}
}

body {
	
	counter-reset: figures listings;
}

.figure figcaption {
	counter-increment: figures;
}

.figure figcaption:before {
	content: 'Fig. ' counter(figures) ' - ';
}


.listing figcaption {
	counter-increment: listings;
}

.listing figcaption:before {
	content: 'List. ' counter(listings) ' - ';
}
