/*
 * AMG Co footer styles.
 * Consumes the variables from amgco-shared.css and does not redefine them.
 * No font-family anywhere (typography comes from GeneratePress).
 *
 * !important usage (1 place only):
 *  - the prefers-reduced-motion block at the end, so it can switch off every
 *    transition and animation regardless of specificity.
 */

.amgco-footer,
.amgco-footer *,
.amgco-footer *::before,
.amgco-footer *::after {
	box-sizing: border-box;
}

.amgco-footer {
	background: var(--amgco-footer-bg, #FAFAFA);
	color: #172033;
	border-top: 1px solid var(--amgco-border);
	font-size: 0.9rem;
	line-height: 1.6;
}

.amgco-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 20px 0;
}

.amgco-footer svg {
	display: block;
	flex: none;
	width: 20px;
	height: 20px;
}

/* Links ---------------------------------------------------------------- */

.amgco-footer a,
.amgco-footer a:visited {
	color: #172033;
	text-decoration: none;
	transition: color 0.15s ease;
}

.amgco-footer a:hover,
.amgco-footer a:focus,
.amgco-footer a:active {
	color: #004BF6;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.amgco-footer :focus-visible {
	outline: 2px solid #004BF6;
	outline-offset: 2px;
}

/* Grid ----------------------------------------------------------------- */

.amgco-footer__grid {
	display: grid;
	grid-template-columns: var(--amgco-footer-template, minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr));
	gap: 32px 40px;
	padding-bottom: 40px;
}

/* Brand ---------------------------------------------------------------- */

.amgco-footer__logo {
	display: inline-block;
}

.amgco-footer__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 44px;
}

.amgco-footer .amgco-footer__site-name {
	display: inline-block;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.amgco-footer__description {
	max-width: 360px;
	margin: 12px 0 0;
	color: var(--amgco-muted);
}

.amgco-footer__badge {
	display: inline-block;
	margin-top: 12px;
	padding: 4px 10px;
	border: 1px solid var(--amgco-gold-border);
	border-radius: var(--amgco-radius-sm);
	background: var(--amgco-gold-bg);
	color: var(--amgco-gold-text);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.4;
}

/* Social --------------------------------------------------------------- */

.amgco-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.amgco-footer__social li {
	margin: 0;
}

.amgco-footer .amgco-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--amgco-border);
	border-radius: 50%;
	background: var(--amgco-surface);
	box-shadow: var(--amgco-shadow);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.amgco-footer .amgco-footer__social-link:hover,
.amgco-footer .amgco-footer__social-link:focus,
.amgco-footer .amgco-footer__social-link:active {
	border-color: #004BF6;
	text-decoration: none;
}

.amgco-footer__social-link svg {
	width: 18px;
	height: 18px;
}

/* Contact -------------------------------------------------------------- */

.amgco-footer__contact {
	margin-top: 20px;
}

.amgco-footer__contact-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 8px;
	overflow-wrap: anywhere;
}

.amgco-footer__contact-row > svg {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	color: var(--amgco-muted);
}

.amgco-footer .amgco-footer__copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: -2px 0 0;
	padding: 0;
	border: 0;
	border-radius: var(--amgco-radius-sm);
	background: transparent;
	box-shadow: none;
	color: var(--amgco-muted);
	cursor: pointer;
	transition: color 0.15s ease;
}

.amgco-footer .amgco-footer__copy:hover,
.amgco-footer .amgco-footer__copy:focus,
.amgco-footer .amgco-footer__copy:active {
	background: transparent;
	color: #004BF6;
}

.amgco-footer__copy svg {
	width: 16px;
	height: 16px;
}

.amgco-footer__copy svg + svg {
	display: none;
}

.amgco-footer__copy.is-copied svg:first-child {
	display: none;
}

.amgco-footer__copy.is-copied svg + svg {
	display: block;
	color: #004BF6;
}

/* Columns -------------------------------------------------------------- */

.amgco-footer__col-title {
	margin: 0 0 14px;
	color: #172033;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.amgco-footer .amgco-footer__col-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-align: left;
	text-transform: inherit;
	cursor: default;
}

.amgco-footer .amgco-footer__col-toggle:hover,
.amgco-footer .amgco-footer__col-toggle:focus,
.amgco-footer .amgco-footer__col-toggle:active,
.amgco-footer .amgco-footer__col-toggle:disabled {
	background: transparent;
	color: inherit;
	opacity: 1;
}

/* Chevron only appears when the column is an accordion (mobile). */
.amgco-footer__col-toggle svg {
	display: none;
	transition: transform 0.2s ease;
}

