/* ==========================================================================
   KwikFix Motors — design tokens, base, buttons, header and footer.
   Widget styles live in the KwikFix Core plugin (kf-widgets.css) and use these tokens.
   ========================================================================== */

:root {
	/* Brand (sampled from the selected logo) */
	--kf-orange: #ff9702;
	--kf-orange-dark: #e98a00;
	--kf-blue: #0056db;
	--kf-blue-dark: #0042a8;
	--kf-blue-tint: #eaf1fd;
	--kf-yellow: #ffc400;
	--kf-black: #111111;

	/* Neutrals */
	--kf-ink: #161a21;
	--kf-text: #3b4250;
	--kf-muted: #5b6270;
	--kf-line: #e2e6ec;
	--kf-grey: #f4f6f9;
	--kf-white: #ffffff;
	--kf-dark: #12161d;
	--kf-dark-2: #1c222c;
	--kf-navy: #0d1b2e;
	--kf-navy-2: #16294a;

	/* Feedback */
	--kf-success: #137a3a;
	--kf-error: #b42318;

	/* Type */
	--kf-font-head: "Barlow Condensed", "Barlow Condensed Fallback", "Arial Narrow", sans-serif;
	--kf-font-body: "Barlow", "Barlow Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Layout */
	--kf-container: 1240px;
	--kf-gutter: clamp(16px, 4vw, 32px);
	--kf-radius: 12px;
	--kf-radius-sm: 8px;
	--kf-shadow: 0 10px 30px rgba(17, 22, 33, 0.08);
	--kf-shadow-lg: 0 24px 60px rgba(17, 22, 33, 0.18);
	--kf-header-h: 84px;
}

/* ---------- Base ---------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--kf-header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
	margin: 0;
	font-family: var(--kf-font-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--kf-text);
	background: var(--kf-white);
	-webkit-font-smoothing: antialiased;
}

body.kf-nav-locked { overflow: hidden; }

h1, h2, h3, h4 {
	font-family: var(--kf-font-head);
	font-weight: 700;
	line-height: 1.1;
	color: var(--kf-ink);
	letter-spacing: 0.005em;
	margin: 0 0 0.5em;
}

a { color: var(--kf-blue); }
a:hover { color: var(--kf-blue-dark); }

img { max-width: 100%; height: auto; }

:focus-visible {
	outline: 3px solid var(--kf-orange);
	outline-offset: 3px;
	border-radius: 4px;
}

[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	position: fixed !important; top: 12px; left: 12px; z-index: 10000;
	padding: 12px 18px; background: var(--kf-black); color: var(--kf-white);
	border-radius: var(--kf-radius-sm); text-decoration: none;
}

#kf-main:focus { outline: none; }

.kf-container {
	width: 100%;
	max-width: var(--kf-container);
	margin-inline: auto;
	padding-inline: var(--kf-gutter);
	box-sizing: border-box;
}

.kf-svg { flex: none; }

/* Elementor containers that hold a full-width KwikFix section: no extra spacing. */
.e-con.kf-wrap {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px;
	--row-gap: 0px;
	--column-gap: 0px;
	--margin-top: 0px;
	--margin-bottom: 0px;
}

.e-con.kf-wrap > .elementor-widget { width: 100%; }

/* ---------- Buttons ---------- */

.kf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--kf-radius-sm);
	font-family: var(--kf-font-head);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
	box-sizing: border-box;
}

.kf-btn:hover { transform: translateY(-1px); }

/* Orange buttons use black text: white on orange fails contrast. */
.kf-btn--primary { background: var(--kf-orange); color: var(--kf-black); }
.kf-btn--primary:hover { background: var(--kf-orange-dark); color: var(--kf-black); }

.kf-btn--blue { background: var(--kf-blue); color: var(--kf-white); }
.kf-btn--blue:hover { background: var(--kf-blue-dark); color: var(--kf-white); }

