/* Minification failed. Returning unminified contents.
(11,18): run-time error CSS1039: Token not allowed after unary operator: '-margin-80px'
(12,21): run-time error CSS1039: Token not allowed after unary operator: '-base-padding-x'
(69,21): run-time error CSS1039: Token not allowed after unary operator: '-primary-color'
(92,26): run-time error CSS1039: Token not allowed after unary operator: '-tertiary-color'
(96,21): run-time error CSS1039: Token not allowed after unary operator: '-white-color'
(158,22): run-time error CSS1039: Token not allowed after unary operator: '-margin-40px'
(159,21): run-time error CSS1039: Token not allowed after unary operator: '-base-padding-x'
(197,17): run-time error CSS1039: Token not allowed after unary operator: '-tertiary-color'
(578,22): run-time error CSS1039: Token not allowed after unary operator: '-margin-40px'
 */
/* Portfolio / case study layout */

/* Portfolio listing */

#portfolio {
    display: flex;
    flex-direction: column;
    position: relative;
    height: calc(100vh - 20%) !important;
    justify-content: space-between;
    margin: var(--margin-80px) 0;
    padding: 0 var(--base-padding-x);
}

    #portfolio .title {
        display: flex;
        flex-direction: column;
    }

        #portfolio .title > div {
            align-self: flex-end;
            width: 50%;
        }

#portfolio-wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 6vh;
}

#portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    height: 50vh;
    overflow: hidden;
}

.portfolio-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    height: 50vh;
    opacity: 0;
    z-index: 1;
    width: 100%;
    left: 0;
    top: 0;
}

    .portfolio-item .left {
        display: flex;
        flex-direction: column;
        row-gap: 1rem;
        width: 50%;
        padding-right: 9vw;
        height: 100%;
        justify-content: space-between;
    }

    .portfolio-item .right {
        width: 50%;
        height: 100%;
    }

    .portfolio-item .left .buttonSecondary {
        color: var(--primary-color);
        margin-top: 2rem;
    }

    .portfolio-item .right img {
        border-radius: 1.5rem;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.left-top {
    display: flex;
    flex-direction: column;
    row-gap: 1.5vw;
}

.item-tags {
    display: flex;
    column-gap: .5rem;
}

    .item-tags span {
        background: var(--tertiary-color);
        padding: .25rem .5rem;
        font-size: clamp(10px, 1vw, 14px);
        border-radius: 1rem;
        color: var(--white-color);
    }

.item-button,
.item-paragraph,
.item-title {
    display: flex;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s, transform .5s;
}

.item-button {
    position: relative;
    z-index: 10;
}

.item-image {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1s;
}

.active-portfolio {
    z-index: 12;
}

.clip-div {
    z-index: 1;
    width: 100%;
    left: 0;
    top: 0;
    overflow: hidden;
}

.clip-img {
    z-index: 1;
    width: 100%;
    left: 0;
    top: 0;
    position: absolute;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path .2s ease-out;
}

.active .clip-img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: 2px 2px 16px 0 rgba(5,32,41,.4);
}

.active .buttonSecondary {
    visibility: visible;
}


/* Case study */

.case {
    display: flex;
    column-gap: 3vw;
    margin-top: var(--margin-40px);
    padding: 0 var(--base-padding-x);
}

.case-left {
    width: 33.33%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.case-right {
    width: 66.67%;
}

.case-left img {
    object-fit: contain;
}

.case-right img {
    object-fit: cover;
}

.case img {
    width: 100%;
    border-radius: 1rem;
}

.case-right p {
    font-size: clamp(14px, 1vw, 20px);
    margin-bottom: 1.5rem;
}

.case-right h4 {
    font-size: clamp(14px, 1.5vw, 20px);
    margin-top: 1rem;
}

.case-right h5 {
    color: var(--tertiary-color);
    margin-bottom: 1.5rem;
}

.case .italic {
    margin-bottom: 0;
}


/* Case authors */

.case-author {
    display: flex;
    column-gap: 1rem;
    align-items: center;
    align-self: flex-end;
}

    .case-author img {
        width: 4rem !important;
        height: 4rem;
        border-radius: 1rem;
    }

    .case-author .name {
        font-size: clamp(21px, 1.5vw, 21px);
    }

    .case-author p {
        font-size: max(14px, 12px);
        text-transform: none;
        font-family: Montserrat-Medium;
        font-weight: 400;
        letter-spacing: normal;
    }


/* Visual case rows */

.case-visual {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

    .case-visual .case-left,
    .case-visual .case-right {
        width: auto;
        align-self: center;
        min-width: 0;
    }

    .case-visual .case-left {
        display: flex;
        justify-content: center;
        align-items: center;
    }

.case-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.case-media-desktop img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.case-media-phone {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .case-media-phone img {
        display: block;
        width: min(70%, 260px);
        max-width: 100%;
        height: auto;
    }

.case-full-image {
    display: block;
}

    .case-full-image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 14px;
    }

.case-visual + .case,
.case + .case-visual {
    margin-top: clamp(3rem, 6vw, 6rem);
}


/* Hero image for portfolio subpages */

#hero-image {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
}

    #hero-image img {
        display: block;
        width: 100%;
        height: auto;
    }


