/* footer.php */
/* ----------------------------------------------------------
   FOOTER
---------------------------------------------------------- */
.footer {
	background-color: var(--color-white);
	padding: 64px var(--section-px);
}

.footer__container {
	max-width: var(--container-max);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* Footer Top */
.footer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.footer__logo-img {
	height: 51px;
	width: auto;
	display: block;
}

.footer__back-to-top {
	width: 46px;
	height: 46px;
	border: 1px solid var(--color-text-dark);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background: none;
	transition: background-color 0.2s ease;
	flex-shrink: 0;
	padding: 0;
}
.footer__back-to-top:hover {
	background-color: var(--color-bg-gray);
}

.footer__arrow-up-icon {
	width: 11px;
	height: 21px;
	display: block;
	object-fit: contain;
}

/* Footer Center */
.footer__center {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 32px 0;
	border-bottom: 1px solid var(--color-border);
}

.footer__left {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.footer__nav-grid {
	display: inline-grid;
	width: 328px;
	row-gap: 24px;
	column-gap: 24px;
	grid-template-rows: repeat(2, fit-content(100%));
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer__nav-link {
	font-size: var(--fs-md);
	font-weight: 700;
	line-height: var(--lh-md);
	color: var(--color-text-dark);
	text-transform: uppercase;
	transition: color 0.2s ease;
	white-space: nowrap;
}

.footer__nav-link:hover {
	color: var(--color-primary);
}

.footer__nav-link[aria-current="page"],
.footer__nav-grid .current-menu-item > .footer__nav-link {
	color: var(--color-primary);
}

.footer__socials {
	display: flex;
	gap: 20px;
	align-items: center;
}

.footer__social-link {
	width: 40px;
	height: 40px;
	background-color: var(--color-bg-gray);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
	flex-shrink: 0;
}

.footer__social-link:hover {
	opacity: 0.7;
}

.footer__social-icon {
	max-width: 20px;
	max-height: 20px;
	object-fit: contain;
}

/* Footer Offices */
.footer__offices {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.footer__office {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 183px;
}

.footer__office-country {
	font-size: var(--fs-md);
	font-weight: 700;
	line-height: var(--lh-md);
	color: var(--color-text-dark);
	text-transform: uppercase;
	letter-spacing: 0;
}

.footer__office-address {
	font-size: var(--fs-md);
	font-weight: 400;
	line-height: var(--lh-md);
	color: var(--color-text-dark);
	letter-spacing: 0;
}

/* Footer Bottom */
.footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	margin: 0 auto;
}

.footer__copyright,
.footer__privacy {
	font-size: var(--fs-sm);
	font-weight: 400;
	line-height: var(--lh-sm);
	color: var(--color-text-dark);
	width: 100%;
	text-align: center;
}

.footer__privacy-link {
	color: var(--color-text-dark);
	transition: color 0.2s ease;
}
.footer__privacy-link:hover {
	color: var(--color-primary);
}

@media (max-width: 1024px) {
	.footer {
		padding: var(--section-py) var(--section-px);
	}
	.footer__left {
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
	}
	.footer__center {
		flex-direction: column;
		gap: 64px;
	}
	.footer__offices {
		flex-direction: row;
	}
	.footer__office {
		width: auto;
		min-width: 160px;
	}
	.footer__bottom {
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
	}
	.footer__copyright {
		text-align: left;
	}
	.footer__privacy {
		text-align: right;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.footer__copyright,
	.footer__privacy {
		white-space: nowrap;
	}
}

@media (max-width: 767.9px) {
	.footer {
		display: flex;
		height: 975px;
		padding: 30px 0;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.footer__container {
		width: 390px;
		max-width: calc(100% - 40px);
		flex-direction: column;
		align-items: flex-start;
		gap: 64px;
	}
	.footer__center {
		border-bottom: none;
		padding: 0;
		flex-direction: column;
		gap: 64px;
	}
	.footer__left {
		width: 100%;
		flex-direction: column;
		justify-content: flex-start;
		gap: 64px;
	}
	.footer__nav-grid {
		display: flex;
		flex-direction: column;
		gap: 10px;
		width: auto;
	}
	.footer__nav-link {
		color: var(--color-text-gray);
		font-weight: 400;
		font-size: var(--fs-sm);
		line-height: var(--lh-sm);
		text-transform: none;
	}
	.footer__offices {
		gap: 32px;
		flex-direction: column;
	}
	.footer__office {
		width: 100%;
	}
	.footer__office-country {
		font-size: 18px;
		line-height: 28px;
	}
	.footer__office-address {
		font-size: 18px;
		line-height: 28px;
	}
	.footer__bottom {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.footer__copyright,
	.footer__privacy {
		color: var(--color-text-gray);
		font-size: var(--fs-xs);
		line-height: var(--lh-xs);
		text-align: left;
	}
}
