.tournament-header {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    font-family: "Poppins", Sans-serif;
    color: #F8F8F8;
    margin-bottom: 20px;
}

.tournament-header:hover {
    color: #F8F8F8;
}

.tournament-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.tournament-header p {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
}

.tournament-header p::after {
    content: "";
    background-image: url("../svg/arrow-right.svg");
    background-repeat: no-repeat;
    background-size: cover;
    width: 12px;
    height: 12px;
}

.tournament-gallery-widget {
    --visible-count-desktop: 4;
    --visible-count-tablet: 2;
    --visible-count-mobile: 1;
    --current-visible-count: var(--visible-count-desktop);
}

.gallery-track {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 10px; 
    --visible-count: var(--visible-count-desktop, 4);
}

.gallery-wrapper {
    position: relative;
    overflow: visible; 
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 24px;
}

.gallery-item {
    flex: 0 0 calc(100% / var(--visible-count));
    scroll-snap-align: start;
    transition: transform 0.3s ease;
    position: relative; 
    transform-origin: center;
    z-index: 1; 
}


.gallery-item:hover {
    z-index: 10;
    overflow: visible;
}

.gallery-item:hover .gallery-track {
    overflow: visible;
}

.gallery-wrapper .gallery-item img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.gallery-wrapper .gallery-item:hover img {
    transform: scaleY(1.1) scaleX(1.08);
    z-index: 10; 
}

.mobile-control-buttons {
    display: none;
}

.arrow-next, .arrow-prev {
    content: "";
    background-image: url("../svg/gallery-arrow.svg");
    background-repeat: no-repeat;
    background-size: contain;
    width: 28px;
    height: 75px;
    background-color: transparent !important;
    border: none;
    opacity: 60%;
}

.arrow-prev {
    rotate: 180deg;
}

.arrow-next:hover, .arrow-prev:hover {
    background-color: transparent !important;
    border: none;
    opacity: 100%;
}


/* Smaller screens */

@media (min-width: 768px) and (max-width: 1024px) {
    .gallery-track {
        --visible-count: var(--visible-count-tablet, 3);
    }

    .tournament-header h2 {
        font-size: 20px;
        line-height: 26px;
    }

    .tournament-header p {
        font-size: 18px;
        line-height: 26px;
    }
}

@media (max-width: 767px) {
    .gallery-item {
        flex: 0 0 calc(70% / var(--visible-count)) !important;
    }

    .desktop.arrow-next, .desktop.arrow-prev {
        display: none;
    }

    .tournament-gallery-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .tournament-header {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 0;
    }

    .tournament-header h2 {
        margin: 0;
        font-size: 18px;
        line-height: 21px;
    }

    .tournament-header p {
        font-size: 14px;
        line-height: 28px;
    }

    .mobile-control-buttons {
        display: flex;
        gap: 40px;
        margin-bottom: 20px;
    }

    .mobile-control-buttons .arrow-next,   .mobile-control-buttons .arrow-prev {
        width: 16px;
        height: 42px;
    }
}

