/* ============================================================
   MN: Footer
   Centered brand footer: logo, tagline, social icons,
   footer menu links, copyright — plus back-to-top button.
   ============================================================ */

.site-footer {
	margin-top: var(--mn-space-12);
}

/* Centered brand block. */
.footer-bottom {
	background-color: var(--mn-color-surface-alt);
	padding: var(--mn-space-10) 0 var(--mn-space-8);
	text-align: center;
}

.footer-bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--mn-space-5);
}

.footer-brand .custom-logo,
.footer-brand .custom-logo-dark {
	max-height: 56px;
	width: auto;
}

/* Dark-mode logo swap: only when a dedicated dark logo exists (body class
   set in mn_body_classes), exactly one logo link is visible per mode.
   Without this guard the main logo would vanish in dark mode when no
   dark logo is configured. */
.footer-brand .custom-logo-link-dark {
	display: none;
}

html[data-theme="dark"] body.mn-has-dark-logo .footer-brand .custom-logo-link-dark {
	display: inline-block;
}

html[data-theme="dark"] body.mn-has-dark-logo .footer-brand .custom-logo-link:not(.custom-logo-link-dark) {
	display: none;
}

.footer-site-name {
	font-family: var(--mn-font-heading);
	font-size: var(--mn-text-2xl);
	font-weight: 700;
	color: var(--mn-color-heading);
	text-decoration: none;
}

.footer-tagline {
	margin: var(--mn-space-2) 0 0;
	font-size: var(--mn-text-sm);
	color: var(--mn-color-text-muted);
}

.footer-social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--mn-space-5);
}

.footer-social-link {
	display: inline-flex;
	color: var(--mn-color-heading);
	transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus {
	color: var(--mn-color-primary);
	transform: translateY(-2px);
}

.footer-nav .footer-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--mn-space-2) var(--mn-space-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-nav .footer-menu a {
	font-size: var(--mn-text-sm);
	color: var(--mn-color-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.footer-nav .footer-menu a:hover,
.footer-nav .footer-menu a:focus {
	color: var(--mn-color-primary);
}

.footer-copyright {
	margin: 0;
	font-size: var(--mn-text-xs);
	color: var(--mn-color-text-muted);
}

/* Back to top. */
.mn-back-to-top {
	position: fixed;
	right: var(--mn-space-5);
	bottom: var(--mn-space-5);
	z-index: 60;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--mn-color-primary);
	border-radius: 50%;
	background-color: var(--mn-color-surface);
	color: var(--mn-color-primary);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.mn-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mn-back-to-top:hover,
.mn-back-to-top:focus {
	background-color: var(--mn-color-primary);
	color: #fff;
}
