.accordion { display: flex; width: 100%; height: 423px; overflow: hidden; }
.panel {
    flex: 1;
    transition: flex 0.5s ease-in-out;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel picture {
    width: 100%;
    height: 100%;
    display: flex;
}

.panel img {
    width: auto!important;
    height: 100%!important;
    object-position: left; /* Align image to the left */
	aspect-ratio: 1210 / 423;
	object-fit: cover;
}

.panel .text {
    position: absolute;
    width: 100vw;
    height: 100%;
    left: 0;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.6) 60%,  /* Solid color up to 30% width */
        rgba(0, 0, 0, 0.5) 70%,  /* Start fading at 60% width */
        transparent 100%         /* Fully transparent at 100% */
        );
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel .text h3{
    color: white;
    font-size: 30px;
    font-weight: normal;
    text-align: center; /* Ensure text is aligned from the left */
	text-wrap:nowrap;
}
.panel:hover, .panel.active {
    flex: 4; /* This will expand the panel */
}

@media (max-width: 950px) {
    .panel .text h3{

        text-align: left;

    }
    .panel .text {
        padding: 13px;
        justify-content: left;
    }

}
@media(max-width:1210px)
{
    .accordion{
        width: 100%;
        height: auto;
        object-position: left; /* Align image to the left */
        aspect-ratio: 1210 / 423;
        object-fit: cover;
    }   
}
@media (max-width: 767px) {
    .panel.always-expanded {
        /* To nie nadpisuje JS, ale może być fallback */
        flex: 4;
    }
}