.neat-gallery {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.neat-gallery-grid {
    width: 100%;
}

.neat-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 15px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Normal size items */
.neat-gallery-item-normal {
    width: 33.333%;
}

/* Large size items */
.neat-gallery-item-large {
    width: 66.666%;
}

.neat-gallery-item:hover {
    transform: translateY(-5px);
}

.neat-gallery-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* Remove fixed aspect ratios */
.neat-gallery-image-wrapper {
    min-height: 250px;
}

.neat-gallery-item-large .neat-gallery-image-wrapper {
    min-height: 350px;
}

.neat-gallery-image {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: block;
    min-height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.neat-gallery-item:hover .neat-gallery-image {
    transform: translateY(-50%) scale(1.05);
}

.neat-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.neat-gallery-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    color: #fff;
}

.neat-gallery-item-normal .neat-gallery-title {
    font-size: 1.4rem;
}

.neat-gallery-item-large .neat-gallery-title {
    font-size: 1.8rem;
}

.neat-gallery-title {
    margin: 0 0 8px 0;
    color: #fff;
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.neat-gallery-caption {
    margin: 0;
    font-size: 1rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@media screen and (max-width: 1024px) {
    .neat-gallery-item-normal {
        width: 50%;
    }
    
    .neat-gallery-item-large {
        width: 100%;
    }

    .neat-gallery-image-wrapper {
        min-height: 200px;
    }

    .neat-gallery-item-large .neat-gallery-image-wrapper {
        min-height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .neat-gallery-item-normal,
    .neat-gallery-item-large {
        width: 100%;
    }
    
    .neat-gallery-item-normal .neat-gallery-title,
    .neat-gallery-item-large .neat-gallery-title {
        font-size: 1.4rem;
    }

    .neat-gallery-image-wrapper {
        min-height: 200px;
    }

    .neat-gallery-item-large .neat-gallery-image-wrapper {
        min-height: 250px;
    }
} 