.years-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0 20px;
}

.years-nav a {
    padding: 12px 25px;
    background: #f5f5f5;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.years-nav a:hover {
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
}

.years-nav a.active {
    background: #2f80ed;
    color: #fff;
}

.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
}
.main-image img {
    width: clamp(250px, 60vw, 800px);
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: clamp(250px, 85vw, 1400px);
    padding: 10px;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none; 
    flex-wrap: nowrap;
}

.carousel-item {
    flex: 0 0 auto;
    width: auto;
    height: clamp(50px, 15vw, 100px);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
}

.thumbnail {
    width: 100%; /* Занимаем всю ширину родителя */
    height: 100%;
    object-fit: cover;
    display: block; /* Убираем зазор под изображением */
    border-radius: 6px;
}

.carousel-item.active {
    border-color: #2f80ed;
    transform: scale(1.05);
}