.rat-46127-container {
	display: flex;
	width: 100%;
	min-height: 400px;
	border-left: 1px solid #fff;
	overflow: hidden;
}

.rat-46127-item {
	display: flex;
	flex-direction: row;
	border-right: 1px solid #fff;
	transition: flex 0.5s ease-in-out, background-color 0.3s ease;
	cursor: pointer;
	flex: 1; /* All items start with equal width */
	position: relative;
	overflow: hidden;
}

/* 
 * The trick for the accordion: 
 * Inactive items stay narrow (just the header width).
 * The active item expands to take up the remaining space.
 * Since flex: 1 doesn't work perfectly when content sizes differ, 
 * we use flex-basis and flex-grow.
 */
.rat-46127-item {
    flex: 0 0 80px; /* Fixed width for closed items */
}

.rat-46127-item.rat-46127-active {
	flex: 1 1 auto; /* Expand to fill remaining space */
	cursor: default;
}

/* Header (Number and Vertical Text) */
.rat-46127-header {
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
    width: 80px;
    flex-shrink: 0; /* Don't squash the header */
}

.rat-46127-number {
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	margin-bottom: auto;
	opacity: 0.5;
	transition: opacity 0.3s;
}

.rat-46127-title-vertical {
	writing-mode: vertical-rl;
	transform: rotate(180deg); /* Text reads from bottom to top */
	text-transform: uppercase;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	opacity: 1;
	transition: opacity 0.3s ease;
	margin-top: 40px;
}

.rat-46127-item.rat-46127-active .rat-46127-title-vertical {
	opacity: 0;
	pointer-events: none;
	position: absolute;
}

.rat-46127-item:hover .rat-46127-number {
	opacity: 1;
}

/* Content (Image, Heading, Text) */
.rat-46127-content {
	display: flex;
	flex-direction: column;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	overflow-y: auto;
    width: 100%;
    /* Keep content wide enough so it doesn't wrap weirdly during transition */
    min-width: 300px; 
}

.rat-46127-item.rat-46127-active .rat-46127-content {
	opacity: 1;
	visibility: visible;
    transition-delay: 0.2s; /* Show content after expansion starts */
}

.rat-46127-image-wrap {
	width: 100%;
	margin-bottom: 20px;
}

.rat-46127-image-wrap img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.rat-46127-title {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.rat-46127-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #fff;
}

/* Responsive */
@media (max-width: 767px) {
	.rat-46127-container {
		flex-direction: column;
		border-left: none;
		border-top: 1px solid #fff;
	}

	.rat-46127-item {
        flex-direction: column;
		flex: 0 0 60px; /* Closed state height */
		border-right: none;
		border-bottom: 1px solid #fff;
	}

    .rat-46127-item.rat-46127-active {
        flex: 1 1 auto; /* Expand height */
    }

	.rat-46127-header {
		flex-direction: row;
		align-items: center;
		padding: 15px;
        width: 100%;
        height: 60px;
	}

	.rat-46127-number {
		margin-bottom: 0;
		margin-right: 20px;
	}

	.rat-46127-title-vertical {
		writing-mode: horizontal-tb;
		transform: none;
		margin-top: 0;
	}
	
	.rat-46127-content {
		width: 100%;
		min-width: unset;
		padding: 15px;
	}
}