/* =========================================================================
   PROJECT PAGE SPECIFIC STYLES
   ========================================================================= */

body {
    animation: fadeIn 0.7s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.project-hero {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: #333;
    /* Fallback */
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--hero-color, rgba(0, 0, 0, 0.5));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 160px;
    /* Aligns with Figma left-[160px] */
    color: white;
}

.hero-date {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 2.25rem;
    /* 36px */
    font-weight: 900;
    color: white;
}

.project-details-container {
    width: 100%;
    max-width: 1280px;
    /* Accommodate the 960px width + 160px left padding */
    margin: 0 auto;
    padding: 4rem 160px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-section-heading {
    font-size: 1.25rem;
    /* 20px */
    font-weight: 900;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
}

.project-subheading {
    font-size: 1rem;
    /* 16px */
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-paragraph {
    font-size: 1rem;
    /* 16px */
    font-weight: 500;
    color: var(--text-primary);
    text-align: justify;
    max-width: 960px;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.video-placeholder {
    width: 609px;
    height: 319px;
    background-color: #d9d9d9;
    margin: 3rem auto;
    border-radius: 8px;
    /* Slight rounding to look polished */
}

.project-video {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    margin: 3rem auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Layout Overrides for RAG-QA Elements */
.hero-rag-qa {
    --hero-color: rgba(3, 113, 197, 0.7);
}

.back-link-adjusted {
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

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

.pt-1-5 {
    padding-top: 1.5rem;
}

.project-sub-subheading {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-heading);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.project-sub-subheading.mt-2 {
    margin-top: 2rem;
}

.architecture-img {
    display: block;
    max-width: 800px;
    width: 100%;
    height: auto;
    margin: 3rem auto;
}
.project-list {
    max-width: 960px;
    margin: 0 auto;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
}

.project-list-item {
    list-style-type: initial;
    margin-left: 1.2rem;
    margin-top: 0.5rem;
}

.project-list-group {
    margin-bottom: 1rem;
}

.project-sub-list {
    list-style-type: circle;
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.project-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.btn-link-large {
    font-size: 1rem;
}

/* Responsiveness for Project Page */
@media (max-width: 1024px) {

    .hero-content,
    .project-details-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .video-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

/* =========================================================================
   LIGHTBOX MODAL
   ========================================================================= */
.lightbox-modal {
    /* Use flex & visibility instead of display: none to allow CSS transitions! */
    display: flex;
    visibility: hidden;
    pointer-events: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    /* Use an ease-out timing function for a buttery smooth feel */
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.lightbox-modal.active {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Start slightly smaller */
    transform: scale(0.95);
    /* Extra smooth scale pop */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.project-details-container img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-details-container img:hover {
    opacity: 0.9;
}
