/* --- Past Projects Page Styles --- */

.projects-hero {
    position: relative;
    height: 380px;
    background-image: url('image/past projects/banner.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 84, 172, 0.88) 0%, rgba(20, 190, 217, 0.7) 100%);
    z-index: 1;
}

.projects-hero .container {
    position: relative;
    z-index: 2;
}

.projects-hero h1 {
    font-size: 45px;
    color: var(--white);
    margin-top: 1rem;
}

.projects-breadcrumb {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.projects-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.projects-breadcrumb span {
    display: flex;
    align-items: center;
}

.projects-breadcrumb i {
    width: 14px;
    height: 14px;
}

/* --- Project Rows (Spaced Staggered Layout) --- */
.project-section {
    padding: 5rem 0;
    overflow: hidden;
    background-color: var(--white);
}

.project-section.bg-light {
    background-color: var(--bg-light);
}

.project-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.project-row.reverse {
    flex-direction: row-reverse;
}

.project-content {
    flex: 1.1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h3 {
    font-size: 28px;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.project-content p {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 2.25rem;
    line-height: 1.8;
    text-align: left;
}

.project-image-content {
    flex: 0.9;
    position: relative;
    min-height: auto;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-image-content:hover {
    transform: translateY(-6px);
}

.project-image-content img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.3s ease;
}

.project-image-content:hover img {
    transform: scale(1.02);
    filter: brightness(1.03);
}

/* --- Support Split (Adopted from About Page) --- */
.about-support-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
}

.about-support-img {
    background-image: url('image/About Us/Support Our Mission.jpg');
    background-size: cover;
    background-position: center;
}

.about-support-content {
    background: var(--primary-cyan);
    padding: 4rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-support-content h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.about-support-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* --- Expanded Image Modal --- */
.image-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2500;
    /* High z-index to hover above standard menus */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    /* Sleek slate 900 overlay tint */
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    padding: 0;
    z-index: 2600;
}

.modal-close-btn:hover {
    color: var(--primary-yellow);
    transform: rotate(90deg);
}

.modal-content-wrap {
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-modal.show .modal-image {
    transform: scale(1);
}

.modal-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    max-width: 700px;
    line-height: 1.6;
    font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 991px) {

    .project-row,
    .project-row.reverse {
        flex-direction: column;
        gap: 3rem;
    }

    .project-image-content {
        width: 100%;
    }

    .about-support-split {
        grid-template-columns: 1fr;
    }

    .about-support-img {
        height: 300px;
    }

    .about-support-content {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 767px) {
    .projects-hero h1 {
        font-size: 27px !important;
    }

    .project-section {
        padding: 4rem 0;
    }

    .project-content h3 {
        font-size: 22px;
    }

    .project-content p {
        font-size: 14px !important;
    }

    .modal-close-btn {
        top: 1.5rem;
        right: 1.5rem;
        font-size: 40px;
    }

    .modal-caption {
        font-size: 0.88rem;
        padding: 0 1rem;
    }
}