/**
 * Header and footer refresh, aligned with the V3 page design.
 *
 * This is deliberately NOT part of the Sass build. The theme has no
 * package.json or node_modules, so recompiling style.css would mean
 * introducing a different toolchain and regenerating 170KB of CSS for a
 * change that touches two components. This file is enqueued after
 * style.css instead, so every rule here is an override of a known value
 * rather than an edit to a generated file.
 *
 * Palette is inherited from the theme, which already matches the V3
 * tokens: ink #263E56, green #4BB64A, tint #F7FFF6.
 */

:root {
	--atv-ink: #263E56;
	--atv-muted: rgba(38, 62, 86, 0.68);
	--atv-green: #4BB64A;
	--atv-green-dark: #3d9c3c;
	--atv-line: rgba(38, 62, 86, 0.09);
	--atv-tint: #F7FFF6;

	/* Header height and the body padding that compensates for it are driven
	   from one place, so they cannot drift apart. */
	--atv-header-h: 84px;
	--atv-header-h-scrolled: 68px;
}

/* ==========================================================================
   Header
   ========================================================================== */

body {
	padding-top: var(--atv-header-h);
}

.site-header {
	height: var(--atv-header-h);
	border-bottom: 1px solid transparent;
	transition: height 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

/* The blur lives on a pseudo-element, NOT on .site-header itself. A filter
   or backdrop-filter on an element makes it the containing block for its
   position:fixed descendants, and the mobile menu drawer is exactly that —
   it would resolve its height:100% against the header instead of the
   viewport and collapse to a sliver. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: rgba(255, 255, 255, 0.82);
	backdrop-filter: saturate(150%) blur(14px);
	-webkit-backdrop-filter: saturate(150%) blur(14px);
	transition: background-color 0.22s ease;
}

/* main.js adds .scrolled to the body past 40px, so the compact state costs
   no extra script. */
.scrolled .site-header {
	height: var(--atv-header-h-scrolled);
	border-bottom-color: var(--atv-line);
	box-shadow: 0 6px 24px rgba(38, 62, 86, 0.07);
}

.scrolled .site-header::before {
	background-color: rgba(255, 255, 255, 0.94);
}

.site-header .site-logo img,
.site-header .custom-logo {
	transition: transform 0.22s ease;
	transform-origin: left center;
}

.scrolled .site-header .site-logo img {
	transform: scale(0.9);
}

/* Nav links -------------------------------------------------------------- */

/* Desktop only. Below 993px these same links live in the green slide-out
   drawer, where ink and green text would both fall apart against the
   background — the theme already styles them white there. */
@media (min-width: 993px) {

.main-navigation__menu #main-menu > li > a {
	position: relative;
	padding: 10px 2px;
	font-size: 15px;
	font-weight: 600;
	color: var(--atv-ink);
	letter-spacing: -0.01em;
	transition: color 0.2s ease;
}

/* The underline grows from the centre, so it reads as one gesture rather
   than a border switching on. */
.main-navigation__menu #main-menu > li > a::after {
	content: "";
	position: absolute;
	left: 50%;
	right: 50%;
	bottom: 2px;
	height: 2px;
	border-radius: 2px;
	background: var(--atv-green);
	transition: left 0.22s ease, right 0.22s ease;
}

.main-navigation__menu #main-menu > li > a:hover,
.main-navigation__menu #main-menu > li.current-menu-item > a,
.main-navigation__menu #main-menu > li.current-menu-ancestor > a,
.main-navigation__menu #main-menu > li.current_page_parent > a {
	color: var(--atv-green-dark);
}

.main-navigation__menu #main-menu > li > a:hover::after,
.main-navigation__menu #main-menu > li.current-menu-item > a::after,
.main-navigation__menu #main-menu > li.current-menu-ancestor > a::after,
.main-navigation__menu #main-menu > li.current_page_parent > a::after {
	left: 0;
	right: 0;
}

} /* end desktop nav links */

/* Dropdown --------------------------------------------------------------- */

