/* ===== СТРАНИЦА РАБОТ ===== */
.works-header {
    text-align: center;
    padding: 60px 0 40px;
    animation: fadeInUp 1s ease-out;
}

.works-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.works-subtitle {
    color: var(--text-gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ФИЛЬТРЫ ===== */
.works-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.2), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ===== СЕТКА РАБОТ ===== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0 80px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

/* ===== КАРТОЧКА РАБОТЫ ===== */
.work-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: cardAppear 0.6s ease-out forwards;
}

.work-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary);
    box-shadow: 0 30px 50px rgba(138, 43, 226, 0.3);
}

.work-card.hidden {
    display: none;
}

/* Изображение */
.work-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-category {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.work-card:hover .work-category {
    transform: translateY(0);
}

/* Контент карточки */
.work-content {
    padding: 25px;
}

.work-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.work-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
    background: rgba(138, 43, 226, 0.1);
    padding: 5px 15px;
    border-radius: 30px;
}

.work-description {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Характеристики */
.work-specs {
    list-style: none;
    margin-bottom: 20px;
}

.work-specs li {
    color: var(--text-dark);
    font-size: 0.95rem;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.work-specs li::before {
    content: '⚡';
    color: var(--primary);
    margin-right: 10px;
    font-size: 1rem;
}

/* Сложность */
.work-complexity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.complexity-label {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.complexity-stars {
    display: flex;
    gap: 3px;
}

.star {
    color: #444;
    font-size: 1.2rem;
}

.star.filled {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* ===== ЛАЙТБОКС ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: lightboxFade 0.3s ease;
}

@keyframes lightboxFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border: 2px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 50px var(--primary-glow);
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(138, 43, 226, 0.2);
    border-radius: 50%;
    border: 1px solid var(--primary);
}

.lightbox-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
    background: rgba(138, 43, 226, 0.3);
    box-shadow: 0 0 30px var(--primary);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

/* ===== КНОПКА "СМОТРЕТЬ БОЛЬШЕ" ===== */
.load-more {
    text-align: center;
    padding: 0 0 80px 0;
}

.load-more-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 2px;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(138, 43, 226, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.load-more-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 40px var(--primary);
}

.load-more-btn:hover::before {
    width: 300px;
    height: 300px;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
    .works-header h1 {
        font-size: 2.5rem;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .work-image {
        height: 200px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 40px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .works-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    
    .work-title {
        font-size: 1.3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .work-price {
        font-size: 1.1rem;
    }
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ КАРТОЧЕК ===== */
@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}