/* Project page styles - Complete Updated Version with Overview */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
}

body {
    background-color: #ededed;
    color: #696969;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header styles */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.back-link {
    display: flex;
    align-items: center;
    color: #696969;
    text-decoration: none;
    font-size: 0.9rem;
    position: absolute;
    left: 0;
}

.back-arrow {
    width: 10px;
    height: 10px;
    margin-right: 8px;
}

.title {
    font-size: 2rem;
    font-weight: 300;
    width: 100%;
    text-align: center;
    color: #696969;
}

/* Content styles */
.content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Project hero */
.project-hero {
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Project details - UPDATED to include overview */
.project-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.info-item p {
    font-size: 0.9rem;
    font-weight: 300;
}

/* Project overview - NEW */
.project-overview h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-overview p {
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 0;
}

/* Project content container - NEW */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 1rem;
}

/* Text section styles - NEW */
.project-text-section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.project-paragraph {
    font-weight: 300;
    line-height: 1.8;
    color: #696969;
}

/* Gallery section styles - UPDATED */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.gallery-item {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

figcaption {
    padding: 1rem;
    font-size: 0.8rem;
    color: #888;
    background-color: white;
}

/* Special layout classes - NEW */
.gallery-item.span-2 {
    grid-column: span 2;
}

.gallery-item.full-width {
    grid-column: 1 / -1;
}

/* Project navigation */
.project-navigation {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #ddd;
    padding-top: 2rem;
    margin-top: 3rem;
}

.prev-project, .next-project {
    display: flex;
    align-items: center;
    color: #696969;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.prev-project:hover, .next-project:hover {
    opacity: 0.7;
}

.nav-arrow {
    width: 10px;
    height: 10px;
}

.prev-project .nav-arrow {
    margin-right: 8px;
}

.next-project .nav-arrow {
    margin-left: 8px;
}

/* Animation for gallery items - NEW */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive adjustments - UPDATED */
@media (max-width: 992px) {
    .gallery-item.span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .project-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .project-overview {
        margin-top: 1rem;
    }
    
    .project-content {
        gap: 2rem;
    }
    
    .project-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .next-project {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .project-info {
        grid-template-columns: 1fr;
    }
}

.project-video-section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Video container with responsive aspect ratio */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* Default aspect ratio */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Make iframe fill the container */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video caption */
.video-caption {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 1rem;
    font-weight: 300;
}

/* Animation for video sections */
.project-video-section {
    animation: fadeIn 0.5s ease forwards;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .video-container {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        height: 0;
    }

    .video-container[style*="aspect-ratio: 4/3"] {
        padding-bottom: 75%; /* 4:3 aspect ratio */
    }

    .video-container[style*="aspect-ratio: 1/1"] {
        padding-bottom: 100%; /* 1:1 aspect ratio */
    }
}