/*
Theme Name: Astra Child
Template: astra
Description: Custom child theme for Mr. Green header updates.
Version: 1.0.0
*/

:root {
	--mr-green-primary: #66b556;
	--mr-green-primary-dark: #4a9340;
	--mr-green-primary-deep: #2e7d32;
	--mr-green-primary-soft: #eef8ea;
	--mr-green-text: #18311a;
	--mr-green-border: rgba(74, 147, 64, 0.2);
	--mr-green-shadow: 0 10px 26px rgba(46, 125, 50, 0.12);
}

.mr-green-site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--mr-green-border);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mr-green-site-header.is-sticky {
	box-shadow: var(--mr-green-shadow);
}

.mr-green-header-bar {
	max-width: 1280px;
	margin: 0 auto;
	padding: 16px 24px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 24px;
	transition: padding 0.2s ease;
}

.mr-green-site-header.is-sticky .mr-green-header-bar {
	padding-top: 12px;
	padding-bottom: 12px;
}

.mr-green-site-logo {
	display: inline-flex;
	align-items: center;
	max-width: 280px;
}

.mr-green-site-logo .custom-logo-link {
	display: block;
	line-height: 0;
	max-width: 100%;
}

.mr-green-site-logo img,
.mr-green-site-logo .custom-logo {
	display: block;
	max-height: 82px !important;
	max-width: 100%;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	transition: max-height 0.2s ease;
}

.mr-green-site-header.is-sticky .mr-green-site-logo img,
.mr-green-site-header.is-sticky .mr-green-site-logo .custom-logo {
	max-height: 68px;
}

.mr-green-site-title {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--mr-green-primary-deep);
	text-decoration: none;
}

.mr-green-primary-nav {
	display: flex;
	justify-content: center;
	min-width: 0;
	overflow: hidden;
}

.mr-green-primary-nav .menu,
.mr-green-primary-nav .page-menu {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
	white-space: nowrap;
}

.mr-green-primary-nav li {
	margin: 0;
	padding: 0;
	position: relative;
}

.mr-green-primary-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: var(--mr-green-text);
	text-decoration: none;
	font-size: 0.98rem;
	font-weight: 600;
	transition: color 0.2s ease, background 0.2s ease;
	padding: 0 4px;
	border-radius: 6px;
}

.mr-green-primary-nav a:hover,
.mr-green-primary-nav a:focus-visible {
	color: var(--mr-green-primary-deep);
	background: var(--mr-green-primary-soft);
	outline: none;
}

.mr-green-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
}

.mr-green-phone-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	color: var(--mr-green-primary-deep);
	text-decoration: none;
	font-weight: 700;
	font-size: 1rem;
}

.mr-green-phone-link:hover,
.mr-green-phone-link:focus-visible {
	color: var(--mr-green-primary-dark);
	outline: none;
}

.mr-green-phone-link svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex: 0 0 auto;
}

.mr-green-quote-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--mr-green-primary) 0%, var(--mr-green-primary-dark) 100%);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	box-shadow: 0 10px 22px rgba(74, 147, 64, 0.28);
	transition: background 0.2s ease, transform 0.2s ease;
}

.mr-green-quote-button:hover,
.mr-green-quote-button:focus-visible {
	background: linear-gradient(135deg, var(--mr-green-primary-dark) 0%, var(--mr-green-primary-deep) 100%);
	color: #fff;
	transform: translateY(-1px);
	outline: none;
}

.mr-green-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--mr-green-border);
	border-radius: 10px;
	background: var(--mr-green-primary-soft);
	color: var(--mr-green-primary-deep);
	padding: 0;
	cursor: pointer;
}

.mr-green-menu-toggle svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.mr-green-mobile-panel {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1001;
}

.mr-green-mobile-panel.is-open {
	opacity: 1;
	pointer-events: auto;
}

.mr-green-mobile-panel__inner {
	margin-left: auto;
	width: min(340px, 88vw);
	height: 100%;
	background: #fcfffb;
	padding: 24px;
	transform: translateX(100%);
	transition: transform 0.2s ease;
	overflow-y: auto;
	box-shadow: -10px 0 28px rgba(0, 0, 0, 0.12);
}

.mr-green-mobile-panel.is-open .mr-green-mobile-panel__inner {
	transform: translateX(0);
}

.mr-green-mobile-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--mr-green-border);
	border-radius: 10px;
	background: var(--mr-green-primary-soft);
	margin-bottom: 20px;
	padding: 0;
	cursor: pointer;
	color: var(--mr-green-primary-deep);
	line-height: 1;
}

.mr-green-mobile-close span {
	display: block;
	font-size: 32px;
	line-height: 1;
	transform: translateY(-1px);
}

.mr-green-mobile-nav .menu,
.mr-green-mobile-nav .page-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.mr-green-mobile-nav a {
	display: block;
	padding: 12px 0;
	color: var(--mr-green-text);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid rgba(74, 147, 64, 0.12);
}

.mr-green-mobile-phone {
	margin-top: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	color: var(--mr-green-primary-deep);
	text-decoration: none;
	font-weight: 700;
}

.mr-green-mobile-phone svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex: 0 0 auto;
}

.mr-green-mobile-quote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin-top: 18px;
	padding: 0 20px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--mr-green-primary) 0%, var(--mr-green-primary-dark) 100%);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	box-shadow: 0 10px 22px rgba(74, 147, 64, 0.28);
}

.mr-green-mobile-quote:hover,
.mr-green-mobile-quote:focus-visible {
	background: linear-gradient(135deg, var(--mr-green-primary-dark) 0%, var(--mr-green-primary-deep) 100%);
	color: #fff;
	outline: none;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	left: 12px;
	top: 12px;
	z-index: 100000;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--mr-green-border);
	box-shadow: var(--mr-green-shadow);
}

@media (max-width: 1080px) {
	.mr-green-header-bar {
		grid-template-columns: auto 1fr auto;
		gap: 16px;
	}

	.mr-green-primary-nav .menu,
	.mr-green-primary-nav .page-menu {
		gap: 14px;
	}

	.mr-green-phone-link {
		font-size: 0.94rem;
	}
}

@media (max-width: 1100px) {
	.mr-green-header-bar {
		grid-template-columns: auto 1fr auto auto;
		padding: 14px 18px;
	}

	.mr-green-primary-nav {
		display: none;
	}

	.mr-green-quote-button {
		display: none;
	}

	.mr-green-menu-toggle {
		display: inline-flex;
	}

	.mr-green-site-logo {
		max-width: 190px;
	}

	.mr-green-site-logo img,
	.mr-green-site-logo .custom-logo {
		max-height: 60px;
	}

	.mr-green-phone-link {
		justify-self: end;
		font-size: 0.92rem;
	}
}

@media (max-width: 640px) {
	.mr-green-header-bar {
		gap: 10px;
		padding: 12px 14px;
	}

	.mr-green-site-logo {
		max-width: 150px;
	}

	.mr-green-site-logo img,
	.mr-green-site-logo .custom-logo {
		max-height: 52px;
	}

	.mr-green-phone-link {
		font-size: 0.84rem;
		gap: 6px;
	}

	.mr-green-phone-link span {
		max-width: 105px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.mr-green-menu-toggle {
		width: 40px;
		height: 40px;
	}
}
