.ia-1780-container {
    display: flex;
    width: 100%;
    overflow: hidden;
    gap: 10px; /* Default gap, overriden by control */
    box-sizing: border-box;
}

.ia-1780-container * {
    box-sizing: border-box;
}

.ia-1780-item {
    position: relative;
    flex-grow: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth expansion */
    border-radius: 10px; /* Default border radius */
    overflow: hidden;
    cursor: pointer;
    min-width: 60px; /* Ensure collapsed items are visible */
}

.ia-1780-item.active {
    flex-grow: 5; /* Expand active item significantly */
}

.ia-1780-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.ia-1780-item.active .ia-1780-item-overlay {
    background-color: rgba(0, 0, 0, 0.1); /* Lighten overlay on active */
}

.ia-1780-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    transition-delay: 0.1s;
    pointer-events: none; /* Prevent clicks when hidden */
    
    /* Ensure content stays within box */
    max-height: 100%;
    overflow-y: auto; /* Scroll if content is too tall */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    
    /* Flex layout for better content handling */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ia-1780-item.active .ia-1780-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ia-1780-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    white-space: normal; /* Allow wrapping */
    line-height: 1.2;
    word-wrap: break-word;
}

.ia-1780-desc {
    color: #f0f0f0;
    font-size: 14px;
    margin-bottom: 15px;
    max-width: 100%;
    white-space: normal; 
    line-height: 1.5;
    word-wrap: break-word;
}

.ia-1780-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
    margin-top: 5px;
    align-self: flex-start; /* Prevent button from stretching */
}

.ia-1780-button:hover {
    background-color: #f0f0f0;
}

/* Scrollbar hiding for cleaner look */
.ia-1780-content::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .ia-1780-container {
        flex-direction: column;
        height: auto !important; /* Allow growing in vertical mode */
        min-height: 500px; /* Increase overall minimum height for mobile */
    }
    
    .ia-1780-item {
        width: 100%;
        min-height: 60px;
        flex-basis: auto; /* Allow flex to calculate properly */
    }
    
    .ia-1780-item.active {
        flex-grow: 10; /* Give active item maximum space */
        min-height: 250px; /* Ensure active item is tall enough */
    }
    
    .ia-1780-content {
        padding: 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 80%, rgba(0,0,0,0) 100%);
    }
    
    .ia-1780-title {
        font-size: 20px;
    }
    
    .ia-1780-desc {
        font-size: 13px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 4; /* Limit lines on mobile if needed */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
