.container-all-port {
    margin: 0 auto;
    width: max(1500px, 75vw);
    font-family: "Cormorant SC", serif;
    opacity: 0;
    transform: translateY(15px);
    animation: slideUp .5s ease-out forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio {
    position: relative;
    width: 100%;
    padding-bottom: 50px;
}

.portfolio figure {
    margin: 0 0 40px 0;
    width: 100%;
}
.portfolio figure.new{
    animation: fadeUp 0.5s ease-out forwards;
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);}
    to {
        opacity: 1;
        transform: translateY(0);}
}

.portfolio figcaption {
    display: none;
}

.portfolio img {
    width: 100%;
    height: auto;
    transition: all .25s ease-in-out;
    display: block;
}
.portfolio img:hover {
    scale: 1.05;
}



.lightbox {
    display: none;
    position: fixed;
    margin: 0 auto;
    top: 50%;
    left: 50%;
    background-color: #101011;
    z-index: 1000;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    border: 3px solid #323232;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease-in-out;
}

.lightbox-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px;
    z-index: 2;
    transition: max-width 0.4s ease-in-out, max-height 0.4s ease-in-out;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox.show {
    display: block;
}

.lightbox img {
    max-width: 60vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
}

.lightbox-inner.long-layout {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.lightbox img.long {
    max-width: calc(90vw - 160px);
    max-height: 70vh;
}

.container-all-port.blurred {
    filter: blur(4px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

.lightbox .caption-text h3 {
    font-size: clamp(1.8rem, 5vw, 36px);
    margin: 0;
    padding: 0;
    padding-bottom: 20px;
}

.lightbox-inner.long-layout .caption-text h3 {
    font-size: clamp(1.8rem, 5vw, 36px);
    margin: 50px 0 0 0;
    padding: 0;
    padding-bottom: 20px;
}


.caption {
    position: absolute;
    width: .5vw;
    aspect-ratio: 1 / 1;
    top: 50%;
    right: calc(-50px - 12px);
    transform: translateY(-50%);
    margin-right: 20px;
    border-radius: 50%;
    background-color: #ffff;
    opacity: 0;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, opacity 1s ease;
}

.caption.visible {
    opacity: 1;
}

.caption:hover {
    transform: translateY(-50%) scale(1.3);
}

.caption.elongate {
    transform: translateY(-50%) scaleY(6);
    border-radius: 2px;
}

.caption.hidden {
    display: none;
}

.lightbox-inner.caption-expanded:not(.long-layout) {
    max-width: 98vw;
    gap: 50px;
    padding: 80px 40px;
}

.lightbox-inner.long-layout .caption {
    right: auto;
    top: auto;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    margin-right: 0;
    margin-bottom: 0;
    transition: transform 0.3s ease-in-out, opacity 1s ease;
}

.lightbox-inner.long-layout .caption:hover {
    transform: translateX(-50%) scale(1.3);
}

.caption-text {
    max-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    color: white;
    transition: max-width .8s ease-in-out, max-height .8s ease-in-out, opacity 0.5s ease-in-out 0.2s;
}
    .caption-text p{
        text-align: justify;
    }

.caption-text.show {
    max-width: 1000px;
    overflow: visible;
    opacity: 1;
}

.lightbox-inner.long-layout .caption-text.show {
    max-width: calc(80vw - 160px);
    max-height: none;
    overflow: visible;
    margin-top: 20px;
    opacity: 1;
}

.lightbox-inner.caption-expanded {
    overflow-y: auto;
    max-width: 98vw;
}

.lightbox-inner.long-layout .caption-text {
    text-align: center;
    width: 100%;
    margin-top: 0;
}

.lightbox-inner.long-layout.caption-expanded {
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.lightbox-inner.long-layout.caption-expanded::-webkit-scrollbar {
    width: 2px;
}

.lightbox-inner.long-layout.caption-expanded::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.lightbox-inner.long-layout.caption-expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}