/* ==========================================================
   Tech Accordion Widget
   ========================================================== */

.ta-accordion {
	display: flex;
	width: 100%;
	height: 420px;
	overflow: hidden;
	border-radius: 6px;
}

.ta-item {
	position: relative;
	flex: 0.6;
	overflow: hidden;
	cursor: pointer;
	transition: flex 0.5s ease;
}

.ta-item.active {
	flex: 5;
}

/* Background image */
.ta-item img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Collapsed overlay */
.ta-item::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(30, 50, 80, 0.65);
	z-index: 1;
	transition: background 0.4s ease;
}

.ta-item.active::before {
	background: rgba(0, 0, 0, 0.15);
}

/* Vertical title (collapsed state) */
.ta-vtitle {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.ta-vtitle span {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	white-space: nowrap;
	text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.ta-item.active .ta-vtitle {
	opacity: 0;
	pointer-events: none;
}

/* Expanded content */
.ta-content {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	padding: 40px 50px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.ta-item.active .ta-content {
	opacity: 1;
	transform: translateY(0);
}

.ta-content h3 {
	color: #fff;
	margin-bottom: 14px;
	text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.ta-content p {
	color: rgba(255, 255, 255, 0.88);
	text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ==========================================================
   Mobile: vertical stack + click to expand
   ========================================================== */
@media (max-width: 767px) {
	.ta-accordion {
		flex-direction: column;
		height: auto !important;
		gap: 8px;
	}

	.ta-item {
		flex: none !important;
		height: var(--ta-mobile-collapsed, 80px);
		transition: height 0.4s ease;
		border-radius: 6px;
	}

	.ta-item.active {
		flex: none !important;
		height: var(--ta-mobile-active, 320px);
	}

	/* Hide vertical title on mobile */
	.ta-vtitle {
		display: none;
	}

	/* Content: fill item, vertically centered */
	.ta-content {
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 20px;
		opacity: 1;
		transform: none;
		transition: none;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.ta-content h3 {
		margin-bottom: 8px;
	}

	/* Collapsed: hide description, show only title */
	.ta-item:not(.active) .ta-content p {
		display: none;
	}
}