/**
 * Chatcom — Apple / Nothing–inspired polish
 * Thin frosted nav · menu left · brand right · restrained type
 */

:root {
	--chatcom-ink: #0a0a0a;
	--chatcom-navy: #111827;
	--chatcom-text: #3a3a3c;
	--chatcom-muted: #6e6e73;
	--chatcom-accent: #0071e3;
	--chatcom-accent-hover: #0077ed;
	--chatcom-surface: #f5f5f7;
	--chatcom-offwhite: #f4f4f2;
	--chatcom-line: rgba(0, 0, 0, 0.08);
	--chatcom-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
	--chatcom-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
	--chatcom-nav-h: 186px;
	--chatcom-scroll: 0;
	--chatcom-wa: #25d366;
	--chatcom-wa-dark: #1ebe57;
	--chatcom-max: 100%;
	--chatcom-nav-pad: clamp(16px, 4vw, 48px);
}

/* ---------- Global ---------- */

html {
	scroll-behavior: smooth;
}

body.chatcom-polished {
	position: relative;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	color: var(--chatcom-text);
	background-color: var(--chatcom-offwhite) !important;
}

html:has(body.chatcom-polished) {
	background-color: var(--chatcom-offwhite) !important;
}

body.chatcom-polished ::selection {
	background: rgba(0, 113, 227, 0.18);
	color: var(--chatcom-ink);
}

/*
 * Soft off-white “blurred” canvas behind content only.
 * No filter / backdrop-filter on overlays — text & images stay sharp.
 * Scroll deepens the frosted wash via --chatcom-scroll.
 */
body.chatcom-polished::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(
			ellipse 80% 55% at 15% -5%,
			rgba(255, 255, 255, calc(0.95 - var(--chatcom-scroll) * 0.15)) 0%,
			rgba(255, 255, 255, 0) 70%
		),
		radial-gradient(
			ellipse 70% 50% at 95% 5%,
			rgba(255, 255, 255, calc(0.7 + var(--chatcom-scroll) * 0.15)) 0%,
			rgba(255, 255, 255, 0) 65%
		),
		radial-gradient(
			ellipse 90% 60% at 50% 110%,
			rgba(220, 220, 216, calc(0.35 + var(--chatcom-scroll) * 0.4)) 0%,
			rgba(244, 244, 242, 0) 70%
		),
		linear-gradient(
			180deg,
			rgba(255, 255, 255, calc(0.35 + var(--chatcom-scroll) * 0.25)) 0%,
			rgba(244, 244, 242, calc(0.5 + var(--chatcom-scroll) * 0.35)) 45%,
			rgba(236, 236, 232, calc(0.55 + var(--chatcom-scroll) * 0.3)) 100%
		);
	opacity: 1;
}

body.chatcom-polished .chatcom-whatsapp {
	z-index: 99999;
}

/* Offset sticky nav */
body.chatcom-nav-active {
	padding-top: var(--chatcom-nav-h);
}

/* ---------- Apple / Nothing header ---------- */

.chatcom-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100000;
	height: auto;
	min-height: var(--chatcom-nav-h);
	/* Solid off-white — no backdrop-filter, so content never softens under the bar */
	background: rgba(244, 244, 242, calc(0.94 + (var(--chatcom-scroll) * 0.06)));
	border-bottom: 1px solid rgba(0, 0, 0, calc(0.05 + (var(--chatcom-scroll) * 0.06)));
	box-shadow: 0 6px 20px rgba(0, 0, 0, calc(var(--chatcom-scroll) * 0.04));
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatcom-nav.is-scrolled {
	background: #f4f4f2;
	border-bottom-color: rgba(0, 0, 0, 0.1);
}

.chatcom-nav__inner {
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 12px var(--chatcom-nav-pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

/* Menu — left */
.chatcom-nav__menu {
	display: flex;
	align-items: center;
	min-width: 0;
	flex: 0 1 auto;
}

.chatcom-nav__list {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chatcom-nav__list > li {
	margin: 0;
	padding: 0;
	position: relative;
}

.chatcom-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 10px 18px;
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1;
	color: rgba(10, 10, 10, 0.84) !important;
	text-decoration: none !important;
	transition: color 0.2s ease;
	white-space: nowrap;
	transform-origin: center center;
}

.chatcom-nav__list > li > a:hover,
.chatcom-nav__list > li > a:focus-visible {
	color: var(--chatcom-ink) !important;
	animation: chatcom-menu-shake 0.55s ease both;
}

.chatcom-nav__list > li.current-menu-item > a,
.chatcom-nav__list > li.current_page_item > a {
	color: var(--chatcom-ink) !important;
	font-weight: 600;
}

@keyframes chatcom-menu-shake {
	0%,
	100% {
		transform: translateX(0) rotate(0deg);
	}
	15% {
		transform: translateX(-4px) rotate(-1.2deg);
	}
	30% {
		transform: translateX(4px) rotate(1.2deg);
	}
	45% {
		transform: translateX(-3px) rotate(-0.8deg);
	}
	60% {
		transform: translateX(3px) rotate(0.8deg);
	}
	75% {
		transform: translateX(-1.5px) rotate(-0.3deg);
	}
}

/* Submenus */
.chatcom-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% - 6px);
	left: 0;
	min-width: 180px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--chatcom-line);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.chatcom-nav__list > li:hover > .sub-menu,
