/**
 * Explore sidebar — left slide-in panel with categorized lists of content
 * (capped at 33vw on desktop). Triggered by .nav-explore-trigger in the
 * navigation. Locks body scroll via body.mtp-explore-open.
 */

.mtp-explore {
	position: fixed;
	inset: 0;
	z-index: 1002;
	pointer-events: none;
}
.mtp-explore[hidden] {
	display: none;
}

/* Scrim/backdrop */
.mtp-explore__scrim {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.55);
	opacity: 0;
	transition: opacity 0.3s var(--ease-out);
	pointer-events: none;
	cursor: pointer;
}
.mtp-explore.is-open .mtp-explore__scrim {
	opacity: 1;
	pointer-events: auto;
}

/* Sliding panel */
.mtp-explore__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 33vw;
	max-width: 33vw;
	background: var(--brand-black);
	color: var(--brand-white);
	transform: translateX(-100%);
	transition: transform 0.35s var(--ease-out);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	pointer-events: auto;
	box-shadow: var(--shadow-md);
}
.mtp-explore.is-open .mtp-explore__panel {
	transform: translateX(0);
}

/* Header */
.mtp-explore__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 4vw, 2.5rem);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}
.mtp-explore__title {
	margin: 0;
	font-family: 'Modulus Pro Bold', var(--font-sans);
	font-size: clamp(1.35rem, 1.5vw + 1rem, 1.75rem);
	font-weight: bold;
	letter-spacing: -0.02em;
	color: var(--brand-white);
}
.mtp-explore__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius-full);
	color: rgba(255, 255, 255, 0.9);
	font-size: 1rem;
	cursor: pointer;
	transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.mtp-explore__close:hover {
	color: var(--brand-mint);
	border-color: var(--brand-mint);
}
.mtp-explore__close:focus-visible {
	outline: 2px solid var(--brand-mint);
	outline-offset: 2px;
}

/* Body / scroll area */
.mtp-explore__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
}
.mtp-explore__body > .mtp-explore__section {
	max-width: 1220px;
	margin-left: auto;
	margin-right: auto;
}
.mtp-explore__section + .mtp-explore__section {
	margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.mtp-explore__section-title {
	margin: 0 0 0.85rem;
	font-family: 'Modulus Pro Bold', var(--font-sans);
	font-size: 0.8rem;
	font-weight: bold;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brand-mint);
}

/* Lists */
.mtp-explore__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.35rem 1.5rem;
}
.mtp-explore__list--posts {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.mtp-explore__list--tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.6rem;
}
.mtp-explore__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.mtp-explore__list a {
	display: inline-block;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 0.35rem 0;
	font-size: 0.9875rem;
	line-height: 1.35;
	transition: color 0.2s var(--ease-out);
}
.mtp-explore__list a:hover {
	color: var(--brand-lime);
}
.mtp-explore__list--tags a {
	padding: 0.3rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--radius-full);
	font-size: 0.85rem;
	transition:
		color 0.2s var(--ease-out),
		border-color 0.2s var(--ease-out),
		background 0.2s var(--ease-out);
}
.mtp-explore__list--tags a:hover {
	color: var(--brand-black);
	background: var(--brand-mint);
	border-color: var(--brand-mint);
}

.mtp-explore__empty {
	margin: 0;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.9rem;
}

/* Logged-out hint below scroll area */
.mtp-explore__footer {
	flex-shrink: 0;
	padding: clamp(1rem, 3vw, 1.35rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.25rem);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mtp-explore__note {
	margin: 0;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.82rem;
	line-height: 1.45;
}
/* Specificity beats body.is-scrolled .nav-login-trigger on the shared class */
.mtp-explore .mtp-explore__note button.nav-login-trigger.mtp-explore__login-trigger {
	display: inline;
	vertical-align: baseline;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.mtp-explore .mtp-explore__note button.nav-login-trigger.mtp-explore__login-trigger:hover {
	color: var(--brand-lime);
	border: none;
}

/* Body lock when sidebar is open. */
body.mtp-explore-open {
	overflow: hidden;
}
