/* =========================
   ADMIN
========================= */
.project-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.project-gallery-item {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: move;
    background: #f3f3f3;
    border: 1px solid #ddd;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-gallery-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,.7);
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.project-gallery-item .remove-image:hover {
    background: #dc3232;
}
/* ===============================
   WRAPPER
================================= */
.pg-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.pg-viewport {
    height: 500px;
    overflow: hidden;
    border-radius: 14px;
}

.pg-track {
    display: flex;
    gap: 14px;
    height: 100%;
    transition: transform .5s cubic-bezier(.4,.0,.2,1);
    will-change: transform;
}

/* ===============================
   ITEMS
================================= */
.pg-item {
    flex: 0 0 32%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.pg-item.is-first {
    flex: 0 0 60%;
}

.pg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===============================
   SPECIAL COUNTS
================================= */
.gallery-count-1 .pg-item {
    flex: 0 0 100%;
}

.gallery-count-2 .pg-item {
    flex: 0 0 50%;
}

.gallery-count-3 .pg-item {
    flex: 0 0 33.333%;
}

.gallery-count-3 .pg-item.is-first {
    flex: 0 0 50%;
}

/* ===============================
   NAVIGATION
================================= */
.pg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 20;
    transition: .2s ease;
}

.pg-nav:hover {
    background: rgba(0,0,0,.85);
}

.pg-nav.prev { left: 20px; }
.pg-nav.next { right: 20px; }

.pg-nav:disabled {
    opacity: .3;
    cursor: default;
}

/* ===============================
   MOBILE
================================= */
@media (max-width: 768px) {

    .pg-viewport {
        height: 280px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .pg-track {
        transform: none !important;
    }

    .pg-item {
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .pg-item.is-first {
        flex: 0 0 90%;
    }

    .pg-nav {
        display: none;
    }
}