.chatcom-nav__list > li:focus-within > .sub-menu {
	display: block;
}

.chatcom-nav__list .sub-menu a {
	display: block;
	padding: 10px 16px;
	font-size: 12px;
	color: var(--chatcom-text) !important;
	text-decoration: none !important;
}

.chatcom-nav__list .sub-menu a:hover {
	color: var(--chatcom-ink) !important;
	background: var(--chatcom-surface);
}

/* Brand — right */
.chatcom-nav__brand {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	margin-left: auto;
	text-decoration: none !important;
	line-height: 0;
	transition: opacity 0.2s ease;
}

.chatcom-nav__brand:hover {
	opacity: 0.72;
}

.chatcom-nav__logo {
	display: block;
	/* Original custom-logo size: 374 × 162 */
	width: 374px !important;
	height: 162px !important;
	max-width: 374px;
	object-fit: contain;
	object-position: right center;
}

.chatcom-nav__wordmark {
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 42px;
	font-weight: 600;
	letter-spacing: -0.04em;
	color: var(--chatcom-ink);
	line-height: 1;
}

/* Mobile toggle — left of menu on small screens */
/* Higher specificity + !important: Hello Biz theme sets button/[type=button] later */
button.chatcom-nav__toggle {
	display: none !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: var(--chatcom-ink) !important;
	box-shadow: none !important;
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

button.chatcom-nav__toggle:hover,
button.chatcom-nav__toggle:focus,
button.chatcom-nav__toggle:focus-visible {
	background: rgba(0, 0, 0, 0.04) !important;
	color: var(--chatcom-ink) !important;
	outline: none;
}

.chatcom-nav__toggle-bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 18px;
}

.chatcom-nav__toggle-bars span {
	display: block;
	height: 1.5px;
	width: 100%;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.25s var(--chatcom-ease), opacity 0.2s ease;
}

.chatcom-nav.is-open .chatcom-nav__toggle-bars span:first-child {
	transform: translateY(3.25px) rotate(45deg);
}