/* Xmaint case cover image */

.xm-case-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}


/* Header / subpage hero correction */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    z-index: 9999;
}

section#hero.subpage {
    padding-top: 80px;
}


/* Mobile */

@media only screen and (max-width: 767px) {
    #portfolio {
        height: 100vh !important;
    }

        #portfolio .title > div {
            width: 100%;
        }

    #portfolio-wrapper {
        row-gap: 4vh;
    }

    #portfolio-container {
        height: 80vh;
    }

    .portfolio-item {
        flex-wrap: wrap;
    }

        .portfolio-item .left {
            width: 100%;
            padding: 0;
            justify-content: start;
            height: 35vh;
        }

        .portfolio-item .right {
            width: 100%;
        }

            .portfolio-item .right img {
                max-height: 200px;
            }

    .case {
        flex-direction: column;
        row-gap: 2rem;
    }

    .case-left,
    .case-right {
        width: 100%;
    }

    .case-visual {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

        .case-visual .case-left,
        .case-visual .case-right {
            width: 100%;
        }

    .case-media-desktop img,
    .case-media-phone img {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
}


/* Tablet portrait */

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    #portfolio {
        height: 100% !important;
    }

    #portfolio-container {
        height: 80vh;
    }

    #portfolio .title > div {
        align-self: flex-start;
    }

    .portfolio-item {
        flex-wrap: wrap;
        row-gap: 9vh;
    }

        .portfolio-item .left,
        .portfolio-item .right {
            width: 100%;
            padding-right: 0;
        }

        .portfolio-item .left {
            height: auto;
        }
}



/* Xmaint case study - controlled visual rows */

.xm-visual-row {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

.xm-visual-left {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.xm-visual-right {
    min-width: 0;
}

.xm-visual-desktop {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 14px;
}

.xm-visual-phone {
    display: block;
    width: min(65%, 240px);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

@media only screen and (max-width: 767px) {
    .xm-visual-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .xm-visual-desktop,
    .xm-visual-phone {
        width: 100%;
        max-width: 100%;
    }
}

/* Xmaint visual rows - isolated, overrides generic .case layout */

.case.xm-visual-row {
    display: grid;
    grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

    .case.xm-visual-row .case-left,
    .case.xm-visual-row .case-right {
        width: auto;
        min-width: 0;
    }

    .case.xm-visual-row .xm-visual-left {
        display: flex;
        justify-content: flex-end;        
        align-items: flex-start;
        padding-top: 0.5rem;
    }

    .case.xm-visual-row .xm-visual-right {
        display: block;
    }

    .case.xm-visual-row .xm-visual-desktop {
        display: block;
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 1.5rem;
    }

    .case.xm-visual-row .xm-visual-phone {
        display: block;
        width: min(80%, 340px);
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

@media only screen and (max-width: 767px) {
    .case.xm-visual-row {
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

        .case.xm-visual-row .xm-visual-left {
            justify-content: center;
        }

        .case.xm-visual-row .xm-visual-desktop,
        .case.xm-visual-row .xm-visual-phone {
            width: 100%;
            max-width: 100%;
        }
}

.case.xm-visual-row .xm-visual-desktop {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 1.5rem;
}


.case.xm-visual-row {
    align-items: start;
}

    .case.xm-visual-row .xm-visual-left {
        align-items: flex-start;
        padding-top: 0.5rem;
    }

/* Centered visual block (like your reference image) */
.xm-centered-visual {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    margin-top: var(--margin-40px);
}

    .xm-centered-visual picture {
        width: 100%;
        max-width: 1440px;
    }

    .xm-centered-visual img {
        width: 100%;
        height: auto;
        border-radius: 18px;
        display: block;
    }

.hero-wrapper--full {
    display: block !important; /* kills flex */
    width: 100%;
}

    .hero-wrapper--full .hero-left {
        width: 100% !important;
        max-width: 100%;
    }

    .hero-wrapper--full h1,
    .hero-wrapper--full p {
        max-width: none; /* VERY important */
    }

@media only screen and (max-width: 767px) {
    #hero.subpage {
        padding-top: 5px !important;
    }

        #hero.subpage .hero-container {
            padding-top: 5px !important;
            padding-bottom: 0 !important;
            margin-top: 0 !important;
        }

        #hero.subpage .hero-wrapper {
            margin-top: 0 !important;
            padding-top: 0 !important;
        }

        #hero.subpage .hero-left {
            margin-top: 0 !important;
            padding-top: 0 !important;
        }

        #hero.subpage h1 {
            margin-top: 0 !important;
        }
}
