/**
 * Site footer — the "Footer Main" HTML blocks (one per language) built from
 * Woodmart blocks with wdm-footer-* classes, plus the theme's copyrights bar.
 * Layout from the Footer frames of the Multipack Figma file; the contact tabs,
 * icon rows and details panel come from contact-blocks.css.
 */

.wd-footer.footer-container,
.footer-container .wd-copyrights {
	background-color: #fbfbfa;
}

.footer-container .main-footer {
	padding-top: 80px;
	padding-bottom: 0;
}

/* The footer frame is 1192px wide, 2px more than the site container. */
@media (min-width: 1025px) {
	.footer-container .main-footer,
	.footer-container .wd-copyrights > .container {
		max-width: 1192px;
	}
}

.wdm-footer.wp-block-wd-container.wp-block-wd-container {
	max-width: none;
	align-items: flex-start;
	column-gap: 32px;
	row-gap: 48px;
	color: var(--wdm-c-text);
}

.wdm-footer .wp-block-wd-container.wp-block-wd-container {
	max-width: none;
}

.wdm-footer p {
	margin: 0;
}

/* Brand column */

.wdm-footer .wdm-footer-brand {
	flex: 0 0 400px;
	align-items: stretch;
	gap: 16px;
	min-width: 0;
}

.wdm-footer .wdm-footer-logo {
	width: 150px;
}

.wdm-footer .wdm-footer-logo img {
	display: block;
	width: 150px;
	height: auto;
}

.wdm-footer .wp-block-wd-title.wdm-footer-title {
	margin: 0;
	color: var(--wdm-c-dark);
	font-weight: 800;
	font-size: 20px;
	line-height: 26px;
	text-transform: none;
}

.wdm-footer .wdm-footer-lead {
	color: #6b7270;
	font-size: 14px;
	line-height: 20px;
}

.wdm-footer .wdm-contacts-tabs .wd-tabs-header {
	margin-bottom: 16px;
}

/* Link columns — Woodmart toggles: static on desktop, accordions on phones. */

.wdm-footer .wdm-footer-nav {
	flex: 1 1 0;
	min-width: 0;
	gap: 18px;
}

.wdm-footer .wdm-footer-nav .wd-toggle-title {
	margin: 0;
	color: var(--wdm-c-text);
	font-weight: 700;
	font-size: 16px;
	line-height: 20px;
	text-transform: none;
}

/* The toggles carry their own gap (block CSS .wd.wd .wd-xxxx .wd-toggle-content). */
.footer-container .wdm-footer.wdm-footer .wdm-footer-nav .wd-toggle-content {
	margin-top: 18px;
}

