/* Shared site navigation. Page templates include partials/navbar.html. */

.site-nav,
.site-nav * {
	box-sizing: border-box;
}

.site-nav {
	position: sticky;
	top: 0;
	width: 100%;
	padding: 0;
	background: rgba(5, 8, 24, 0.94);
	border-bottom: 1px solid rgba(64, 224, 255, 0.14);
	backdrop-filter: blur(12px);
	z-index: 1000;
}

.site-nav__inner {
	width: min(100%, 1400px);
	margin: 0 auto;
	padding: 0.9rem 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
}

.site-nav__brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.55rem;
	min-width: max-content;
	color: #ffffff;
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.site-nav__brand span {
	display: inline-block;
	white-space: nowrap;
	background: linear-gradient(135deg, #40e0ff, #1e90ff);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.site-nav__logo-icon {
	flex: 0 0 auto;
	filter: drop-shadow(0 0 8px rgba(64, 224, 255, 0.4));
}

.site-nav__menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 1 1 auto;
	gap: 0.55rem;
	min-width: 0;
}

.site-nav__link,
.site-nav__resources-button,
.site-nav__resource-link {
	color: #d7e3f4;
	text-decoration: none;
	font: inherit;
	font-weight: 650;
	line-height: 1.1;
	white-space: nowrap;
	border-radius: 10px;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav__link,
.site-nav__resources-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	padding: 0.55rem 0.7rem;
}

.site-nav__resources-button {
	border: 0;
	background: transparent;
	cursor: pointer;
}

.site-nav__link:hover,
.site-nav__resources-button:hover,
.site-nav__resource-link:hover,
.site-nav__link.is-active,
.site-nav__resources-button.is-active,
.site-nav__resource-link.is-active {
	color: #40e0ff;
	background: rgba(64, 224, 255, 0.12);
}

.site-nav__link:focus-visible,
.site-nav__resources-button:focus-visible,
.site-nav__resource-link:focus-visible,
.site-nav__button:focus-visible,
.site-nav__brand:focus-visible,
.site-nav__toggle:focus-visible,
.site-nav__user-button:focus-visible,
.site-nav .dropdown-menu-item:focus-visible {
	outline: 3px solid rgba(64, 224, 255, 0.85);
	outline-offset: 3px;
}

.site-nav__resources {
	position: relative;
	z-index: 1100;
}

.site-nav__resources::after {
	content: '';
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 0.55rem;
}

.site-nav__resources-menu {
	display: none;
	position: absolute;
	top: calc(100% + 0.45rem);
	left: 0;
	min-width: 190px;
	padding: 0.45rem;
	background: rgba(10, 14, 39, 0.98);
	border: 1px solid rgba(64, 224, 255, 0.25);
	border-radius: 12px;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
	z-index: 1200;
}

.site-nav__resources:hover::after,
.site-nav__resources:focus-within::after,
.site-nav__resources[data-open="true"]::after {
	display: block;
}

.site-nav__resources:hover .site-nav__resources-menu,
.site-nav__resources:focus-within .site-nav__resources-menu,
.site-nav__resources[data-open="true"] .site-nav__resources-menu {
	display: grid;
	gap: 0.2rem;
}

.site-nav__resource-link {
	display: flex;
	padding: 0.65rem 0.75rem;
}

.site-nav__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.7rem 1.1rem;
	border-radius: 10px;
	border: 1px solid transparent;
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	opacity: 1;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-nav__button:hover {
	transform: translateY(-1px);
}

