section.works {
    .items {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 280px;
        gap: 40px;
        margin-top: 40px;
        .item {
            position: relative;
            width: 100%;
            overflow: hidden;
            border-radius: 20px;
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center 15%;
                transition: transform 0.5s ease;
            }
            .info {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                padding: 30px 30px 30px 10px;
                z-index: 9;
                display: flex;
                flex-direction: column;
                justify-content: flex-end;
                align-items: end;
                transform: translateY(64px);
                transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                h3 {
                    margin: 0;
                    width: fit-content;
                    font-size: 22px;
                    color: var(--c-white);
                    position: relative;
                    font-family: var(--font-main);
                    text-align: right;
                    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                    &::after {
                        content: '';
                        position: absolute;
                        width: 100%;
                        height: 2px;
                        background: var(--c-white);
                        left: 0;
                        bottom: -4px;
                        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                    }
                }
                p {
                    color: var(--c-white);
                    font-size: 16px;
                    margin: 0;
                    text-align: right;
                    margin-top: 20px;
                    opacity: 0;
                    max-height: 0;
                    transition: all 0.4s ease;
                    overflow: hidden;
                    font-weight: var(--fw-light);
                }
                .btn.primary {
                    opacity: 0;
                    transition: all 0.4s ease;
                    width: 180px;
                    margin-top: 20px;
                    font-size: 14px;
                    font-weight: var(--fw-medium);
                }
            }
            &::before {
                content: '';
                position: absolute;
                inset: 0;
                opacity: 0;
                background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
                z-index: 2;
                transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }
            &::after {
                content: '';
                position: absolute;
                inset: 0;
                opacity: 1;
                background: rgba(7, 7, 7, 0.3);
                z-index: 2;
                transition: 0.3s linear;
            }
            &.s {
                grid-row: span 1;
            }
            &.m {
                grid-row: span 2;
            }
            &.l {
                grid-row: span 3;
            }
            &.ml {
                .info {
                    transform: translateY(14px);
                }
            }
        }
    }
}
section.text {
    h2 {
        margin-bottom: 25px;
    }
    p {
        max-width: 1000px;
        margin-bottom: 20px;
    }
    .btn {
        margin-top: 60px;
    }
}
@media screen and (max-width: 1759px) {
    section.works {
        .items {
            grid-auto-rows: 220px;
            .item {
                .info {
                    transform: translateY(54px);
                    padding: 30px 20px 20px 10px;
                    .btn.primary {
                        margin-top: 10px;
                    }
                }
                &.ml {
                    .info {
                        transform: translateY(14px);
                    }
                }
            }
        }
    }
}
@media screen and (max-width: 1279px) {
    section.works {
        .items {
            grid-auto-rows: 220px;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }
    }
    section.text {
        h2 {
            margin-bottom: 20px;
        }
        p {
            margin-bottom: 15px;
            font-size: 15px;
        }
        .btn {
            margin-top: 40px;
        }
    }   
}
@media screen and (max-width: 767px) {
    section.works {
        .items {
            grid-template-columns: 1fr;
            .item {
                .info {
                    padding: 30px 15px 15px 0;
                    transform: translateY(49px);
                    h3 {
                        font-size: 18px;
                    }
                    p {
                        font-size: 15px;
                        margin-top: 10px;
                    }
                }
                &.ml {
                    .info {
                        transform: translateY(9px);
                    }
                }
            }
        }
    } 
}
/* @media screen and (hover: hover) { */
    .works {
        .items {
            .item:hover {
                img {
                    transform: scale(1.05);
                }
                .info {
                    transform: translateY(0);
                    p {
                        max-height: 100px;
                        opacity: 1;
                    }
                    .btn.primary {
                        opacity: 1;
                    }
                }
                &::before {
                    opacity: 1;
                }
                &::after {
                    opacity: 0;
                }
            }
        }
    }
/* } */
