/* ============================================
   PROJECT DETAIL PAGE STYLES
   ============================================ */

/* ============================================
   PROJECT NAVIGATION
   ============================================ */

.project-nav {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(10,10,10,0.8), transparent);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-nav > * {
    pointer-events: auto;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f5f5f5;
    text-decoration: none;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.7;
}

.back-link svg {
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-5px);
}

.project-nav-title {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.project-nav-progress {
    width: 100px;
    height: 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    transition: width 0.1s ease;
}

/* ============================================
   PROJECT HERO
   ============================================ */

.project-hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 8rem 5vw 4rem;
    align-items: center;
}

.project-hero-image {
    height: 70vh;
    position: relative;
    overflow: hidden;
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-hero-content {
    padding: 2rem;
}

.project-category {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 100;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.project-description {
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 3rem;
    max-width: 500px;
}

.project-meta {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

.meta-value {
    font-size: 1rem;
    font-weight: 400;
}

/* ============================================
   PROJECT GALLERY
   ============================================ */

.project-gallery {
    padding: 15vh 0;
    width: 100%;
}

.gallery-intro {
    margin-bottom: 3rem;
    max-width: 600px;
    padding: 0 2vw;
}

.gallery-intro-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.gallery-intro-text {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
}

/* Gallery Container - Grid Layout (Fill Row First) */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.gallery-row {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-row img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-row:hover img {
    transform: scale(1.03);
}

/* ============================================
   PROJECT STORY
   ============================================ */

.project-story {
    padding: 15vh 5vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: #0f0f0f;
}

.story-content {
    padding: 2rem;
}

.story-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 2rem;
    color: #f5f5f5;
    opacity: 1 !important;
}

.story-text {
    font-size: 1.125rem;
    line-height: 2;
    color: #b0b0b0;
    opacity: 1 !important;
}

.story-text p {
    margin-bottom: 1.5rem;
    color: #c0c0c0;
    opacity: 1 !important;
}

.story-image {
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
}

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

/* ============================================
   NEXT PROJECT
   ============================================ */

.project-next {
    padding: 10vh 5vw;
    text-align: center;
    background: #0f0f0f;
}

.next-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888 !important;
    opacity: 1 !important;
    margin-bottom: 2rem;
}

.next-project-link {
    display: inline-block;
    text-decoration: none;
    color: #f5f5f5 !important;
    max-width: 800px;
    width: 100%;
}

.next-image {
    aspect-ratio: 21/9;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.next-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.next-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    color: #f5f5f5 !important;
    opacity: 1 !important;
}

.next-category {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999 !important;
    opacity: 1 !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .project-hero {
        grid-template-columns: 1fr;
        padding-top: 6rem;
    }
    
    .project-hero-image {
        height: 50vh;
        order: -1;
    }
    
    .project-story {
        grid-template-columns: 1fr;
    }
    
    .masonry-item.item-large,
    .masonry-item.item-medium {
        grid-column: span 1;
    }
    
    .masonry-item.item-large-vertical {
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .project-nav {
        padding: 0.75rem 1.5rem;
        top: 4.5rem;
    }
    
    .project-nav-title {
        display: none;
    }
    
    .project-meta {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    
    .masonry-item,
    .masonry-item.item-large,
    .masonry-item.item-small,
    .masonry-item.item-small-vertical,
    .masonry-item.item-small-square,
    .masonry-item.item-medium,
    .masonry-item.item-large-vertical,
    .masonry-item.item-medium-square {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 4/3;
    }
}

/* ============================================
   IMAGE LIGHTBOX
   ============================================ */

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.lightbox-close:hover {
    color: #ba0000;
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 40px;
    height: 40px;
}

/* Navigation arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 30px;
}

.lightbox-nav.next {
    right: 30px;
}

.lightbox-nav svg {
    width: 30px;
    height: 30px;
}

/* Mobile */
@media (max-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .gallery-row img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .gallery-row img {
        height: 200px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-close svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .gallery-row img {
        height: 250px;
    }
}