@media (min-width: 993px) {
	.main-navigation__menu #main-menu .sub-menu {
		padding: 10px;
		border: 1px solid var(--atv-line);
		border-radius: 16px;
		background: #fff;
		box-shadow: 0 18px 44px rgba(38, 62, 86, 0.13);
	}

	.main-navigation__menu #main-menu .sub-menu li a {
		display: block;
		padding: 10px 14px;
		border-radius: 10px;
		font-size: 14.5px;
		font-weight: 600;
		color: var(--atv-ink);
		white-space: nowrap;
		transition: background-color 0.18s ease, color 0.18s ease;
	}

	.main-navigation__menu #main-menu .sub-menu li a:hover {
		background: rgba(75, 182, 74, 0.1);
		color: var(--atv-green-dark);
	}
}

/* Header CTA ------------------------------------------------------------- */

.main-button--header,
a.main-button--header {
	padding: 13px 26px;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: -0.01em;
	background: linear-gradient(180deg, #58c257 0%, #41a940 100%);
	box-shadow: 0 6px 18px rgba(75, 182, 74, 0.32);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.main-button--header:hover,
a.main-button--header:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(75, 182, 74, 0.38);
	filter: brightness(1.03);
}

.main-button--header:active,
a.main-button--header:active {
	transform: translateY(0);
	box-shadow: 0 4px 12px rgba(75, 182, 74, 0.3);
}

/* Burger ----------------------------------------------------------------- */

.menu-toggle {
	border-radius: 12px;
	transition: background-color 0.2s ease;
}

.menu-toggle:hover {
	background-color: rgba(75, 182, 74, 0.1);
}

@media (max-width: 992px) {
	:root {
		--atv-header-h: 68px;
		--atv-header-h-scrolled: 60px;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	margin-top: 96px;
	padding-top: 64px;
	border-top: 1px solid var(--atv-line);
	background: linear-gradient(180deg, #fff 0%, var(--atv-tint) 100%);
}

.site-footer .footer-widgets {
	padding-bottom: 8px;
}

/* Widget headings become eyebrows, matching the V3 sections. */
.site-footer .widget-title,
.site-footer .widgettitle,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
	margin: 0 0 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--atv-muted);
}

.site-footer .site-short-description {
	color: var(--atv-muted);
	font-size: 15px;
	line-height: 1.65;
	max-width: 34ch;
}

.site-footer p.footer-heading {
	font-size: 16px;
	font-weight: 700;
	color: var(--atv-ink);
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer li {
	margin: 0 0 11px;
}

.site-footer a {
	color: var(--atv-muted);
	font-size: 15px;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.18s ease;
}

.site-footer a:hover {
	color: var(--atv-green-dark);
}

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

.site-footer .contact-social {
	display: flex;
	gap: 10px;
	margin-top: 26px;
}

.site-footer .contact-social li {
	margin: 0;
}

.site-footer .contact-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--atv-line);
	border-radius: 50%;
	background: #fff;
	color: var(--atv-ink);
	transition: border-color 0.18s ease, background-color 0.18s ease,
		color 0.18s ease, transform 0.18s ease;
}

.site-footer .contact-social a:hover {
	border-color: rgba(75, 182, 74, 0.45);
	background: rgba(75, 182, 74, 0.1);
	color: var(--atv-green-dark);
	transform: translateY(-2px);
}

/* Payment logos ---------------------------------------------------------- */

.site-footer .footer-logos {
	margin-top: 40px;
	padding: 24px 0 4px;
	border-top: 1px solid var(--atv-line);
}

.site-footer .footer-logo img {
	max-height: 26px;
	width: auto;
	filter: grayscale(1);
	opacity: 0.55;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.site-footer .footer-logo img:hover {
	filter: none;
	opacity: 1;
}

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

.site-footer .footer-info {
	margin-top: 8px;
	padding: 22px 0 26px;
	border-top: 1px solid var(--atv-line);
}

.site-footer .footer-info p,
.site-footer .footer-info a {
	font-size: 13.5px;
	color: var(--atv-muted);
}

.site-footer .footer-info ul {
	display: flex;
	gap: 26px;
}

.site-footer .footer-info li {
	margin: 0;
}

@media (max-width: 768px) {
	.site-footer {
		margin-top: 56px;
		padding-top: 44px;
	}

	.site-footer .footer-info ul {
		flex-wrap: wrap;
		gap: 8px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header::before,
	.site-header .site-logo img,
	.main-navigation__menu #main-menu > li > a::after,
	.main-button--header,
	.site-footer .contact-social a {
		transition: none;
	}
}
