/**
 * NLM site footer (plugin replacement).
 */

.nlm-site-footer {
	--nlm-footer-bg: var(--nlm-header-bg, #000b1e);
	--nlm-footer-accent: var(--nlm-accent, #3ec8ff);
	--nlm-footer-text: #fff;
	--nlm-footer-muted: rgba(255, 255, 255, 0.72);
	--nlm-footer-border: #37455d;
	--nlm-footer-partner-logo-height: 40px;
	--nlm-footer-top-offset: 50px;

	background-color: var(--nlm-footer-bg);
	color: var(--nlm-footer-text);
	font-family: var(--Montserrat, Montserrat, sans-serif);
	padding-top: var(--nlm-footer-top-offset);
}

/* Keep footer above overlapping page content (e.g. homepage masonry). */
body.nlm-footer-active #nlm-site-footer {
	position: relative;
	z-index: 20;
	isolation: isolate;
}

body.nlm-footer-active #content {
	position: relative;
	z-index: 1;
}

/* Parent theme sets h2 { color: #666 }. */
body.nlm-footer-active #nlm-site-footer h2.nlm-site-footer__heading {
	color: var(--nlm-footer-text);
}

.nlm-site-footer a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.nlm-site-footer a:hover,
.nlm-site-footer a:focus {
	color: var(--nlm-footer-accent);
}

.nlm-site-footer__main.wrap,
.nlm-site-footer__partners.wrap,
.nlm-site-footer__bar.wrap {
	max-width: 100%;
	padding-left: var(--wrap, 130px);
	padding-right: var(--wrap, 130px);
	box-sizing: border-box;
}

.nlm-site-footer__main {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 2.5rem 2rem;
	padding-top: 4rem;
	padding-bottom: 3rem;
}

.nlm-site-footer__brand {
	position: relative;
	overflow: hidden;
	min-width: 0;
}

.nlm-site-footer__watermark {
	position: absolute;
	left: -0.15em;
	top: 0;
	z-index: 0;
	font-family: var(--Raleway, Raleway, serif);
	font-size: clamp(7rem, 14vw, 13rem);
	font-weight: 700;
	line-height: 0.82;
	letter-spacing: -0.04em;
	color: rgba(255, 255, 255, 0.03);
	user-select: none;
	pointer-events: none;
}

.nlm-site-footer__brand-inner {
	position: relative;
	z-index: 1;
}

.nlm-site-footer__logo {
	display: block;
	width: fit-content;
	max-width: min(100%, var(--nlm-footer-logo-max-width, 100%));
	margin-bottom: 1.25rem;
	color: var(--nlm-footer-text);
}

.nlm-site-footer__logo:hover,
.nlm-site-footer__logo:focus {
	color: var(--nlm-footer-text);
}

.nlm-site-footer__logo-svg,
.nlm-site-footer__logo-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	filter: none;
}

.nlm-site-footer__intro-line1,
.nlm-site-footer__intro-line2 {
	margin: 0 0 0.85rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--nlm-footer-muted);
	max-width: 22rem;
}

.nlm-site-footer__accent {
	color: var(--nlm-footer-accent);
}

.nlm-site-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.nlm-site-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: rgba(62, 200, 255, 0.12);
	color: var(--nlm-footer-text);
}

.nlm-site-footer__social-link:hover,
.nlm-site-footer__social-link:focus {
	background: var(--nlm-footer-accent);
	color: var(--nlm-footer-bg);
}

.nlm-site-footer__social-link svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.nlm-site-footer__heading {
	margin: 0 0 1.25rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	position: relative;
	padding-bottom: 0.65rem;
}

.nlm-site-footer__heading::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 2rem;
	height: 2px;
	background: var(--nlm-footer-accent);
}

.nlm-site-footer__links,
.nlm-site-footer__contact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nlm-site-footer__links li {
	margin-bottom: 0.65rem;
	font-size: 0.88rem;
	line-height: 1.4;
}

.nlm-site-footer__links li:last-child {
	margin-bottom: 0;
}

.nlm-site-footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
	font-size: 0.88rem;
	line-height: 1.45;
}

.nlm-site-footer__contact-item:last-child {
	margin-bottom: 0;
}

.nlm-site-footer__contact-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: rgba(62, 200, 255, 0.15);
	color: var(--nlm-footer-accent);
}

.nlm-site-footer__contact-icon-svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.nlm-site-footer__contact-icon .nlm-site-footer__contact-icon-mask,
.nlm-site-footer__contact-icon .nlm-header__icon-mask {
	display: block;
	width: 1rem;
	height: 1rem;
	background-color: currentColor;
	mask-image: var(--nlm-icon-mask);
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-image: var(--nlm-icon-mask);
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
}

