/* --- Global Detail Page Styles --- */

.project-header { 
    padding: 20px 20px 20px; 
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: white; 
    text-align: center; 
}

.project-meta { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    margin-top: 20px; 
    color: #94a3b8;
    font-size: 0.9rem;
}

.subtitle { 
    color: #94a3b8; 
    font-size: 1.1rem; 
    margin-top: 10px; 
}

/* --- Layout & Container --- */

.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr; /* Fixed sidebar width to prevent clustering */
    gap: 50px;
    align-items: start;
    max-width: 1200px;
    margin: 30px auto; /* Removed negative margin for better spacing */
    padding: 0 40px;
}

/* --- Sidebar Styling --- */

.project-sidebar {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 120px; /* Space from top navigation */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    z-index: 10;
}

.sidebar-block { 
    margin-bottom: 25px; 
}

.sidebar-block h4 { 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.tool-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.tool-tags span {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.full-width { 
    width: 100%; 
    text-align: center; 
    margin: 5px 0; 
}

/* --- Main Content Area --- */

.project-main-content { 
    background: transparent; 
}

.back-link { 
    display: inline-block; 
    margin-bottom: 25px; 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem;
    transition: transform 0.2s;
}

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

.project-large-img { 
    width: 100%; 
    height: auto;
    max-height: 500px; /* Prevents vertical images from stretching too far */
    border-radius: 16px; 
    margin-bottom: 40px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    object-fit: cover;
}

.text-block { 
    margin-bottom: 40px; 
}

.text-block h2 { 
    margin-bottom: 15px; 
    color: var(--secondary); 
}

/* --- Highlight Box & Stats --- */

.highlight-box {
    background: #f0f7ff;
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.impact-stats {
    display: flex;
    gap: 40px;
    margin: 30px 0;
}

.stat-item { text-align: left; }

.stat-num { 
    display: block; 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: var(--primary); 
}

.stat-label { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}

/* --- Gallery Section --- */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* --- Responsive Fixes --- */

@media (max-width: 1000px) {
    .content-wrapper { 
        grid-template-columns: 1fr; 
        margin-top: 20px; 
        padding: 0 20px;
    }
    
    .project-sidebar { 
        position: relative; 
        top: 0; 
        order: 2; /* Moves sidebar below content on mobile */
    }
    
    .project-main-content { 
        order: 1; 
    }
    
    .image-gallery { 
        grid-template-columns: 1fr; 
    }
}

.text-block ul {
    margin-left: 20px;
    padding-left: 20px;
    margin-bottom: 1.5rem;
    list-style-type: disc; /* Ensures standard bullets appear */
}

.text-block li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #333; /* Or whatever color matches your design */
}

.text-block ol {
    margin-left: 20px;
    padding-left: 20px;
    margin-bottom: 1.5rem;
}