/* clean-code-exception:magic_number stylesheet -- CSS geometry literals are measured figma values, not registry values */
.redesign_footer {
	width: 100%;
	padding: 40px 20px calc(40px + var(--android_safe_bottom, 0px));
	background: var(--color_black_900);
}

body:has(> footer.redesign_footer) {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

body:has(> footer.redesign_footer) > main {
	flex: 1 0 auto;
}

body:has(> footer.redesign_footer) > header,
body:has(> footer.redesign_footer) > footer {
	flex-shrink: 0;
}

.redesign_footer_content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	width: 100%;
	max-width: var(--reading_column_max_width);
	margin: 0 auto;
}

.redesign_footer_logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 42px;
}

.redesign_footer_logo img {
	width: 140px;
	height: 40.58px;
}

.redesign_footer_links {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	max-width: var(--reading_column_max_width);
}

.footer_links_desktop {
	display: none;
}

.redesign_footer_links_row {
	display: flex;
	gap: 40px;
}

.redesign_footer_links_row_single {
	justify-content: flex-start;
}

/* stretch, not flex-start: the anchor becomes the column's full width so the pointer answers
   anywhere on the row instead of only on the glyphs. text-align keeps every glyph on its edge. */
.redesign_footer_links_col {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	width: 155px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.redesign_footer_links_col_wide {
	width: 170px;
}

.redesign_footer_links_col a {
	display: block;
	font-size: var(--font_size_body_md);
	line-height: var(--line_height_body_md);
	font-weight: var(--font_weight_regular);
	color: var(--color_white_900);
	text-align: right;
}

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

.redesign_footer_copyright {
	width: 100%;
	max-width: var(--reading_column_max_width);
	margin: 0;
	font-size: var(--font_size_h8);
	line-height: 20px;
	font-weight: var(--font_weight_regular);
	color: var(--color_menu_muted);
	text-align: right;
}

@media (min-width: 1024px) {
	.redesign_footer {
		min-height: var(--desktop_footer_height);
		padding: 40px 0 68px;
	}

	/* The band DOM order is logo, links, social, copyright (mobile column order,
	   unchanged) -- desktop draws logo leading, links centre, social trailing
	   with the copyright stacked under the logo, which grid-template-areas
	   places without touching mobile document order. Corrected 2026-08-19
	   (UC-ER3): the page inherits html[dir=rtl] with no local direction
	   override here, so the FIRST-listed grid track renders at the physical
	   RIGHT -- the old order (social links logo) put social right and logo
	   left, the mirror of the figma frame (social x=146 left, logo x=1197
	   right). */
	.redesign_footer_content {
		display: grid;
		grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
		grid-template-rows: auto 1fr;
		grid-template-areas:
			"logo   links social"
			"copyright links .";
		row-gap: 2.73px;
		column-gap: 0;
		align-items: start;
		max-width: clamp(
			var(--desktop_footer_band_min_width_holding_a_40px_gutter_at_the_1024_band_edge),
			100% - 2 * var(--desktop_footer_band_side_gutter),
			var(--desktop_footer_band_max_width)
		);
		margin: 0 auto;
	}

	.redesign_footer_logo {
		grid-area: logo;
		justify-self: end;
		width: 170px;
		height: 49.27px;
	}

	.redesign_footer_logo img {
		width: 170px;
		height: 49.27px;
	}

	.footer_links_phone {
		display: none;
	}

	.footer_links_desktop {
		display: flex;
	}

	.redesign_footer_links {
		grid-area: links;
		flex-direction: row;
		justify-self: center;
		width: calc(100% - 2 * var(--desktop_footer_links_min_clearance_from_logo_and_social));
		max-width: 590px;
		gap: 40px;
	}

	.redesign_footer_social {
		grid-area: social;
		justify-self: start;
	}

	.redesign_footer_copyright {
		grid-area: copyright;
		justify-self: end;
	}

	.redesign_footer_links_row {
		display: contents;
	}

	.redesign_footer_links_col,
	.redesign_footer_links_col_wide {
		width: auto;
		min-width: 0;
		max-width: 170px;
		flex: 1 1 0;
	}
}
