/* Project Detail Specific Styles */

/* Scoped Body Background */
.project-detail-body {
    background-color: var(--bg-color);
}

/* Back Navigation Breadcrumb */
.back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 1600px;
    margin: 4rem auto 0;
    padding: 0 2rem;
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.back-home:hover {
    opacity: 1;
    transform: translateX(-5px);
}

.back-home svg {
    width: 16px;
    height: 16px;
}

/* Project Hero Section */
.project-hero {
    padding: 4rem 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.project-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

/* Technical Metadata Grid */
.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-item h5 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.meta-item p {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Hero Image Showcase */
.project-showcase {
    max-width: 1600px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.project-showcase img,
.project-showcase video {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.project-showcase.dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .project-showcase.dual {
        grid-template-columns: 1fr;
    }
}

/* Content Grid (Case Study) */
.project-content-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 6rem;
    max-width: 1600px;
    margin: 4rem auto;
    padding: 0 2rem;
}

/* New full-width container for body content */
.project-body-full {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-body-full section {
    margin-bottom: 4rem;
}

.main-content h2,
.project-body-full h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 3rem;
    text-align: left;
    line-height: 1.1;
    color: var(--text-color);
}

.main-content p,
.project-body-full p {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 75ch;
    /* Improve readability */
}

/* List Styling */
.main-content ul,
.project-body-full ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 2.5rem;
    max-width: 75ch;
    /* Improve readability */
}

.main-content ul li,
.project-body-full ul li {
    position: relative;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
    padding-left: 2rem;
    /* Pad inwards from the left */
}

.main-content ul li::before,
.project-body-full ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

/* Detail Sidebar (Right Column) */
.detail-sidebar {
    padding-top: 2rem;
}

.sidebar-item {
    margin-bottom: 4rem;
}

.sidebar-item h6 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    margin-bottom: 1.25rem;
}

.sidebar-item p {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .project-hero {
        padding-top: 4rem;
    }
}

/* Architecture Diagram Responsive Container */
.architecture-diagram {
    width: 100%;
    max-width: 100%;
    margin: 3rem 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.architecture-diagram img {
    width: 100%;
    height: auto;
    max-width: 1400px;
    display: block;
    margin: 0 auto;
}

/* On smaller screens, allow horizontal scrolling for large diagrams */
@media (max-width: 1200px) {
    .architecture-diagram {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .architecture-diagram img {
        min-width: 800px;
        width: auto;
        max-width: none;
    }
}

/* Project CTA Section */
.project-cta {
    background-color: #f8fafc;
    padding: 4rem 2rem 8rem;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.project-cta h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    color: var(--text-color);
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}

.project-cta p {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 60ch;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 1.25rem 3rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 4px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--text-color);
    transform: translateY(-5px);
}