.sng-3c289e53-container {
    --items-per-row: 5;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 10px; /* Default, overridden by controls */
}

.sng-3c289e53-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, min-width 0.4s ease;
    cursor: pointer;
    height: 400px; /* Default, overridden by controls */
    display: block;
    flex-grow: 1;
}

.sng-3c289e53-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.sng-3c289e53-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    transition: opacity 0.4s ease;
    z-index: 2;
    white-space: nowrap;
}

.sng-3c289e53-title {
    margin: 0;
    font-size: 24px;
    color: #ffffff;
}

/* Default States */
.sng-3c289e53-cover {
    flex: 1 1 100%; /* Take full width initially */
    min-width: 100%;
}

.sng-3c289e53-inner {
    flex: 0 0 0%;
    opacity: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    height: 0; /* Hide initially to not break layout */
}

/* Hover States on the whole container */
.sng-3c289e53-container:hover .sng-3c289e53-cover,
.sng-3c289e53-container:hover .sng-3c289e53-inner {
    /* calc to subtract the gap dynamically */
    flex: 1 1 calc( (100% / var(--items-per-row)) - 10px );
    min-width: calc( (100% / var(--items-per-row)) - 20px );
    height: 400px; /* Restore height */
    opacity: 1;
}

/* Specific item hover to expand even more within its row */
.sng-3c289e53-container .sng-3c289e53-inner:hover,
.sng-3c289e53-container .sng-3c289e53-cover:hover {
    flex: 3 1 calc( (100% / var(--items-per-row)) * 2 - 10px );
}