/* ==========================================================================
   FOOTER – UX Blocks "footer" (home, set in Theme Options › Footer) and
   footer-company / -contact / -news / -notes / -note / -policies (chosen per
   page type in inc/blocks.php). One block per language (Polylang).
   Layout is in UX Builder; this file styles the brand, links and legal links.
   ========================================================================== */

/* Flatsome's bottom bar is not used */
body.ag-site .absolute-footer { display: none; }
body.ag-site #footer { background: var(--ag-paper); }

/* Home uses the 5vw gutter, sub pages 6vw */
body.home .ag-footer-block { --ag-gutter: clamp(22px, 5vw, 76px); }

.ag-footer-brand { display: flex; margin: 0; }
.ag-footer-brand a { display: inline-flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 800; color: var(--ag-ink); }
/* Official logo (horizontal) */
.ag-footer-brand img, .ag-site-footer__brand img { width: auto; height: 46px; }
@media (max-width: 549px) { .ag-footer-brand img, .ag-site-footer__brand img { height: 38px; } }

.ag-footer-links { display: flex; justify-content: flex-end; align-items: center; gap: 50px; margin: 0; font-size: 9px; letter-spacing: .12em; color: var(--ag-muted); }
.ag-footer-links a { color: inherit; }
/* "HOME" on sub pages and "← BACK TO HOME" on Policies */
.ag-footer-links a.ag-footer-home, .ag-footer-back a { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ag-ink); }
.ag-footer-back { margin: 0; }

.ag-footer-legal { display: flex; justify-content: flex-end; gap: 20px; margin: 18px 0 0; font-size: 9px; line-height: 1.5; letter-spacing: .08em; color: var(--ag-muted); }
.ag-footer-legal a { color: inherit; }

.ag-footer-block a:hover { color: var(--ag-red); }

@media (max-width: 849px) {
	/* ≤850px in the original: 22px sides, links inline with the copyright below,
	   legal links on the left */
	.ag-footer-block, body.home .ag-footer-block { --ag-gutter: 22px; }
	.ag-footer-links { display: inline-block; text-align: right; line-height: 2; }
	.ag-footer-links span { display: block; }
	.ag-footer-legal { flex-wrap: wrap; justify-content: flex-start; gap: 10px 18px; }
}
@media (max-width: 549px) {
	/* Phone: brand and links share a line when they fit, otherwise the links wrap
	   below the brand; links + copyright stay right-aligned within their block. */
	.ag-footer-main { flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
	.ag-footer-main > .col { flex: 0 0 auto; width: auto; max-width: none; }
	.ag-footer-block .text-right { text-align: left; }
}