.wdm-footer .wdm-footer-nav .wd-sub-menu,
.wdm-footer .wdm-footer-nav .sub-sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wdm-footer .wdm-footer-nav .sub-sub-menu {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Woodmart pulls accented menu lists up by their 8px link padding. */
.wdm-footer .wdm-footer-nav .wd-sub-menu > li,
.wdm-footer .wdm-footer-nav .sub-sub-menu > li {
	margin: 0;
}

/* Beats the menu list's own block CSS (.wd.wd .wd-xxxx .sub-sub-menu > li > a). */
.footer-container .wdm-footer.wdm-footer .wdm-footer-nav .sub-sub-menu > li > a {
	padding: 0;
	color: #6b7270;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
}

.footer-container .wdm-footer.wdm-footer .wdm-footer-nav .sub-sub-menu > li > a:hover {
	color: var(--wdm-c-green);
}

/* Certificates */

.wdm-footer .wdm-footer-badges {
	flex: 0 0 120px;
	align-items: flex-end;
	gap: 24px;
}

.wdm-footer .wdm-footer-badges > .wdm-footer-badge {
	width: auto;
}

.wdm-footer .wdm-footer-badge img {
	display: block;
	width: 114px;
	height: auto;
	margin-inline-start: auto;
}

.wdm-footer .wdm-footer-badge:first-child:not(:only-child) img {
	width: 85px;
}

/* EU funding notice, between two dividers */

.wdm-footer .wdm-footer-eu {
	flex: 0 0 100%;
	align-items: center;
	gap: 70px;
	padding: 42px 26px;
	border-top: 1px solid #e7e9e6;
	border-bottom: 1px solid #e7e9e6;
}

.wdm-footer .wdm-footer-eu-logo {
	flex: 0 0 229px;
}

.wdm-footer .wdm-footer-eu-logo img {
	display: block;
	width: 229px;
	height: auto;
}

.wdm-footer .wdm-footer-eu-text {
	flex: 0 1 730px;
	color: var(--wdm-c-text);
	font-size: 16px;
	line-height: 25.6px;
}

.wdm-footer .wdm-footer-eu-text strong {
	font-weight: 600;
}

.wdm-footer .wdm-footer-eu-text a {
	color: var(--wdm-c-blue);
}

/* Copyrights bar (theme settings → Footer → Copyrights) */

.footer-container .wd-copyrights {
	padding: 32px 0 40px;
	border-top: 0;
	color: #313131;
	font-size: 16px;
	line-height: 25.6px;
}

.footer-container .wd-copyrights a {
	color: #333;
}

.footer-container .wd-copyrights strong {
	font-weight: 600;
}

.footer-container .wd-copyrights .wd-col-end img {
	display: block;
	height: 24px !important; /* the setting carries an inline 32px */
	width: auto;
	margin-inline-start: auto;
}

/* Tablet */

@media (max-width: 1024px) {
	.wdm-footer .wdm-footer-brand {
		flex: 1 1 100%;
	}

	.wdm-footer .wdm-footer-eu {
		gap: 32px;
	}
}

/* Mobile */

@media (max-width: 767px) {
	.footer-container .main-footer {
		padding-top: 32px;
	}

	.footer-container .main-footer,
	.footer-container .wd-copyrights > .container {
		padding-right: 20px;
		padding-left: 20px;
	}

	.wdm-footer.wp-block-wd-container.wp-block-wd-container {
		align-items: stretch;
		row-gap: 24px;
	}

	.wdm-footer .wdm-footer-brand {
		flex: none;
		gap: 14px;
	}

	.wdm-footer .wdm-footer-logo {
		width: 177px;
		margin: 0 auto 0;
	}

	.wdm-footer .wdm-footer-logo img {
		width: 177px;
	}

	.wdm-footer .wp-block-wd-title.wdm-footer-title,
	.wdm-footer .wdm-footer-lead {
		text-align: center;
	}

	.wdm-footer .wp-block-wd-title.wdm-footer-title {
		line-height: 24px;
	}

	/* The tabs sit 24px under the lead, the details panel 16px under the
	   tabs; the column gap is 14px. Padding, as Woodmart zeroes child margins. */
	.wdm-footer .wdm-footer-lead {
		padding-bottom: 10px;
	}

	.wdm-footer .wdm-footer-brand > .wdm-contacts-details {
		border-top: 2px solid transparent;
		background-clip: padding-box;
	}

	.wdm-footer .wdm-contacts-tabs .wd-nav-tabs {
		width: 100%;
	}

	.wdm-footer .wdm-footer-nav {
		flex: none;
		gap: 0;
		padding-top: 24px;
		border-top: 1px solid #e7e9e6;
	}

	.wdm-footer .wdm-footer-nav + .wdm-footer-nav {
		padding-bottom: 24px;
		border-bottom: 1px solid #e7e9e6;
	}

	.wdm-footer .wdm-footer-nav .wd-toggle-head {
		justify-content: space-between;
		align-items: center;
		min-height: 24px;
	}

	/* The design's chevron-down-small instead of the theme's thin chevron. */
	.wdm-footer .wdm-footer-nav .wd-toggle-icon {
		width: 24px;
		height: 24px;
		font-size: 0;
	}

	.wdm-footer .wdm-footer-nav .wd-toggle-icon svg {
		display: none;
	}

	.wdm-footer .wdm-footer-nav .wd-toggle-icon::before {
		content: "";
		display: block;
		width: 24px;
		height: 24px;
		background-color: var(--wdm-c-dark);
		-webkit-mask: url(../images/contacts/chevron-down.svg) center / 24px no-repeat;
		mask: url(../images/contacts/chevron-down.svg) center / 24px no-repeat;
	}

	/* The mobile frame draws the contact rows with outline icons. The icons in
	   the blocks stay the filled ones used on desktop; these replace them by
	   row (phone, phone, mail, address, hours). */
	.wdm-footer .wdm-contacts-rows li:nth-child(-n+2) .wd-icon img {
		content: url(../images/contacts/footer-phone.svg);
	}

	.wdm-footer .wdm-contacts-rows li:nth-child(3) .wd-icon img {
		content: url(../images/contacts/footer-mail.svg);
	}

	.wdm-footer .wdm-contacts-rows li:nth-child(4) .wd-icon img {
		content: url(../images/contacts/footer-pin.svg);
	}

	.wdm-footer .wdm-contacts-rows li:nth-child(5) .wd-icon img {
		content: url(../images/contacts/footer-clock.svg);
	}

	.wdm-footer .wdm-footer-eu {
		order: 4;
		flex: none;
		gap: 35px;
		padding: 0;
		border: 0;
		text-align: center;
	}

	.wdm-footer .wdm-footer-eu-logo {
		flex: none;
		margin: 0 auto;
	}

	.wdm-footer .wdm-footer-eu-text {
		flex: none;
		max-width: 288px;
		margin: 0 auto;
		font-size: 14px;
		line-height: 22.4px;
	}

	.wdm-footer .wdm-footer-badges.wp-block-wd-container {
		order: 5;
		flex: none;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 30px;
	}

	.wdm-footer .wdm-footer-badge:first-child:not(:only-child) img {
		width: 80px;
	}

	.wdm-footer .wdm-footer-badge img {
		width: 115px;
	}

	.footer-container .wd-copyrights {
		padding: 16px 0 32px;
		font-size: 12px;
		line-height: 16px;
		text-align: center;
	}

	.footer-container .wd-copyrights .wd-grid-g {
		display: flex;
		flex-direction: column-reverse;
		gap: 24px;
	}

	.footer-container .wd-copyrights .wd-col-end img {
		height: auto !important;
		max-width: 100%;
		margin: 0 auto;
	}

	.footer-container .wd-copyrights strong {
		display: block;
	}
}
