﻿/* секция услуг */
.works-section {
    padding: 30px 0;
    background-color: var(--dark-bg);
    min-height: 60vh;
}

.works-page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-color);
    text-align: center;
    letter-spacing: 2px;
    position: relative;
}

    .works-page-title::after {
        content: '';
        display: block;
        width: 80px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 15px auto 0;
        box-shadow: 0 0 10px rgba(242, 225, 95, 0.6);
    }

/* карточки */
.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 50px;
}

.work-card {
    background: var(--darker-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 680px;
}

    .work-card:hover {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        border-color: rgba(242, 225, 95, 0.3);
    }

.work-image-wrapper {
    position: relative;
    height: 320px;
    overflow: hidden;
    background-color: #222;
}

.w-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.w-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.4s ease-in-out;
}

.w-layer-before {
    z-index: 1;
    opacity: 1;
}

.w-layer-after {
    z-index: 2;
    opacity: 0;
}

    .w-layer-after.active {
        opacity: 1;
    }

.w-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(13, 13, 13, 0.9);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 5;
}

.w-label {
    width: 80px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    user-select: none;
    position: relative;
    margin: 0 5px;
    text-align: center;
}

    .w-label::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--primary-color);
        border-radius: 2px;
        box-shadow: 0 0 10px rgba(242, 225, 95, 0.8);
        transition: width 0.3s ease;
    }

    .w-label.active::after {
        width: 100%;
    }

    .w-label.active {
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(242, 225, 95, 0.6);
    }

.w-checkbox {
    appearance: none;
    width: 44px;
    height: 24px;
    background: var(--dark-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .w-checkbox::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        background: var(--text-muted);
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .w-checkbox:checked {
        background: rgba(242, 225, 95, 0.25);
        border-color: var(--primary-color);
    }

        .w-checkbox:checked::after {
            left: 22px;
            background: var(--primary-color);
            box-shadow: 0 0 10px rgba(242, 225, 95, 0.8);
        }

/* инфа в карточках */
.work-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.work-desc {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 25px;
    flex: 1;
}

.work-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-gray);
}

    .meta-item i {
        color: var(--primary-color);
        font-size: 1.1rem;
    }

    .meta-item .price {
        font-weight: 600;
        color: var(--primary-color);
        font-size: 1.05rem;
    }

.work-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-work {
    flex: 1;
    padding: 14px 12px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-work-primary {
    background: var(--primary-color);
    color: var(--darker-bg);
}

    .btn-work-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 0 20px rgba(242, 225, 95, 0.5);
    }

.btn-work-white {
    background: var(--text-light);
    color: var(--darker-bg);
    border: 2px solid var(--text-light);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-work-white:hover {
        transform: translateY(-3px);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }

/* пагинация (пк) / "показать еще" (мобайлы) */
.works-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 20px;
    width: 100%;
    flex-wrap: nowrap;
}

.pagination-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--darker-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .pagination-btn:hover:not(:disabled) {
        border-color: var(--primary-color);
        color: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: 0 0 15px rgba(242, 225, 95, 0.3);
    }

    .pagination-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.pagination-info {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    min-width: 120px;
}

.load-more-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    background: var(--primary-color);
    color: var(--darker-bg);
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(242, 225, 95, 0.3);
}

    .btn-load-more:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(242, 225, 95, 0.5);
    }

    .btn-load-more i {
        margin-left: 10px;
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .btn-load-more:hover i {
        transform: translateY(-1px);
    }

.load-more-count {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-left: 5px;
}

.load-more-end {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

    .load-more-end i {
        color: var(--primary-color);
        font-size: 1.1rem;
    }

/* заглушка и анимация */
.empty-works {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.empty-works-icon {
    width: 100px;
    height: 100px;
    background: rgba(242, 225, 95, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    border: 2px dashed rgba(242, 225, 95, 0.3);
}

    .empty-works-icon i {
        font-size: 3rem;
        color: var(--primary-color);
        text-shadow: 0 0 15px rgba(242, 225, 95, 0.5);
    }

.empty-works-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.empty-works-desc {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-card.showing {
    animation: fadeInUp 0.4s ease forwards;
}

/* адаптация */
@media (max-width: 1350px) {
    .w-label {
        font-size: 1rem;
        margin: 0;
    }
}

@media (max-width: 1280px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }

    .work-card {
        min-height: 700px;
    }
}

@media (max-width: 1280px) and (min-width: 1201px) {
    .container {
        max-width: 950px !important;
        padding: 0 20px;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .work-card {
        min-height: 650px;
    }

    .work-image-wrapper {
        height: 300px;
    }

    .works-page-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .work-card {
        min-height: 650px;
    }

    .work-image-wrapper {
        height: 300px;
    }

    .works-page-title {
        font-size: 2.2rem;
    }

    .load-more-wrapper {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 20px;
    }

    .work-card {
        min-height: auto;
    }

    .work-image-wrapper {
        height: 280px;
    }

    .work-title {
        font-size: 1.7rem;
    }

    .work-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .works-page-title {
        font-size: 2rem;
    }

    .works-pagination {
        gap: 20px;
        margin-top: 40px;
        display: none !important;
    }

    .btn-work {
        flex: none;
        width: 300px;
        max-width: 100%;
    }

    .load-more-wrapper {
        display: flex !important;
    }

    .empty-works {
        padding: 50px 20px;
    }

    .empty-works-icon {
        width: 80px;
        height: 80px;
    }

        .empty-works-icon i {
            font-size: 2.5rem;
        }

    .empty-works-title {
        font-size: 1.8rem;
    }

    .empty-works-desc {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .pagination-info {
        font-size: 0.85rem;
        min-width: 90px;
    }

    .works-page-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 380px) {
    .work-title {
        font-size: 1.3rem;
    }
}
