/* ==========================================================================
   Coach Bhairy — site header (.cb-header) + footer (.cb-footer)
   Loaded on every front-end page when the header/footer templates are active.
   ========================================================================== */

.cb-header,
.cb-footer,
.cb-skip-link {
	--cb-brand: #962D3E;
	--cb-brand-dark: #5e1724;
	--cb-accent: #E9B85C;
	--cb-ink: #1c1214;
	--cb-charcoal: #515151;
	--cb-font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--cb-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.cb-chrome { --cb-header-h: 92px; --cb-admin-h: 0px; }
body.cb-chrome.admin-bar { --cb-admin-h: 32px; }
@media (max-width: 1199px) { body.cb-chrome { --cb-header-h: 72px; } }
@media (max-width: 782px) { body.cb-chrome.admin-bar { --cb-admin-h: 46px; } }

/* Remove Elementor container spacing around the chrome widgets. */
.cb-chrome-slot .e-con,
.cb-chrome-slot .e-con-inner,
.cb-chrome-slot .elementor-widget-container { padding: 0 !important; margin: 0 !important; max-width: none !important; --gap: 0; }
.cb-chrome-slot .elementor-element { width: 100%; }

/* Non-hero pages: push content below the fixed header. */
body.cb-chrome:not(.cb-header-overlay) { padding-top: var(--cb-header-h); }
/* Hero pages: keep hero copy clear of the transparent header. */
body.cb-header-overlay .cb-ph__content { padding-top: calc(var(--cb-header-h) + 40px); }
body.cb-header-overlay .cb-hc__content { padding-top: var(--cb-header-h); }

#cb-main { position: absolute; top: 0; }
#cb-main:focus { outline: none; }

/* ---------- Skip link ---------- */
.cb-skip-link {
	position: fixed;
	top: -100px;
	left: 16px;
	z-index: 100000;
	padding: 12px 18px;
	border-radius: 8px;
	background: var(--cb-brand);
	color: #fff !important;
	font: 600 .9rem/1 var(--cb-font-body);
	text-decoration: none;
	transition: top .2s ease;
}
.cb-skip-link:focus { top: calc(var(--cb-admin-h) + 12px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.cb-header {
	--cb-logo-h: 60px;
	--cb-fg: var(--cb-charcoal);
	position: fixed;
	top: var(--cb-admin-h, 0px);
	left: 0;
	right: 0;
	z-index: 990;
	font-family: var(--cb-font-body);
	color: var(--cb-fg);
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 1px 0 rgba(28, 18, 20, .06);
	transition: background-color .35s ease, box-shadow .35s ease, color .35s ease;
}
.cb-header__bar {
	display: flex;
	align-items: center;
	gap: 28px;
	max-width: 1320px;
	height: var(--cb-header-h, 92px);
	margin: 0 auto;
	padding: 0 32px;
	transition: height .35s ease;
}

/* Logo (two images, cross-faded between white and colour) + tagline */
.cb-header__logo {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	text-decoration: none;
}
.cb-header__logo-mark {
	position: relative;
	display: block;
	height: var(--cb-logo-h);
	line-height: 0;
	transition: height .35s ease;
}
.cb-header__tagline {
	display: block;
	color: var(--cb-charcoal);
	font: 500 10.5px/1.2 var(--cb-font-body);
	letter-spacing: .04em;
	white-space: nowrap;
	transition: color .35s ease;
}
.cb-header .cb-header__logo-img { display: block; height: 100%; width: auto; max-width: none; transition: opacity .35s ease; }
.cb-header .cb-header__logo-img--light { position: absolute; inset: 0 auto auto 0; opacity: 0; }
.cb-header__logo-text { font: 700 1.4rem/var(--cb-logo-h) var(--cb-font-head); color: var(--cb-brand); }

/* Desktop menu */
.cb-header__nav { margin-left: auto; }
.cb-menu,
.cb-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.cb-menu { display: flex; align-items: center; gap: 4px; }
.cb-menu > li { position: relative; }
.cb-menu a {
	position: relative;
	display: block;
	padding: 10px 14px;
	color: inherit;
	font: 500 .95rem/1.2 var(--cb-font-body);
	text-decoration: none !important;
	white-space: nowrap;
	transition: color .25s ease;
}
.cb-menu > li > a::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 4px;
	height: 2px;
	border-radius: 2px;
	background: var(--cb-brand);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}
.cb-menu > li > a:hover,
.cb-menu > li > a[aria-current="page"] { color: var(--cb-brand); }
.cb-menu > li > a:hover::after,
.cb-menu > li > a[aria-current="page"]::after { transform: scaleX(1); }
/* optional dropdowns */
.cb-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: 8px;
	border-radius: 12px;
	background: #fff;
	color: var(--cb-charcoal);
	box-shadow: 0 20px 40px -12px rgba(28, 18, 20, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.cb-menu li:hover > .sub-menu,
.cb-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.cb-menu .sub-menu a { border-radius: 8px; }
.cb-menu .sub-menu a:hover { background: #f6eef0; color: var(--cb-brand); }

.cb-header__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.cb-header__cta { padding: .85em 1.45em; font-size: .9rem; box-shadow: none; }

/* Hamburger */
.cb-header__toggle {
	display: none;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.cb-header__toggle:hover,
.cb-header__toggle:focus { background: transparent; color: inherit; }
.cb-burger { position: relative; display: block; width: 24px; height: 16px; margin: 0 auto; }
.cb-burger span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.cb-burger span:nth-child(1) { top: 0; }
.cb-burger span:nth-child(2) { top: 7px; width: 70%; left: auto; right: 0; }
.cb-burger span:nth-child(3) { top: 14px; }
.cb-header.is-open .cb-burger span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.cb-header.is-open .cb-burger span:nth-child(2) { opacity: 0; }
.cb-header.is-open .cb-burger span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

.cb-header a:focus-visible,
.cb-header button:focus-visible,
.cb-footer a:focus-visible {
	outline: 3px solid var(--cb-accent);
	outline-offset: 3px;
	border-radius: 6px;
}

/* --- Transparent state over a hero (top of page, menu closed) --- */
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) {
	--cb-fg: #fff;
	background: linear-gradient(180deg, rgba(18, 8, 11, .55) 0%, rgba(18, 8, 11, 0) 100%);
	box-shadow: none;
}
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-header__logo-img--light { opacity: 1; }
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-header__logo-img--dark { opacity: 0; }
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-header__tagline { color: rgba(255, 255, 255, .88); }
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-menu > li > a:hover,
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-menu > li > a[aria-current="page"] { color: #fff; }
.cb-header-overlay .cb-header:not(.is-scrolled):not(.is-open) .cb-menu > li > a::after { background: var(--cb-accent); }

/* --- Scrolled state: compact, solid --- */
.cb-header.is-scrolled { background: rgba(255, 255, 255, .98); box-shadow: 0 10px 30px -18px rgba(28, 18, 20, .45); }
.cb-header.is-scrolled .cb-header__bar { height: calc(var(--cb-header-h, 92px) - 18px); }
.cb-header.is-scrolled .cb-header__logo-mark { height: calc(var(--cb-logo-h) - 10px); }

/* --- Mobile drawer --- */
.cb-drawer {
	position: fixed;
	inset: 0;
	z-index: -1;
	display: flex;
	padding: calc(var(--cb-header-h, 72px) + var(--cb-admin-h, 0px)) 0 0;
	background:
		radial-gradient(120% 60% at 100% 0%, rgba(233, 184, 92, .16), transparent 60%),
		linear-gradient(160deg, #6d1b2b 0%, var(--cb-ink) 100%);
	color: #fff;
	opacity: 0;
	transition: opacity .3s ease;
}
.cb-drawer[hidden] { display: none; }
.cb-header.is-open .cb-drawer { opacity: 1; }
.cb-drawer__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 24px 28px 36px;
	overflow-y: auto;
}
.cb-drawer__menu,
.cb-drawer__menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.cb-drawer__menu > li {
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .4s ease, transform .4s ease;
}
.cb-header.is-open .cb-drawer__menu > li { opacity: 1; transform: none; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(2) { transition-delay: .04s; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(3) { transition-delay: .08s; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(4) { transition-delay: .12s; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(5) { transition-delay: .16s; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(6) { transition-delay: .2s; }
.cb-header.is-open .cb-drawer__menu > li:nth-child(n+7) { transition-delay: .24s; }
.cb-drawer__menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 2px;
	color: #fff !important;
	font: 600 1.55rem/1.2 var(--cb-font-head);
	text-decoration: none !important;
}
.cb-drawer__menu a::after { content: "→"; font: 400 1.1rem/1 var(--cb-font-body); opacity: .45; transition: transform .25s ease, opacity .25s ease; }
.cb-drawer__menu a:hover::after,
.cb-drawer__menu a[aria-current="page"]::after { opacity: 1; transform: translateX(4px); color: var(--cb-accent); }
.cb-drawer__menu a[aria-current="page"] { color: var(--cb-accent) !important; }
.cb-drawer__menu .sub-menu a { padding: 10px 2px 10px 16px; font: 500 1rem/1.3 var(--cb-font-body); }
.cb-drawer__cta { align-self: flex-start; margin-top: 32px; }
.cb-drawer__note {
	margin: auto 0 0;
	padding-top: 32px;
	color: var(--cb-accent);
	font: 600 .75rem/1.4 var(--cb-font-body);
	letter-spacing: .2em;
	text-transform: uppercase;
}
html.cb-no-scroll,
html.cb-no-scroll body { overflow: hidden; }

/* Open state: header bar sits on the drawer, white content */
.cb-header.is-open { --cb-fg: #fff; background: transparent; box-shadow: none; }
.cb-header.is-open .cb-header__logo-img--light { opacity: 1; }
.cb-header.is-open .cb-header__logo-img--dark { opacity: 0; }
.cb-header.is-open .cb-header__tagline { color: rgba(255, 255, 255, .88); }

/* 7 menu items + tagline logo + CTA: tighten progressively so nothing leaves the screen */
@media (max-width: 1365px) {
	.cb-header__bar { gap: 14px; padding: 0 20px; }
	.cb-menu a { padding: 10px 8px; font-size: .86rem; }
	.cb-menu > li > a::after { left: 8px; right: 8px; }
	.cb-header__tagline { font-size: 9.5px; letter-spacing: .02em; }
	.cb-header .cb-header__cta { padding: .85em 1.15em; font-size: .85rem; }
}
@media (max-width: 1279px) {
	.cb-menu a { padding: 10px 6px; font-size: .82rem; }
	.cb-menu > li > a::after { left: 6px; right: 6px; }
}
@media (max-width: 1199px) {
	.cb-header__nav { display: none; }
	.cb-header__actions { margin-left: auto; }
	.cb-header__toggle { display: block; }
}
@media (max-width: 520px) {
	.cb-header__bar { padding: 0 16px; }
	.cb-header__cta { display: none; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.cb-footer {
	position: relative;
	background: var(--cb-ink);
	color: rgba(255, 255, 255, .72);
	font: 400 .95rem/1.7 var(--cb-font-body);
}
.cb-footer a { color: inherit; text-decoration: none; transition: color .2s ease; }
.cb-footer a:hover { color: #fff; }

/* CTA band */
.cb-footer__cta {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(90% 140% at 100% 0%, rgba(233, 184, 92, .22), transparent 55%),
		linear-gradient(120deg, var(--cb-brand) 0%, var(--cb-brand-dark) 100%);
	color: #fff;
}
.cb-footer__cta::after {
	content: "";
	position: absolute;
	right: -80px;
	bottom: -120px;
	width: 360px;
	height: 360px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 50%;
	box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 80px rgba(255, 255, 255, .02);
	pointer-events: none;
}
.cb-footer__cta-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 72px 32px;
}
.cb-footer__cta-copy { max-width: 680px; }
.cb-footer__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .8em;
	margin: 0 0 1rem;
	color: var(--cb-accent);
	font: 600 .78rem/1.2 var(--cb-font-body);
	letter-spacing: .22em;
	text-transform: uppercase;
}
.cb-footer__eyebrow::before { content: ""; width: 2.6em; height: 2px; border-radius: 2px; background: currentColor; }
.cb-footer__cta-title {
	margin: 0 0 .6rem;
	color: #fff;
	font: 700 clamp(1.7rem, 3vw, 2.5rem)/1.2 var(--cb-font-head);
}
.cb-footer__cta-text { margin: 0; color: rgba(255, 255, 255, .85); font-size: 1.02rem; }
.cb-footer__cta-actions { display: flex; flex-wrap: wrap; gap: 14px; flex: none; }
.cb-btn--light { background: #fff; color: var(--cb-brand) !important; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
.cb-btn--light:hover { background: var(--cb-accent); color: var(--cb-ink) !important; transform: translateY(-2px); }

/* Main columns */
.cb-footer__main {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr;
	gap: 48px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 72px 32px 56px;
}
.cb-footer--4col .cb-footer__main { grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr; }
.cb-footer__logo { display: inline-block; line-height: 0; }
.cb-footer .cb-footer__logo img { width: 190px; max-width: 100%; height: auto; }
.cb-footer__about { max-width: 340px; margin: 22px 0 14px; }
.cb-footer__values {
	margin: 0;
	color: var(--cb-accent);
	font: 600 .74rem/1.5 var(--cb-font-body);
	letter-spacing: .18em;
	text-transform: uppercase;
}
.cb-footer__title {
	margin: 6px 0 20px;
	color: #fff;
	font: 600 1.15rem/1.3 var(--cb-font-head);
}
.cb-footer__title::after { content: ""; display: block; width: 32px; height: 2px; margin-top: 12px; border-radius: 2px; background: var(--cb-brand); }
.cb-footer__links,
.cb-footer__links .sub-menu,
.cb-footer__contact,
.cb-footer__social { list-style: none; margin: 0; padding: 0; }
.cb-footer__links li { margin: 0 0 10px; }
.cb-footer__links a { display: inline-block; transition: color .2s ease, transform .2s ease; }
.cb-footer__links a:hover { transform: translateX(4px); }
.cb-footer__links a[aria-current="page"] { color: var(--cb-accent); }
.cb-footer__contact li { display: flex; gap: 12px; margin: 0 0 14px; }
.cb-footer__contact svg { flex: none; margin-top: 3px; color: var(--cb-accent); }
.cb-footer__social { display: flex; gap: 10px; margin-top: 22px; }
.cb-footer__social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 50%;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.cb-footer__social a:hover { background: var(--cb-brand); border-color: var(--cb-brand); }

/* Bottom bar */
.cb-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 22px 32px 26px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: .85rem;
}
.cb-footer__bottom p { margin: 0; }
.cb-footer__note { font-family: var(--cb-font-head); font-style: italic; color: rgba(255, 255, 255, .6); }

/* Back to top */
.cb-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 980;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--cb-brand);
	color: #fff !important;
	box-shadow: 0 12px 28px -10px rgba(150, 45, 62, .9);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .3s ease, transform .3s ease, visibility .3s, background-color .2s ease;
}
.cb-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.cb-to-top:hover { background: var(--cb-brand-dark); }

@media (max-width: 1023px) {
	.cb-footer__main,
	.cb-footer--4col .cb-footer__main { grid-template-columns: 1fr 1fr; }
	.cb-footer__brand { grid-column: 1 / -1; }
	.cb-footer__cta-inner { flex-direction: column; align-items: flex-start; padding: 60px 24px; }
	.cb-footer__main { padding: 56px 24px 40px; gap: 40px 32px; }
	.cb-footer__bottom { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 560px) {
	.cb-footer__main,
	.cb-footer--4col .cb-footer__main { grid-template-columns: 1fr; }
	.cb-footer__cta-actions { width: 100%; }
	.cb-footer__cta-actions .cb-btn { flex: 1 1 auto; justify-content: center; }
	.cb-footer__bottom { flex-direction: column; }
	.cb-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.cb-header,
	.cb-header *,
	.cb-footer *,
	.cb-to-top { transition: none !important; }
}

/* ==========================================================================
   Floating WhatsApp button (all pages; option cb_whatsapp)
   ========================================================================== */
.cb-wa-float {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 985;
	display: flex;
	align-items: center;
	height: 58px;
	padding: 0;
	border-radius: 999px;
	background: #25d366;
	color: #fff !important;
	font: 600 .9rem/1 var(--cb-font-body, "Poppins", sans-serif);
	text-decoration: none !important;
	box-shadow: 0 14px 30px -10px rgba(18, 140, 70, .75), 0 0 0 0 rgba(37, 211, 102, .45);
	animation: cbWaIn .6s 1s cubic-bezier(.2, .7, .2, 1) both, cbWaPulse 2.6s 2s ease-out 3;
	transition: background-color .25s ease, transform .25s ease;
}
.cb-wa-float:hover { background: #1ebe5b; transform: translateY(-2px); }
.cb-wa-float:focus-visible { outline: 3px solid var(--cb-accent, #E9B85C); outline-offset: 3px; }
.cb-wa-float__icon { display: grid; place-items: center; width: 58px; height: 58px; flex: none; }
.cb-wa-float__icon svg { width: 30px; height: 30px; stroke-width: 1.9; }
/* label slides out on hover / keyboard focus (desktop) */
.cb-wa-float__label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	transition: max-width .35s ease, opacity .25s ease, padding .35s ease;
}
.cb-wa-float:hover .cb-wa-float__label,
.cb-wa-float:focus-visible .cb-wa-float__label { max-width: 180px; opacity: 1; padding-right: 22px; }
@keyframes cbWaIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes cbWaPulse {
	0% { box-shadow: 0 14px 30px -10px rgba(18, 140, 70, .75), 0 0 0 0 rgba(37, 211, 102, .45); }
	70% { box-shadow: 0 14px 30px -10px rgba(18, 140, 70, .75), 0 0 0 16px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 14px 30px -10px rgba(18, 140, 70, .75), 0 0 0 0 rgba(37, 211, 102, 0); }
}
/* back-to-top stacks above the WhatsApp button */
.cb-has-wa .cb-to-top { bottom: 92px; right: 27px; }
/* hide while the mobile menu drawer is open */
body:has(.cb-header.is-open) .cb-wa-float { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 560px) {
	.cb-wa-float { right: 16px; bottom: 16px; height: 54px; }
	.cb-wa-float__icon { width: 54px; height: 54px; }
	.cb-has-wa .cb-to-top { bottom: 80px; right: 21px; }
}
@media (hover: none) {
	.cb-wa-float:hover .cb-wa-float__label { max-width: 0; opacity: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.cb-wa-float { animation: none; }
	.cb-wa-float__label { transition: none; }
}
@media print { .cb-wa-float { display: none; } }
