/* ===== PROJECT CONTENT SECTION ===== */
.project-content-section {
    background: white;
    padding: 60px 0;
}


/* Project Description */
.project-description h4 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.project-description p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Key Features */
.key-features {
    margin-top: 40px;
}

.key-features h4 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.feature-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    height: 100%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-dark);
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.feature-icon i {
    font-size: 22px;
    color: white;
}

.feature-card h5 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Project Sidebar */
.project-sidebar {
    position: sticky;
    top: 100px;
}

.info-card,
.scope-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.info-card h4,
.scope-card h4 {
    color: #1e293b;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: var(--primary-dark);
    font-size: 18px;
    margin-top: 3px;
}

.info-label {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    color: #1e293b;
    font-weight: 500;
    font-size: 1rem;
}

/* Scope List */
.scope-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scope-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.scope-list li:last-child {
    border-bottom: none;
}

.scope-list i {
    color: var(--primary-dark);
    font-size: 14px;
    margin-top: 3px;
}

.scope-list li span {
    color: #475569;
    font-size: 0.95rem;
}

/* ===== GALLERY SECTION ===== */
.project-gallery-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 60px 0;
}

.gallery-title {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.gallery-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Gallery Images - FIXED */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-img-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    /* REMOVE FIXED HEIGHT */
    aspect-ratio: 4/3;
    /* Keeps consistent ratio */
    background: #f1f5f9;
    /* Fallback background */
}

.gallery-img-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    background: #f1f5f9;
    /* Loading background */
}

.gallery-img-container:hover .gallery-img {
    transform: scale(1.05);
}

/* Better Fallback for Missing Images */
.gallery-img:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #e2e8f0 25%, #f1f5f9 25%, #f1f5f9 50%, #e2e8f0 50%, #e2e8f0 75%, #f1f5f9 75%, #f1f5f9 100%);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
    z-index: 1;
}

/* Show error only when image fails to load */
.gallery-img[src=""]:before,
.gallery-img:not([src]):before {
    content: "Image loading...";
    background: #e2e8f0;
}

/* Zoom Icon Overlay */
.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 106, 84, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-img-container:hover .zoom-overlay {
    background: rgba(16, 106, 84, 0.5);
    opacity: 1;
}

.zoom-icon {
    color: white;
    font-size: 40px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-img-container:hover .zoom-icon {
    transform: scale(1);
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== SIMPLE & STABLE LIGHTBOX ===== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease;
}

/* ACTIVE STATE */
.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 800px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vh;

    background: #000;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;   /* 🔥 IMPORTANT */
}


.lightbox-img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}


/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: -45px;
    right: 0;

    font-size: 34px;
    color: #fff;
    cursor: pointer;

    z-index: 10; 
}


.close-btn:hover {
    color: var(--primary-light);
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .project-sidebar {
        margin-top: 40px;
        position: static;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .project-content-section,
    .project-gallery-section {
        padding: 50px 0;
    }

    .gallery-title {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 20px;
    }

    .info-card,
    .scope-card {
        padding: 20px;
    }

    .lightbox-img {
        max-height: 70vh;
    }
}