.kf-btn--dark { background: var(--kf-black); color: var(--kf-white); }
.kf-btn--dark:hover { background: #000; color: var(--kf-yellow); }

.kf-btn--outline { border-color: var(--kf-ink); color: var(--kf-ink); background: transparent; }
.kf-btn--outline:hover { background: var(--kf-ink); color: var(--kf-white); }

.kf-btn--outline-dark { border-color: var(--kf-black); color: var(--kf-black); background: transparent; }
.kf-btn--outline-dark:hover { background: var(--kf-black); color: var(--kf-white); }

.kf-btn--ghost { border-color: rgba(255, 255, 255, 0.8); color: var(--kf-white); background: transparent; }
.kf-btn--ghost:hover { background: var(--kf-white); color: var(--kf-black); }

.kf-btn--link {
	min-height: 48px; padding-inline: 4px;
	color: var(--kf-white); text-transform: none; letter-spacing: 0;
	font-family: var(--kf-font-body); font-weight: 600; font-size: 16px;
	text-decoration: underline; text-underline-offset: 4px;
}
.kf-btn--link:hover { color: var(--kf-yellow); transform: none; }

.kf-btn--sm { min-height: 42px; padding: 9px 18px; font-size: 16px; }
.kf-btn--lg { min-height: 56px; padding: 14px 32px; font-size: 20px; }
.kf-btn--block { width: 100%; }

/* ---------- Header ---------- */

.kf-site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--kf-white);
	transition: box-shadow 0.2s;
}

.admin-bar .kf-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .kf-site-header { top: 0; } }

.kf-site-header.is-scrolled { box-shadow: 0 6px 24px rgba(17, 22, 33, 0.1); }

.kf-topbar {
	background: var(--kf-navy);
	color: var(--kf-white);
	font-size: 15px;
}

.kf-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 42px;
}

.kf-topbar__list {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 6px 24px; margin: 0; padding: 0; list-style: none;
}

.kf-topbar__list li,
.kf-topbar__list a {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--kf-white); text-decoration: none;
}

.kf-topbar__list a:hover { color: var(--kf-yellow); }
.kf-topbar__list .kf-svg { width: 16px; height: 16px; color: var(--kf-orange); }

.kf-social { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }

.kf-social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	background: rgba(255, 255, 255, 0.14); color: var(--kf-white);
	transition: background-color 0.2s, color 0.2s;
}

.kf-social a:hover { background: var(--kf-orange); color: var(--kf-black); }
.kf-social .kf-svg { width: 16px; height: 16px; }

.kf-mainbar { border-bottom: 1px solid var(--kf-line); }

.kf-mainbar__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: var(--kf-header-h);
}

.kf-logo { display: inline-flex; flex: none; }
.kf-logo__img { display: block; width: auto; height: 52px; }

.kf-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-left: auto;
}

.kf-menu {
	display: flex; align-items: center; gap: 4px;
	margin: 0; padding: 0; list-style: none;
}

.kf-menu > .menu-item { position: relative; display: flex; align-items: center; }

.kf-menu a {
	display: block;
	padding: 10px 12px;
	font-family: var(--kf-font-body);
	font-size: 16px;
	font-weight: 600;
	color: var(--kf-ink);
	text-decoration: none;
}

.kf-menu a:hover,
.kf-menu .current-menu-item > a,
.kf-menu .current-menu-ancestor > a { color: var(--kf-blue); }

.kf-submenu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; margin-left: -8px; padding: 0;
	border: 0; border-radius: 6px; background: transparent; color: var(--kf-ink); cursor: pointer;
}

.kf-submenu-toggle .kf-svg { transition: transform 0.2s; }
.menu-item.is-open > .kf-submenu-toggle .kf-svg { transform: rotate(180deg); }

.kf-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--kf-white);
	border: 1px solid var(--kf-line);
	border-radius: var(--kf-radius);
	box-shadow: var(--kf-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.kf-menu .sub-menu a {
	padding: 10px 12px;
	border-radius: var(--kf-radius-sm);
	font-family: var(--kf-font-body);
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
}

.kf-menu .sub-menu a:hover { background: var(--kf-blue-tint); }

.menu-item.is-open > .sub-menu,
.kf-menu > .menu-item:hover > .sub-menu,
.kf-menu > .menu-item:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0);
}

