/* ==================================
   PROJECT DETAIL PAGE - COMPLETE
   With Fixed-Size Gallery & Lightbox
   ================================== */

/* Project Detail Container */
.project-detail {
    padding: 60px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 40px;
    padding: 10px 20px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #000;
    color: #fff;
}

.project-header {
    text-align: center;
    margin-bottom: 60px;
}

.project-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.project-subtitle {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 40px;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
    min-width: 120px;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    font-weight: 700;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 900;
    margin-top: 5px;
}

/* Featured Image */
/*.project-featured {*/
/*    margin-bottom: 60px;*/
/*    text-align: center;*/
/*    clip-path: polygon(0 0, 100% 0, 100% 98%, 0 100%);*/
/*    overflow: hidden;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*}*/

.project-featured {
    margin-bottom: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.project-image {
    display: flex;
    justify-content: center;
}
.project-featured img {
    max-width: 100%;  /* Responsive - won't overflow */
    height: auto;     /* Maintains aspect ratio */
    width: auto;      /* Shows at original width */
}

/* Video Wrapper - 16:9 aspect ratio */
.project-video .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.project-video .video-wrapper iframe,
.project-video .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Project Content */
.project-content {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.project-content h2 {
    font-family: 'Arial Black', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.project-content p {
    margin-bottom: 20px;
}

.project-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px auto;
}

/* ==================================
   GALLERY - FIXED SIZE WITH LIGHTBOX
   ================================== */

.gallery-section {
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #000;
}

/* Gallery Grid - Fixed Size Items */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    height: 400px;
    clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

/* Video thumbnail styling */
.gallery-item video.gallery-thumbnail {
    pointer-events: none;
}

/* Video play icon overlay */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.gallery-item:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Gallery Overlay on Hover */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 12px 24px;
    border: 2px solid #fff;
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}

/* ==================================
   LIGHTBOX MODAL
   ================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    /* clip-path: polygon(0 0, 100% 0, 100% 98%, 0 100%); */
}

.lightbox-video {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: none;
    /* clip-path: polygon(0 0, 100% 0, 100% 98%, 0 100%); */
}

/* Show only the active media type in lightbox */
.lightbox-content.show-image .lightbox-image {
    display: block;
}

.lightbox-content.show-image .lightbox-video {
    display: none;
}

.lightbox-content.show-video .lightbox-image {
    display: none;
}

.lightbox-content.show-video .lightbox-video {
    display: block;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid #fff;
    color: #fff;
    font-size: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10000;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(100, 100, 100, 0.8);
    backdrop-filter: blur(5px);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

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

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav svg {
    stroke: #fff;
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox.active {
    animation: fadeIn 0.3s ease;
}

.lightbox.active .lightbox-image,
.lightbox.active .lightbox-video {
    animation: zoomIn 0.3s ease;
}

/* ==================================
   TOOLS & CTA SECTIONS
   ================================== */

.tools-section {
    text-align: center;
    margin: 60px 0;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.tool-tag {
    padding: 10px 25px;
    background: #000;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}

.project-cta {
    text-align: center;
    margin: 60px 0;
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: #000;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.project-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 3px solid #000;
}

.nav-link {
    padding: 20px;
    background: #f5f5f5;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
    transition: all 0.3s ease;
    text-align: center;
}

.nav-link:hover {
    background: #000;
    color: #fff;
}

.nav-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 5px;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 900;
}

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

@media (max-width: 768px) {
    .project-detail {
        padding: 40px 0;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-meta {
        gap: 20px;
    }

    .project-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-item {
        height: 300px;
    }

    .project-nav {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }

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

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-content {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 1.6rem;
    }

    .gallery-item {
        height: 250px;
    }

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

    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 25px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img,
    .gallery-item video,
    .gallery-overlay,
    .video-play-icon,
    .lightbox,
    .lightbox-image,
    .lightbox-video {
        transition: none;
        animation: none;
    }
}