﻿.projects-page {
    width: 90%;
    max-width: 1400px;
    margin: 20px auto 60px;
}

    .projects-page h1 {
        text-align: center;
        margin-bottom: 50px;
        font-size: 42px;
        font-weight: 700;
    }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(340px,1fr));
    gap: 35px;
}

.project-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: .35s;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

    .project-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 45px rgba(0,0,0,.18);
    }

    .project-card img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        transition: .45s;
    }

    .project-card:hover img {
        transform: scale(1.08);
    }

.project-content {
    padding: 22px;
    transition: .35s;
}

.project-card:hover .project-content {
    transform: translateY(-4px);
}

.project-content h2 {
    margin-bottom: 10px;
    font-size: 26px;
}

.project-content span {
    color: #777;
    font-size: 15px;
}

.project-content p {
    margin-top: 18px;
    line-height: 1.9;
    color: #444;
}



/* ===========================
        MODAL
   (کلاس‌ها با پیشوند pm- تا با
    .modal-content / .modal-body
    و... بوت‌استرپ تداخل نکنه)
=========================== */

.project-modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 9999;
}

    .project-modal.show {
        opacity: 1;
        visibility: visible;
    }

.pm-content {
    width: min(1200px,92vw);
    height: 80vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 70% 30%;
    grid-template-rows: 100%;
    position: relative;
    transform: scale(.92);
    transition: .35s;
}

.project-modal.show .pm-content {
    transform: scale(1);
}

.pm-image {
    width: 100%;
    height: 100%;
}

    .pm-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.pm-info {
    height: 100%;
    box-sizing: border-box;
    padding: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;
}

    .pm-info h2 {
        margin: 0;
        font-size: 40px;
    }

    .pm-info h4 {
        margin: 20px 0;
        color: #888;
        font-weight: 400;
    }

    .pm-info p {
        line-height: 2.1;
        color: #555;
    }

.close-modal {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: .25s;
}

    .close-modal:hover {
        transform: rotate(90deg);
    }



/* ===========================
      Responsive
=========================== */

@media(max-width:900px) {

    .pm-content {
        width: 95vw;
        height: auto;
        display: block;
    }

    .pm-image {
        height: 350px;
    }

    .pm-info {
        width: 100%;
        padding: 30px;
    }
}
