/* Lock page scroll when menu is open */
html.cnav-lock,
body.cnav-lock {
	overflow: hidden;
}

/* Overlay */
.cnav-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.cnav-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.cnav-overlay-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(220, 220, 220, 0.6);
	backdrop-filter: blur(4px);
}

/* Shell */
.cnav-shell {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	height: 100dvh;
	overflow: hidden;
	transform: translateY(-200px);
	transition: transform 0.3s ease;
}

.cnav-overlay.is-open .cnav-shell {
	transform: translateY(0);
}

/* Static header */
.cnav-shell-header {
	flex: 0 0 auto;
	background: var(--copper-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #fff;
	padding: 0 .5rem;
}

.cnav-shell-header-center{
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.cnav-shell-title {
	font-weight: 500;
}

.cnav-back,
.cnav-close {
	border: 0;
	background: none;
	padding: 0.5rem;
	cursor: pointer;
	font: inherit;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #fff;
}

.cnav-back.is-hidden {
	display: none !important;
}

.cnav-close {
	margin-left: auto;
	justify-self: end;
	font-size: 1.5rem;
	line-height: 1;
}

.cnav-shell-header,
.cnav-panels {
	position: relative;
	z-index: 2;
}

.cnav-shell-bg {
	position: absolute;
	inset: -4px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	filter: blur(2px) brightness(0.8);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 0;
}

.cnav-shell-bg.has-bg {
	opacity: 1;
}

/* Panels wrapper */
.cnav-panels {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

/* Panels */
.cnav-panel {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	transform: translateX(100%) translateY(18px);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.3s ease;
	background: transparent;
	overflow: hidden;
	will-change: transform, opacity;
}

.cnav-panel.is-active {
	transform: translateX(0) translateY(0);
	opacity: 1;
	z-index: 3;
}

.cnav-panel.is-prev {
	transform: translateX(0) translateY(-50px);
	opacity: 0;
	z-index: 1;
	pointer-events: none;
}

.cnav-panel.is-next {
	transform: translateX(0) translateY(50px);
	opacity: 0;
	z-index: 0;
	pointer-events: none;
}

/* Only the content area scrolls */
.cnav-panel-body {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.cnav-panel-body::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* Root cards */
.cnav-root-list {
	list-style: none;
	margin: 0;
	padding: 1rem;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.cnav-root-item {
	margin: 0;
	width: calc(20% - .8rem);
}

@media screen and (max-width: 1280px) {
	.cnav-root-item {
		width: calc(25% - .75rem);
	}
}

@media screen and (max-width: 980px) {
	.cnav-root-item {
		width: calc(33.333% - .667rem);
	}
}

@media screen and (max-width: 720px) {
	.cnav-root-item {
		width: calc(50% - .5rem);
	}
}

.cnav-root-card {
	position: relative;
	overflow: hidden;
	background: rgba(250, 248, 245, 0.85);
	padding: .5rem .5rem 0 .5rem;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cnav-root-card-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	background-color: var(--copper-color);
	border-radius: 5px;
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.cnav-root-image-link {
	position: absolute;
	inset: 0;
	display: block;
}

.cnav-root-card-info-links {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
}

.cnav-root-link {
	text-decoration: none;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.1;
	max-width: calc(100% - 60px);
}

/* Standard list rows */
.cnav-list {
	list-style: none;
	margin: 0;
	padding: 1rem;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}

@media screen and (max-width: 1100px) {
	.cnav-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (max-width: 820px) {
	.cnav-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 560px) {
	.cnav-list {
		grid-template-columns: 1fr;
	}
}

.cnav-list-item {
	margin: 0;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 8px;
	padding: .5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cnav-list-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 58px;
}

.cnav-list-thumb {
	height: 64px;
	aspect-ratio: 1 / 1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--copper-color);
	border-radius: 3px;
	display: block;
	flex: 0 0 auto;
}

.cnav-list-link {
	display: block;
	flex: 1 1 auto;
	min-width: 0; /* important inside flex */
	text-decoration: none;
	padding: 1rem 0;
	font-weight: 600;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Forward buttons */
.cnav-forward,
.cnav-root-forward {
	border: 0;
	display: inline-flex;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--copper-color);
	justify-content: center;
	align-items: center;
	box-shadow: 0 0 0 2px inset;
	background: transparent;
	flex: 0 0 auto;
}

/* Larger screens */
@media (min-width: 768px) {
	.cnav-shell {
		width: 100%;
	}
}