/* Bernz Social Feed Styles */
.bernz-social-feed {
    width: 100%;
    margin: 20px 0;
}

.bernz-feed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.bernz-feed-item {
    position: relative;
    overflow: hidden; /* Essential for containing the scaled image */
    border-radius: 12px;
    height: 100%;
    aspect-ratio: 4/5;
}

.bernz-feed-item a {
    display: block;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.bernz-feed-item img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center;
    transition: transform 0.5s ease; /* Smooth zoom transition */
}

/* Hover effect - only the image scales */
.bernz-feed-item:hover img {
    transform: scale(1.1); /* Image zooms to 110% */
}

/* Gradient overlay that covers the entire image */
.bernz-feed-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%; /* Consistent height for all overlays */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.bernz-feed-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 15px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 2;
    /* Force consistent height for all captions */
    min-height: 50px;
    display: flex;
    align-items: flex-end;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bernz-feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bernz-feed-grid {
        grid-template-columns: 1fr;
    }
    
    .bernz-feed-item::after {
        height: 35%;
    }
    
    .bernz-feed-caption {
        min-height: 45px;
        padding: 12px;
        font-size: 13px;
    }
}

.bernz-social-feed .bernz-feed-grid .bernz-feed-item a img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    display: block;
}
