.carousel {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Arrows ---- */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.arrow:focus {
    outline: none;
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.arrow:active {
    transform: translateY(-50%) scale(0.92);
    transition-duration: 0.1s;
}

.arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

/* ---- Gallery ---- */
.gallery {
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding: 0 80px;
}

/* fade edges */
.gallery::before,
.gallery::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.gallery::before {
    left: 0;
    background: linear-gradient(to right, var(--main-color), transparent);
}

.gallery::after {
    right: 0;
    background: linear-gradient(to left, var(--main-color), transparent);
}

.gallery__item {
    width: 76px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    margin-right: 8px;
}

.gallery ul {
    height: 64px;
    width: 9999px;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: margin-left 400ms cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0;
}

.gallery li {
    display: inline-block;
    background-color: transparent;
    border: none;
}

/* ---- Year buttons (tablinks) inside carousel ---- */
.gallery__item .tablinks {
    width: 64px;
    height: 48px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    float: none;
    padding: 0;
}

.gallery__item .tablinks:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery__item .tablinks.active {
    background: rgba(255, 255, 255, 0.95);
    border-color: #fff;
    color: var(--main-color);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.gallery__item .tablinks:focus {
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.span_pos_abs_l0_t0 {
    position: absolute;
    left: 0;
    top: 0;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .carousel {
        max-width: 100%;
    }
    .arrow {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .gallery {
        padding: 0 42px;
    }
    .gallery::before,
    .gallery::after {
        width: 42px;
    }
    .gallery__item {
        width: 64px;
        margin-left: 5px;
        margin-right: 5px;
    }
    .gallery__item .tablinks {
        width: 56px;
        height: 42px;
        font-size: 14px;
        border-radius: 21px;
    }
}

@media (max-width: 400px) {
    .gallery__item .tablinks {
        width: 48px;
        height: 38px;
        font-size: 13px;
        border-radius: 19px;
    }
}

