/* ClickTraces – Content + Accordion (ct-content-accordion)
 * Single-class rules are defaults that Elementor controls override.
 * ".ct-ca .x" rules are structural and protect against theme styles. */

.ct-ca {
	--ca-left: 42%;
	--ca-gap: 56px;
	--ca-dur: 400ms;
	container-type: inline-size;
	container-name: ctca;
	display: block;
	width: 100%;
	box-sizing: border-box;
}

.ct-ca * {
	box-sizing: border-box;
}

.ct-ca .ct-ca__grid {
	display: grid;
	grid-template-columns: var(--ca-left) 1fr;
	align-items: flex-start;
	gap: var(--ca-gap);
	width: 100%;
}

.ct-ca.ct-ca--no-intro .ct-ca__grid {
	grid-template-columns: 1fr;
}

.ct-ca.ct-ca--reverse .ct-ca__intro {
	order: 2;
}

.ct-ca.ct-ca--reverse .ct-ca__list {
	order: 1;
}

/* ---------- Intro ---------- */

.ct-ca .ct-ca__intro {
	min-width: 0;
}

.ct-ca .ct-ca__heading {
	margin: 0 0 18px;
	font-size: 40px;
	font-weight: 800;
	line-height: 1.12;
	color: #111418;
}

.ct-ca .ct-ca__text {
	margin: 0 0 28px;
	color: #5b6069;
	font-size: 16px;
	line-height: 1.7;
}

.ct-ca .ct-ca__text p {
	margin: 0 0 12px;
}

.ct-ca .ct-ca__text p:last-child {
	margin-bottom: 0;
}

.ct-ca .ct-ca__text a {
	color: #111418;
	text-decoration: underline;
}

.ct-ca .ct-ca__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background-color: #6d4cff;
	border: 1px solid transparent;
	border-radius: 40px;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ct-ca .ct-ca__btn:hover,
.ct-ca .ct-ca__btn:focus {
	background-color: #5a3ce0;
}

.ct-ca .ct-ca__btn-arrow {
	display: inline-flex;
	transition: transform 0.25s ease;
}

.ct-ca .ct-ca__btn:hover .ct-ca__btn-arrow {
	transform: translateX(4px);
}

/* ---------- Accordion list ---------- */

.ct-ca .ct-ca__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.ct-ca .ct-ca__item {
	position: relative;
	margin: 0;
	background-color: #f5f6f8;
	border: 1px solid transparent;
	border-radius: 10px;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.ct-ca .ct-ca__heading-tag {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: inherit;
	line-height: inherit;
	font-weight: inherit;
}

/* Reset theme button styles */
.ct-ca .ct-ca__head {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 18px 22px;
	font: inherit;
	text-align: left;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
	appearance: none;
}

.ct-ca .ct-ca__head:focus-visible {
	outline: 2px solid rgba(109, 76, 255, 0.6);
	outline-offset: 2px;
	border-radius: 8px;
}

.ct-ca .ct-ca__badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 14px;
	padding: 4px 8px;
	font-size: 13px;
	font-weight: 700;
	color: #111418;
	background-color: #fff;
	border: 1px solid #e4e6ea;
	border-radius: 6px;
	line-height: 1;
}

.ct-ca .ct-ca__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111418;
	line-height: 1.3;
	transition: color 0.25s ease;
}

/* ---------- Toggle icon ---------- */

.ct-ca .ct-ca__icon {
	position: relative;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-left: 16px;
	color: #111418;
}

.ct-ca--icon-plus .ct-ca__icon::before,
.ct-ca--icon-plus .ct-ca__icon::after {
	content: "";
	position: absolute;
	background-color: currentColor;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.ct-ca--icon-plus .ct-ca__icon::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
}

.ct-ca--icon-plus .ct-ca__icon::after {
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	transform: translateX(-50%);
}

.ct-ca--icon-plus .ct-ca__item.is-open .ct-ca__icon::after {
	opacity: 0;
	transform: translateX(-50%) scaleY(0);
}

.ct-ca--icon-chevron .ct-ca__icon::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
	transition: transform 0.3s ease;
}

.ct-ca--icon-chevron .ct-ca__item.is-open .ct-ca__icon::before {
	transform: translateY(20%) rotate(225deg);
}

/* ---------- Panel ---------- */

.ct-ca .ct-ca__panel {
	overflow: hidden;
	max-height: 0;
	transition: max-height var(--ca-dur) ease;
}

.ct-ca .ct-ca__panel[hidden] {
	display: block;
}

.ct-ca .ct-ca__content {
	padding: 0 22px 20px;
	color: #5b6069;
	font-size: 15px;
	line-height: 1.7;
}

.ct-ca .ct-ca__content p {
	margin: 0 0 12px;
}

.ct-ca .ct-ca__content p:last-child {
	margin-bottom: 0;
}

.ct-ca .ct-ca__content a {
	color: #111418;
	text-decoration: underline;
}

/* Before JS runs, show the server-rendered open item's content. */
.ct-ca:not(.ct-ca--ready) .ct-ca__item.is-open .ct-ca__panel {
	max-height: none;
}

/* ---------- Stacked (single column) – responds to the widget's own width ---------- */

@container ctca (max-width: 1024px) {
	.ct-ca--stack-1024 .ct-ca__grid {
		grid-template-columns: 1fr;
	}
	.ct-ca--stack-1024 .ct-ca__intro,
	.ct-ca--stack-1024 .ct-ca__list {
		order: 0;
	}
}

@container ctca (max-width: 767px) {
	.ct-ca--stack-767 .ct-ca__grid {
		grid-template-columns: 1fr;
	}
	.ct-ca--stack-767 .ct-ca__intro,
	.ct-ca--stack-767 .ct-ca__list {
		order: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ct-ca .ct-ca__panel,
	.ct-ca .ct-ca__item,
	.ct-ca .ct-ca__icon::before,
	.ct-ca .ct-ca__icon::after {
		transition-duration: 0.01ms !important;
	}
}
