:root{
    --primaryColor:black;
    --middleColor:#444444;
    --helperColor:#ce000c;
    --lightHelper:#FDFBEE;
    --hrColor:rgb(222, 184, 135);
    --transparentColor:#00d0848f;
    --shadow:rgba(189, 188, 188, 0.514);
    --text-header: #b1b1b1;
   /* --------------------------------- */
    --whatsappColor:#25D366;
    --white:#ffff;
    --blue: #1877F2;
    --green: #25D366;
    --gray:  #f8f8f8;
}


.portfolio{
    text-align: center;
    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, 7fr);
    gap: 50px;
}

.project {
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #fff;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
}

.project:hover {
    transform: scale(1.05);
}

.project img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.project a{
    text-decoration: none;
}
.project-text {
    padding: 10px;
    background-color: #1f2937; /* لون غامق للنص */
    color: #fff;
    border-radius: 0 0 10px 10px;
    text-align: center;
}

.project-text h3, .project-text h4 {
    margin: 5px 0;
}


/* ---------------------------------------------------------- */
.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(--middleColor);
    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;
    }
}