/* filepath: website/static/website/css/project-detail.css */
/* ===== PROJECT CASE STUDY - DYNAMIC & CONTENT-FIRST ===== */
/* Preserves original color scheme: #ffffff bg, #1a1a1a text, #000 accents */

.project-detail-section {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 140px 0 120px;
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
}

.project-detail-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* BACK LINK: Subtle & Clean */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 50px;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #000;
    transform: translateX(-5px);
}

/* 1. HEADER AREA */
.project-header {
    margin-bottom: 70px;
    max-width: 900px;
}

.header-meta {
    display: flex;
    -align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #f0f0f0;
    color: #666;
}

/* Dynamic status colors based on slugify class */
.status-badge.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.in-progress {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.planning {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.ongoing {
    background: #fce4ec;
    color: #c2185b;
}

.category-name {
    font-size: 12px;
    font-weight: 600;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -3px;
    margin-bottom: 25px;
    color: #000;
    word-break: break-word;
}

.project-lead {
    font-size: 22px;
    line-height: 1.5;
    color: #666;
    font-weight: 400;
}

/* 2. LAYOUT GRID — CONTENT ON LEFT, SUPPORTING IMAGE/META ON RIGHT */
.project-layout-grid {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 3. MAIN NARRATIVE (Content-First, spacious) */
.project-narrative {
    flex: 2;
    min-width: 280px;
    max-width: 780px;
}

.narrative-section {
    margin-bottom: 60px;
}

.narrative-section h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.narrative-section h2 i {
    color: #ddd;
}

.narrative-body {
    font-size: 19px;
    line-height: 1.85;
    color: #333;
}

.narrative-body p {
    margin-bottom: 25px;
}

/* Secondary Narrative Sections (Challenge/Solution) */
.narrative-section.secondary h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.narrative-section.secondary p {
    font-size: 17px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

/* Outcome/Results Section — subtle highlight */
.narrative-section.outcome {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 20px;
    margin-top: 20px;
}

.narrative-section.outcome h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 4. SIDEBAR (Supporting Visual & Metadata) */
.project-sidebar {
    flex: 1;
    min-width: 300px;
    max-width: 360px;
}

.sidebar-sticky {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Image Card: Supporting role, elegant */
.supporting-image-card {
    border-radius: 20px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.supporting-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.08);
}

.supporting-image-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.image-placeholder {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    gap: 12px;
    font-size: 14px;
}

.image-placeholder i {
    font-size: 48px;
    opacity: 0.5;
}

/* Specs Card - clean metadata */
.specs-card {
    padding: 8px 0;
    background: transparent;
}

.specs-group {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

.specs-group:last-of-type {
    border-bottom: none;
}

.specs-group label,
.tech-stack-group label,
.tags-card label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin-bottom: 8px;
}

.specs-group span {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

/* Tech Pills & Tags */
.tech-stack-group {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.tech-pills,
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tech-pill,
.tag-pill {
    padding: 6px 14px;
    background: #f2f2f2;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    transition: all 0.2s ease;
}

.tech-pill:hover,
.tag-pill:hover {
    background: #e6e6e6;
    transform: translateY(-1px);
}

/* Action Buttons */
.project-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.live-btn {
    background: #000;
    color: #fff;
    border: none;
}

.live-btn:hover {
    background: #2c2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.repo-btn {
    background: #fff;
    color: #000;
    border: 1px solid #e0e0e0;
}

.repo-btn:hover {
    background: #fafafa;
    border-color: #ccc;
    transform: translateY(-2px);
}

.demo-btn {
    background: #f8f8f8;
    color: #000;
    border: 1px solid #ddd;
}

.demo-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Tags Card (optional extra) */
.tags-card {
    margin-top: 8px;
    padding: 16px 0;
    border-top: 1px solid #eee;
}

/* Error Fallback */
.error-container {
    text-align: center;
    padding: 80px 20px;
    background: #fafafa;
    border-radius: 24px;
}

.error-container i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.error-container h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.plain-button {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    transition: background 0.3s;
}

.plain-button:hover {
    background: #333;
}

/* ===== RESPONSIVE: IMAGE MOVES GRACEFULLY ===== */
@media (max-width: 1024px) {
    .project-layout-grid {
        gap: 50px;
    }

    .project-title {
        font-size: 52px;
        letter-spacing: -2px;
    }
}

@media (max-width: 900px) {
    .project-layout-grid {
        flex-direction: column;
    }

    .project-sidebar {
        max-width: 100%;
        width: 100%;
    }

    .sidebar-sticky {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .supporting-image-card {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .project-detail-container {
        padding: 0 24px;
    }

    .project-title {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .project-lead {
        font-size: 18px;
    }

    .narrative-body {
        font-size: 17px;
    }

    .sidebar-sticky {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .narrative-section.outcome {
        padding: 28px;
    }

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

@media (max-width: 480px) {
    .project-title {
        font-size: 32px;
    }

    .back-link {
        margin-bottom: 30px;
    }

    .narrative-section.secondary h3 {
        font-size: 22px;
    }
}