.kf-nav-toggle,
.kf-mobile-call { display: none; }

@media (max-width: 1100px) {
	.kf-menu a { padding-inline: 8px; font-size: 18px; }
	.kf-topbar__address { display: none !important; }
}

@media (max-width: 960px) {
	:root { --kf-header-h: 70px; }

	.kf-logo__img { height: 42px; }
	/* The header has its own call button on mobile, so the topbar only repeated the phone number. */
	.kf-topbar { display: none; }

	.kf-mobile-call,
	.kf-nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 48px; height: 48px; padding: 0;
		border: 2px solid var(--kf-line); border-radius: var(--kf-radius-sm);
		background: var(--kf-white); color: var(--kf-ink); cursor: pointer;
	}

	.kf-mobile-call { margin-left: auto; background: var(--kf-orange); border-color: var(--kf-orange); color: var(--kf-black); }
	.kf-nav-toggle { order: 3; }
	.kf-nav-toggle .kf-svg { width: 24px; height: 24px; }
	.kf-nav-toggle__close { display: none; }
	.is-nav-open .kf-nav-toggle__open { display: none; }
	.is-nav-open .kf-nav-toggle__close { display: inline-flex; }

	.kf-nav {
		position: fixed;
		inset: var(--kf-header-h) 0 0 0;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		margin: 0;
		padding: 16px var(--kf-gutter) 32px;
		background: var(--kf-white);
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	}

	.admin-bar .kf-nav { inset-block-start: calc(var(--kf-header-h) + 46px); }

	.is-nav-open .kf-nav { visibility: visible; opacity: 1; transform: none; }

	.kf-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.kf-menu > .menu-item { flex-wrap: wrap; border-bottom: 1px solid var(--kf-line); }
	.kf-menu > .menu-item > a { flex: 1; padding: 14px 4px; font-size: 22px; }
	.kf-submenu-toggle { width: 48px; height: 48px; margin: 0; }

	.kf-menu .sub-menu {
		position: static; flex-basis: 100%;
		display: none; min-width: 0; padding: 0 0 12px;
		border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none;
	}

	.kf-menu > .menu-item:hover > .sub-menu,
	.kf-menu > .menu-item:focus-within > .sub-menu { display: none; }
	.kf-menu .menu-item.is-open > .sub-menu { display: block; }

	.kf-nav__actions .kf-btn { width: 100%; }
}

/* ---------- Footer ---------- */

.kf-site-footer {
	background: var(--kf-dark);
	color: #c9ced8;
	font-size: 16px;
}

.kf-site-footer a { color: #e6e9ef; text-decoration: none; }
.kf-site-footer a:hover { color: var(--kf-yellow); }

.kf-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
	gap: 40px;
	padding-block: 64px 48px;
}

.kf-logo--footer {
	padding: 12px 16px;
	margin-bottom: 20px;
	background: var(--kf-white);
	border-radius: var(--kf-radius);
}

.kf-logo--footer .kf-logo__img { height: 44px; }

.kf-footer__brand p { max-width: 34ch; }
.kf-footer__brand .kf-social { margin-top: 20px; }

.kf-footer__title {
	margin-bottom: 18px;
	font-size: 22px;
	color: var(--kf-white);
	letter-spacing: 0.01em;
}

.kf-footer__title::after {
	content: "";
	display: block;
	width: 36px;
	height: 3px;
	margin-top: 10px;
	background: var(--kf-orange);
	border-radius: 2px;
}

.kf-footer__menu,
.kf-footer__contact { margin: 0; padding: 0; list-style: none; }
.kf-footer__menu li { margin-bottom: 10px; }

.kf-footer__contact li {
	display: flex; gap: 12px; align-items: flex-start;
	margin-bottom: 14px;
}

.kf-footer__contact .kf-svg { margin-top: 3px; color: var(--kf-orange); width: 18px; height: 18px; }

