/* FOOTER */

.site-footer {
	position: relative;
	padding: 112px 0 42px;
	background: var(--color-dark);
	color: rgba(255, 255, 255, 0.74);
	overflow: hidden;
}

.site-footer::before {
	display: none;
}

.site-footer .container {
	position: relative;
	z-index: 1;
}

.site-footer__upper,
.site-footer__lower {
	gap: 48px;
}

.site-footer__upper {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 30px;
}

.site-footer__brand {
	display: inline-flex;
	align-items: flex-start;
	color: var(--color-white);
	text-decoration: none;
}

.site-footer__brand:hover,
.site-footer__brand:focus-visible {
	text-decoration: none;
}

.site-footer__logo {
	display: block;
	width: auto;
	height: 112px;
}

.site-footer__nav {
	padding-top: 10px;
	width: var(--footer-links-width);
	max-width: 100%;
	text-align: right;
}

.site-footer__menu-list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(120px, 1fr));
	grid-auto-flow: column;
	grid-template-rows: repeat(3, auto);
	gap: 18px 0;
	margin: 0;
	padding: 0;
	justify-items: end;
}

.site-footer__menu-item {
	margin: 0;
}

.site-footer__menu-item a {
	font-family: var(--font-display);
	font-size: 1.125rem;
	line-height: 1;
	letter-spacing: 0.01em;
	color: rgba(255, 255, 255, 0.32);
	text-decoration: none;
}

.site-footer__menu-item a:hover,
.site-footer__menu-item a:focus-visible {
	color: #fff;
	text-decoration: none;
}

.site-footer__divider {
	height: 1px;
	margin: 0 0 28px;
	background: rgba(255, 255, 255, 0.2);
}

.site-footer__lower {
	display: grid;
	grid-template-columns: 1fr var(--footer-links-width);
	align-items: center;
	gap: 24px;
}

.site-footer__contact-links,
.site-footer__meta {
	min-width: 0;
}

.site-footer__contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-self: end;
	justify-content: flex-end;
	order: 2;
}

.site-footer__contact-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
}

.site-footer__contact-link:hover,
.site-footer__contact-link:focus-visible {
	text-decoration: none;
}

.site-footer__contact-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
	opacity: 0.32;
	transition: opacity 0.2s ease;
}

.site-footer__contact-link:hover .site-footer__contact-icon,
.site-footer__contact-link:focus-visible .site-footer__contact-icon {
	opacity: 1;
}

.site-footer__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-self: start;
	text-align: left;
	gap: 12px;
	width: var(--footer-links-width);
	max-width: 100%;
	order: 1;
}

.site-footer__legal-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 12px 28px;
}

.site-footer__legal-links a {
	position: relative;
	display: inline-block;
	font-size: var(--font-size-legal);
	line-height: var(--line-height-text-small);
	color: rgba(255, 255, 255, 0.32);
	text-decoration: none;
}

.site-footer__legal-links a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 3px;
	background: var(--color-primary);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.2s ease-in-out;
}

.site-footer__legal-links a:hover,
.site-footer__legal-links a:focus-visible {
	color: #fff;
	text-decoration: none;
}

.site-footer__legal-links a:hover::after,
.site-footer__legal-links a:focus-visible::after {
	transform: scaleX(0);
}

.site-info {
	margin: 0;
	font-size: var(--font-size-text-small);
	color: rgba(255, 255, 255, 0.48);
}

@media (min-width: 768px) and (max-width: 1320px) {
	.site-footer {
		padding-top: 112px;
	}

	.site-footer__upper {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: 48px;
	}

	.site-footer__nav {
		padding-top: 0;
		margin-left: auto;
	}

	.site-footer__menu-list {
		gap: 12px 48px;
	}
}

@media (max-width: 767px) {
	.site-footer {
		padding: 102px 0 32px;
	}

	.site-footer__upper,
	.site-footer__lower {
		grid-template-columns: 1fr;
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.site-footer__upper {
		padding-bottom: 36px;
	}

	.site-footer__logo {
		height: 104px;
	}

	.site-footer__nav {
		padding-top: 24px;
		padding-bottom: 0;
		width: 100%;
		text-align: left;
	}

	.site-footer__menu-list {
		grid-template-columns: 1fr 1fr;
		gap: 14px 12px;
		justify-items: start;
	}

	.site-footer__menu-item a {
		font-size: 1rem;
	}

	.site-footer__divider {
		margin-bottom: 36px;
	}

	.site-footer__lower {
		width: 100%;
		padding-top: 0;
		padding-bottom: 12px;
	}

	.site-footer__contact-links {
		gap: 14px;
		justify-self: start;
		justify-content: flex-start;
	}

	.site-footer__meta,
	.site-footer__legal-links {
		align-items: flex-start;
		justify-content: flex-start;
		width: 100%;
	}

	.site-footer__legal-links {
		display: flex;
		gap: 0;
	}

	.site-footer__legal-links a + a::before {
		content: "|";
		display: inline-block;
		margin: 0 8px;
		color: rgba(255, 255, 255, 0.32);
	}
}
