/* Metall Gallery Frontend CSS */

.metall-gallery-wrapper {
    width: 100%;
}

.metall-gallery-grid {
    display: grid;
    /* Removed hardcoded grid-template-columns to let Elementor control it */
    gap: 15px;
    grid-auto-rows: 1fr; /* Ensures rows have consistent height if using fixed columns */
}

.metall-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #f7f7f7;
    transition: all 0.3s ease;
    display: grid !important; /* Switch to grid for better child filling */
}

.metall-gallery-item a {
    display: grid !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none;
}

.metall-gallery-item img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important; /* Added min-height to force vertical fill */
    object-fit: cover !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Featured Layout Styles */
.metall-gallery-featured {
    /* Let Elementor handle it */
}

/* When in featured mode, first item takes two columns and two rows */
.metall-item-featured {
    grid-column: span 2;
    grid-row: span 2;
}

/* Hover Types */
.metall-hover-scale:hover img {
    transform: scale(1.1);
}

.metall-hover-opacity:hover img {
    opacity: 0.7;
}

/* Overlay Effect */
.metall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metall-overlay i {
    color: #fff;
    font-size: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.metall-gallery-item:hover .metall-overlay {
    opacity: 1;
}

.metall-gallery-item:hover .metall-overlay i {
    transform: translateY(0);
}

/* Lightbox Specific Styles (GLightbox override if needed) */
.glightbox-container .gdesc-inner {
    border-radius: 0 0 10px 10px;
}

/* Responsive */
@media (max-width: 768px) {
    /* No longer forcing 2 columns here, Elementor will handle it */
    .metall-item-featured {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    /* No longer forcing 1 column here, Elementor will handle it */
}
