/* ==========================================================================
   Custom Offcanvas for Elementor
   All sizing/timing is driven by CSS variables so Elementor's native
   responsive & style controls (which just write these variables) work
   without any extra JS.
   ========================================================================== */

.coe-offcanvas-root {
	display: inline-block;
	/* Shared timing variable: lives here (not on .coe-offcanvas) because the
	   trigger button and the offcanvas panel are siblings, not parent/child,
	   so only a variable set on their common ancestor is inherited by both. */
	--coe-anim-duration: 400ms;
}

/* ---------- Trigger button ---------- */
.coe-trigger-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	background: #181818;
	color: #fff;
	padding: 12px 24px;
	font-family: inherit;
	line-height: 1;
}

.coe-trigger-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Animated hamburger → X icon ---------- */
.coe-hamburger {
	--coe-burger-width: 22px;
	--coe-burger-thickness: 2px;
	--coe-burger-gap: 5px;
	--coe-burger-color: currentColor;

	position: relative;
	display: inline-block;
	flex-shrink: 0;
	width: var(--coe-burger-width);
	height: calc(var(--coe-burger-thickness) * 3 + var(--coe-burger-gap) * 2);
}

.coe-hamburger-line {
	position: absolute;
	left: 0;
	width: 100%;
	height: var(--coe-burger-thickness);
	background: var(--coe-burger-color);
	border-radius: 999px;
	transition:
		transform var(--coe-anim-duration) ease,
		opacity var(--coe-anim-duration) ease,
		top var(--coe-anim-duration) ease;
}

.coe-hamburger-line:nth-child(1) {
	top: 0;
}

.coe-hamburger-line:nth-child(2) {
	top: calc(var(--coe-burger-thickness) + var(--coe-burger-gap));
}

.coe-hamburger-line:nth-child(3) {
	top: calc((var(--coe-burger-thickness) + var(--coe-burger-gap)) * 2);
}

/* When the trigger is toggled open, the three lines morph into an X */
.coe-trigger-btn.coe-active .coe-hamburger-line:nth-child(1) {
	top: calc(var(--coe-burger-thickness) + var(--coe-burger-gap));
	transform: rotate(45deg);
}

.coe-trigger-btn.coe-active .coe-hamburger-line:nth-child(2) {
	opacity: 0;
}

.coe-trigger-btn.coe-active .coe-hamburger-line:nth-child(3) {
	top: calc(var(--coe-burger-thickness) + var(--coe-burger-gap));
	transform: rotate(-45deg);
}

/* ---------- Offcanvas root (fixed, full viewport container) ---------- */
.coe-offcanvas {
	--coe-panel-size: 60%;
	--coe-panel-bg: #ffffff;
	--coe-overlay-bg: rgba(0, 0, 0, 0.6);
	--coe-zindex: 9999;

	position: fixed;
	inset: 0;
	z-index: var(--coe-zindex);
	visibility: hidden;
	pointer-events: none;
}

.coe-offcanvas.coe-active {
	visibility: visible;
	pointer-events: auto;
}

/* ---------- Overlay ---------- */
.coe-offcanvas-overlay {
	position: absolute;
	inset: 0;
	background: var(--coe-overlay-bg);
	opacity: 0;
	transition: opacity var(--coe-anim-duration) ease;
}

.coe-offcanvas.coe-active .coe-offcanvas-overlay {
	opacity: 1;
}

/* ---------- Panel (shared) ---------- */
.coe-offcanvas-panel {
	position: absolute;
	display: flex;
	flex-direction: column;
	background: var(--coe-panel-bg);
	transition: transform var(--coe-anim-duration) ease;
	will-change: transform;
	overflow: hidden;
}

.coe-offcanvas-content {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---------- Left / Right directions -> width based, use logical
   properties so this behaves correctly on RTL (e.g. Persian) sites ---------- */
.coe-offcanvas[data-coe-direction="left"] .coe-offcanvas-panel,
.coe-offcanvas[data-coe-direction="right"] .coe-offcanvas-panel {
	top: 0;
	bottom: 0;
	width: var(--coe-panel-size);
	max-width: 100vw;
}

.coe-offcanvas[data-coe-direction="left"] .coe-offcanvas-panel {
	left: 0;
	transform: translateX(-100%);
}

.coe-offcanvas[data-coe-direction="right"] .coe-offcanvas-panel {
	right: 0;
	transform: translateX(100%);
}

/* ---------- Top / Bottom directions -> height based ---------- */
.coe-offcanvas[data-coe-direction="top"] .coe-offcanvas-panel,
.coe-offcanvas[data-coe-direction="bottom"] .coe-offcanvas-panel {
	left: 0;
	right: 0;
	height: var(--coe-panel-size);
	max-height: 100vh;
}

.coe-offcanvas[data-coe-direction="top"] .coe-offcanvas-panel {
	top: 0;
	transform: translateY(-100%);
}

.coe-offcanvas[data-coe-direction="bottom"] .coe-offcanvas-panel {
	bottom: 0;
	transform: translateY(100%);
}

/* ---------- Open state: panel slides to its resting position ---------- */
.coe-offcanvas.coe-active .coe-offcanvas-panel {
	transform: translate(0, 0);
}

/* ---------- Panel header (logo + close) ----------
   A flex row pinned to the top of the panel. `direction: ltr` neutralises the
   page's RTL so "close on the right" always means physically right; the logo
   sits at the opposite end via space-between. */
.coe-offcanvas-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	direction: ltr;
	border-bottom: 0 solid transparent;
}

.coe-offcanvas-panel[data-close-side="left"] .coe-offcanvas-header {
	flex-direction: row-reverse;
}

.coe-offcanvas-logo {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.coe-offcanvas-logo img {
	display: block;
	width: 120px;
	max-width: 100%;
	height: auto;
}

/* ---------- Close button (shared look) ---------- */
.coe-offcanvas-close {
	flex: 0 0 auto;
	width: 1.6em;
	height: 1.6em;
	line-height: 1;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.coe-offcanvas-close svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Floating close (used only when the header is OFF) ----------
   Position variants are physical so they behave predictably on RTL sites. */
.coe-offcanvas-close--floating {
	position: absolute;
	top: var(--coe-close-top, 12px);
	z-index: 2;
}

.coe-offcanvas-panel[data-close-pos="right"] .coe-offcanvas-close--floating {
	right: var(--coe-close-h, 12px);
	left: auto;
}

.coe-offcanvas-panel[data-close-pos="left"] .coe-offcanvas-close--floating {
	left: var(--coe-close-h, 12px);
	right: auto;
}

.coe-offcanvas-panel[data-close-pos="center"] .coe-offcanvas-close--floating {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
}

/* ---------- Force full screen on mobile when enabled ---------- */
@media (max-width: 767px) {
	.coe-offcanvas.coe-fullscreen-mobile .coe-offcanvas-panel {
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		max-width: 100vw !important;
		max-height: 100vh !important;
		margin: 0 !important;
		border-radius: 0 !important;
	}
}

/* ---------- Prevent background scroll while a panel is open ---------- */
body.coe-offcanvas-open {
	overflow: hidden;
}

/* ---------- Editor-only placeholder (panel content is not rendered live
   inside the Elementor editor, to keep the editor fast and crash-free) ---------- */
.coe-editor-placeholder {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 13px;
	line-height: 1.6;
}

.coe-editor-placeholder strong {
	color: #1d2327;
	font-size: 14px;
}
