.projects{
    background-color: rgba(0,0,0,0.03);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.projects-main-container{
    padding: 100px 10px;
    width: 100%;
    max-width: 1124px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.projects-animation{
    display: block;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
}
.wrapper {
    padding-top: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    height: 400px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: start;
}

.card {
    width: 80px;
    border-radius: .75rem;
    background-size: cover;
    cursor: pointer;
    overflow: hidden;
    border-radius: 2rem;
    margin: 0 10px;
    display: flex;
    align-items: flex-end;
    transition: .6s cubic-bezier(.28,-0.03,0,.99);
    box-shadow: 0px 5px 15px -3px rgba(0,0,0,0.6);
}

.card > .row {
    color: white;
    display: flex;
    flex-wrap: nowrap;
}

.card > .row > .icon {
    background: #223;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: flex-end;
    margin: 15px;
}

.card > .row > .description {
    display: flex;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    max-height: 9em;
    width: 520px;
    opacity: 0;
    transform: translateY(30px);
    transition-delay: .3s;
    transition: all .3s ease;
    background-color: rgba(0,0,0,0.5);
    border-top-left-radius: 20px;
    padding: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5; 
    -webkit-box-orient: vertical;
}

.description p {
    color: white;
    padding-top: 5px;
}
.dates-media{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 25px;
}
.project-dates{
    font-weight: 600;
    font-style: italic;
}
.description h4 {
    color: rgb(255, 234, 0);
    text-transform: uppercase;
}
input {
    display: none;
}

input:checked + label {
    width: 600px;
}

input:checked + label .description {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
@media screen and (max-width: 436px) {
    .dates-media{
        display: flex;
        flex-direction: column;
        gap: 1px;
    }
}

/* For tablets and mobile devices */
@media screen and (max-width: 1024px) {
    .wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        height: auto;
        flex-wrap: nowrap;
        flex-direction: column;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0;
        gap: 10px;
    }
    .card {
        height: 60px;
        min-width: 300px;
        width: 90vw;
        flex: 0 0 auto;
        scroll-snap-align: start;
        margin: 0 10px;
        transition: none;
    }

    input:checked + label {
        width: 90vw; /* keep width flexible */
        height: 300px;
    }

    input:checked + label .description {
        opacity: 1;
        transform: translateY(0);
        width: 100%;
        border-top-right-radius: 20px;
    }

    .card > .row > .description {
        max-height: 12rem;
        width: 100%;
        font-size: 12px;
        border-top-right-radius: 20px;
    }
    .card > .row > .icon {
        width: 30px;
        height: 26px;
        font-size: 12px;
        border-radius: 50%;
    }
}
