:root {
    --new-primary-color: #e153e6;
    --new-secondary-color: #F2B84C;
  }

/* PROJECTS */
#projects {
    padding: 2rem 0;
}

#projects .pastProjects {
    margin: 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr));
    flex-basis: 50%;
    grid-gap: 1rem;
    align-content: center;
}

@media screen and (max-width: 1250px) {
    #projects .pastProjects {
        margin: 2rem 1rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(40vw, 1fr));
        flex-basis: 50%;
        grid-gap: 1rem;
    }
}

@media screen and (max-width: 600px) {
    #projects .pastProjects {
        margin: 2rem 1rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80vw, 1fr));
        flex-basis: 50%;
        grid-gap: 1rem;
    }
}

#projects .pastProjects .projectContainer img {
    aspect-ratio: 4/3;
    object-fit: contain;
    width: 100%;
    height: auto; 
    max-height: 300px;
}

#projects .projectContainer {
    padding: 1rem;
    position: relative;
    /* max-height: 300px; */
    /* max-width: 300px; */
}
  
#projects .projectText {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0);
    color: white;
    visibility: hidden;
    -webkit-transition: visibility 0s, opacity 0.3s ease; 
    transition: visibility 0s, background 0.3s ease;
}

#projects .projectContainer:hover {
    cursor: pointer;
}

#projects .projectContainer:hover .projectText {
    width: 100%;
    padding: 8px 15px;
    visibility: visible;
    background: rgba(0, 0, 0, 0.7);
}


/* MODAL */
#projects .modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.75);
}

#projects .modalContent {
    color: #333;
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 2rem;
    border: 1px solid #888;
    width: 80%; 
}

#projects .modalContent ul {
    list-style-type: disc;
    margin-left: 30px;
    text-align: left;
}

#projects .modalContent a {
    color: blue;
}

#projects .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

#projects .close:hover,
#projects .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#projects .slideshowContainer {
    max-width: 100%;
    position: relative;
    margin: auto;
}

#projects .slide {
    display: none;
}

#projects .previous, #projects .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: #f4f4f4;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.1);
}

#projects .next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

#projects .previous {
    left: 0;
    border-radius: 3px 0 0 3px;
}

#projects .previous:hover, #projects .next:hover {
    background-color: rgba(0,0,0,0.8);
}

#projects .text {
    color: #333;
    font-size: 15px;
    padding: 8px 12px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

#projects .dots {
    margin: 1rem;
}

#projects .dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

#projects .active, #projects .dot:hover {
    background-color: #717171;
}

#projects .modalContent h2 {
    padding-top: 2rem;
}

#projects .modalContent img {
    max-height: 700px;
    object-fit: contain;
}

#projects .modalContent p {
    text-align: justify;
}

@media (max-width: 700px) {
    #projects .lead {
        margin-bottom: 1rem;
    }

    #projects .projectButtons div {
        margin-top: 1rem;
    }

    #projects .projectText {
        position: relative;
        width: 100%;
        padding: 8px 15px;
        visibility: visible;
        background: rgba(0, 0, 0, 0.7);
        transition: none;
    }

    #projects .slideshowContainer {
        display: none;
    }

    #projects .dots {
        display: none;
    }

    #projects .modalContent {
        margin: 15% auto; 
    }

    #projects .modalContent h2 {
        font-size: 25px;
    }
}