/* Стили для видео галереи */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки по умолчанию */
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Соотношение 16:9 */
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
}

.video-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.video-card h3 {
    margin: 10px 0 5px;
    font-size: 16px;
    line-height: 1.3;
}

.category-link {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #333;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center; /* Центрирование кнопок */
    width: 100%; /* Для правильного центрирования */
}

.filter-buttons button {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-buttons button:hover {
    background: #e0e0e0;
}

.filter-buttons button.active {
    background: #333;
    color: white;
}

/* Адаптация для планшетов */
@media (max-width: 992px) {
    .video-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки для планшетов */
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: 1fr; /* 1 колонка для мобильных */
    }
    
    .filter-buttons button {
        padding: 6px 12px;
        font-size: 14px;
    }
}