/**
 * Double Image Gallery - Frontend Styles
 */

/* Gallery Grid Layout */
.dg-gallery-wrapper {
    margin: 20px 0;
    max-width: 1200px;
}

.dg-gallery-title {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.dg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* Individual Gallery Item */
.dg-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Square thumbnails */
}

.dg-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Thumbnail Image */
.dg-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dg-item:hover .dg-thumbnail {
    transform: scale(1.05);
}

/* Loading State (optional) */
.dg-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error State (optional) */
.dg-item.error::after {
    content: 'Image not available';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255,0,0,0.8);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dg-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .dg-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .dg-gallery-title {
        font-size: 20px;
    }
}

/* Clearfix */
.dg-gallery::after {
    content: '';
    display: table;
    clear: both;
}