/* Gallery Grid Layout (Premium Masonry-like) */
.gallery-grid {
    column-count: 2;
    column-gap: 12px;
}

@media (min-width: 600px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 20px;
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (min-width: 1400px) {
    .gallery-grid {
        column-count: 4;
    }
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    border-radius: 8px;
    /* shape-depth skill */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    cursor: zoom-in;
    /* Trend layer scroll reveal base */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.2, 0, 0, 1), transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

@media (min-width: 600px) {
    .gallery-item {
        margin-bottom: 20px;
    }
}

.gallery-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item__img {
    width: 100%;
    height: auto;
    display: block;
    /* Motion skill base */
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
    transform-origin: center center;
}

/* Overlay and Label */
.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.gallery-item__label {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

/* Hover Effect (Desktop Only) - Strong but elegant */
@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover .gallery-item__img {
        transform: scale(1.05);
        /* Noticeable but elegant zoom */
    }

    .gallery-item:hover .gallery-item__overlay {
        opacity: 1;
    }

    .gallery-item:hover .gallery-item__label {
        transform: translateY(0);
    }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .gallery-item__img {
        transition: none;
    }

    .gallery-item:hover .gallery-item__img {
        transform: none;
    }
}

.gallery-item__link {
    display: block;
    text-decoration: none;
    position: relative;
}