﻿.before-after {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
    height: auto;
    user-select: none;
    max-height: 540px;
}
.before-after-images {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
}
.before-after-images img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}
.after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}
.before-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
}
.before-after-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--background);
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
    transition: box-shadow 0.2s ease;
}
.before-after-slider:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.before-after-handle {
    backdrop-filter: blur(40px);
    background: rgba(248, 248, 248, 0.24);
    border: 2px solid var(--background);
    border-radius: 60px;
    width: 42px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: 50%;
    left: 50%;


    transform: translate(-50%, -50%);
    cursor: ew-resize;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.before-after-handle:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}
.before-after-handle::before,
.before-after-handle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--white);
    border-right: 2px solid var(--white);
}
.before-after-handle::before {
    transform: rotate(-135deg);
}
.before-after-handle::after {
    transform: rotate(45deg);
}
.before-after-label {
    position: absolute;
    bottom: 0;
    padding: 8px 16px;
    background: var(--background);
    font-size: 20px;
    z-index: 5;
    pointer-events: none;
}
.before-label {
    left: 0px;
    border-radius: 0 4px;
}
.after-label {
    right: 0px;
    border-radius: 4px 0;
}

.portfolio__nav{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: center;
}
.portfolio__nav .swiper-button-disabled{
    background: var(--white);
    color: var(--black);
    cursor: default;
}
.portfolio__prev{
    flex-direction: row-reverse;
    padding: 4px 12px 4px 56px;
}
.portfolio__prev svg {
    right: unset;
    left: 8px;
    transform: rotate(90deg);
}
.portfolio__bottom{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: flex-start;
}
.portfolio-item{
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.portfolio__content{
    padding: 24px;
    background: var(--white);
    border-radius: 4px;
}
.portfolio .border::before{
    margin: 24px 0;
}
.portfolio-item__work.border::before{
    margin-bottom: 8px;
}
.portfolio-item__work{
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.portfolio-options{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.portfolio-options__item{
    border-radius: 4px;
    padding: 24px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.portfolio-options__title{
    color: var(--blue-accent);
    margin-left: auto;
    text-transform: uppercase;
}
.portfolio-options__desc{
    font-family: var(--second-family);
}
.portfolio-text-mob{
    display: none;
}

@media all and (max-width: 1200px){
    .portfolio__nav{
        gap: 16px;
    }
    .portfolio__bottom{
        display: flex;
        flex-direction: column;
    }
    .portfolio-options{
        width: 100%;
        gap: 16px;
    }
    .portfolio-options__item{
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .before-after-handle {
        width: 42px;
        height: 42px;
    }
    .before-after-handle::before,
    .before-after-handle::after {
        width: 6px;
        height: 6px;
    }
    .portfolio-text-mob{
        display: block;
    }
    .portfolio-text-pc{
        display: none;
    }
    .portfolio__nav{
        gap: 8px;
    }
    .portfolio__content{
        padding: 16px;
    }
    .portfolio-options{
        display: flex;
        flex-direction: column;
    }
    .before-after-label{
        font-size: 16px;
        padding: 8px 12px;
    }
}
