.portfolio-1 {
    background-color: #f2f2f2;
    width: min(32%, 35vh);
    min-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1.2765;
    transform-origin: left;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px auto;
}

.portfolio-1:hover img,
.portfolio-1 img {
    transform: none !important;
    transition: none !important;
}

.portfolio-1 h5,
.portfolio-1:hover h5 {
    margin-bottom: inherit !important;
}

@media (max-width: 1023px) {
    .portfolio-1 {
        width: max(208px, 35%);
        height: auto;
        aspect-ratio: 1 / 1.35;
    }
}

.portfolio-1 a {
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
}

.portfolio-1 .content {
    overflow: hidden;
    background-color: #f2f2f2;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 30px 40px 48px;
}

.portfolio-1 .content strong {
    position: relative;
    z-index: 2;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    line-height: 1.38;
    letter-spacing: -0.06px;
    text-align: center;
    white-space: nowrap;
    margin: 0;
}

.portfolio-1 .content figure {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    clip-path: circle(25%);
    transition: clip-path 0.8s cubic-bezier(0.39, 0.575, 0.565, 1);
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-1 .content figure img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
    padding: 20px;
}

.portfolio-1 .content span{
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    line-height: 1.4;
    letter-spacing: -0.02px;
    text-align: center;
}

.btn-point {
    display: none;
}

@media (hover: hover) {
    .btn-point {
        display: block;
        opacity: 1;
        visibility: visible;
        position: absolute;
        bottom: 0;
        right: 0;
        z-index: 2;
        width: 70px;
        height: 70px;
    }

    .btn-point span:nth-child(1) {
        position: absolute;
        bottom: -70px;
        right: -70px;
        width: 70px;
        height: 70px;
        background: #fff;
        border-radius: 50% 0 0 0;
        transition: bottom 0.7s cubic-bezier(0.785, 0.135, 0.15, 0.86), 
                   right 0.7s cubic-bezier(0.785, 0.135, 0.15, 0.86), 
                   transform 0.3s;
    }

    .btn-point span:nth-child(1)::before {
        content: "";
        position: absolute;
        bottom: 0;
        left: -40px;
        width: 40px;
        height: 40px;
        border-right: 1px solid #fff;
        box-sizing: content-box;
        background: radial-gradient(circle at 0 0, transparent 71%, #fff 70%);
    }

    .btn-point span:nth-child(1)::after {
        content: "";
        position: absolute;
        top: -40px;
        right: 0;
        width: 40px;
        height: 40px;
        border-bottom: 1px solid #fff;
        box-sizing: content-box;
        background: radial-gradient(circle at 0 0, transparent 71%, #fff 70%);
    }

    .btn-point span:nth-child(2) {
        overflow: hidden;
        display: block;
        position: absolute;
        bottom: 0;
        right: 0;
        width: 60px;
        height: 60px;
        transform: scale(0);
        transform-origin: right bottom;
        transition: transform 0.6s cubic-bezier(0.785, 0.135, 0.15, 0.86);
    }

    .btn-point span:nth-child(2)::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: #5519E6;
    }

    .btn-point span:nth-child(2)::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('/sites/default/files/2025-09/Taevas_White_Down_Arrow_48_48.webp') no-repeat center;
        background-size: 20px 20px;
    }

    .btn-point span {
        --velocity: 0.8;
    }

    .portfolio-1:hover .btn-point span:nth-child(1) {
        bottom: 0;
        right: 0;
        transition: bottom calc(0.7s * var(--velocity)) cubic-bezier(0.785, 0.135, 0.15, 0.86), 
                   right calc(0.7s * var(--velocity)) cubic-bezier(0.785, 0.135, 0.15, 0.86), 
                   transform 0.3s;
        animation: icon-btn-ani calc(1.4s * var(--velocity)) calc(0s * var(--velocity)) both ease-out;
        transform-origin: right bottom;
    }

    .portfolio-1:hover .btn-point span:nth-child(2) {
        overflow: visible;
        transform: scale(1);
        transition: transform calc(0.7s * var(--velocity)) calc(0.05s * var(--velocity)) cubic-bezier(0.785, 0.135, 0.15, 0.86);
    }

    .portfolio-1:hover .btn-point span:nth-child(2)::before {
        animation: icon-btn-ani calc(1.35s * var(--velocity)) calc(0.05s * var(--velocity)) both ease-out;
        transform-origin: right bottom;
    }

    .portfolio-1:hover .btn-point span:nth-child(2)::after {
        animation: icon-btn-ani calc(1.35s * var(--velocity)) calc(0.05s * var(--velocity)) both ease-out;
        transform-origin: right bottom;
    }

    .portfolio-1:hover .content figure {
        clip-path: circle(100%);
    }
}

@keyframes icon-btn-ani {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 1023px) {
    .portfolio-1 .content {
        padding: 32px 20px;
    }
    
    .portfolio-1 .content strong {
        font-size: 20px;
        line-height: 1.5;
    }
    
    .portfolio-1 .content figure {
        clip-path: circle(25% at 50% 46%);
    }
    
    .portfolio-1 .content span{
        font-size: 13px;
    }
    
    .portfolio-1 .content br {
        display: none;
    }
}

@media (min-width: 1024px) {
    .portfolio-1 .content {
        min-height: 380px;
    }
}

.portfolio-1 {
    z-index: 1;
}

.portfolio-1:hover {
    z-index: 2;
}
