:root{
    --primaryColor:#000000;
    --middleColor:#393E46;
    --helperColor:#954C2E;
    --lightHelper:#EAE4D5;
    --hrColor:rgb(222, 184, 135);
    --transparentColor:rgba(0, 0, 0, 0.699);
    --shadow:rgba(189, 188, 188, 0.514);
   /* --------------------------------- */
    --whatsappColor:#25D366;
    --white:#ffff;
    --blue: #1877F2;
    --green: #25D366;
    --gray:  #f8f8f8;
}
.portfolio{
    text-align: center;
    /* عملنا padding to make  */
    /* padding: 50px 20px; */
    /* background: */

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portfolio h1{
    color: var(--primaryColor);
    font-size: 2.5rem;
    width: fit-content;
    border-bottom: 4px solid var(--primaryColor);
    margin: 0px auto ;
}

.portfolio-grid {
    width: 80%;
    margin: auto;
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 5fr);
    gap: 50px;
}

.project {
    position: relative;
    width: 300px;
    height: fit-content;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project:hover {
    transform: scale(1.05);
}

.project img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.project div{
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    background:var(--transparentColor) ;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;   
    /* padding: 10px; */
}

.project h3,h4  {
    color: var(--white);
    margin: 0px;
    /* font-size: 18px; */
}

/* ---------------------------------------------------------- */
.modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    position: relative;
}
.modal img {
    width: 50%;
    border-radius: 10px;
}
.modal h2 {
    margin: 10px 0;
    color: var(--primaryColor);
}
.modal p {
    color: #666;
}
.modal a {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background: var(--helperColor);
    color: var(--primaryColor);
    text-decoration: none;
    border-radius: 5px;
}
.modal .close {
    position: absolute;
    top: -10px; 
    right: -3px;
    width: 30px;
    height: 30px;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #000;
    border-radius: 50%;
    background: white;
    color: black;
    /* display: flex; */
    /* align-items: center;
    justify-content: center; */
    align-content: center;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.3s;
}

/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
@media (max-width:600px){
    .portfolio-grid{
        grid-template-columns: repeat(1, 5fr);
        gap: 50px;
    }
}

@media screen and (min-width: 601px) and (max-width: 800px){
    .portfolio-grid{
        grid-template-columns: repeat(2, 3fr);
        gap: 30px;
    }
}

@media screen and (min-width: 801px) and (max-width: 870px){
    .portfolio-grid{
        grid-template-columns: repeat(2, 3fr);
        gap: 50px;
    }
}

@media screen and (min-width:871px) and (max-width: 970px){

    .portfolio-grid{
        width:98%;
        
        grid-template-columns: repeat(2, 1fr);
        gap: 90px;
    }
}

@media screen and (min-width: 971px) and (max-width: 1200px){
    .portfolio-grid{
        grid-template-columns: repeat(3, 3fr);
        gap: 20px;
    }

    
}

@media screen and (min-width: 1201px) and (max-width: 1404px){
    .portfolio-grid{
        grid-template-columns: repeat(4, 3fr);
        gap: 30px;
    }
}