/* Change flex-direction to column-reverse to move dropdown to bottom of map */
.thematic-map .stage {
	display: flex;
	flex-direction: column;
}

.thematic-map {
    --bg-color: #edeeed;
    --dark-blue: #1e3e54;
    --light-blue: #3c7da9;
    --ultra-light-blue: #4b9cd3;
    --orange: #be5e1b;
    --light-orange: #ed7522;
    --green: #769062;
    --light-green: #93b37a;
    --black: #3c3c3f;
    --font-widget-title: 'Recoleta Alt';
	background-color: var(--bg-color);
    padding: 35px 0;
	max-width: 1200px;
    margin: 50px auto;
}

.thematic-map header {
    padding: 0 15px 30px;
    text-align: center;
}

.thematic-map header h2 {
    font-family: var(--font-widget-title);
    color: var(--dark-blue);
    font-size: 45px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.thematic-map header p {
    font-size: 20px;
    margin: 0;
}

.thematic-map .controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    padding: 0 15px;
}

.thematic-map .state-map {
    display: none;
}

.thematic-map .controls button {
    position: relative;
    color: var(--black);
    font-size: 16px;
    font-weight: bold;
    padding: 10px 16px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-width: 2px;
    border-right-width: 8px;
}

.thematic-map .controls button:first-of-type {
    border-color: var(--ultra-light-blue);
}

.thematic-map .controls button.active:first-of-type {
    background-color: var(--light-blue);
	color: white;
}

.thematic-map .controls button:nth-child(2) {
    border-color: var(--light-green);
    margin: 0 10px;
}

.thematic-map .controls button.active:nth-child(2) {
    background-color: var(--green);
	color: white;
}

.thematic-map .controls button:last-of-type {
    border-color: var(--light-orange);
}

.thematic-map .controls button.active:last-of-type {
	background-color: var(--orange);
	color: white;
}

.thematic-map .links-cont {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
	background-color: var(--bg-color);
}

