.chapter-map-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	padding: 40px 20px;
	max-width: 1280px;
	margin: 0 auto;
	margin-bottom:40px;
}

.chapter-map-main {
	flex: 1 1 700px;
	min-width: 300px;
}

.chapter-map-sidebar {
	width: 100%;
	max-width: 306px;
	font-family: sans-serif;
}

.chapter-map-sidebar h2 {
	font-size: 18px;
	font-weight: 700;
	color: #333;
	margin-bottom: 16px;
}

.dropdown select {
	width: 100%;
	padding: 12px;
	font-size: 16px;
	border: 1px solid #ECE6DF;
	background: #fff;
	color: #444;
}

.divider {
	text-align: center;
	margin: 24px 0;
	position: relative;
}
.divider::before,
.divider::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 40%;
	height: 1px;
	background: #ECE6DF;
}
.divider::before {
	left: 0;
}
.divider::after {
	right: 0;
}
.divider span {
	background: #fdfcfa;
	padding: 0 12px;
	color: #888;
	font-weight: 600;
	font-size: 14px;
}

.filter-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.filter-item {
	border: 1px solid #ECE6DF;
	background: #FAF9F7;
	overflow: hidden;
}

.filter-item input[type="radio"] {
	display: none;
}

.filter-item label {
	display: flex;
	align-items: center;
	padding: 12px;
	cursor: pointer;
	gap: 10px;
	position: relative;
	transition: background 0.2s ease-in-out;
	margin-bottom: 0px;
}

.filter-item .radio-icon {
	width: 16px;
	height: 16px;
	border: 2px solid #ccc;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
}

.filter-item input[type="radio"]:checked + label .radio-icon {
	border-color: #b8632e;
	background-color: #b8632e;
}

.filter-item .filter-title {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	flex: 1;
}

.filter-item .arrow {
	transform: rotate(0deg);
	transition: transform 0.3s ease-in-out;
}

.filter-item input[type="radio"]:checked + label .arrow {
	transform: rotate(180deg);
}

.filter-content {
	max-height: 0;
	overflow: hidden;
	padding: 0 12px;
	color: #666;
	font-size: 14px;
	line-height: 1.5;
	transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.filter-item input[type="radio"]:checked ~ .filter-content {
	max-height: 300px;
	padding: 12px;
	background-color: #fff;
}

.disclaimer {
	padding: 20px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	margin-bottom: 80px;
	margin-top: 60px;
}

/* Hexagonal USA/Canada map */
.hex-map {
	margin-top: 64px;
	display: grid;
	grid-template-columns: repeat(13, 52px);
	grid-auto-rows: 44px;
	gap: 4px;
	position: relative;
	place-content: center;
	transform: translateX(-45px);
}

.hex-container .state-name {
	display:none;
}

.hex {
	margin-top: 15px;
	width: 52px;
	min-width: 52px;
	height: 30px;
	background-color: #187870;
	position: relative;
	color: #fff;
	font-size: 16px;
	font-family: sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.25s ease-in-out;
	cursor: pointer;
}

.hex label {
	margin-bottom: 0px;
	cursor:pointer;
}

.hex:before {
	content: "";
	width: 0;
	height: 0;
	border-bottom: 15px solid #187870;
	border-left: 26px solid transparent;
	border-right: 26px solid transparent;
	position: absolute;
	top: -15px;
	transition: border-color 0.25s ease-in-out;
}

.hex:after {
	content: "";
	width: 0;
	position: absolute;
	left: 0px;
	bottom: -15px;
	border-top: 15px solid #187870;
	border-left: 26px solid transparent;
	border-right: 26px solid transparent;
	transition: border-color 0.25s ease-in-out;
}


.hex:hover, .hex.selected:hover {
  background-color:#F17113;
}

.hex:hover::before, .hex.selected:hover::before {
  border-bottom: 15px solid #F17113;
}

.hex:hover::after, .hex.selected:hover::after {
  border-top: 15px solid #F17113;
}

.hex.selected {
  background-color: #BE5918;
}

.hex.selected::after {
  border-top:15px solid #BE5918;
}

.hex.selected::before {
  border-bottom:15px solid #BE5918;
}

.hex.disabled {
	background-color: #999;
	cursor: not-allowed;
}

.hex.disabled:hover {
	background-color: #999;
}

.hex.disabled::before {
	border-bottom-color: #999;
}

.hex.disabled::after {
	border-top-color: #999;
}

.hex.disabled:hover::before {
	border-bottom-color: #999;
}

.hex.disabled:hover::after {
	border-top-color: #999;
}

.hex-container[data-row="2"],
.hex-container[data-row="4"],
.hex-container[data-row="6"],
.hex-container[data-row="8"] {
	margin-left: 28px;
}

.mobile-controls {
	display: none;
}

.pagination {
	display: none;
}

@media (max-width: 768px) {

	.mobile-controls {
		display: block;
		margin-top: 20px;
	}

	.chapter-map-sidebar {
		display: none;
	}

	.chapter-map-layout {
		padding: 0px;
	}

	.hex-map {
		display: block;
		margin-top: 40px;
		transform: translateX(0px);
	}

	.hex-map.hide-mobile {
		display: none;
	}

	.hex-container {
		display: flex;
		gap: 12px;
		height:84px;
		margin-bottom: 8px;
		border: 1px solid #ECE6DF;
		padding: 12px;
		background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.25 3.75L17.5 10M17.5 10L11.25 16.25M17.5 10H2.5' stroke='%23F17113' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 12px center;
		background-size: 20px;
		padding-right: 44px;
		align-items: center;
		cursor: pointer;
	}

	.hex-container[data-row="2"],
	.hex-container[data-row="4"],
	.hex-container[data-row="6"],
	.hex-container[data-row="8"] {
		margin-left: 0;
	}

	.hex-container .state-name {
		display: inline-block;
		line-height: 1.2;
		font-size: 16px;
		font-weight:700;
		color: #3B3F40;
	}

	.hex {
		margin-top: 0;
	}

	.chapter-map-layout {
		flex-direction: column;
	}
	.chapter-map-sidebar {
		width: 100%;
	}

	.pagination {
		display: flex;
		gap: 8px;
		align-items: center;
		justify-content: center;
	}

	.pagination button {
		width: 48px;
		height: 48px;
		padding: 0;
		border: 1px solid #eee7e0;
		background-color: #fff;
		color: #666;
		font-size: 16px;
		text-align: center;
		cursor: pointer;
	}

	.pagination button:hover {
		background-color: transparent !important;
		color: #666;
		border: 1px solid #666;
	}

	.pagination button::before {
		background-color: transparent !important;
	}

	.pagination button.active {
		background-color: #197873; /* Dark green */
		color: white;
		border-color: #197873;
	}

	.pagination button:disabled {
		opacity: 0.4;
		cursor: default;
	}
}
