/* Gallery Section Styles */

/* Main Gallery Section */
.gallery {
    background-color: var(--background-color);
    padding: 100px 0;
    min-height: 100vh;
}

.gallery-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}


/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Skeleton */
.gallery-item.loading {
    background: linear-gradient(90deg, var(--surface-color) 25%, var(--border-color) 50%, var(--surface-color) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

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

/* Gallery Item Overlay */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 0.1;
}

/* Gallery Item Info */
.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-description {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Gallery Controls */
.gallery-controls {
    text-align: center;
    margin-top: 2rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    user-select: none;
}

.lightbox-arrow-left {
    left: 20px;
}

.lightbox-arrow-right {
    right: 20px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    margin-top: 1rem;
    color: white;
    max-height: 20vh;
    overflow-y: auto;
    padding-right: 10px;
}

.lightbox-info::-webkit-scrollbar {
    width: 6px;
}

.lightbox-info::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.lightbox-info::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.lightbox-info::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.lightbox-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}


/* Active nav link */
.nav-link.active {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery {
        padding: 80px 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -30px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .lightbox-info h3 {
        font-size: 1.2rem;
    }
    
    .lightbox-info p {
        font-size: 0.9rem;
    }
}