.thematic-map .widget-links {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.thematic-map .widget-links .widget-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thematic-map .widget-link img {
    margin: 0 auto 6px;
    max-width: 55px;
}

.thematic-map[data-region="chapel"] .controls button[data-map="chapel"] {
    color: white;
    background-color: var(--light-blue);
}

.thematic-map[data-region="carrboro"] .controls button[data-map="carrboro"] {
    color: white;
    background-color: var(--green);
}

.thematic-map[data-region="hillsborough"] .controls button[data-map="hillsborough"] {
    color: white;
    background-color: var(--orange);
}

.thematic-map .widget-links a {
    display: block;
    padding: 5px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-width: 2px;
    border-left-width: 8px;
    border-color: var(--light-blue);
    color: var(--black);
    text-transform: uppercase;
    text-align: center;
    font-size: 12px;
}

.thematic-map .widget-links a:nth-child(2) {
    margin: 0 8px;
}

.thematic-map h2 {
	margin: 0;
	margin-bottom: var(--space-3);
	color: var(--dark-blue);
	font-family: var(--font-display);
	font-size: 40px;
	font-weight: 400;
	text-align: center;
	padding: 0 var(--space-6);
}

.thematic-map .description {
	padding: 0 var(--space-2) var(--space-6);
    text-align: center;
	color: var(--black);
}

.thematic-map.slides .header {
	display: flex;
	flex-direction: column;
	margin-bottom: var(--space-2);
}

.thematic-map.slides a.view-all {
	max-width: fit-content;
	align-self: flex-end;
	color: var(--btn-text-color);
	font-family: var(--font-family-body);
	font-size: var(--text-base);
	font-weight: 500;
	text-transform: uppercase;
	border-radius: var(--rounded-full);
	background-color: var(--btn-bg-color);
	padding: var(--space-1) var(--space-5) var(--space-1) var(--space-4);
	margin-right: var(--space-5);
}

/***
	Map Stage
****/
.thematic-map .stage {
	position: relative;
	overflow: scroll;
	width: 100%;
}

.thematic-map.top-dropdown .stage {
	flex-direction: column;
}

/***
	Map SVG
****/
.thematic-map .map {
	position: relative;
	overflow: hidden;
	width: 165%;
}

.thematic-map .map svg {
	position: relative;
	width: 100%;
	height: auto;
	top: 0;
	left: 0;
	transform: none;
	margin: 0px;
}

.thematic-map .map svg [data-map-beacon-chapelhill],
.thematic-map .map svg [data-map-beacon-carrboro],
.thematic-map .map svg [data-map-beacon-hillsborough] {
	cursor: pointer;
}

.thematic-map .map svg [data-map-poi-chapelhill],
.thematic-map .map svg [data-map-poi-carrboro],
.thematic-map .map svg [data-map-poi-hillsborough] {
	display: none;
	transition: display ease 0.6s;
}

.thematic-map .map svg [data-map-poi-chapelhill],
.thematic-map .map svg [data-map-poi-carrboro],
.thematic-map .map svg [data-map-poi-hillsborough] {
	display: none;
	transition: display ease 0.6s;
}

.thematic-map .map [data-map-poi-chapelhill].active,
.thematic-map .map [data-map-poi-carrboro].active,
.thematic-map .map [data-map-poi-hillsborough].active,
.thematic-map .map [data-map-poi-chapelhill].hover,
.thematic-map .map [data-map-poi-carrboro].hover,
.thematic-map .map [data-map-poi-hillsborough].hover {
	display: block;
}
/***
	Resolves opacity issue for last slide index
***/

.thematic-map .glide__slide--active .map-callout-tiles-3-across {
	transition: opacity 200ms ease-in;
	opacity: 1 !important;
}

/*** 
	Card Layout 
***/

.thematic-map .regions [data-poi] {
	max-width: 100vw;
	padding: var(--space-2) var(--space-2) var(--space-3);
	margin: 0 20px;
	background-color: var(--white);
	border-radius: 5px;
	display: none;
}

.thematic-map .regions [data-poi].active {
	display: block;
	position: absolute;
	z-index: 3;
}

.thematic-map .regions .image {
	position: relative;
	flex: 1;
}

.thematic-map .regions .region-card {
	position: relative;
}

.thematic-map .regions .slide-bottom {
	flex: 1;
}

.thematic-map .regions .content-wrapper {
	position: relative;
}

.thematic-map .regions .close-button {
	position: absolute;
	color: #595A5E;
	top: -15px;
    right: -20px;
}

.thematic-map .regions .close-button i {
	font-size: 20px;
}

.thematic-map .regions .content-wrapper .content {
	display: flex;
	gap: 15px;
}

.thematic-map .regions .content-wrapper .content .slide-description {
    font-size: 14px;
	margin-bottom: 10px;
	line-height: 1.2;
}

.thematic-map .regions .content-wrapper .content .read-more-button {
    position: relative;
    color: var(--black);
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-width: 2px;
    border-right-width: 8px;
	text-transform: uppercase;
	border-color: var(--light-orange);
}

.thematic-map .regions h3 {
	font-size: var(--text-lg);
	font-weight: 700;
}

.thematic-map .regions a i {
	margin-left: var(--space-1);
}

/* Slider Arrows */
.thematic-map.slides .regions .glide__arrows {
	position: absolute;
	display: flex;
	z-index: 1;
	bottom: 0;
	right:	0;
	margin: var(--space-2) var(--space-1);
}

@media (max-width: 375px) {
	.thematic-map .widget-links a {
		padding: 5px 2px;
	}

	.thematic-map .links-cont {
		padding: 0 10px 20px;
	}

	.thematic-map .controls button {
		font-size: 14px;
		padding: 10px 15px;
	}
}

@media (min-width: 40em) {
	.thematic-map .map {
		width: 100%;
	}

	.thematic-map .links-cont {
		position: relative;
		top: -3px;
	}
}

/*
	Desktop Overwrites
*/

@media (min-width: 64em) {
	.thematic-map .stage {
		position: relative;
		max-width: 100vw;
		grid-column: 2 / 4;
        grid-row: 1;
		overflow: hidden;
	}

	.thematic-map .regions .close-button:hover {
		background-color: transparent;
	}

	.thematic-map.slides .container {
		display: grid;
    	grid-template-columns: repeat(4, 1fr);
	}

	.thematic-map .links-cont {
        grid-column: 4;
    }

	.thematic-map .controls button:first-of-type,
	.thematic-map .controls button:last-of-type,
	.thematic-map .controls button:nth-child(2) {
		width: 100%;
	}

	.thematic-map .controls button:first-of-type:hover,
	.thematic-map .controls button:last-of-type:hover,
	.thematic-map .controls button:nth-child(2):hover {
		background-color: transparent;
		color: var(--black);
	}
	
	.thematic-map .controls button.active:first-of-type:hover {
		background-color: var(--light-blue);
		color: white;
	}
	
	.thematic-map .controls button.active:nth-child(2):hover {
		background-color: var(--green);
		color: white;
	}
	
	.thematic-map .controls button.active:last-of-type:hover {
		background-color: var(--orange);
		color: white;
	}

	.thematic-map.slides .regions {
		grid-column: 2 / span 1;
		grid-row: 1/ span 1;
		justify-self: end;
		align-self: center;
		width: 33vw;
		max-width: 475px;
		margin: 0;
		z-index: 10;
	}

	.thematic-map.slides .header {
		max-width: 1150px;
    	margin: 0 auto;
	}

	.thematic-map .regions [data-poi] {
		max-width: 40vw;
		padding: var(--space-2);
		width: 100%;
	}

	.thematic-map .description {
		font-size: 18px;
		max-width: 800px;
		margin: 0 auto 30px;
	}

	.thematic-map .state-map {
		display: block;
		position: relative;
		bottom: 120px;
        width: 420px;
        height: 20px;
        left: -250px;
	}

	.thematic-map .controls {
		flex-direction: column;
		grid-column: 1;
        grid-row: 1;
		padding: 0px;
		gap: 15px;
	}

	.thematic-map .widget-links {
		flex-direction: column;
		gap: 15px;
	}

	.thematic-map.slides .map {
		overflow: hidden;
	}

	.thematic-map.slides .map svg {
		width: auto;
		margin: 0px;
	}
}


@media (min-width: 75em) {
    .thematic-map .controls {
        align-items: flex-start;
		justify-content: flex-start;
        margin-top: 50px;
    }

	.thematic-map .links-cont {
		align-items: flex-start;
		margin-top: 50px;
    }

	.thematic-map .state-map {
        bottom: 150px;
        width: 520px;
        left: -320px;
    }

	.thematic-map .widget-link img {
		margin: 0 auto 6px;
		max-width: 65px;
	}

	.thematic-map .controls button {
		max-width: 250px;
		font-size: 25px;
	}

	.thematic-map .controls button:nth-child(2) {
		margin: 0;
	}

	.thematic-map .widget-links a {
		padding: 5px 16px;
		font-size: 14px;
		font-weight: bold;
	}

	.thematic-map .widget-links {
        gap: 50px;
    }

	.thematic-map .regions h3 {
		font-size: 21px;
		font-weight: 700;
	}
}

