/* 3DS Image Accordion — base structural styles.
   Visual styling (colors, sizes, typography, filters, etc.) is generated
   by Elementor from the widget's Style tab controls. This file only
   provides the structure the widget needs to function correctly. */

.ds-imgacc {
	display: flex;
	flex-direction: row;
	width: 100%;
	box-sizing: border-box;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ds-imgacc-panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	cursor: pointer;
	transition-property: flex-grow;
	outline: none;
	box-sizing: border-box;
}

.ds-imgacc-panel:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: -4px;
}

.ds-imgacc-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform 0.4s ease, filter 0.4s ease;
	pointer-events: none;
}

.ds-imgacc-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ds-imgacc-content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	box-sizing: border-box;
	pointer-events: none;
}

.ds-imgacc-content a,
.ds-imgacc-content a.ds-imgacc-title-link {
	pointer-events: auto;
	text-decoration: none;
	display: inline-block;
}

.ds-imgacc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	white-space: nowrap;
}

.ds-imgacc-icon svg {
	width: 1em;
	height: 1em;
}

.ds-imgacc-title {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	transition: transform 0.3s ease;
}

/* Rotate title to vertical while its panel is collapsed. */
.ds-imgacc-panel:not(.is-active) .ds-imgacc-title--rotate {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	max-width: none;
}

.ds-imgacc-description {
	overflow: hidden;
	transition: opacity 0.3s ease, max-height 0.3s ease;
}

.ds-imgacc-panel:not(.is-active) .ds-imgacc-description--hide-collapsed {
	opacity: 0;
	max-height: 0;
	margin: 0;
	pointer-events: none;
}

/* ---------- Responsive: stack vertically on small screens ---------- */
@media (max-width: 767px) {
	.ds-imgacc--stack-mobile {
		flex-direction: column;
	}

	.ds-imgacc--stack-mobile .ds-imgacc-panel {
		flex: 1 1 0 !important;
		width: 100%;
	}

	.ds-imgacc--stack-mobile .ds-imgacc-panel.is-active {
		flex-grow: 4 !important;
	}

	.ds-imgacc--stack-mobile .ds-imgacc-panel:not(.is-active) {
		flex-grow: 1 !important;
		min-height: 56px;
	}

	/* Vertical rotation reads oddly in a stacked column layout — force
	   titles horizontal again once we've switched to vertical stacking. */
	.ds-imgacc--stack-mobile .ds-imgacc-title--rotate {
		writing-mode: horizontal-tb;
		transform: none;
	}

	.ds-imgacc--stack-mobile .ds-imgacc-content {
		justify-content: center;
	}
}
