/* Project Detail Page Specific Styles */

.project-details {
    max-width: 1000px;
    width: 100%;
    margin: 120px auto 60px;
    padding: 0 120px 0 20px; /* extra right padding bc of project navbar to the right */
    box-sizing: border-box;
}

.project-header {
    margin-bottom: 40px;
}

.project-header img {
    width: 100%; /* fill container width */
    max-width: 1000px; /* maximum width so very large images don’t overflow */
    height: auto; /* maintain aspect ratio */
    border-radius: 5px; /* optional rounded corners */
    object-fit: contain; /* ensure full image visible */
    display: block; /* removes inline spacing */
}

.project-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    text-align: left;
}

.project-header .metadata {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.project-description {
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: left;

}

.project-description p {
    margin-bottom: 20px;
    text-align: left;
}

.project-main-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 40px;
}

.project-gallery {
    display: flex;
    flex-direction: column; /* stack vertically */
    align-items: center; /* center horizontally */
    gap: 60px; /* spacing between images */
    margin-bottom: 1px;
}

.project-gallery h2 {
    margin-top: 60px;
    margin-bottom: 20px;
    width: 100%;
    text-align: left;
}

.project-gallery img {
    width: 100%; /* fill container width */
    max-width: 1000px; /* maximum width so very large images don’t overflow */
    height: auto; /* maintain aspect ratio */
    border-radius: 5px; /* optional rounded corners */
    object-fit: contain; /* ensure full image visible */
    display: block; /* removes inline spacing */
}

.project-gallery video {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    border-radius: 5px;
}

.gallery-item {
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.gallery-item a {
    overflow: hidden;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

/* Desktop Sidebar */
.project-nav-wrapper {
    position: fixed;
    top: 120px; /* distance from top */
    right: 0; /* distance from right */
    z-index: 1000;
}

.project-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff; /*Change this value to change the background color of the right navigation bar*/
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-nav a {
    text-decoration: none;
    color: #49495C; /*Change this value to change the color of the text of the right navigation bar*/
    font-weight: 500;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.project-nav a:hover {
    background: #F2E7FE; /*Change this value to change the color of the hover background of the right navigation bar text elements*/
    transform: translateX(-10px);
}

/* class for the hamburger dropdown toggle menu */
.project-nav-toggle {
    display: none;
}

@media (max-width: 992px) {
    .project-nav-wrapper {
        position: relative; /* wrapper still relative for dropdown positioning */
        width: 100%;
        margin-bottom: 20px;
    }

    /* Dropdown menu positioned absolutely relative to wrapper (or toggle) */
    .project-nav {
        display: none;
        position: fixed; /* also fixed to viewport */
        top: 260px; /* below the toggle (toggle height + margin) */
        right: 0px; /* align to toggle */
        flex-direction: column;
        gap: 0;
        padding: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        width: 200px; /* fixed dropdown width */
        z-index: 1050;
    }

    /* Hamburger stays fixed on the screen */
    .project-nav-toggle {
        display: block;
        position: fixed; /* fix to viewport */
        top: 220px; /* distance from top of viewport */
        right: 0px; /* distance from right of viewport */
        background: #524D58; /* change this value to change color of dropdown toggle background */
        color: #FFFFFFFF; /* change this value to change text color of dropdown toggle */
        font-size: 16px;
        border: none;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        z-index: 1100;
    }

    .project-nav.show {
        display: flex;
    }

    .project-nav a {
        padding: 10px;
        font-size: 14px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    .project-nav a:last-child {
        border-bottom: none;
    }
}

/* Smaller screens adjustments */
@media (max-width: 600px) {
    /* Dropdown menu positioned absolutely relative to wrapper (or toggle) */
    .project-nav {
        display: none;
        position: fixed; /* also fixed to viewport */
        top: 260px; /* below the toggle (toggle height + margin) */
        right: 0px; /* align to toggle */
        flex-direction: column;
        gap: 0;
        padding: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        width: 200px; /* fixed dropdown width */
        z-index: 1050;
    }

    /* Hamburger stays fixed on the screen */
    .project-nav-toggle {
        display: block;
        position: fixed; /* fix to viewport */
        top: 220px; /* distance from top of viewport */
        right: 0px; /* distance from right of viewport */
        font-size: 16px;
        border: none;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        z-index: 1100;
    }

    .project-nav a {
        font-size: 13px;
    }
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive Design for Project Page */
@media (max-width: 768px) {
    .project-header h1 {
        font-size: 28px;
    }

    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

