.codevz-tilted-gallery {
    --columns: 5;
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.codevz-tilted-gallery > a {
    position: relative;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease, z-index 0s 0.5s;
    cursor: pointer;
    z-index: 1;
    text-decoration: none;
}

.codevz-tilted-gallery > a > img {
    max-width: initial;
    width: 120%;
    height: 120%;
    position: absolute;
    top: -10%;
    left: -10%;
    object-fit: cover;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.codevz-tilted-gallery > a > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.codevz-tilted-gallery > a > div > span {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid rgba(255,255,255,0.3);
    transform: translateY(-10px);
    transition: transform 0.4s ease;
}

.codevz-tilted-gallery > a > div > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.codevz-tilted-gallery > a > div > div > h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.codevz-tilted-gallery > a > div > div > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    transform: translateY(12px);
    transition: transform 0.4s ease 0.05s;
}

.codevz-tilted-gallery > a:hover {
    transform: rotate(0deg) scale(1.05) translateY(0) !important;
    box-shadow: 0 22px 45px rgba(0,0,0,0.25);
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease, z-index 0s;
}

.codevz-tilted-gallery > a:hover > div {
    opacity: 1;
}

.codevz-tilted-gallery > a:hover > div > span,
.codevz-tilted-gallery > a:hover > div > div > h3,
.codevz-tilted-gallery > a:hover > div > div > p {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .codevz-tilted-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .codevz-tilted-gallery > a {
        height: 260px;
    }
}