.chatcom-nav.is-open .chatcom-nav__toggle-bars span:last-child {
	transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile drawer */
@media (max-width: 833px) {
	button.chatcom-nav__toggle {
		display: inline-flex !important;
		order: 1;
	}

	.chatcom-nav__brand {
		order: 2;
	}

	.chatcom-nav__menu {
		position: fixed;
		top: var(--chatcom-nav-h);
		left: 0;
		right: 0;
		display: block;
		padding: 12px 16px 28px;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: saturate(180%) blur(24px);
		-webkit-backdrop-filter: saturate(180%) blur(24px);
		border-bottom: 1px solid var(--chatcom-line);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.25s var(--chatcom-ease), transform 0.25s var(--chatcom-ease), visibility 0.25s;
		max-height: calc(100vh - var(--chatcom-nav-h));
		overflow-y: auto;
	}

	.chatcom-nav.is-open .chatcom-nav__menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	.chatcom-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.chatcom-nav__list > li > a {
		height: auto;
		min-height: 0;
		padding: 14px 12px;
		font-size: 20px;
		font-weight: 500;
		letter-spacing: -0.02em;
		border-radius: 10px;
	}

	.chatcom-nav__list > li > a:hover {
		background: rgba(244, 244, 242, 0.9);
		animation: chatcom-menu-shake 0.55s ease both;
	}

	.chatcom-nav__list .sub-menu {
		position: static;
		display: block;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding: 0 0 8px 12px;
	}

	.chatcom-nav__logo {
		width: 180px !important;
		height: 78px !important;
		max-width: 180px;
	}

	.chatcom-nav__inner {
		padding-top: 8px;
		padding-bottom: 8px;
	}
}

/* ---------- Page polish (Apple / Nothing restraint) ---------- */

body.chatcom-polished .elementor-widget-heading .elementor-heading-title {
	letter-spacing: -0.03em;
	color: var(--chatcom-navy);
	font-weight: 600;
}

body.chatcom-polished .elementor-widget-text-editor,
body.chatcom-polished .elementor-icon-box-description {
	color: var(--chatcom-muted);
	line-height: 1.7;
	font-weight: 400;
}

/* Soften heavy hero treatment */
body.chatcom-polished .elementor-39 .elementor-element.elementor-element-54768fda {
	box-shadow: none !important;
	border-bottom: 1px solid var(--chatcom-line);
	background-color: var(--chatcom-offwhite) !important;
}

body.chatcom-polished .elementor-39 .elementor-element.elementor-element-b3dbfd8 {
	background-color: transparent !important;
}

/* Off-white page canvas */
body.chatcom-polished.elementor-page,
body.chatcom-polished .elementor,
body.chatcom-polished .site-main {
	background-color: transparent !important;
}

/* Buttons — Apple-like, less “pill marketing” */
body.chatcom-polished .elementor-button {
	border-radius: 980px !important;
	padding: 12px 22px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	letter-spacing: -0.01em;
	box-shadow: none !important;
	background-color: var(--chatcom-accent) !important;
	border-color: var(--chatcom-accent) !important;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s var(--chatcom-ease),
		opacity 0.2s ease !important;
}

body.chatcom-polished .elementor-button:hover,
body.chatcom-polished .elementor-button:focus {
	background-color: var(--chatcom-accent-hover) !important;
	border-color: var(--chatcom-accent-hover) !important;
	transform: scale(1.02);
	box-shadow: none !important;
}

body.chatcom-polished .elementor-button:active {
	transform: scale(0.98);
}

/* Icon boxes */
body.chatcom-polished .elementor-icon-box-wrapper {
	transition: transform 0.35s var(--chatcom-ease);
}

body.chatcom-polished .elementor-widget-icon-box:hover .elementor-icon-box-wrapper {
	transform: translateY(-2px);
}

body.chatcom-polished .elementor-icon-box-title {
	letter-spacing: -0.02em;
	color: var(--chatcom-navy) !important;
}

body.chatcom-polished .elementor-icon-box-icon .elementor-icon {
	transition: color 0.25s ease, transform 0.35s var(--chatcom-ease);
}

body.chatcom-polished .elementor-widget-icon-box:hover .elementor-icon {
	color: var(--chatcom-accent) !important;
	transform: scale(1.04);
}

/* Images */
body.chatcom-polished .elementor-widget-image img,
body.chatcom-polished .elementor-widget-image-carousel img {
	transition: filter 0.4s ease, transform 0.5s var(--chatcom-ease);
}

body.chatcom-polished .elementor-widget-image:hover img {
	filter: contrast(1.02) saturate(1.03);
}

/* Dividers */
body.chatcom-polished .elementor-divider-separator {
	border-color: var(--chatcom-ink) !important;
	opacity: 0.12;
}

/* Forms */
body.chatcom-polished input[type="text"],
body.chatcom-polished input[type="email"],
body.chatcom-polished input[type="tel"],
body.chatcom-polished input[type="url"],
body.chatcom-polished input[type="number"],
body.chatcom-polished input[type="search"],
body.chatcom-polished textarea,
body.chatcom-polished select,
body.chatcom-polished .elementor-field {
	border: 1px solid var(--chatcom-line) !important;
	border-radius: 10px !important;
	background: var(--chatcom-surface) !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

body.chatcom-polished input:focus,
body.chatcom-polished textarea:focus,
body.chatcom-polished select:focus,
body.chatcom-polished .elementor-field:focus {
	border-color: var(--chatcom-accent) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16) !important;
	outline: none !important;
}

/* Footer */
body.chatcom-polished .elementor-location-footer,
body.chatcom-polished footer.site-footer {
	border-top: 1px solid var(--chatcom-line);
	background: var(--chatcom-surface);
}

/* Hide legacy theme header if anything leaks through */
body.chatcom-nav-active > .site-header:not(.chatcom-nav) {
	display: none !important;
}

/* ---------- WhatsApp ---------- */

.chatcom-whatsapp {
	--size: 56px;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99999;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: var(--size);
	height: var(--size);
	padding: 0 16px 0 12px;
	border-radius: 999px;
	background: var(--chatcom-wa);
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
	transition: transform 0.3s var(--chatcom-ease), background-color 0.25s ease, box-shadow 0.3s ease;
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	overflow: visible;
}

.chatcom-whatsapp:hover,
.chatcom-whatsapp:focus-visible {
	background: var(--chatcom-wa-dark);
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(37, 211, 102, 0.42);
	color: #fff !important;
	outline: none;
}

.chatcom-whatsapp__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
}

.chatcom-whatsapp__icon svg {
	display: block;
}

.chatcom-whatsapp__label {
	white-space: nowrap;
}

.chatcom-whatsapp__pulse {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	animation: chatcom-wa-pulse 2.6s var(--chatcom-ease) infinite;
}

@keyframes chatcom-wa-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
		opacity: 1;
	}
	70% {
		box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

@media (max-width: 767px) {
	.chatcom-whatsapp {
		right: 14px;
		bottom: 14px;
		--size: 52px;
		padding: 0;
		width: var(--size);
		justify-content: center;
	}

	.chatcom-whatsapp__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		border: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chatcom-whatsapp__pulse {
		animation: none;
	}

	.chatcom-nav__list > li > a:hover,
	.chatcom-nav__list > li > a:focus-visible {
		animation: none;
	}

	body.chatcom-polished .elementor-button,
	body.chatcom-polished .elementor-icon-box-wrapper,
	.chatcom-whatsapp,
	.chatcom-nav__menu {
		transition: none !important;
	}
}

body.chatcom-polished .cky-btn-revisit-wrapper,
body.chatcom-polished .cookieadmin-revisit {
	bottom: 90px !important;
}
