.contentElements {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.filterBar {
    width: 100%;
    position: -webkit-sticky;
    position: static;
    top: 0;
    background-color: white;
    z-index: 10;
    -webkit-transition: 0.5s;
    transition: 0.5s;
}

.dark .filterBar {
    background-color: #001c31;
}

.filter {
    width: 50%;
    margin: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 20px;
    padding-top: 0;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    font-family: 'kanit_r';
    font-size: 1rem;
}

.filter li {
    padding: 5px;
    list-style: none;
    position: relative;
    cursor: pointer;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    color: black;
}

.dark .filter li {
    color: white;
}

.filter li.active {
    color: var(--rojo);
}

#worksList {
    width: 100%;
}

#top {
    width: 0;
    height: 0;
}

.work {
    width: 100%;
    position: relative;
    margin-bottom: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    cursor: pointer;
    -webkit-transition: 0.6s;
    transition: 0.6s;
}

.work .video {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 300;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    -webkit-transition: 0.6s;
    transition: 0.6s;
}

.work.fullscreen .video {
    visibility: visible;
    opacity: 1;
    background-color: black;
}

.work .video video {
    display: none;
}

.work.fullscreen .video video {
    display: block;
    width: 100%;
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    max-height: 100%;
    max-height: 100vh;
    max-height: calc(var(--vh, 1vh) * 100);
}

.work .video img {
    width: 30px;
    position: absolute;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    top: 15px;
    right: 15px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    -webkit-filter: invert();
    filter: invert();
    cursor: pointer;
}

.work .video img:hover {
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.work .thumbnail {
    /*width: 90%;*/
    height: 450px;
}

.videoTextContainer {
    position: absolute;
    width: 30%;
    height: 25%;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 0;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    border: 2px solid transparent;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.videoTextContainer.active {
    background: rgba(0, 0, 0, 0.7);
    width: 65%;
    height: 65%;
}

.videoTextContainer::before,
.videoTextContainer::after,
.videoText::before,
.videoText::after {
    display: block;
    content: "";
    width: 3vw;
    height: 3vw;
    position: absolute;
}

.videoTextContainer::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid white;
    border-left: 1px solid white;
    -webkit-transition: 0.5s all;
    transition: 0.5s all;
}

.videoTextContainer::after {
    top: -1px;
    right: -1px;
    border-top: 1px solid white;
    border-right: 1px solid white;
    -webkit-transition: 0.5s all;
    transition: 0.5s all;
}

.videoText::before {
    bottom: -1px;
    left: -1px;
    border-bottom: 1px solid white;
    border-left: 1px solid white;
    -webkit-transition: 0.5s all;
    transition: 0.5s all;
}

.videoText::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid white;
    border-right: 1px solid white;
    -webkit-transition: 0.5s all;
    transition: 0.5s all;
}


.videoTextContainer:hover::before,
.videoTextContainer:hover::after {
    width: 70%;
    height: 70%;
}

.videoTextContainer:hover .videoText::before,
.videoTextContainer:hover .videoText::after {
    width: 70%;
    height: 70%;
}

.videoTextContainer.active::before,
.videoTextContainer.active::after,
.videoTextContainer.active .videoText::before,
.videoTextContainer.active .videoText::after {
    width: 0px;
    height: 0px;
    opacity: 0;
}

