/* BAR Theme — Footer styles (Figma "Group 4") */

.bar-footer {
	position: relative;
	background-color: var(--wp--preset--color--primary, #104246);
	color: #ffffff;
	overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * Top region — curved dark/light swoosh behind the content
 * --------------------------------------------------------------------------- */
.bar-footer__top {
	position: relative;
}

/* Decorative shape — dark-emerald base + lighter-emerald sweep on the right.
 * Stretched to fill the top region (preserveAspectRatio="none" in the SVG). */
.bar-footer__shape {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.bar-footer__shape svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Fills set here (not in the SVG) so re-exports can't break the colours. */
.bar-footer__shape .bar-footer-shape__base {
	fill: var(--wp--preset--color--primary, #104246);
}

.bar-footer__shape .bar-footer-shape__sweep {
	fill: var(--wp--preset--color--secondary, #397767);
}

/* ---------------------------------------------------------------------------
 * Content row
 * --------------------------------------------------------------------------- */
.bar-footer__inner {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 48px;
	max-width: var(--bar-content);
	margin-inline: auto;
	padding: 40px var(--bar-section-x);
}

/* ---------------------------------------------------------------------------
 * Logo
 * --------------------------------------------------------------------------- */
.bar-footer__logo-col a {
	display: inline-block;
	text-decoration: none;
}

.bar-footer__logo-img {
	width: auto;
	height: 100px;
	max-width: 300px;
	object-fit: contain;
	transition: opacity 0.2s ease;
}

.bar-footer__logo-col a:hover .bar-footer__logo-img,
.bar-footer__logo-col a:focus-visible .bar-footer__logo-img {
	opacity: 0.8;
}

/* ---------------------------------------------------------------------------
 * Footer nav — Lato Medium 20px, white, stacked
 * --------------------------------------------------------------------------- */
.bar-footer__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bar-footer__nav-list a {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	color: #ffffff;
	text-decoration: none;
	transition: opacity 0.18s ease;
}

.bar-footer__nav-list a:hover,
.bar-footer__nav-list a:focus-visible {
	opacity: 0.75;
}

/* ---------------------------------------------------------------------------
 * Legal + socials column — legal at the top, socials pinned at the bottom
 * --------------------------------------------------------------------------- */
.bar-footer__legal-socials {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 48px;
	min-height: 170px;
}

.bar-footer__legal-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 24px;
	align-items: center;
}

.bar-footer__legal-list a {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	color: #ffffff;
	text-decoration: none;
	transition: opacity 0.18s ease;
}

.bar-footer__legal-list a:hover,
.bar-footer__legal-list a:focus-visible {
	opacity: 0.75;
	text-decoration: underline;
}

/* Socials — plain white glyphs, ~25px, no background box */
.bar-footer__socials {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 12px;
	align-items: center;
}

.bar-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	color: #ffffff;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.bar-footer__social-link:hover,
.bar-footer__social-link:focus-visible {
	opacity: 0.8;
}

/* Each icon uses currentColor for its own fill (X, Facebook) or stroke
 * (Instagram outline), so we set colour here and leave fill/stroke to the SVG. */
.bar-footer__social-link svg {
	width: 25px;
	height: 25px;
}

/* ---------------------------------------------------------------------------
 * Credit bar — darker band
 * --------------------------------------------------------------------------- */
.bar-footer__credit-bar {
	position: relative;
	z-index: 1;
	background-color: var(--wp--preset--color--footer-bar, #0b363a);
}

.bar-footer__credit-bar-inner {
	display: flex;
	align-items: center;
	min-height: 42px;
	max-width: var(--bar-content);
	margin-inline: auto;
	padding: 6px var(--bar-section-x);
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 500;
	color: #ffffff;
}

.bar-footer__credit-link {
	display: inline-block;
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.18s ease;
}

.bar-footer__credit-link:hover,
.bar-footer__credit-link:focus-visible {
	color: var(--wp--preset--color--accent-soft, #bbdee7);
}

/* ---------------------------------------------------------------------------
 * Responsive — < 768px: stack, centre, drop the curved sweep for a solid band
 * --------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.bar-footer__shape {
		display: none;
	}

	.bar-footer__inner {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
		gap: 32px;
		padding: 40px var(--bar-gutter);
	}

	.bar-footer__nav-list {
		align-items: flex-start;
	}

	.bar-footer__legal-socials {
		align-items: flex-start;
		min-height: 0;
		gap: 24px;
	}

	.bar-footer__legal-list {
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: flex-start;
		flex-direction: column;
		text-align: left;
		gap: 12px;
	}

	.bar-footer__credit-bar-inner {
		justify-content: center;
		text-align: center;
		padding-inline: var(--bar-gutter);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bar-footer__nav-list a,
	.bar-footer__legal-list a,
	.bar-footer__social-link,
	.bar-footer__credit-link {
		transition: none;
	}

	.bar-footer__social-link:hover,
	.bar-footer__social-link:focus-visible {
		transform: none;
	}
}