.site-nav__button--primary {
	color: #06111f;
	background: linear-gradient(135deg, #66ecff, #42a5ff);
	box-shadow: 0 10px 24px rgba(64, 224, 255, 0.24);
}

.site-nav__button--outline {
	color: #ffffff;
	background: rgba(64, 224, 255, 0.08);
	border-color: rgba(64, 224, 255, 0.46);
}

.site-nav__button--donate {
	color: #ffffff;
	background: linear-gradient(135deg, #7c3aed, #db2777);
	box-shadow: 0 10px 24px rgba(219, 39, 119, 0.3);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.site-nav__auth {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

.site-nav__user {
	position: relative;
}

.site-nav__user-button {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.62rem 0.85rem;
	color: #ffffff;
	background: rgba(64, 224, 255, 0.08);
	border: 1px solid rgba(64, 224, 255, 0.46);
	border-radius: 10px;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.site-nav__user-button strong {
	color: #40e0ff;
}

.site-nav__user-menu {
	display: none;
	position: absolute;
	top: calc(100% + 0.45rem);
	right: 0;
	min-width: 250px;
	padding: 0.5rem;
	background: rgba(10, 14, 39, 0.98);
	border: 1px solid rgba(64, 224, 255, 0.3);
	border-radius: 12px;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
	z-index: 1200;
}

.site-nav__user-summary {
	padding: 0.55rem 0.75rem;
	margin-bottom: 0.35rem;
	border-bottom: 1px solid rgba(64, 224, 255, 0.2);
}

.site-nav__user-summary div:nth-child(2) {
	color: #a9b9ca;
	font-size: 0.82rem;
}

.site-nav__user-summary div:nth-child(3) {
	color: #c4b5fd;
	font-size: 0.78rem;
	text-transform: capitalize;
}

.site-nav .dropdown-menu-item {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 0.6rem;
	padding: 0.65rem 0.75rem;
	color: #ffffff;
	background: transparent;
	border: 0;
	border-radius: 8px;
	text-align: left;
	text-decoration: none;
	font: inherit;
	cursor: pointer;
}

.site-nav .dropdown-menu-item:hover {
	color: #40e0ff;
	background: rgba(64, 224, 255, 0.1);
}

.site-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #40e0ff;
	background: rgba(64, 224, 255, 0.08);
	border: 1px solid rgba(64, 224, 255, 0.42);
	border-radius: 10px;
	cursor: pointer;
}

.site-nav__toggle-icon {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
}

.site-nav__toggle-icon span {
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav[data-mobile-open="true"] .site-nav__toggle-icon span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.site-nav[data-mobile-open="true"] .site-nav__toggle-icon span:nth-child(2) {
	opacity: 0;
}

.site-nav[data-mobile-open="true"] .site-nav__toggle-icon span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.site-nav__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site-nav__overlay {
	display: none;
}

body.site-nav-open {
	overflow: hidden;
}

body.site-nav-open .site-nav__overlay {
	display: block;
	position: fixed;
	inset: 0;
	background: rgba(5, 9, 24, 0.72);
	backdrop-filter: blur(4px);
	z-index: 900;
}

@media (min-width: 1025px) {
	.site-nav__menu {
		flex-wrap: nowrap;
	}
}

@media (max-width: 1180px) and (min-width: 1025px) {
	.site-nav__inner {
		padding-inline: 1.25rem;
		gap: 0.85rem;
	}

	.site-nav__menu {
		gap: 0.35rem;
	}

	.site-nav__brand {
		font-size: 1.25rem;
	}

	.site-nav__link,
	.site-nav__resources-button {
		padding-inline: 0.5rem;
		font-size: 0.92rem;
	}

	.site-nav__button {
		padding-inline: 0.85rem;
		font-size: 0.92rem;
	}
}

@media (max-width: 1024px) {
	.site-nav__inner {
		padding: 0.75rem 1rem;
	}

	.site-nav__brand {
		font-size: 1.25rem;
	}

	.site-nav__logo-icon {
		width: 28px;
		height: 28px;
	}

	.site-nav__toggle {
		display: inline-flex;
	}

	.site-nav__menu {
		display: none;
		position: fixed;
		top: 68px;
		left: 1rem;
		right: 1rem;
		max-height: calc(100vh - 88px);
		overflow-y: auto;
		padding: 1rem;
		background: rgba(10, 14, 39, 0.98);
		border: 1px solid rgba(64, 224, 255, 0.25);
		border-radius: 14px;
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
		z-index: 1001;
		flex-direction: column;
		align-items: stretch;
		gap: 0.55rem;
	}

	.site-nav[data-mobile-open="true"] .site-nav__menu {
		display: flex;
	}

	.site-nav__link,
	.site-nav__resources-button,
	.site-nav__button,
	.site-nav__user-button {
		width: 100%;
		justify-content: center;
	}

	.site-nav__resources-menu,
	.site-nav__user-menu {
		position: static;
		width: 100%;
		min-width: 0;
		margin-top: 0.45rem;
		box-shadow: none;
	}

	.site-nav__auth,
	.site-nav__user {
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 0.55rem;
	}
}
