﻿/* Site header: top bar, main bar, services strip with mega menus. Loads on every page. */

.site-header {
	background: var(--wl-bg);
}

.site-header a {
	color: inherit;
	text-decoration: none;
}

.site-header :focus-visible {
	outline-color: var(--wl-brand);
}

/* Top bar */

.header-top {
	border-bottom: 1px solid var(--wl-line);
	padding: 8px 0;
}

.top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	/* min-height: 68px; */
	font-weight: 700;
	color: #211f1f;
}

.top-review,
.top-status {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.9rem;
	/* min-height: 48px; */
}

.top-review {
	justify-content: flex-start;
	min-width: 360px;
}

.google-mark {
	/* width: 28px;
	height: 28px; */
	width: 18px;
	height: 18px;
}

.review-score {
	font-size: 16px;
	font-weight: 700;
}

.stars {
	color: #f4c542;
	font-size: 1.45rem;
	letter-spacing: 0.06em;
}

.review-copy,
.top-status {
	font-size: 16px;
}

.review-copy {
	font-weight: 400;
}

/* Scrolling messages: CSS only, duplicated group (aria-hidden) gives a seamless loop. */

.ticker {
	--ticker-width: 390px;
	flex: 0 1 var(--ticker-width);
	width: var(--ticker-width);
	overflow: hidden;
	font-size: 16px;
}

.ticker__track {
	display: flex;
	width: max-content;
	animation: ticker-scroll 40s linear infinite;
	will-change: transform;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
	animation-play-state: paused;
}

.ticker__group {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-around;
	min-width: var(--ticker-width);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ticker__item {
	white-space: nowrap;
}

.ticker__item::after {
	content: "\2022";
	margin-inline: 0.9rem;
	opacity: 0.9;
}

@supports (content: "x" / "") {
	.ticker__item::after {
		content: "\2022" / "";
	}
}

@keyframes ticker-scroll {
	to {
		transform: translateX(-50%);
	}
}

/* Open status and clock */

.top-status {
	justify-content: flex-end;
}

.top-status .time {
	display: inline-block;
	min-width: 6.4em;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.top-status .time[hidden] {
	display: none;
}

.status-dot {
	position: relative;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #52d03e;
}

.status-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #52d03e;
	animation: status-pulse 1s infinite;
}

@keyframes status-pulse {
	from {
		opacity: 0.7;
		transform: scale(1);
	}

	to {
		opacity: 0;
		transform: scale(3.5);
	}
}

/* Main bar */

.main-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding-block: 1.1rem;
}

.main-bar .col-left {
	display: flex;
	align-items: center;
	gap: 3rem;
}

.brand {
	display: block;
	flex: 0 0 220px;
	width: 220px;
}

.brand img {
	display: block;
	width: 100%;
	max-width: 178px;
	height: auto;
	object-fit: contain;
}

.main-nav {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	color: var(--wl-text);
}

.main-nav__list {
	display: flex;
	align-items: center;
	gap: 3.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav a {
	font-size: 16px;
	font-weight: 500;
	color: #211f1f;
	transition: 0.3s;
}

.main-nav a:hover {
	color: #f4c542;
}

.header-actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 336px;
    width: 100%;
}

.header-btn {
	display: flex;
	white-space: nowrap;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: var(--wl-btn-height);
	padding: 0 23px;
	border: 1px solid var(--wl-brand);
	border-radius: 5px;
	color: var(--wl-brand);
	font-size: 16px;
	font-weight: 900;
	transition: scale 0.25s ease;
}

.header-btn:hover {
	scale: var(--wl-btn-grow);
}

.header-btn--primary {
	gap: 0.55rem;
	border-color: var(--wl-accent);
	background: var(--wl-accent);
}

/* Services strip */

.header-services {
	position: relative;
	z-index: 10;
	padding-bottom: 24px;
}

.header-services .container {
	position: relative;
}