.nlm-site-footer__partners {
	border-top: 1px solid var(--nlm-footer-border);
	padding-top: 2.75rem;
	padding-bottom: 2.75rem;
}

.nlm-site-footer__partners-list {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

.nlm-site-footer__partners-item {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 0.75rem 1.75rem;
	border-right: 1px solid var(--nlm-footer-border);
}

.nlm-site-footer__partners-item:first-child {
	padding-left: 0;
}

.nlm-site-footer__partners-item:last-child {
	border-right: 0;
	padding-right: 0;
}

.nlm-site-footer__partner-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--nlm-footer-partner-logo-height);
}

.nlm-site-footer__partners-item .nlm-site-footer__partner-logo img,
.nlm-site-footer__partners-item .nlm-site-footer__partner-img {
	display: block;
	height: var(--nlm-footer-partner-logo-height);
	max-height: var(--nlm-footer-partner-logo-height);
	width: auto;
	max-width: 100%;
	object-fit: contain;
	-webkit-filter: brightness(0) saturate(100%) invert(100%);
	filter: brightness(0) saturate(100%) invert(100%);
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.nlm-site-footer__partners-item .nlm-site-footer__partner-logo:hover img,
.nlm-site-footer__partners-item .nlm-site-footer__partner-logo:focus img {
	opacity: 1;
}

.nlm-site-footer__bar.wrap {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2rem;
	border-top: 1px solid var(--nlm-footer-border);
	padding-top: 2rem;
	padding-bottom: 2rem;
	min-height: 4.5rem;
}

.nlm-site-footer__copyright {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.8125rem;
	color: var(--nlm-footer-muted);
	letter-spacing: 0.02em;
}

.nlm-site-footer__legal {
	margin-left: auto;
	flex: 0 0 auto;
}

.nlm-site-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
}

.nlm-site-footer__legal-list > li {
	display: flex;
	align-items: center;
}

.nlm-site-footer__legal-list > li + li::before {
	content: "|";
	margin-right: 0.65rem;
	color: rgba(255, 255, 255, 0.35);
	user-select: none;
}

@media (max-width: 900px) {
	.nlm-site-footer__bar.wrap {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 0.75rem;
		min-height: 0;
	}

	.nlm-site-footer__legal {
		width: 100%;
		margin-left: 0;
	}

	.nlm-site-footer__legal-list {
		justify-content: flex-start;
	}
}

@media (max-width: 1024px) {
	.nlm-site-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nlm-site-footer__brand {
		grid-column: 1 / -1;
	}

	.nlm-site-footer__partners-list {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 1.5rem;
	}

	.nlm-site-footer__partners-item {
		flex: 0 1 auto;
		border-right: 0;
		padding: 0.5rem 1rem;
	}

	.nlm-site-footer__partners-item:not(:last-child) {
		border-right: 1px solid var(--nlm-footer-border);
	}
}

@media (max-width: 640px) {
	.nlm-site-footer__main.wrap,
	.nlm-site-footer__partners.wrap,
	.nlm-site-footer__bar.wrap {
		padding-left: var(--wrap, 15px);
		padding-right: var(--wrap, 15px);
	}

	.nlm-site-footer__main {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding-top: 2.5rem;
		padding-bottom: 2rem;
	}

	.nlm-site-footer__watermark {
		font-size: clamp(5rem, 28vw, 8rem);
	}

	.nlm-site-footer__partners {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	.nlm-site-footer__partners-list {
		flex-direction: column;
		align-items: stretch;
	}

	.nlm-site-footer__partners-item {
		border-right: 0;
		border-bottom: 1px solid var(--nlm-footer-border);
		padding: 1rem 0;
	}

	.nlm-site-footer__partners-item:last-child {
		border-bottom: 0;
	}

	.nlm-site-footer__bar.wrap {
		align-items: center;
		padding-top: 2.25rem;
		padding-bottom: 2rem;
		text-align: center;
	}

	.nlm-site-footer__copyright {
		width: 100%;
		text-align: center;
	}

	.nlm-site-footer__legal {
		width: 100%;
	}

	.nlm-site-footer__legal-list {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0;
		width: 100%;
	}

	.nlm-site-footer__legal-list > li,
	.nlm-site-footer__legal-list > li > a,
	.nlm-site-footer__legal-list > li > span {
		width: 100%;
	}

	.nlm-site-footer__legal-list > li > a,
	.nlm-site-footer__legal-list > li > span {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		text-align: center;
	}

	.nlm-site-footer__legal-list > li + li::before {
		content: none;
	}
}