.videoText {
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.scroll {
    overflow: auto;
    height: 170px;
    display: none;
}

.scroll::-webkit-scrollbar {
    display: none;
}

.scroll {
    -ms-overflow-style: none;
}

.descriptionContainer {
    display: none;
}

.videoTextContainer.active .videoText,
.videoTextContainer.active .descriptionContainer,
.videoTextContainer.active .scroll {
    display: block;
}

.videoTextContainer.active .videoText p {
    float: left;
    width: 40%;
    padding: 5%;
}

.videoTitle {
    margin-bottom: 5px;
    font-family: 'kanit_r', sans-serif;
    font-size: 1.3rem;
    text-align: center;
}

.videoTextContainer.active .videoTitle {
    font-size: 1.75rem;
    height: 50px;
    margin: 0;
    opacity: 0;
    text-align: start;
    padding-bottom: 2.5% !important;
    -webkit-animation: appear 0.4s 0.2s forwards;
    animation: appear 0.4s 0.2s forwards;
    margin-bottom: 8px;
    line-height: 1.8rem;
}

.videoSubtitle {
    font-family: 'kanit_li', sans-serif;
    font-style: italic;
    font-size: 0.9rem;
}

.videoTextContainer.active .videoSubtitle {
    text-align: end;
    opacity: 0;
    font-size: 1.1rem;
    height: 50px;
    padding-bottom: 2.5% !important;
    -webkit-animation: appear 0.4s 0.2s forwards;
    animation: appear 0.4s 0.2s forwards;
    margin-top: 8px;
}

.videoDescription {
    font-family: 'kanit_l', sans-serif;
    font-size: 0.9rem;
    width: 55% !important;
    padding-top: 2.5% !important;
    opacity: 0;
}

.videoTextContainer.active .videoDescription {
    display: block;
    -webkit-animation: appear 0.4s 0.4s forwards;
    animation: appear 0.4s 0.4s forwards;
}

.videoCredits {
    font-family: 'kanit_l', sans-serif;
    font-size: 0.9rem;
    text-align: end;
    width: 25% !important;
    padding-top: 2.5% !important;
    opacity: 0;
}

.videoTextContainer.active .videoCredits {
    -webkit-animation: appear 0.4s 0.4s forwards;
    animation: appear 0.4s 0.4s forwards;
}

@-webkit-keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.workText {
    width: 100%;
    margin-top: 5vh;
    margin-bottom: 6vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.workText h1 {
    text-align: center;
    font-family: 'kanit_m', sans-serif;
    font-size: 1rem;
}

.closeDescription,
.playButton {
    display: none;
}


@media (max-width: 1024px) {
    .filter {
        width: 60%;
        font-size: 1.3rem;
    }

    .videoTextContainer {
        width: 50%;
        height: 35%;
    }

    .videoTextContainer.active {
        width: 75%;
        height: 75%;
    }

    .videoTitle {
        font-size: 1.8rem;
    }

    .videoTextContainer.active .videoTitle {
        height: 40px;
        font-size: 1.5rem;
    }

    .videoSubtitle {
        font-size: 1.3rem;
    }

    .videoTextContainer.active .videoSubtitle {
        height: 40px;
    }

    .videoDescription,
    .videoCredits {
        font-size: 0.9rem;
    }

    .videoTextContainer:hover::before,
    .videoTextContainer:hover::after {
        width: 3vw;
        height: 3vw;
    }

    .videoTextContainer:hover .videoText::before,
    .videoTextContainer:hover .videoText::after {
        width: 3vw;
        height: 3vw;
    }

    .content .video img {
        visibility: visible !important;
        display: block !important;
        pointer-events: none;
    }

    .fullscreen .video img {
        pointer-events: all;
    }

    .workText h1 {
        font-size: 1.3rem;
    }

    .scroll {
        height: 150px;
    }
}

@media (max-width: 768px) {

    .filter {
        width: 60%;
        font-size: 1.1rem;
    }

    .videoTextContainer {
        width: 50%;
        height: 30%;
    }

    .descriptionContainer {
        height: 100px;
    }

    .videoDescription,
    .videoCredits {
        font-size: 0.9rem;
    }

    .scroll {
        height: 130px;
    }

    .videoTextContainer.active {
        width: 75%;
        height: 75%;
    }

    .videoTitle {
        font-size: 1.5rem;
    }

    .videoTextContainer.active .videoTitle {
        font-size: 1.6rem;
        width: 50% !important;
    }

    .videoSubtitle {
        font-size: 1.1rem;
    }

    .videoTextContainer.active .videoSubtitle {
        font-size: 1rem;
        width: 30% !important
    }

    .workText h1 {
        font-size: 1.1rem;
    }

    .work {
        margin-bottom: 30px;
    }
}

@media (max-width: 650px) {
    .filterBar {
        height: 120px;
    }

    .filter {
        width: 85%;
        margin-top: 70px;
    }

    .work {
        -webkit-transition: 0.3s;
        transition: 0.3s;
    }

    .work.big {
        overflow: hidden;
        -webkit-animation: grow 0.3s forwards;
        animation: grow 0.3s forwards;
    }

    @-webkit-keyframes grow {
        from {
            height: 56vw;
        }

        to {
            height: 580px;
        }
    }

    @keyframes grow {
        from {
            height: 56vw;
        }

        to {
            height: 580px;
        }
    }

    .work .thumbnail {
        -webkit-transition: 0.3s;
        transition: 0.3s;
    }

    .work.big .thumbnail {
        height: 100%;
        width: auto;
    }

    .videoTextContainer {
        width: 65%;
        height: 45%;
    }

    .videoTextContainer.active {
        width: 85%;
        height: 85%;
    }

    .videoText .scroll {
        display: none;
        height: -webkit-max-content;
        height: -moz-max-content;
        height: max-content;
        max-height: 200px;
    }

    .descriptionContainer {
        width: 100%;
        height: 280px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
    }

    .videoTextContainer.active .videoText .descriptionContainer {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }

    .videoTextContainer.active .videoText .scroll {
        display: block;
    }

    .videoTitle {
        font-size: 1.3rem;
        text-align: center;
    }

    .videoSubtitle {
        font-size: 1rem;
    }

    .videoTextContainer.active .videoText p {
        width: 90% !important;
        margin: 0;
    }

    .videoTextContainer.active p.videoTitle {
        font-size: 1.4rem;
        width: 78% !important;
        text-align: start;
        line-height: 1.4rem;
    }

    .videoTextContainer.active p.videoSubtitle {
        font-size: 0.9rem;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        text-align: start;
    }

    .videoDescription {
        -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
        order: 1;
    }

    .videoDescription,
    .videoCredits {
        font-size: 0.9rem;
        text-align: start;
    }

    .closeDescription {
        display: block !important;
        width: 20px;
        opacity: 0;
        position: absolute;
        -webkit-transform: rotate(45deg);
        transform: rotate(45deg);
        top: 15px;
        right: 15px;
        -webkit-transition: 0.3s;
        transition: 0.3s;
        -webkit-filter: invert();
        filter: invert();
        pointer-events: none;
    }

    .playButton {
        display: block !important;
        width: 50px;
        opacity: 0;
        position: absolute;
        bottom: 15px;
        right: 15px;
        -webkit-transition: 0.3s;
        transition: 0.3s;
        -webkit-filter: invert();
        filter: invert();
        pointer-events: none;
    }

    .videoTextContainer.active .closeDescription {
        opacity: 1;
        pointer-events: all;
    }

    .videoTextContainer.active .playButton {
        opacity: 1;
        pointer-events: all;
    }

    .workText h1 {
        font-size: 1rem;
        margin-bottom: 80px;
        width: 90%;
    }

    .videoDescription.scroll {
        margin-top: 30px !important;
        height: 160px;
        padding-bottom: 10px !important;
    }
}


@media (max-width: 400px) {
    .filter {
        font-size: 1rem;
    }
}

.contGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.imgGrid {
    width: 100%;
}

.horizontal {
    grid-column: 2 span;
}

.borderHide {
    overflow: hidden;
}

.growImg {
    transform: scale(1.1);
}

.growImg2 {
    transform: scale(1.6);
}

.growImg3 {
    transform: scale(1.45);
    align-self: center;
}

.bgImg2 {
    background-image: url("../images/Proyecto1000.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    width: 100%;
    height: 100%;
}