/* ==================== БЛОК "НАШИ РАБОТЫ" (ПЛИТКА) ==================== */

.works-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.works-gallery[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.works-gallery[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.works-gallery[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }

.our-works-section-title {
    text-align: center;
    margin-bottom: 48px;
}

.our-works-section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #142f3c;
    margin-bottom: 16px;
}

.our-works-section-title p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Карточка работы */
.work-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f8;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: #f3b33d;
}

/* Превью */
.work-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg);
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-thumb img {
    transform: scale(1.05);
}

.work-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Информация под превью */
.work-info {
    padding: 16px 20px;
}

.work-title {
    font-size: 1rem;
    font-weight: 600;
    color: #142f3c;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.work-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.work-title a:hover {
    color: var(--color-accent);
}

.work-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Сообщение, если работ нет */
.works-not-found {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 16px;
    color: #64748b;
    border: 1px solid #eef2f8;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 1024px) {
    .works-gallery[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .works-gallery[data-columns="4"],
    .works-gallery[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .our-works-section-title h2 {
        font-size: 1.5rem;
    }

    .our-works-section-title p {
        font-size: 0.95rem;
    }

    .work-info {
        padding: 12px 14px;
    }

    .work-title {
        font-size: 0.9rem;
    }

    .work-desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .works-gallery,
    .works-gallery[data-columns] {
        grid-template-columns: 1fr;
    }
}
