#onas {
    display: flex;
    height: min(90vh, 80vw); /* Maksymalna wysokość 90vh, ale dostosowana do szerokości */
    max-height: 90vh; /* Nie pozwala przekroczyć tej wysokości */
    min-height: 60vh; /* Nie pozwala, aby sekcja była zbyt mała */
    margin-top: 12vh;
}
@media (max-width: 768px) {
    #onas {
        height: auto;
        min-height: 50vh; /* Zmniejsza wysokość na telefonach */
    }
}










@media screen and (max-width: 1400px) {
           
    #onas {
        
        
        margin-top: 10vh; /* Dodajemy margines równy wysokości headera */
        
        
    }
    
}


@media screen and (max-width: 1055px) {
           
    #onas {
        
        
        margin-top: 8vh; /* Dodajemy margines równy wysokości headera */
        
        
    }
    
}




@media screen and (max-width: 750px) {
           
    #onas {
        
        
        margin-top: 8vh !important; /* Dodajemy margines równy wysokości headera */
        
        
    }
    
}










.onastitle {
    font-size: auto;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.825);

    text-justify: center;
    max-width: 100%;
    position: absolute;
    width: 100%;
    height: auto;
    min-height: calc(+7%);
    display: grid;
    place-items: center;
    z-index: 10; /* Zapewnia, że tekst jest nad obrazami */
    display: flex;
    align-items: center; /* Wycentrowanie w pionie */
    justify-content: center;
    font-family: bebas;
    letter-spacing: 0.2em;
    padding: 0%;
    margin: 0%;
}





.galeria-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: auto;
    text-align: center;
}

.galeria-box {
    width: 50%;
    height: auto; /* Pozwala się dostosować */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.galeria-title {
    font-family: bebas;
    font-size: 2.5vw; /* Dynamiczna wielkość tekstu */
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    
    padding: 2%; /* Małe marginesy wewnętrzne */
    border-radius: 10px;
    
    max-width: 90%;
    width: 85%;
    height: auto; /* Zakrywa 85% widocznej galerii */
    
    position: absolute;
    left: 50%;
    top: 70%;

    transform: translate(-50%, -42.5%); /* Przesunięcie do prawidłowej pozycji */
    
    z-index: 10;
    
    display: flex;
    align-items: center; /* Wycentrowanie tekstu */
    justify-content: center;
    
    white-space: normal;
    word-wrap: break-word;
    overflow: hidden;
    box-sizing: border-box; /* Zapobiega przekraczaniu wymiarów */
}




.galeria {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.galeria-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.galeria-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex; /* Zapewnia poprawne układanie */
    justify-content: center; /* Centrowanie */
    align-items: center;
}

.galeria-wrapper img {
    width: 100%; /* Dopasowanie do kontenera */
    height: 100%;
    object-fit: cover;
    position: absolute;
    left: 0; /* Ustawienie do lewej krawędzi */
    top: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.galeria-wrapper img.active {
    opacity: 1;
}

.no-animation {
    transition: none !important;
}