.services-grid {
	display: grid;
	grid-auto-columns: minmax(150px, 1fr);
	grid-auto-flow: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.services-grid li:first-child .service-item {
	border-left: 1px solid var(--wl-line);
	border-radius: 16px 0 0 16px;
}

.services-grid li:last-child .service-item {
	border-radius: 0 8px 8px 0;
}

.services-grid details {
	height: 100%;
}

.service-item {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	padding: 1.2rem 1rem;
	border-top: 1px solid var(--wl-line);
	border-right: 1px solid var(--wl-line);
	border-bottom: 1px solid var(--wl-line);
	background: #fff;
	color: var(--wl-brand);
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	list-style: none;
	cursor: pointer;
}

.service-item::marker,
.service-item::-webkit-details-marker {
	display: none;
	content: "";
}

.service-item:hover {
	background: #e8e8e8;
}

/* Commercial is always blue, the current page's item is blue, and any item turns blue while its mega menu is open. */
.service-item--blue,
.service-item.active,
.services-grid details[open] > .service-item {
	background: var(--wl-brand);
	color: #fff;
}

.service-item .icon {
	width: 0.75rem;
	height: 0.75rem;
	margin-left: 0.5rem;
	transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.services-grid details[open] .service-item .icon {
	transform: rotate(180deg);
}

.mega-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin: 5px auto 0;
	z-index: 5;
	width: 97%;
	/* max-height: min(78vh, 820px); */
	padding: clamp(1.25rem, 3vw, 3.5rem) clamp(1.25rem, 4.5vw, 5rem);
	overflow-y: auto;
	border-radius: 16px;
	background: #183e65;
	box-shadow: 0 16px 35px rgba(15, 44, 93, 0.22);
	transform-origin: top center;
}

.mega-menu :focus-visible {
	outline-color: #fff;
}

.services-grid details[open] > .mega-menu {
	animation: mega-menu-enter 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mega-menu-title {
	margin: 0 0 1.7rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.75);
	color: #fff;
	font-size: clamp(2rem, 3vw, 3.2rem);
	font-weight: 800;
}

.mega-menu-sections {
	display: grid;
	grid-template-columns: repeat(var(--mega-cols, 3), minmax(0, 1fr));
	gap: clamp(1.25rem, 2vw, 2rem);
}

.services-grid details[open] .mega-menu-section {
	animation: mega-menu-section-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.services-grid details[open] .mega-menu-section:nth-child(1) {
	animation-delay: 60ms;
}

.services-grid details[open] .mega-menu-section:nth-child(2) {
	animation-delay: 110ms;
}

.services-grid details[open] .mega-menu-section:nth-child(3) {
	animation-delay: 160ms;
}

.services-grid details[open] .mega-menu-section:nth-child(n + 4) {
	animation-delay: 210ms;
}

.mega-menu-section h3 {
	min-height: 2.7rem;
	margin: 0 0 0.5rem;
	color: var(--wl-accent);
	font-size: clamp(0.95rem, 1.2vw, 1.2rem);
	font-weight: 800;
}

/* The link tiles fill whatever width their section gets: 180px minimum each and four columns at most,
   so a menu with one section spreads out and a crowded one drops to fewer columns. */
.mega-menu-links {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(max(180px, calc((100% - 2.4rem) / 4)), 1fr));
	gap: 0.8rem;
}

.mega-menu-links a {
	display: flex;
	align-items: center;
	min-height: 68px;
	padding: 0.8rem;
	border: 1px solid transparent;
	border-radius: 20px;
	background: #0b3041;
	color: #f5f7fa;
	font-size: 0.9rem;
	line-height: 1.45;
	transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.mega-menu-links a:hover,
.mega-menu-links a:focus-visible {
	border-color: var(--wl-accent);
	background: #104257;
	transform: translateY(-2px);
}

@keyframes mega-menu-enter {
	from {
		opacity: 0;
		transform: translate3d(0, 14px, 0) scale(0.985);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

@keyframes mega-menu-section-enter {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Reduced motion: no scrolling, show the messages statically. */

/* @media (prefers-reduced-motion: reduce) {
	.ticker {
		overflow-x: auto;
	}

	.ticker__group[aria-hidden="true"] {
		display: none;
	}
} */

/* Laptops (up to 1400px): tighter gaps keep the main bar on one line instead of wrapping the nav links. */

.main-nav a {
	white-space: nowrap;
}

@media (max-width: 1535px) {
	.main-bar {
		gap: 1.25rem;
	}

	.main-bar .col-left {
		gap: 1.5rem;
	}

	.main-nav__list {
		gap: 2.5rem;
	}

	.brand {
		flex-basis: 200px;
		width: 200px;
	}
}

/* Smaller desktops: tighten spacing. */

@media (max-width: 1200px) {
	.main-bar .col-left {
		gap: 1.5rem;
	}

	.main-nav__list {
		gap: 1.5rem;
	}

	.top-review {
		min-width: 0;
	}

	.ticker {
		--ticker-width: 260px;
	}

	.main-nav a {
		white-space: nowrap;
	}
}

/* Narrow desktops (1024px to 1100px): a smaller logo and tighter gaps keep the main bar on one line. */

@media (max-width: 1100px) {
	.main-bar {
		gap: 1rem;
	}

	.main-bar .col-left {
		gap: 1rem;
	}

	.brand {
		flex-basis: 180px;
		width: 180px;
	}

	.main-nav__list {
		gap: 1rem;
	}

	.header-actions {
		gap: 0.5rem;
	}

	.header-btn {
		padding-inline: 12px;
	}
}

/* The header sits inside the same container as the page (976px wide from 1024px to 1279px), so the main bar drops the text links; the bar underneath carries the same links. */

@media (min-width: 1024px) and (max-width: 1279px) {
	.main-nav {
		display: none;
	}
}

/* Tablet and phone (1023px and below): the three bars give way to a logo with a menu button,
   a slide-down menu and a call bar fixed to the bottom of the screen. */

.header-mobile,
.mobile-menu,
.mobile-cta {
	display: none;
}

@media (max-width: 1023px) {
	.site-header {
		position: sticky;
		top: 0;
		z-index: 999;
	}

	.header-top,
	.header-main,
	.header-services {
		display: none;
	}

	/* Room for the fixed call bar so it never covers the end of the page. */
	body {
		padding-bottom: 84px;
	}

	html.menu-open {
		overflow: hidden;
	}

	.header-mobile {
		display: block;
		background: #fff;
	}

	/* Navy strip above the bar: Google rating and open status. */

	.header-mobile__top {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		height: 32px;
		background: #0b2848;
		color: #fff;
		font-size: 12px;
		font-weight: 600;
		line-height: 1;
		white-space: nowrap;
	}

	.header-mobile__google {
		width: 14px;
		height: 14px;
	}

	.header-mobile__sep {
		font-style: normal;
		opacity: 0.7;
	}

	.header-mobile__open {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.header-mobile__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 73px;
		padding: 0 16px;
		border-bottom: 1px solid #e3e6eb;
	}

	.header-mobile__actions {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.header-mobile__phone {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: #ffcb05;
		color: #0b2848;
	}

	.header-mobile__phone .icon {
		width: 20px;
		height: 20px;
	}

	.header-mobile__logo {
		display: block;
		flex: none;
	}

	.header-mobile__logo img {
		display: block;
		width: 120px;
		max-width: none;
		height: auto;
	}

	.menu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 10px;
		background: #eef1f6;
		color: #0b2848;
		line-height: 0;
		cursor: pointer;
	}

	.menu-toggle svg {
		display: block;
	}

	.menu-toggle .menu-toggle__close,
	.menu-toggle[aria-expanded="true"] .menu-toggle__open {
		display: none;
	}

	.menu-toggle[aria-expanded="true"] .menu-toggle__close {
		display: block;
	}

	/* Slide-down menu, fixed under the bar. */

	.mobile-menu {
		position: fixed;
		top: 106px;
		right: 0;
		left: 0;
		z-index: 999;
		display: block;
		height: calc(100dvh - 106px);
		padding: 20px 16px 0;
		overflow-y: auto;
		border-top: 1px solid #d1d5db;
		background: #f9f9f9;
	}

	.mobile-menu[hidden] {
		display: none;
	}

	.mobile-menu__inner {
		max-width: 768px;
		margin-inline: auto;
		padding: 0 24px 230px;
	}

	.mobile-menu__list {
		margin: 16px 0 0;
		padding: 0;
		list-style: none;
	}

	.mobile-menu__sub {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.mobile-menu__item,
	.mobile-menu__pill {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 7px 30px;
		font-size: 14px;
		font-weight: 900;
		line-height: 20px;
		text-align: center;
		transition: color 0.2s ease;
	}

	/* Prefixed with .mobile-menu so they win over the header's "a { color: inherit }". */
	.mobile-menu .mobile-menu__item {
		color: #211f1f;
	}

	.mobile-menu .mobile-menu__pill {
		color: var(--wl-brand);
	}

	.mobile-menu .mobile-menu__item:hover,
	.mobile-menu .mobile-menu__item.is-current,
	.mobile-menu .mobile-menu__pill:hover {
		color: #ffcb05;
	}

	.mobile-menu__pill {
		margin-bottom: 8px;
		padding: 10px 30px;
		border: 1px solid #d1d5db;
		border-radius: 12px;
	}

	summary.mobile-menu__item {
		list-style: none;
		cursor: pointer;
	}

	summary.mobile-menu__item::marker,
	summary.mobile-menu__item::-webkit-details-marker {
		display: none;
		content: "";
	}

	.mobile-menu__caret {
		width: 0.75em;
		height: auto;
		margin-left: 0.55em;
		flex: none;
	}

	/* Call bar. */

	.mobile-cta {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 999;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		padding: 12px 16px;
		background: #fff;
		box-shadow: 0 -4px 16px rgba(11, 40, 72, 0.08);
	}

	.mobile-cta__btn {
		display: flex;
		flex: 1 1 0;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		min-width: 0;
		height: var(--wl-btn-height);
		gap: 10px;
		padding: 0 8px;
		border: 0;
		border-radius: 6px;
		font-size: 16px;
		font-weight: 800;
		line-height: 1;
		text-align: center;
		transition: scale 0.25s ease;
	}

	.mobile-cta__btn:hover {
		scale: var(--wl-btn-grow);
	}

	.mobile-cta__btn--call {
		background: #17406e;
		color: #fff !important;
	}

	.mobile-cta__btn--call .icon {
		width: 18px;
		height: 18px;
	}

	.mobile-cta__btn--primary {
		background: #ffcb05;
		color: #0b2848;
	}
}

@media (max-width: 767px) {
	.mobile-menu {
		top: 106px;
		height: calc(100dvh - 106px);
	}

	.mobile-menu__inner {
		max-width: 640px;
	}

	.mobile-cta__btn {
		flex: 1 1 0;
	}
}

@media (max-width: 639px) {
	.mobile-menu__inner {
		max-width: none;
	}
}
/* 1201px to 1366px: the 3.5rem link gaps pushed the quote and phone buttons past the right edge (page scrolled sideways), so the gaps tighten. */

@media (min-width: 1201px) and (max-width: 1366px) {
	.main-nav__list {
		gap: 1.25rem;
	}

	.main-nav a {
		font-size: 15px;
	}
}


/* Header as designed: small yellow stars, one centred message, plain phone number and a yellow Book Online button. */

.top-bar { font-size: 14px; }

.top-review { flex: 1 1 0; min-width: 0; gap: 8px; }

.top-review .stars { font-size: 14px; letter-spacing: 0.1em; line-height: 1; }

.review-score, .review-copy, .top-status { font-size: 14px; }

.review-score { font-weight: 700; }

.review-copy { color: #4a4a4a; }

.top-message { flex: 1 1 0; margin: 0; font-size: 14px; font-weight: 700; text-align: center; }

.top-status { flex: 1 1 0; justify-content: flex-end; gap: 8px; }

.header-btn--phone { gap: 0.55rem; padding: 0; border-color: transparent; background: transparent; color: var(--wl-brand); }

.header-btn--phone .icon { width: 16px; height: 16px; }

.header-btn--primary { color: var(--wl-brand); }

.main-nav a { font-weight: 400; }

@media (min-width: 1024px) and (max-width: 1279px) {
	.main-nav { display: flex; }
	.main-nav__list { gap: 1rem; }
	.main-nav a { font-size: 15px; }
	.header-btn { font-size: 15px; }
	.header-btn--primary { padding-inline: 14px; }
}

.top-review .stars { color: #ffb800; font-size: 15px; }

@media (min-width: 1024px) and (max-width: 1279px) {
	.service-item { padding-inline: 8px; font-size: 14px; white-space: nowrap; }
}

/* Open status: the green dot comes before the label. */
.top-status .status-dot { order: -1; }

/* Five stars come from 5stars.svg (99 x 15). */
.top-review img.stars { display: block; flex: none; width: 99px; height: 15px; }

/* Figma match: utility bar, logo and phone link. */
.header-top { padding: 10px 0; }
.top-bar { line-height: normal; }
.top-review { gap: 6px; }
.review-copy { color: #4a5160; font-weight: 400; }
.top-message { font-weight: 600; line-height: normal; }
.status-dot { width: 9px; height: 9px; }
.brand img { max-width: 176px; }
.header-btn--phone .icon { width: 18px; height: 18px; }
