.dt-gallery-figma {
    position: relative;
    isolation: isolate;
    padding: 15px 0 160px;
}

    .dt-gallery-figma::after {
        content: "";
        position: absolute;
        z-index: -1;
        inset: auto 0 0;
        height: 903px;
        background: url("/Design/img/TieuHocMuiNe2/d.png") no-repeat;
        pointer-events: none;
        left: 0;
        background-size: 100% 100%;
    }

.dt-gallery-figma__container {
    position: relative;
}

.dt-gallery-figma > .dt-gallery-figma__container.grid.wide {
    width: calc(100% - 32px);
    max-width: 1206px;
}

.dt-gallery-figma__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: unset;
    margin-bottom: 20px;
}

    .dt-gallery-figma__heading h2 {
        margin: 0;
        color: #0c2997;
        font-family: "Baloo Da 2", "Baloo 2", sans-serif;
        font-size: 26px;
        font-weight: 700;
        line-height: 1.25;
        text-transform: uppercase;
    }

.dt-gallery-figma__accent {
    display: block;
    width: 97px;
    height: 4px;
    margin: -1px 0 0 1px;
    border-radius: 3px;
    background: #ffc107;
}

.dt-gallery-figma__all {
    text-underline-offset: 3px;
    color: #0c2997;
    font: 600 16px / 1.37 'Inter_24pt-SemiBold', Arial, sans-serif;
    text-decoration: none;
    height: 43px;
    border-radius: 29px;
    background: #fdde51;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

    .dt-gallery-figma__all span {
        display: inline-block;
        margin-left: 5px;
        text-decoration: none;
    }

    .dt-gallery-figma__all:hover,
    .dt-gallery-figma__all:focus-visible {
        color: #0745c1;
    }

.dt-gallery-figma__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(4, 137px);
    gap: 14px;
}

.dt-gallery-figma__item {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .92);
    border-radius: 18px;
    background: #fbfbf7;
    box-shadow: 0 12px 24px rgba(12, 92, 145, .18);
    isolation: isolate;
    transform: translateZ(0);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

    .dt-gallery-figma__item:nth-child(1) {
        grid-column: 1 / 7;
        grid-row: 1 / 3;
    }

    .dt-gallery-figma__item:nth-child(2) {
        grid-column: 7 / 10;
        grid-row: 1 / 2;
    }

    .dt-gallery-figma__item:nth-child(3) {
        grid-column: 10 / 13;
        grid-row: 1 / 3;
    }

    .dt-gallery-figma__item:nth-child(4) {
        grid-column: 7 / 10;
        grid-row: 2 / 5;
    }

    .dt-gallery-figma__item:nth-child(5) {
        grid-column: 1 / 4;
        grid-row: 3 / 5;
    }

    .dt-gallery-figma__item:nth-child(6) {
        grid-column: 4 / 7;
        grid-row: 3 / 5;
    }

    .dt-gallery-figma__item:nth-child(7) {
        grid-column: 10 / 13;
        grid-row: 3 / 5;
    }

    .dt-gallery-figma__item:nth-child(8) {
        grid-column: 8 / 10;
        grid-row: 4 / 5;
        display: none;
    }

    .dt-gallery-figma__item img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: scale(1.015);
        transition: transform .65s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
    }

    .dt-gallery-figma__item::before {
        content: "";
        position: absolute;
        z-index: 1;
        inset: 0;
        background: linear-gradient(180deg, rgba(5, 47, 91, .02) 32%, rgba(5, 47, 91, .68) 100%);
        opacity: .82;
        transition: opacity .3s ease;
    }

    .dt-gallery-figma__item::after {
        content: "↗";
        position: absolute;
        z-index: 2;
        right: 12px;
        bottom: 12px;
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 50%;
        background: rgba(255, 218, 89, .95);
        color: #0745c1;
        font-size: 25px;
        font-weight: 700;
        line-height: 1;
        opacity: .9;
        transform: translateY(5px) scale(.82);
        transition: opacity .3s ease, transform .3s ease, background-color .3s ease;
        display: none;
    }

    .dt-gallery-figma__item:hover,
    .dt-gallery-figma__item:focus-visible {
        border-color: #ffda59;
        box-shadow: 0 18px 32px rgba(7, 69, 193, .25);
        transform: translateY(-5px) rotate(-.35deg);
    }

        .dt-gallery-figma__item:hover img,
        .dt-gallery-figma__item:focus-visible img {
            filter: saturate(1.16) contrast(1.04);
            transform: scale(1.1);
        }

        .dt-gallery-figma__item:hover::before,
        .dt-gallery-figma__item:focus-visible::before {
            opacity: .55;
        }

        .dt-gallery-figma__item:hover::after,
        .dt-gallery-figma__item:focus-visible::after {
            opacity: 1;
            transform: translateY(0) scale(1);
            background: #fff;
        }

    .dt-gallery-figma__item:focus-visible {
        outline: 3px solid rgba(255, 193, 7, .75);
        outline-offset: 4px;
    }

@media (max-width: 767px) {
    .dt-gallery-figma {
        padding: 2px 0 88px;
    }

        .dt-gallery-figma > .dt-gallery-figma__container.grid.wide {
            padding: 0;
        }

    .dt-gallery-figma__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(5, 132px);
        gap: 10px;
    }

    .dt-gallery-figma::after {
        content: "";
        position: absolute;
        z-index: -1;
        inset: auto 0 0;
        height: 276px;
        background: url("/Design/img/TieuHocMuiNe2/d.png") no-repeat;
        pointer-events: none;
        left: 0;
        background-size: 100% 100%;
    }

    .dt-gallery-figma__item {
        height: auto;
        min-height: 132px;
        border-radius: 14px;
    }

        .dt-gallery-figma__item:nth-child(n) {
            grid-column: auto;
            grid-row: auto;
        }

        .dt-gallery-figma__item:nth-child(8) {
            display: block;
        }

        .dt-gallery-figma__item:nth-child(1) {
            grid-column: 1 / -1;
            min-height: 210px;
        }

        .dt-gallery-figma__item::after {
            right: 9px;
            bottom: 9px;
            width: 28px;
            height: 28px;
            font-size: 17px;
        }
}

@media (max-width: 480px) {
    .dt-gallery-figma__heading {
        min-height: auto;
        margin-bottom: 16px;
    }

    .dt-gallery-figma__accent {
        display: block;
        width: 66px;
        height: 3px;
        margin: 2px 0 0 1px;
        border-radius: 3px;
        background: #ffc107;
    }

    .dt-gallery-figma__heading h2 {
        font-size: 20px;
        font-family: 'MuiNe Baloo';
    }

    .dt-gallery-figma__all {
        margin-top: 0;
        font-size: 14px;
        padding: 0 12px;
        height: 38px;
        line-height: 1.6;
    }

    .dt-gallery-figma__grid {
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .dt-gallery-figma__item:nth-child(n),
    .dt-gallery-figma__item:nth-child(1) {
        grid-column: auto;
        min-height: 165px;
    }

    .dt-gallery-figma__item:nth-child(1) {
        min-height: 165px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dt-gallery-figma__item,
    .dt-gallery-figma__item img,
    .dt-gallery-figma__item::before,
    .dt-gallery-figma__item::after {
        transition: none;
    }

        .dt-gallery-figma__item:hover,
        .dt-gallery-figma__item:focus-visible {
            transform: none;
        }
}