.galleryjb {
    display: flex;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnailjb {
    width: 200px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnailjb:hover {
    transform: scale(1.05);
}

#thumbnails-containerjb {
    position: fixed;
    bottom: 20px;
    left: 50px; /* Adjust as needed */
    display: flex;
    align-items: center;
    z-index: 1100;
    transition: transform 0.5s ease;
}

#thumbnailsjb {
    display: flex;
    gap: 20px; /* Maintain gap between thumbnails */
    position: relative;
}

#overlayjb {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#overlayjb img {
    max-width: 100vw;
    max-height: 100vh;
    margin: auto;
    display: block;
    object-fit: contain;
}

.mini-thumbnailjb {
    width: auto;
    max-width: 100px;
    height: auto;
    max-height: 100px !important;
    cursor: pointer;
    transition: transform 0.3s;
    border: 2px solid white;
}

.mini-thumbnailjb:hover {
    transform: scale(1.08);
}

.mini-thumbnailjb.active-thumbnailjb {
    transform: scale(1.15);
}

#closeButtonjb {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 1200;
    user-select: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#closeButtonjb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#arrowButtonjb {
    position: absolute; /* Umístění šipky */
    right: 5px; /* Nastavení vzdálenosti od pravého okraje */
    top: 50%; /* Umístění na polovinu výšky rodičovského prvku */
    transform: translate(50%, -50%); /* Posun do středu a vertikálně */
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    background-color: rgba(0, 0, 0, 1);   
    border-radius: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    transition: background-color 0.3s;
    padding-right: 10px;
}

#arrowButtonjb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#arrowButtonjb.rotated {
    transform: translate(50%, -50%) rotate(180deg); /* Udržení vertikálního zarovnání i po rotaci */
}

@media (max-width: 768px) {
    
    #overlayjb #thumbnails-containerjb
    {
        display: none; /* Hide elements on small screens */
    }
}

@media (min-width: 768px) {
    #prevArrow,
    #nextArrow {
        display: none; /* Hide arrows on screens wider than 768px */
    }
}

#prevArrow {
    position: absolute; /* Keep the positioning */
    left: 10px; /* Distance from the left edge */
    top: 50%; /* Center it vertically */
    transform: translateY(-50%); /* Adjust for vertical centering */
    z-index: 1200; /* Ensure it's above other elements */
}

/* Optional: To style the next arrow on the right side */
#nextArrow {
    position: absolute; /* Keep the positioning */
    right: 10px; /* Distance from the right edge */
    top: 50%; /* Center it vertically */
    transform: translateY(-50%); /* Adjust for vertical centering */
    z-index: 1200; /* Ensure it's above other elements */
}