/* ========== КАРТОЧКИ ВИДЕО ========== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
    width: 100%;
}

/* Для планшетов */
@media (min-width: 768px) and (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 14px;
    }
}

/* Для десктопа */
@media (min-width: 1025px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 16px;
    }
}

.video-card {
    width: 100%;
    padding: 6px; /* Уменьшил с 8px */

    border-radius: 16px; /* Уменьшил с 20px */
    border: 1px solid transparent;

    background: transparent;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.video-card:hover {
    border-color: var(--accent);

    background: rgba(255, 255, 255, 0.02);

    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--wood);
    overflow: hidden;
    border-radius: 14px; /* Уменьшил с 18px */
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* Уменьшил с 2rem */
    color: var(--text-secondary);
    background: var(--wood);
}

.duration-badge {
    position: absolute;
    right: 6px; /* Уменьшил с 8px */
    bottom: 6px; /* Уменьшил с 8px */
    padding: 2px 5px; /* Уменьшил с 4px 8px */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem; /* Уменьшил с 1rem */
    border-radius: 4px;
    font-weight: 500;
}

.video-info {
    padding: 8px 4px 4px; /* Уменьшил паддинги */
}

.video-title {
    font-size: 0.95rem; /* Уменьшил с 1.35rem */
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    
    line-height: 1.35;
    max-height: 2.7em;
}

/* На десктопе чуть крупнее */
@media (min-width: 768px) {
    .video-title {
        font-size: 1.1rem;
    }
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem; /* Уменьшил с 1rem */
    color: var(--text-secondary);
}

.video-author {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}