/* ===================================================================
   Accordion with Image – tc-ai
   =================================================================== */

/* ── Reset ──────────────────────────────────────────────────────── */
.tc-ai-root,
.tc-ai-root *,
.tc-ai-root *::before,
.tc-ai-root *::after {
	box-sizing: border-box;
}

/* ── Responsive visibility ──────────────────────────────────────── */
.tc-ai-desktop { display: none; }
.tc-ai-mobile  { display: block; }

@media (min-width: 768px) {
	.tc-ai-desktop { display: block; }
	.tc-ai-mobile  { display: none; }
}

/* ── Desktop grid ───────────────────────────────────────────────── */
.tc-ai-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 60px;
	align-items: start;
}

.tc-ai-grid--left .tc-ai-col--accordion { order: 2; }
.tc-ai-grid--left .tc-ai-col--media    { order: 1; }

/* ── Accordion ──────────────────────────────────────────────────── */
.tc-ai-item {
	border-bottom: 1px solid #e5e5e5;
}

button.tc-ai-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 20px 0;
	margin: 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	background-color: transparent;
	transition: background-color 0.2s ease;
}

button.tc-ai-header:focus-visible {
	outline: 2px solid #41A541;
	outline-offset: 2px;
	border-radius: 4px;
}

.tc-ai-item .tc-ai-title {
	flex: 1;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.3;
	color: #A5A5A5;
}

.tc-ai-item.is-open .tc-ai-title {
	color: #102A43;
}


.tc-ai-icon {
	flex-shrink: 0;
	margin-left: 16px;
	font-size: 14px;
	color: #829AB1;
	transition: transform 0.3s ease, color 0.3s ease;
	display: flex;
	align-items: center;
}

.tc-ai-icon svg {
	width: 1em;
	height: 1em;
}

.tc-ai-item.is-open .tc-ai-icon {
	transform: rotate(180deg);
	color: #41A541;
}

/* ── Panel slide ────────────────────────────────────────────────── */
.tc-ai-panel {
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.tc-ai-content {
	padding: 0 0 24px;
	font-size: 16px;
	line-height: 1.6;
	color: #4E647A;
}

.tc-ai-content p:first-child { margin-top: 0; }
.tc-ai-content p:last-child  { margin-bottom: 0; }

.tc-ai-content ul {
	list-style: none;
	padding-left: 0;
	margin: 12px 0;
}

.tc-ai-content ul li {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 4px 0;
}

.tc-ai-content ul li::before {
	content: '\f111'; /* fa-circle fallback */
	font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', 'FontAwesome';
	font-weight: 900;
	font-size: 8px;
	color: #0f574a;
	flex-shrink: 0;
	line-height: 1;
	display: inline-block;
	position: relative;
	top: -1px;
}

/* ── Item link ──────────────────────────────────────────────────── */
.tc-ai-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	margin-bottom: 16px;
	font-size: 16px;
	font-weight: 600;
	color: #41A541;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tc-ai-link:hover {
	color: #338033;
}

.tc-ai-link-icon {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
}

.tc-ai-link-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ── Media panel (desktop) ──────────────────────────────────────── */
.tc-ai-media-panel {
	position: sticky;
	top: 130px;
	min-height: 510px;
	background: #f5f7fa;
	border-radius: 16px;
	overflow: hidden;
}

/* ── Image crossfade ────────────────────────────────────────────── */
.tc-ai-layer {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease, transform 0.5s ease;
	z-index: 0;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.tc-ai-layer.is-active {
	opacity: 1;
	z-index: 1;
	pointer-events: auto;
}

.tc-ai-img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* ── Mobile carousel ─────────────────────────────────────────────── */
.tc-ai-carousel {
	overflow: hidden;
	position: relative;
}

.tc-ai-carousel-track {
	display: flex;
	transition: transform 0.4s ease;
	will-change: transform;
}

.tc-ai-carousel-slide {
	flex: 0 0 100%;
	min-width: 0;
	padding: 0 4px;
	box-sizing: border-box;
}

.tc-ai-mobile-title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #102A43;
	margin: 0 0 12px;
}

.tc-ai-mobile-visual {
	padding: 24px 0 0;
}

.tc-ai-mobile-visual .tc-ai-img {
	width: 100%;
	max-height: 400px;
	border-radius: 12px;
	object-fit: contain;
}

/* Dots */
.tc-ai-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 24px 0 8px;
}

.tc-ai-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: #D1D5DB;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.tc-ai-carousel-dot:hover {
	background: #9CA3AF;
}

.tc-ai-carousel-dot.is-active {
	background: #41A541;
	transform: scale(1.2);
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.tc-ai-layer {
		transform: none;
		transition: opacity 0.2s ease;
	}
	.tc-ai-layer.is-active {
		transform: none;
	}
	.tc-ai-panel {
		transition: max-height 0.15s ease;
	}
	.tc-ai-icon {
		transition: transform 0.15s ease, color 0.15s ease;
	}
}
