/* Стили для портфолио */

.portfolio-section {
    padding: 60px 0;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    transition: all 0.4s ease;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    aspect-ratio: 1/1.2;
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.05);
    min-height: 300px;
}

.portfolio-item img,
.portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.portfolio-item:hover img,
.portfolio-item:hover video {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    transition: bottom 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    bottom: 0;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.overlay-content h3 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-color);
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(188, 147, 245, 0.3);
}

/* Лайтбокс для просмотра работ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .portfolio-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .portfolio-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-filter {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 14px;
    }
}
