/* Gallery Styles */

/* Service Gallery Container */
.service-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    position: relative;
    z-index: 2;
}

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

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(110, 61, 200, 0.4);
    border: 2px solid var(--cosmic-accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.5s ease;
}

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

/* No Images Message */
.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.7), rgba(90, 24, 154, 0.7));
    border-radius: 12px;
    color: var(--cosmic-text-secondary);
    font-style: italic;
    border: 1px solid rgba(157, 78, 221, 0.3);
    backdrop-filter: blur(5px);
}

/* Gallery Modal */
.gallery-modal {
    z-index: 1001; /* Higher than regular modals */
    background-color: rgba(16, 0, 43, 0.9);
    backdrop-filter: blur(10px);
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: rgba(36, 0, 70, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(157, 78, 221, 0.4);
    box-shadow: 0 15px 40px rgba(16, 0, 43, 0.5);
}

.gallery-modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    max-height: 70vh;
    overflow: hidden;
}

#gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#gallery-title {
    margin-top: 10px;
    text-align: center;
    background: linear-gradient(90deg, #6e3dc8, #9d4edd, #c77dff, #e0aaff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: nebula-text-animation 8s ease infinite;
    text-shadow: 0 0 20px rgba(224, 170, 255, 0.5);
    font-weight: 700;
}

/* Gallery Navigation */
.gallery-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.gallery-nav-btn {
    background: var(--cosmic-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(110, 61, 200, 0.4);
}

.gallery-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(110, 61, 200, 0.6);
}

#image-counter {
    font-size: 14px;
    color: var(--cosmic-highlight);
    text-shadow: 0 0 10px rgba(224, 170, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .service-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gallery-modal-content {
        padding: 15px;
    }
    
    .gallery-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .service-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .gallery-modal-content {
        padding: 10px;
    }
    
    .gallery-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}
