$maxWidth: 960px;
$minTablet: 767px;

@mixin media($size) {
	@if $size == 'tabletUpwards' {@media screen and ( min-width : $minTablet ) { @content; }}
}

body {
	position: relative;
	background-color: #DDDDDD;
	font-family: 'helvetica', sans-serif;
	font-weight: lighter;
	font-size: 14px;
	color: #555;
	margin: 0;
	padding: 0;
	min-width: 320px;
}

h1 {
	text-transform: uppercase;
	color: #333;
}

h3 {
	font-weight: lighter;
	color: #555555;
}

a {
	position: relative;
	color: #a8244f;
	text-decoration: none;
	&:before {
		content: "";
		height: 2px;
		position: absolute;
		bottom: -5px;
		left: 0;
		right: 0;
		background-color: darken(#a8244f, 10%);
		transform: rotateY(90deg);
		transition: transform 0.2s ease-in-out;
	}
	&:hover {
		color: darken(#a8244f, 10%);
		text-decoration: none;
		&:before {
			transform: rotateY(0deg);
		}
	}
}

.split {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: strech;
	p {
		flex-basis: 100%;
		@include media('tabletUpwards') {
			flex-basis: 48%;
		}
	}
}

nav.social {
	display: inline-block;
	padding: 0;
	margin-bottom: 18px;
	li {
		list-style: none;
		float: left;
		a {
			padding: 5px;
		}
		&:first-child a {
			padding-left: 0;
		}
	}
}

.container {
	position: relative;
	width: 100%;
	margin: 50px 0;
	.inner {
		position: relative;
		width: 100%;
		max-width: $maxWidth;
		margin: 0 auto;
		overflow: hidden;
		box-sizing: border-box;
		padding: 20px 30px;
		background-color: #EEE;
	}
}

.comparison-slider-wrapper {
	position: relative;
	width: 100%;
	margin: 20px 0;
	background-color: white;

	.comparison-slider {
		position: relative;
		width: 100%;
		margin: 0;
		border: 5px white solid;
		box-sizing: border-box;
		> img {
			width: 100%;
			height: auto;
			display: block;
		}

		.overlay {
			display: none;
			position: absolute;
			width: 250px;
			bottom: 20px;
			right: 20px;
			background-color: rgba(0, 0, 0, 0.4);
			padding: 10px;
			box-sizing: border-box;
			color: #DDD;
			text-align: right;
			@include media('tabletUpwards') {
				display: block;
			}
		}

		.resize {
			position: absolute;
			top: 0;
			left: 0;
			height: 100%;
			width: 50%;
			overflow: hidden;
			> img {
				display: block;
				height: 100%;
			}
			.overlay {
				right: auto;
				left: 20px;
				text-align: left;
			}
		}

		.divider {
			position: absolute;
			width: 2px;
			height: 100%;
			background-color: rgba(256, 256, 256, 0.2);
			left: 50%;
			top: 0;
			bottom: 0;
			margin-left: -1px;
			cursor: ew-resize;
			&:before {
				content: "";
				position: absolute;
				width: 20px;
				height: 20px;
				left: -9px;
				top: 50%;
				margin-top: -10px;
				background-color: white;
				transform: rotate(45deg);
				transition: all 0.1s ease-in-out;
			}
			&:after {
				content: "";
				position: absolute;
				width: 12px;
				height: 12px;
				left: -5px;
				top: 50%;
				margin-top: -6px;
				background-color: white;
				transform: rotate(45deg);
				transition: all 0.1s ease-in-out;
			}
			&.draggable{
				&:before {
					width: 30px;
					height: 30px;
					left: -14px;
					margin-top: -15px;
				}
				&:after {
					width: 20px;
					height: 20px;
					left: -9px;
					margin-top: -10px;
					background-color: #555;
				}
			}
		}
	}

	.caption {
		position: relative;
		width: 100%;
		padding: 10px;
		box-sizing: border-box;
		font-size: 12px;
		font-style: italic;
	}
}

.suppoprt-me {
	display: inline-block;
	position: fixed;
	bottom: 10px;
	left: 10px;
	width: 20vw;
	max-width: 250px;
	min-width: 200px;
	z-index: 9;
	img {
		width: 100%;
		height: auto;
	}
}
.comparison-slider {
    position: relative;
}

.comparison-slider::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 51, 51, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.comparison-slider.hover-overlay::after {
    opacity: 1;
}
.MGBA-labels {
    display: none;
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.comparison-slider.hover-overlay .MGBA-labels {
    display: block;
}

.MGBA-label {
    position: absolute;
    padding: 5px 16px;
    border-radius: 4px;
}

/*.ba-before-label {
    left: 20px;
    transform: translateY(-50%);
}

.ba-after-label {
    right: 20px;
    transform: translateY(-50%);
}*/
.comparison-slider.vertical {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100% /* or make it dynamic/responsive */
  overflow: hidden;
}

.comparison-slider.vertical .resize {
  width: 100%;
  height: 50%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.comparison-slider.vertical img {
  width: 100%;
  height: auto;
}

.comparison-slider.vertical .divider {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(256, 256, 256, 0.2);
  cursor: ns-resize;
  transform: translateY(-50%); 
}

.comparison-slider.vertical .divider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 0px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background-color: white;
}

.comparison-slider.vertical .divider::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background-color: white;
}

.comparison-slider.vertical .divider.draggable::before {
  width: 30px;              
  height: 30px;
  top: 0px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.comparison-slider.vertical .divider.draggable::after {
  width: 20px;
  height: 20px;
  top: 0px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background-color: #555;
}


.MGBA-labels {
  position: absolute;
  width: 100%;
  pointer-events: none;
  z-index: 15;
}

.MGBA-label {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 13px;
  position: absolute;
  display: inline-block;
}


.MGBA-read-more-link:hover {
    color: var(--MGBA-hover-font-color, inherit) !important;
    background-color: var(--MGBA-hover-bg-color, transparent) !important;
}

.MGBA-orientation-horizontal .MGBA-after-label { right: 20px; transform: translateY(-50%); }
.MGBA-orientation-horizontal .MGBA-before-label { left: 20px; transform: translateY(-50%); }

.MGBA-orientation-vertical .MGBA-after-label { bottom: 10px; left: 50%; transform: translateX(-50%); }
.MGBA-orientation-vertical .MGBA-before-label { top: 10px; left: 50%; transform: translateX(-50%); }
.MGBA-orientation-vertical .MGBA-labels { height: 100%; text-align: center; }
