.ect-tabs {
	--ect-collapsed-width: 100px;
	--ect-expanded-width: 52%;
	--ect-gap: 10px;
	--ect-expanded-image-height: 155px;
	--ect-expanded-image-width: 100%;
	--ect-collapsed-image-height: 125px;
	--ect-collapsed-image-width: 100%;
	--ect-image-position-x: 50%;
	--ect-image-position-y: 50%;
	--ect-label-color: #185a91;
	width: 100%;
	min-height: 460px;
	padding: 20px;
	box-sizing: border-box;
	background: #0f6b45;
	overflow: hidden;
}

.ect-card-list {
	display: flex;
	align-items: stretch;
	gap: var(--ect-gap);
	width: 100%;
	min-height: 420px;
	justify-content: flex-start;
}


.ect-card {
    position: relative;
    display: flex;
    flex: 0 0 var(--ect-collapsed-width);
    width: var(--ect-collapsed-width);
    min-width: var(--ect-collapsed-width);
    min-height: 420px;
    overflow: hidden;
    border-radius: 20px;
    background: #fff8c9;
    color: #343b35;
    transition: flex-basis .35s ease, width .35s ease, transform .25s ease;
   
}

.ect-card.is-active {
	flex: 0 0 var(--ect-expanded-width);
	width: var(--ect-expanded-width);
	max-width: var(--ect-expanded-width);
	min-width: 0;
}

.ect-card.is-active > .ect-card-trigger { display: none; }

.ect-card-trigger {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	flex: 0 0 var(--ect-collapsed-width);
	width: var(--ect-collapsed-width);
	min-width: var(--ect-collapsed-width);
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 20px;
	overflow: hidden;
	background: #fff8c9;
	color: #185a91;
	cursor: pointer;
	font: inherit;
}

.ect-card-trigger {
	text-align: initial;
	text-indent: 0;
	-webkit-text-fill-color: currentColor;
}

.ect-card-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
	z-index: 3;
}

.ect-card-image {
	display: block;
	width: 100%;
	overflow: hidden;
	background: #d7b5a3;
}

.ect-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--ect-image-position-x) var(--ect-image-position-y);
}

.ect-card-image-collapsed {
	width: var(--ect-collapsed-image-width);
	height: var(--ect-collapsed-image-height);
	flex: 0 0 var(--ect-collapsed-image-height);
	align-self: center;
}

.ect-card-image-expanded {
	width: var(--ect-expanded-image-width);
	height: var(--ect-expanded-image-height);
	flex: 0 0 var(--ect-expanded-image-height);
	align-self: flex-start;
	border-radius: 20px 20px 0 0;
	background: #d7b5a3;
}

.ect-card-label {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-height: 0;
	padding: 14px 0;
	color: var(--ect-label-color, #185a91) !important;
	-webkit-text-fill-color: currentColor;
	visibility: visible !important;
	opacity: 1 !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	text-align: center;
}

.ect-card-content {
	display: flex;
	width: 100%;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	animation: ectExpand .28s ease;
}

.ect-card-content[hidden] { display: none !important; }

.ect-card-body {
	padding: 16px;
	overflow-y: auto;
	flex: 1;
	min-width: 0;
}

.ect-card-heading {
	margin: 0 0 10px;
	color: #185a91;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.ect-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0 0 11px;
}

.ect-item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #1765a5;
	color: #fff;
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
}

