.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px
}

.portfolio-item-outer {
    position: relative;
    flex: 0 0 calc((100% - 28px) / 3) !important;
    max-width: calc((100% - 28px) / 3);
    padding: 5px;
    border-radius: 24px;
    overflow: hidden;
    background: rgb(255 255 255 / .07);
    border: 1px solid #fff0;
    backdrop-filter: blur(15px)
}

.portfolio-item-outer:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    padding: 1px;
    border-radius: 24px;
    background: linear-gradient(90deg, rgb(94 211 224) 0%, rgb(94 211 224 / .1) 30%, rgb(94 211 224 / .1) 70%, rgb(94 211 224) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude
}

.portfolio-item {
    position: relative;
    min-height: 300px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center
}

.portfolio-details {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    color: #fff;
    opacity: 0;
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(4px);
    background: radial-gradient(50% 50% at 50% 50%, rgb(41 187 255 / .49) 0%, rgb(0 149 218 / .49) 34.13%, rgb(0 90 171 / .49) 100%);
    transition: opacity 0.3s ease
}

.portfolio-item:hover .portfolio-details {
    opacity: 1
}

.portfolio-title {
    margin: 0;
    color: var(--e-global-color-secondary);
    font-family: var(--e-global-typography-9603e03-font-family);
    font-size: var(--e-global-typography-9603e03-font-size);
    font-weight: var(--e-global-typography-9603e03-font-weight);
    line-height: 34px
}

.view-details {
    margin: 0;
    font-family: var(--e-global-typography-accent-font-family);
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    text-transform: var(--e-global-typography-accent-text-transform);
    line-height: var(--e-global-typography-accent-line-height)
}

.portfolio-popup {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(0 0 0 / .8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease
}

.portfolio-popup.active {
    opacity: 1;
    visibility: visible
}

.popup-content {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    padding: 30px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--e-global-color-2958132)
}

.popup-content:before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 760px;
    height: 300px;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    filter: blur(132px);
    background: radial-gradient(50% 50% at 50% 50%, rgb(41 187 255 / .49) 0%, rgb(0 149 218 / .49) 34.13%, rgb(0 90 171 / .49) 100%)
}

.popup-content #popup-title {
    margin: 0 0 14px 0;
    color: var(--e-global-color-secondary);
    font-family: var(--e-global-typography-primary-font-family);
    font-size: var(--e-global-typography-secondary-font-size);
    font-weight: var(--e-global-typography-secondary-font-weight);
    line-height: 40px;
    z-index: 9
}

.popup-btn {
    display: block;
    margin-top: 15px;
    padding: 12px 24px;
    border-radius: 360px;
    text-decoration: none;
    background: var(--e-global-color-accent);
    color: var(--e-global-color-primary);
    z-index: 9
}

.popup-btn:hover {
    background: var(--e-global-color-text)
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    background: var(--e-global-color-accent)
}

.portfolio-popup .popup-close {
    padding: 0 !important;
    font-size: 28px !important;
    color: var(--e-global-color-primary) !important;
    border-color: var(--e-global-color-accent);
    width: 35px
}

.portfolio-popup .popup-close:hover {
    background-color: var(--e-global-color-secondary);
    color: var(--e-global-color-2958132);
    border-color: var(--e-global-color-secondary)
}

.swiper-wrapper {
    max-height: 450px
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center
}

.swiper-slide img {
    width: auto;
    height: 100% !important;
    max-height: 450px;
    border-radius: 12px !important;
    object-fit: contain
}

.portfolio-popup .swiper-controls .swiper-button-prev,
.portfolio-popup .swiper-controls .swiper-button-next {
    padding: 20px !important;
    border: none;
    height: unset
}

.portfolio-popup .swiper-controls .swiper-button-prev:after,
.portfolio-popup .swiper-controls .swiper-button-next:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center
}

.portfolio-popup .swiper-controls .swiper-button-prev:after {
    background-image: url(/wp-content/uploads/2025/11/left-arrow-icon.svg)
}

.portfolio-popup .swiper-controls .swiper-button-next:after {
    background-image: url(/wp-content/uploads/2025/11/right-arrow-icon.svg)
}

.portfolio-popup .swiper-pagination {
    position: unset
}

.portfolio-popup .swiper-pagination-bullet {
    background: var(--e-global-color-text);
    opacity: 1;
    width: 10px;
    height: 10px
}

.portfolio-popup .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: var(--e-global-color-accent)
}

.portfolio-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px
}

.portfolio-actions .load-more-btn {
    border: none
}