.kf-site-footer .kf-btn--primary,
.kf-site-footer .kf-btn--primary:hover { color: var(--kf-black); }

/* Reset Hello Elementor's default table borders/zebra striping for KwikFix tables. */
.kf-hours, .kf-specs { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: inherit; }
.kf-hours tr > *, .kf-specs tr > * { border: 0; background: transparent !important; line-height: 1.4; }
.kf-hours th, .kf-hours td { padding: 6px 0; text-align: left; font-weight: 500; border-bottom: 1px solid var(--kf-line); }
.kf-hours td { text-align: right; }
.kf-hours--footer th, .kf-hours--footer td { border-color: rgba(255, 255, 255, 0.1); color: #e6e9ef; }

.kf-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 15px; }

.kf-footer__bottom-inner {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	padding-block: 20px;
}

.kf-footer__bottom p { margin: 0; }

@media (max-width: 960px) {
	.kf-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
	.kf-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px 32px; }
}

/* ---------- Standard (non-Elementor) pages: blog, privacy policy ---------- */

.site-main:not(.kf-vehicle-page) {
	max-width: 820px;
	margin: 0 auto;
	padding: 56px var(--kf-gutter) 80px;
}

.site-main .page-header .entry-title,
.site-main .entry-title { font-size: clamp(36px, 5vw, 54px); }

/* ---------- Mobile action bar (call + request), always reachable on phones ---------- */

.kf-mobile-cta { display: none; }

@media (max-width: 960px) {
	.kf-mobile-cta {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 999;
		display: grid;
		grid-template-columns: 1fr 1.4fr;
		gap: 8px;
		padding: 8px var(--kf-gutter) calc(8px + env(safe-area-inset-bottom));
		background: var(--kf-white);
		box-shadow: 0 -6px 24px rgba(17, 22, 33, 0.14);
	}
	.kf-mobile-cta .kf-btn { min-height: 48px; padding-inline: 12px; font-size: 17px; }
	.kf-mobile-cta--single { grid-template-columns: 1fr; }
	body.kf-has-mobile-cta { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	body.kf-nav-locked .kf-mobile-cta { display: none; }
}

/* ---------- Tap targets in the footer (at least 44px tall on touch screens) ---------- */

.kf-footer__menu li { margin-bottom: 0; }
.kf-footer__menu a,
.kf-footer__contact a,
.kf-footer__bottom a { display: inline-block; padding-block: 10px; }
.kf-footer__contact li { margin-bottom: 4px; align-items: center; }
.kf-footer__contact .kf-svg { margin-top: 0; }

@media (max-width: 960px) {
	.kf-social { gap: 10px; }
	.kf-social a { width: 44px; height: 44px; }
	.kf-social .kf-svg { width: 18px; height: 18px; }
}

/* ---------- 404 and empty blog ---------- */

.kf-notfound { padding-block: clamp(64px, 10vw, 120px); text-align: center; }
.kf-notfound__code { margin: 0 0 8px; font-family: var(--kf-font-head); font-size: clamp(72px, 14vw, 140px); font-weight: 800; line-height: 1; color: var(--kf-orange); }
.kf-notfound h1 { font-size: clamp(34px, 5vw, 52px); }
.kf-notfound p { max-width: 56ch; margin: 0 auto 8px; font-size: 19px; color: var(--kf-muted); }
.kf-notfound .kf-btn-row { justify-content: center; margin-top: 28px; }
.kf-notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 32px 0 0; padding: 0; list-style: none; }
.kf-notfound__links a { display: inline-block; padding: 10px 4px; font-weight: 600; }

.kf-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-block: clamp(48px, 7vw, 80px); }
.kf-post-card { overflow: hidden; border: 1px solid var(--kf-line); border-radius: var(--kf-radius); background: var(--kf-white); }
.kf-post-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.kf-post-card__body { padding: 20px; }
.kf-post-card__title { font-size: 24px; margin-bottom: 8px; }
.kf-post-card__title a { color: var(--kf-ink); text-decoration: none; }
.kf-post-card__meta { margin: 0 0 10px; font-size: 14px; color: var(--kf-muted); }

