/* Gallery Module CSS */

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Gallery Image */
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    color: white;
    padding: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Gallery Title */
.gallery-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

/* Gallery Count */
.gallery-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-count i {
    font-size: 1rem;
}

/* Gallery Item Badge */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(220, 53, 69, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item::after {
    content: '\F4CA'; /* Bootstrap icon for images */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 3;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover::before,
.gallery-item:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Load More Button */
.load-more-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.load-more-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Dark Mode */
body.dark-mode .gallery-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .load-more-btn {
    background: var(--card-bg);
    border-color: #404040;
    color: var(--text-color);
}

body.dark-mode .load-more-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
    
    .gallery-overlay {
        padding: 1.25rem;
    }
    
    .gallery-title {
        font-size: 1rem;
    }
    
    .gallery-count {
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-overlay {
        padding: 1rem;
        transform: translateY(0);
        opacity: 1;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.6) 70%,
            transparent 100%
        );
    }
    
    .gallery-item::before,
    .gallery-item::after {
        opacity: 1;
        transform: scale(1);
    }
}