.amgco-footer__links {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amgco-footer__links li {
	margin: 0;
}

.amgco-footer__sub {
	display: grid;
	gap: 6px;
	margin: 8px 0 0 4px;
	padding: 0 0 0 12px;
	border-left: 1px solid var(--amgco-border);
	list-style: none;
	font-size: 0.85rem;
}

/* Newsletter ----------------------------------------------------------- */

.amgco-footer__news-title {
	margin: 0 0 6px;
	color: #172033;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.amgco-footer__news-desc {
	margin: 0 0 14px;
	color: var(--amgco-muted);
}

.amgco-footer__form {
	display: flex;
	align-items: stretch;
	gap: 8px;
	margin: 0;
}

.amgco-footer .amgco-footer__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--amgco-border);
	border-radius: var(--amgco-radius-sm);
	background: var(--amgco-surface);
	color: #172033;
	font-size: 0.9rem;
}

.amgco-footer .amgco-footer__input:focus {
	border-color: #004BF6;
}

.amgco-footer .amgco-footer__input[aria-invalid="true"] {
	border-color: #B42318;
}

.amgco-footer .amgco-footer__submit {
	flex: none;
	height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: var(--amgco-radius-sm);
	background: #004BF6;
	box-shadow: none;
	color: #FFFFFF;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.amgco-footer .amgco-footer__submit:hover,
.amgco-footer .amgco-footer__submit:focus,
.amgco-footer .amgco-footer__submit:active {
	background: var(--amgco-blue-hover, #003BC4);
	color: #FFFFFF;
}

.amgco-footer .amgco-footer__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.amgco-footer__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.amgco-footer__status {
	min-height: 1.4em;
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: var(--amgco-muted);
}

.amgco-footer__status.is-success {
	color: #067647;
}

.amgco-footer__status.is-error {
	color: #B42318;
}

/* Legal row ------------------------------------------------------------ */

.amgco-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 0 0 20px;
	font-size: 0.82rem;
}

.amgco-footer__legal-link {
	color: var(--amgco-muted);
}

/* Bottom bar ----------------------------------------------------------- */

.amgco-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding: 20px 0;
	border-top: 1px solid var(--amgco-border);
}

.amgco-footer__copyright,
.amgco-footer__credit {
	margin: 0;
	color: var(--amgco-muted);
	font-size: 0.82rem;
}

.amgco-footer__payment {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amgco-footer__payment-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 2px 8px;
	border: 1px solid var(--amgco-border);
	border-radius: var(--amgco-radius-sm);
	background: var(--amgco-surface);
	font-size: 0.75rem;
	line-height: 1.6;
}

.amgco-footer__payment-item svg {
	width: 16px;
	height: 16px;
}

.amgco-footer__lang,
.amgco-footer__trust {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 0.82rem;
}

.amgco-footer__lang svg,
.amgco-footer__trust svg {
	width: 18px;
	height: 18px;
}

.amgco-footer__trust svg {
	color: var(--amgco-gold-text);
}

/* Back to top ---------------------------------------------------------- */

.amgco-footer .amgco-footer__totop {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #004BF6;
	box-shadow: 0 4px 12px rgba(23, 32, 51, 0.2);
	color: #FFFFFF;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.15s ease;
}

.amgco-footer .amgco-footer__totop.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.amgco-footer .amgco-footer__totop:hover,
.amgco-footer .amgco-footer__totop:focus,
.amgco-footer .amgco-footer__totop:active {
	background: var(--amgco-blue-hover, #003BC4);
	color: #FFFFFF;
}

/* Tablet --------------------------------------------------------------- */

@media (max-width: 1024px) {
	.amgco-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.amgco-footer__brand,
	.amgco-footer__news {
		grid-column: 1 / -1;
	}
}

/* Mobile: one column, menu columns become accordions ------------------- */

@media (max-width: 640px) {
	.amgco-footer__inner {
		padding-top: 40px;
	}

	.amgco-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding-bottom: 24px;
	}

	.amgco-footer__brand {
		padding-bottom: 28px;
	}

	.amgco-footer__col {
		border-top: 1px solid var(--amgco-border);
	}

	.amgco-footer__col-title {
		margin: 0;
	}

	.amgco-footer .amgco-footer__col-toggle {
		padding: 14px 0;
		cursor: pointer;
	}

	.amgco-footer__col-toggle svg {
		display: block;
	}

	.amgco-footer__col-toggle[aria-expanded="true"] svg,
	.amgco-footer__col.is-open .amgco-footer__col-toggle svg {
		transform: rotate(180deg);
	}

	/* Collapse only when JS is running, so the links stay visible without it. */
	.amgco-footer--js .amgco-footer__col-body {
		display: none;
	}

	.amgco-footer--js .amgco-footer__col.is-open > .amgco-footer__col-body {
		display: block;
		padding-bottom: 16px;
	}

	.amgco-footer__news {
		padding-top: 24px;
		border-top: 1px solid var(--amgco-border);
	}

	.amgco-footer__form {
		flex-direction: column;
	}

	.amgco-footer .amgco-footer__submit {
		width: 100%;
	}

	.amgco-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.amgco-footer,
	.amgco-footer *,
	.amgco-footer *::before,
	.amgco-footer *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}