.portfolio {
    padding: 5rem 0;
    color: #fff;
}

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

.portfolio-item {
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 20px;
    background: #101010;
    border: 1px solid #1b1c1e;
    transition: 0.25s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}


.portfolio-image {
    margin-bottom: 15px;
}

.portfolio-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.portfolio-content {
    display: flex;
    flex-direction: column;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.portfolio-description {
    color: #bababa;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.portfolio-tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.portfolio-tag {
    background: #56565629;
    color: #fff;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
}

.portfolio-no-items {
    text-align: center;
    color: #666;
}

.portfolio .button-div {
    align-self: flex-start;
    margin-top: auto;
}

/* Popup */
#PortfolioVideoPopup {
    position: fixed;
    top: 0%;
    right: -100%;
    width: 80vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 0px;
    overflow: hidden;
    transition: .45s all;
}

#PortfolioVideoPopup.open {
    right: 0;
}

#PortfolioVideoPopup .video-popup-content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    padding: 15px;
    gap: 30px;
    display: flex;
    flex-direction: column;
}

#PortfolioVideoPopup .video-popup-content #videoFrame {
    width: 100%;
    height: 65%;
}

#PortfolioVideoPopup .video-popup-content .close-popup {
    position: absolute;
    height: 20px;
    width: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    top: 20px;
    z-index: 100;
    left: 20px;
    transform: rotateZ(45deg);
}

#PortfolioVideoPopup .video-popup-content .close-popup::before {
    content: "";
    width: 20px;
    height: 2px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateZ(90deg);
}

#PortfolioVideoPopup .video-popup-content .close-popup::after {
    content: "";
    width: 20px;
    height: 2px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateZ(0deg);
}

.video-details {
    color: #fff;
    width: 100%;
    height: auto;
}

#PortfolioVideoPopup .video-popup-content .video-description {
    color: #bababa;
    margin-bottom: 10px;
}

.video-tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.video-title {
    margin-bottom: 10px;
}

.video-tags li {
    background: #da4f4557;
    color: #fff;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
}


@media screen and (max-width: 900px) {
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }

    .portfolio-item {
        padding: 15px;
    }
    #PortfolioVideoPopup {
        width: 100%;
    }

    #PortfolioVideoPopup .video-popup-content #videoFrame{
        height: auto;
        width: 100%;
        padding-top: 60px;
    }
}