/* ============================================
   PROJECT PHOTO GALLERY SYSTEM
   Standalone file - link this in any project page
   ============================================ */

.project-gallery {
    margin: 60px 0;
}

.project-gallery h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 600;
    color: #000000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.gallery-caption p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-modal-close {
    position: fixed;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
    font-weight: 300;
}

.gallery-modal-close:hover {
    color: #6495ED;
}

.gallery-modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 100px 40px 40px;
}

.gallery-modal-wrapper {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.gallery-modal-caption {
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 20px 15px;
    transition: all 0.3s ease;
    z-index: 2001;
}

.gallery-nav:hover {
    background: rgba(100, 149, 237, 0.3);
    border-color: #6495ED;
}

.gallery-nav-prev {
    left: 20px;
}

.gallery-nav-next {
    right: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-nav {
        padding: 15px 10px;
        font-size: 24px;
    }
    
    .gallery-nav-prev {
        left: 10px;
    }
    
    .gallery-nav-next {
        right: 10px;
    }
    
    .gallery-modal-content {
        padding: 80px 20px 20px;
    }
}