.ect-item-content { min-width: 0; flex: 1; }
.ect-item-title { margin: 2px 0 2px; color: #185a91; font-size: 14px; font-weight: 700; line-height: 1.3; }
.ect-problem .ect-item-title { color: #a63c28; }
.ect-fix .ect-item-title { color: #176344; }
.ect-relief .ect-item-title { color: #185a91; }
.ect-item-copy { color: #343b35; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ect-item-copy p { margin: 0 0 5px; }
.ect-item-copy p:last-child { margin-bottom: 0; }
.ect-approved-claim { margin: -5px 0 0 41px; color: #76601c; font-size: 13px; font-style: italic; line-height: 1.4; }

@keyframes ectExpand {
	from { opacity: .35; transform: translateX(6px); }
	to { opacity: 1; transform: translateX(0); }
}

/* Tablet + mobile: vertical expandable accordion. Each condition sits one below another.
   Only one condition is open at a time, matching desktop interaction. */
@media (max-width: 1100px) {
	.ect-tabs {
		min-height: 0;
		padding: 16px;
		overflow: visible;
	}

	.ect-card-list {
		flex-direction: column;
		align-items: stretch;
		gap: var(--ect-gap);
		min-height: 0;
		width: 100%;
	}

	.ect-card,
	.ect-card.is-active {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 0;
		height: auto;
		border-radius: 20px;
	}

	/* Collapsed cards are horizontal rows. */
	.ect-card:not(.is-active) {
		height: var(--ect-collapsed-image-height);
	}

	.ect-card-trigger {
		flex-direction: row;
		align-items: stretch;
		justify-content: flex-start;
		width: 100%;
		min-width: 0;
		height: var(--ect-collapsed-image-height);
		min-height: var(--ect-collapsed-image-height);
		border-radius: 20px;
	}

	.ect-card-image-collapsed {
		width: var(--ect-collapsed-image-height);
		height: var(--ect-collapsed-image-height);
		min-width: var(--ect-collapsed-image-height);
		flex: 0 0 var(--ect-collapsed-image-height);
		align-self: stretch;
	}

	.ect-card-label {
		min-height: 0;
		width: auto;
		flex: 1 1 auto;
		padding: 14px 18px;
		writing-mode: horizontal-tb;
		transform: none;
		white-space: normal;
		justify-content: center;
		align-items: flex-start;
		text-align: left;
		font-size: 18px;
		font-weight: 700;
		line-height: 1.25;
		color: var(--ect-label-color, #185a91) !important;
		-webkit-text-fill-color: currentColor;
		visibility: visible !important;
		opacity: 1 !important;
		overflow-wrap: anywhere;
	}

	.ect-card-content {
		width: 100%;
		max-width: 100%;
		flex: none;
	}

	.ect-card-image-expanded {
		width: var(--ect-expanded-image-width);
		height: var(--ect-expanded-image-height);
		flex: 0 0 var(--ect-expanded-image-height);
		max-width: 100%;
		border-radius: 20px 20px 0 0;
	}

	.ect-card-body {
		padding: 18px;
		overflow: visible;
	}

	.ect-card-heading {
		font-size: 22px;
		line-height: 1.3;
	}

	.ect-item-title {
		font-size: 16px;
	}

	.ect-item-copy {
		font-size: 15px;
		line-height: 1.5;
	}
}

/* Tablet-specific sizing. */
@media (min-width: 768px) and (max-width: 1100px) {
	.ect-tabs {
		padding: 16px;
	}

	.ect-card-label {
		font-size: 18px;
	}

	.ect-card-image-expanded {
		height: min(var(--ect-expanded-image-height), 42vw);
		flex-basis: min(var(--ect-expanded-image-height), 42vw);
	}
}

/* Mobile-specific sizing. */
@media (max-width: 767px) {
	.ect-tabs {
		padding: 10px;
	}

	.ect-card,
	.ect-card.is-active,
	.ect-card-trigger {
		border-radius: 14px;
	}

	.ect-card-label {
		padding: 12px 14px;
		font-size: 15px;
		font-weight: 700;
		color: var(--ect-label-color, #185a91) !important;
		-webkit-text-fill-color: currentColor;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.ect-card-image-expanded {
		height: var(--ect-expanded-image-height);
		flex-basis: var(--ect-expanded-image-height);
		border-radius: 14px 14px 0 0;
	}

	.ect-card-body {
		padding: 14px;
	}

	.ect-card-heading {
		font-size: 19px;
	}

	.ect-item {
		gap: 9px;
		margin-bottom: 12px;
	}

	.ect-item-icon {
		flex-basis: 28px;
		width: 28px;
		height: 28px;
		font-size: 17px;
	}

	.ect-item-title {
		font-size: 14px;
	}

	.ect-item-copy {
		font-size: 14px;
	}

	.ect-approved-claim {
		margin-left: 37px;
		font-size: 12px;
	}
}

/* Responsive condition rows: preserve the v1.6.2 desktop design, but on
   tablet/mobile show a clean white image + title row. The whole row remains
   the existing button, so both image and title are clickable. */
@media (max-width: 1100px) {
	.ect-tabs .ect-card:not(.is-active) {
		background: #ffffff !important;
		height: var(--ect-collapsed-image-height) !important;
		min-height: var(--ect-collapsed-image-height) !important;
		border-radius: 20px !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger {
		display: grid !important;
		grid-template-columns: var(--ect-collapsed-image-height) minmax(0, 1fr) !important;
		align-items: stretch !important;
		justify-content: stretch !important;
		width: 100% !important;
		min-width: 0 !important;
		height: var(--ect-collapsed-image-height) !important;
		min-height: var(--ect-collapsed-image-height) !important;
		padding: 0 !important;
		margin: 0 !important;
		border: 0 !important;
		border-radius: 20px !important;
		background: #ffffff !important;
		color: var(--ect-label-color, #185a91) !important;
		text-align: left !important;
		text-indent: 0 !important;
		-webkit-text-fill-color: currentColor !important;
		cursor: pointer !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger > .ect-card-image-collapsed {
		grid-column: 1 !important;
		grid-row: 1 !important;
		width: var(--ect-collapsed-image-height) !important;
		min-width: var(--ect-collapsed-image-height) !important;
		height: var(--ect-collapsed-image-height) !important;
		min-height: var(--ect-collapsed-image-height) !important;
		flex: none !important;
		align-self: stretch !important;
		margin: 0 !important;
		border-radius: 20px 0 0 20px !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger > .ect-card-label {
		grid-column: 2 !important;
		grid-row: 1 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		position: static !important;
		box-sizing: border-box !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		height: 100% !important;
		min-height: 0 !important;
		padding: 12px 18px !important;
		margin: 0 !important;
		background: #ffffff !important;
		color: var(--ect-label-color, #185a91) !important;
		-webkit-text-fill-color: var(--ect-label-color, #185a91) !important;
		font-family: inherit !important;
		font-size: 18px !important;
		font-weight: 700 !important;
		line-height: 1.25 !important;
		letter-spacing: normal !important;
		text-align: left !important;
		text-indent: 0 !important;
		white-space: normal !important;
		word-break: normal !important;
		overflow-wrap: anywhere !important;
		writing-mode: horizontal-tb !important;
		text-orientation: mixed !important;
		transform: none !important;
		visibility: visible !important;
		opacity: 1 !important;
		overflow: visible !important;
		z-index: 5 !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger:hover > .ect-card-label,
	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger:focus > .ect-card-label,
	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger:focus-visible > .ect-card-label {
		color: var(--ect-label-color, #185a91) !important;
		-webkit-text-fill-color: var(--ect-label-color, #185a91) !important;
	}
}

@media (max-width: 767px) {
	.ect-tabs .ect-card:not(.is-active),
	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger {
		border-radius: 14px !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger {
		grid-template-columns: var(--ect-collapsed-image-height) minmax(0, 1fr) !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger > .ect-card-image-collapsed {
		border-radius: 14px 0 0 14px !important;
	}

	.ect-tabs .ect-card:not(.is-active) > .ect-card-trigger > .ect-card-label {
		padding: 10px 14px !important;
		font-size: 16px !important;
		line-height: 1.25 !important;
	}
}
