/* ============================================================
   PROJECT DETAIL PAGE STYLES
   ============================================================ */

/* ---------- Banner category tag ---------- */
.project-banner-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary);
    background-color: rgba(184, 137, 43, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}


/* ============================================================
   1. HERO IMAGE
   ============================================================ */
.project-hero {
    background-color: var(--color-white);
    padding-top: var(--space-xl);
}

.project-hero-image {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--color-light);
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   2. PROJECT DETAIL GRID
   ============================================================ */
.project-detail {
    background-color: var(--color-white);
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-xl);
    align-items: start;
}

/* Description (left) */
.project-description .section-label {
    text-align: left;
}

.project-description h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    color: var(--color-dark);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.project-text {
    font-size: var(--fs-base);
    color: var(--color-gray);
    line-height: 1.85;
    margin-bottom: var(--space-lg);
}

.project-cta {
    margin-top: var(--space-md);
}

.project-cta .btn svg {
    transition: transform var(--transition-fast);
}

.project-cta .btn:hover svg {
    transform: translateX(4px);
}


/* ============================================================
   3. META SIDEBAR
   ============================================================ */
.project-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.project-meta-card {
    background-color: var(--color-light);
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.project-meta-card h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    color: var(--color-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.project-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
}

.project-meta-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.project-meta-list li:last-child {
    border-bottom: none;
}

.meta-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray);
    flex-shrink: 0;
}

.meta-value {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-dark);
    text-align: right;
}


/* ============================================================
   4. CTA CARD — Inside LEFT column (below Start button)
   ============================================================ */
.project-meta-cta {
    background-color: var(--color-dark);
    border-color: var(--color-dark);
    text-align: center;
    margin-top: var(--space-lg);
    padding: var(--space-lg) var(--space-md);
}

/* When CTA sits inside the description (left column), give it
   some breathing room and a comfortable max-width */
.project-description .project-meta-cta {
    margin-top: var(--space-xl);
    padding: var(--space-xl) var(--space-lg);
    max-width: 100%;
}

.project-meta-cta h3 {
    color: var(--color-white);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
}

.project-meta-cta p {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.project-meta-cta .btn {
    width: 100%;
    justify-content: center;
}

/* Prevent double spacing when CTA is inside description */
.project-description .project-meta-cta h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
}


/* ============================================================
   5. PROJECT GALLERY + LIGHTBOX
   ============================================================ */
.project-gallery {
    padding: var(--space-2xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #E8E4DC;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 32px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-primary);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    letter-spacing: 0.1em;
    font-weight: 600;
}


/* ============================================================
   6. RELATED PROJECTS
   ============================================================ */
.related-projects {
    padding: var(--space-2xl) 0;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.related-project-card {
    display: block;
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.related-project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.related-project-image {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--color-border);
    transition: transform var(--transition-slow);
}

.related-project-card:hover .related-project-image {
    transform: scale(1.04);
}

.related-project-body {
    padding: var(--space-md);
}

.related-project-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.related-project-body h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    color: var(--color-dark);
    line-height: 1.3;
    margin-bottom: 6px;
}

.related-project-loc {
    font-size: var(--fs-xs);
    color: var(--color-gray);
}


/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .project-meta {
        position: static;
    }

    .related-projects-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery tablet */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
    }

    /* CTA card on tablet */
    .project-description .project-meta-cta {
        padding: var(--space-lg) var(--space-md);
    }
}

@media (max-width: 768px) {
    .project-description h2 {
        font-size: var(--fs-xl);
    }

    .project-hero-image {
        aspect-ratio: 4 / 3;
        border-radius: 0;
        margin: 0 -20px;
        width: calc(100% + 40px);
    }

    .project-cta .btn {
        width: 100%;
        justify-content: center;
    }

    /* CTA card on mobile */
    .project-description .project-meta-cta {
        margin-top: var(--space-lg);
        padding: var(--space-lg) var(--space-md);
    }

    .project-meta-cta h3 {
        font-size: var(--fs-md);
    }
}

@media (max-width: 576px) {
    /* Gallery mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}