/* ===================================================================
   9. FOOTER
================================================================== */

.page-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #7c6f64;
	/* fallback */
	border-top: 1px solid var(--border);
	text-align: center;
	color: #665c54;
	/* fallback */
	color: var(--muted);
}

.site-footer {
	border-top: 2px solid #7c6f64;
	/* fallback */
	border-top: 2px solid var(--border);
	margin-top: 2rem;
}

.site-footer-inner {
	max-width: 70rem;
	margin: 0 auto;
	padding: 1rem;
}

.site-footer p {
	margin: 0.5rem 0;
}

.site-footer-grid {
	display: grid;
	grid-template-columns: 1.25fr 1fr 1fr;
	gap: 1.25rem;
	padding: 1rem 0;
}

/* Handle the combined container on desktop */
.site-footer-combined {
	display: contents;
}

.site-footer-heading {
	font-size: 1rem;
	margin: 0 0 0.5rem;
	font-family: 'Public Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.site-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer-list li {
	margin: 0.35rem 0;
}

.site-footer-list a {
	--nav-underline: #cc241d;
	/* fallback */
	--nav-underline: var(--nav-red);
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	position: relative;
	text-decoration: none;
	padding-bottom: 0.2rem;
	color: #3c3836;
	/* fallback */
	color: var(--fg);
	transition: color 140ms ease;
}

.site-footer-list a:visited {
	color: var(--fg);
}

.site-footer-list a:hover,
.site-footer-list a:active {
	color: var(--nav-underline);
}

.site-footer-list li:nth-child(7n + 1) a {
	--nav-underline: #cc241d;
	/* fallback */
	--nav-underline: var(--nav-red);
}

.site-footer-list li:nth-child(7n + 2) a {
	--nav-underline: #d65d0e;
	/* fallback */
	--nav-underline: var(--nav-orange);
}

.site-footer-list li:nth-child(7n + 3) a {
	--nav-underline: #b57614;
	/* fallback */
	--nav-underline: var(--nav-yellow);
}

.site-footer-list li:nth-child(7n + 4) a {
	--nav-underline: #79740e;
	/* fallback */
	--nav-underline: var(--nav-green);
}

.site-footer-list li:nth-child(7n + 5) a {
	--nav-underline: #689d6a;
	/* fallback */
	--nav-underline: var(--nav-aqua);
}

.site-footer-list li:nth-child(7n + 6) a {
	--nav-underline: #458588;
	/* fallback */
	--nav-underline: var(--nav-blue);
}

.site-footer-list li:nth-child(7n + 7) a {
	--nav-underline: #b16286;
	/* fallback */
	--nav-underline: var(--nav-purple);
}

.site-footer-list a::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--nav-underline);
	transform: scaleX(1);
	transform-origin: left;
	transition: transform 140ms ease;
}

.site-footer-list a:hover::before,
.site-footer-list a:focus-visible::before {
	transform: scaleX(1);
}

.site-footer-list a i {
	color: #665c54;
	/* fallback */
	color: var(--muted);
}

.site-footer-land {
	border-top: 1px solid #7c6f64;
	/* fallback */
	border-top: 1px solid var(--border);
	margin-top: 1rem;
	padding-top: 1rem;
}

.footer-easter-egg {
	cursor: pointer;
	text-decoration: underline dotted;
	text-underline-offset: 2px;
	transition: all 0.2s ease;
}

.footer-easter-egg:hover {
	color: #cc241d;
	/* fallback */
	color: var(--accent-primary);
	text-decoration-style: solid;
}

.footer-links {
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	font-size: 0.875rem;
}

/* Back to top button */
.to-top {
	position: fixed !important;
	bottom: 20px !important;
	right: 20px !important;
	left: auto !important;
	top: auto !important;
	z-index: 100;
	border: 1px solid #7c6f64;
	/* fallback */
	border: 1px solid var(--border);
	border-radius: 999px;
	background: #fbf1c7;
	/* fallback */
	background: var(--bg);
	color: #3c3836;
	/* fallback */
	color: var(--fg);
	text-decoration: none;
	padding: 0.4rem 0.6rem;
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	font-weight: 700;
	/* Ensure proper positioning relative to viewport */
	transform: none !important;
}

/* Override link styles for to-top button */
.to-top:link,
.to-top:visited {
	position: fixed !important;
}

.to-top::before {
	display: none;
}