/* The mobile action bar already has a Call button, so the header one is hidden on phones. */
@media (max-width: 960px) {
	.kf-mobile-call { display: none !important; }
	.kf-nav-toggle { margin-left: auto; }
}

/* In-page links (#services, #kf-cars, card anchors) must land below the sticky header:
   on desktop that is the 42px topbar + main bar; on phones the topbar is hidden. */
html { scroll-padding-top: calc(var(--kf-header-h) + 42px + 16px); }
@media (max-width: 960px) { html { scroll-padding-top: calc(var(--kf-header-h) + 16px); } }
html:has(> body.admin-bar) { scroll-padding-top: calc(var(--kf-header-h) + 42px + 48px); }

/* ==========================================================================
   Premium refinements: restrained palette (navy + one orange accent), fewer capitals,
   header that tightens on scroll.
   ========================================================================== */

/* Menu: current page and hover marked with an orange underline rather than blue text. */
.kf-menu > .menu-item > a { position: relative; }
.kf-menu > .menu-item > a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
	height: 2px; border-radius: 2px; background: var(--kf-orange);
	transform: scaleX(0); transform-origin: left; transition: transform 0.2s;
}
.kf-menu > .menu-item > a:hover,
.kf-menu > .current-menu-item > a,
.kf-menu > .current-menu-ancestor > a { color: var(--kf-ink); }
.kf-menu > .menu-item > a:hover::after,
.kf-menu > .current-menu-item > a::after,
.kf-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }

/* Header tightens once the page scrolls (desktop). */
@media (min-width: 961px) {
	.kf-mainbar__inner { transition: min-height 0.25s ease; }
	.kf-logo__img { transition: height 0.25s ease; }
	.is-scrolled .kf-mainbar__inner { min-height: 68px; }
	.is-scrolled .kf-logo__img { height: 44px; }
}

@media (max-width: 960px) {
	.kf-menu > .menu-item > a { font-size: 18px; }
	.kf-menu > .menu-item > a::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.kf-mainbar__inner, .kf-logo__img { transition: none; }
}

/* ---------- WhatsApp (only when a number is set in KwikFix settings) ---------- */

.kf-whatsapp-float {
	position: fixed; right: 24px; bottom: 24px; z-index: 998;
	display: inline-flex; align-items: center; gap: 10px;
	padding: 12px 18px 12px 14px; border-radius: 999px;
	background: #1fa855; color: var(--kf-white); text-decoration: none; font-weight: 700;
	box-shadow: 0 10px 26px rgba(17, 22, 33, 0.22);
	transition: transform 0.2s, background-color 0.2s;
}
.kf-whatsapp-float:hover { background: #178a45; color: var(--kf-white); transform: translateY(-2px); }
.kf-whatsapp-float .kf-svg { width: 24px; height: 24px; }
.kf-btn--whatsapp { background: #1fa855; color: var(--kf-white); padding-inline: 0; }
.kf-btn--whatsapp:hover { background: #178a45; color: var(--kf-white); }
.kf-btn--whatsapp .kf-svg { width: 24px; height: 24px; }

@media (max-width: 960px) {
	.kf-whatsapp-float { display: none; }
	.kf-mobile-cta--whatsapp { grid-template-columns: 48px 1fr 1.4fr; }
	.kf-mobile-cta--whatsapp.kf-mobile-cta--single { grid-template-columns: 48px 1fr; }
}

/* Footer in the same navy family as the topbar and dark sections. */
.kf-site-footer { background: #0a1626; }
.kf-footer__bottom { border-top-color: rgba(255, 255, 255, 0.08); }

/* Submenu arrow: its own 32px target, not overlapped by the link's padding. */
@media (min-width: 961px) {
	.kf-menu > .menu-item-has-children > a { padding-right: 2px; }
	.kf-menu > .menu-item-has-children > a::after { right: 2px; }
	.kf-submenu-toggle { width: 32px; height: 32px; margin-left: 0; }
}
