
.portfolio {
    width: 1200px;
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.portfolio__title{
    font-family: 'Gilroy';
    font-style: normal;
    font-weight: 800;
    font-size: 36px;
    line-height: 44px;

    color: #FFFFFF;

    padding-top: 30px;
    padding-bottom: 20px;
}

.portfolio__list {
    width: 1170px;
    max-width: 100%;
}

.portfolio__item {
    width: 100%;
    max-width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);

    font-family: 'Gilroy';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 22px;
    color: #FFFFFF;
}

.portfolio__item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-item__inner > div,
.portfolio-item__head > div {
    width: 100%;
}

.portfolio-item__head {
    padding: 30px 0;
}

.portfolio__item:nth-child(odd) .portfolio-item__link-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
}

.portfolio__item:nth-child(even) .portfolio-item__link-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.portfolio-item__label {
    display: inline-block;
    width: auto;
    padding: 5px 23px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    border-radius: 5px;
}

.portfolio-item__label span {
    line-height: 23px;
    text-align: center;
}

.portfolio-item__link a {
    line-height: 19px;
    font-weight: 600;
    border-bottom: 1px solid #FFFFFF;
    transition: border-color 100ms linear;
}

.portfolio-item__link a:hover {
    cursor: pointer;
    border-color: transparent;
}

.portfolio__item:nth-child(odd) .portfolio-item__content {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.portfolio__item:nth-child(even) .portfolio-item__content {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.portfolio-item__project-description {
    width: 400px;
}

.portfolio__item:nth-child(odd) .portfolio-item__project-images {
    width: calc(100% - 440px);
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.portfolio__item:nth-child(odd) .portfolio-item__project-images .mobile-image {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.portfolio__item:nth-child(even) .portfolio-item__project-images {
    width: calc(100% - 440px);
    display: flex;
    justify-content: flex-start;
    position: relative;
}

.portfolio__item:nth-child(odd) .portfolio-item__project-images .desktop-image {
    position: relative; 
    right: -19px;
}

.portfolio__item:nth-child(even) .portfolio-item__project-images .desktop-image {
    position: relative; 
    left: -19px;
}


.portfolio__item .portfolio-item__project-images .mobile-image {
    width: 231px;
}

.portfolio__item:nth-child(odd) .portfolio-item__project-images .mobile-image {
    position: absolute;
    left: -40px; 
}

.portfolio__item:nth-child(even) .portfolio-item__project-images .mobile-image {
    position: absolute;
    right: -40px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
}

.portfolio-item__title {
    padding-top: 20px;
}

#kvint .portfolio-item__project-images .desktop-image {
    left: 0px;
}

/* Приходится использовать !important чтобы стили заголовка не перебивались стилями страницы, на которой подключается блок портфолио */
.portfolio-item__title h2 {
    font-weight: bold !important;
    font-size: 26px !important;
    line-height: 31px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.portfolio-item__project-about {
    padding-top: 20px;
}

.portfolio-item__project-goals {
    padding: 30px 0;
}

.portfolio-item__project-goals > h4 {
    font-weight: bold;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: normal;
}

.portfolio-item__project-goals > ul {
    padding-top: 20px;
    padding-left: 15px;
}

.portfolio-item__project-goals > ul > li {
    padding: 5px 0;
}

.portfolio-item__project-goals > ul > li > span {
    display: block;
    position: relative;
    padding-left: 24px;
}

.portfolio-item__project-goals > ul > li > span::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    top: 7px;
    left: 0;
    background: #FFFFFF;
    border-radius: 50%;
}

.portfolio-item__button {
    width: 230px;
    height: 40px;
    position: relative;
    text-align: center;
    transform-style: preserve-3d;
    transform-origin: center center;
}

@media only screen and (min-width: 1199px) {
    .portfolio-item__button span {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
        text-align: center;
        line-height: 40px;
        background: rgba(255, 255, 255, 0.05);
        transform-style: preserve-3d;
        backface-visibility: hidden;
        border-radius: 5px;
        transition: 700ms;
    }

    .portfolio-item__button:hover {
        cursor: pointer;
    }

    .portfolio-item__button span.front {
        transform: rotateX(0deg) translateZ(30px);
    }

    .portfolio-item__button:hover span.front {
        transform: rotateX(-180deg) translateZ(30px);
    }

    .portfolio-item__button span.back {
        transform: rotateX(-180deg) translateZ(30px);
    }

    .portfolio-item__button:hover span.back {
        transform: rotateX(0deg) translateZ(30px);
    }

    .portfolio-item__button span.center,
    .portfolio-item__button span.back {
        background: #E2BC79;
    }

    .portfolio-item__button:hover span.center {
        transform: rotateX(-180deg);
    }
}

.portfolio-item__footer {
    padding-top: 40px;
    padding-bottom: 50px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* хром, сафари */
.portfolio-item__footer::-webkit-scrollbar {
    width: 0;
}

/* ie 10+ */
.portfolio-item__footer {
    -ms-overflow-style: none;
}

.portfolio-item__stats-list {
    max-width: 1159px   ;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.portfolio-item__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;

    position: relative;
    padding-left: 65px;
    min-height: 50px;
}

.portfolio-item__stats::before {
    content: "";
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 0;
    left: 0;
    background-position: center center;
    background-repeat: no-repeat;
}

.portfolio-item__stats--year::before {
    background-image: url("/local/templates/reds_new/images/portfolio/icons/spaceship.svg");
}

.portfolio-item__stats--hours::before {
    background-image: url("/local/templates/reds_new/images/portfolio/icons/time.svg");
}

.portfolio-item__stats--time::before {
    background-image: url("/local/templates/reds_new/images/portfolio/icons/calendar.svg");
}

.portfolio-item__stats--developers::before {
    background-image: url("/local/templates/reds_new/images/portfolio/icons/developer.svg");
}

.portfolio-item__stats .value {
    font-weight: 900;
    font-style: normal;
    font-size: 48px;
    line-height: 59px;
    white-space: nowrap;

    letter-spacing: 0.03em;

    color: transparent;
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: #FFFFFF;
    -webkit-text-fill-color: transparent;

    margin-bottom: -9px;
}

.portfolio-item__stats .label {
    margin-bottom: -6px;
    white-space: nowrap;
}

.xs, .md {
    display: none;
}

/* ZCC - colors */

#zcc .portfolio-item__link a{
    color: #E2BC79;
    border-bottom-color: #E2BC79;
}

#zcc .portfolio-item__button span.center, #zcc .portfolio-item__button span.back {
    background: #E2BC79;
}

#zcc .portfolio-item__stats .value{
    -webkit-text-stroke-color: #E2BC79;
}

/* RTC - colors */

#rtc .portfolio-item__link a{
    color: #87B757;
    border-bottom-color: #87B757;
}

#rtc .portfolio-item__button span.center, #rtc .portfolio-item__button span.back {
    background: #87B757;
}

#rtc .portfolio-item__stats .value{
    -webkit-text-stroke-color: #87B757;
}

/* DELTA - colors */

#delta .portfolio-item__link a{
    color: #3FC0AA;
    border-bottom-color: #3FC0AA;
}

#delta .portfolio-item__button span.center, #delta .portfolio-item__button span.back {
    background: #3FC0AA;
}

#delta .portfolio-item__stats .value{
    -webkit-text-stroke-color: #3FC0AA;
}

/* SMONTA - colors */

#smonta .portfolio-item__link a{
    color: #fedd44;
    border-bottom-color: #fedd44;
}

#smonta .portfolio-item__button span.center, #smonta .portfolio-item__button span.back {
    background: #fedd44;
}

#smonta .portfolio-item__stats .value{
    -webkit-text-stroke-color: #fedd44;
}

#smonta .mobile-image {
    position: absolute; 
    left: -40px;
    width: 231px;
}

#smonta .desktop-image {
    position: relative; 
    right: -19px;
}

/* KVINT - colors */

#kvint .portfolio-item__link a{
    color: #0de9fd;
    border-bottom-color: #0de9fd;
}

#kvint .portfolio-item__button span.center, #kvint .portfolio-item__button span.back {
    background: #0de9fd;
}

#kvint .portfolio-item__stats .value{
    -webkit-text-stroke-color: #0de9fd;
}

/* PHO - colors */

#pho .portfolio-item__link a{
    color: #f15c24;
    border-bottom-color: #f15c24;
}

#pho .portfolio-item__button span.center, #pho .portfolio-item__button span.back {
    background: #f15c24;
}

#pho .portfolio-item__stats .value{
    -webkit-text-stroke-color: #f15c24;
}

/* JerusalemBazar - colors */

#jerusalem .portfolio-item__link a {
    color: #A899BB;
    border-bottom-color: #A899BB;
}

#jerusalem .portfolio-item__link {
    color: #A899BB;
    font-weight: 600;
}

#jerusalem .portfolio-item__button span.center, #jerusalem .portfolio-item__button span.back {
    background: #A899BB;
}

#jerusalem .portfolio-item__stats .value{
    -webkit-text-stroke-color: #A899BB;
}

#jerusalem .mobile-image {
    position: absolute; 
    left: -40px;
    width: 231px;
}

/* Sartale - colors */

#sartale .portfolio-item__link a {
    color: #597764;
    border-bottom-color: #597764;
}

#sartale .portfolio-item__link {
    color: #597764;
    font-weight: 600;
}

#sartale .portfolio-item__button span.center, #sartale .portfolio-item__button span.back {
    background: #597764;
}

#sartale .portfolio-item__stats .value{
    -webkit-text-stroke-color: #597764;
}


@media only screen and (max-width: 1199px) {

    #zcc .portfolio-item__button span {
        background: #E2BC79;
    }
    #rtc .portfolio-item__button span {
        background: #87B757;
    }
    #delta .portfolio-item__button span {
        background: #3FC0AA;
    }
    #smonta .portfolio-item__button span {
        background: #fedd44;
    }
    #kvint .portfolio-item__button span {
        background: #0de9fd;
    }
    #pho .portfolio-item__button span {
        background: #f15c24;
    }
    #jerusalem .portfolio-item__button span {
        background: #A899BB;
    }
    #sartale .portfolio-item__button span {
        background: #597764;
    }

    .portfolio{
        width: 820px;
    }

    .portfolio__title{
        padding-top: 20px;
        font-size: 30px;
        line-height: 37px;
    }

    .no-md {
        display: none;
    }

    .md {
        display: block;
    }

    .portfolio-item__button .center,
    .portfolio-item__button .back{
        display: none;
    }

    .portfolio-item__button span {
        width: 100%;
        height: 100%;
        display: block;
        text-align: center;
        line-height: 40px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 5px;
        transition: 700ms;
    }

    .portfolio-item__link-wrapper {
        justify-content: space-between;
    }

    .portfolio__item:nth-child(odd) .portfolio-item__link-wrapper,
    .portfolio__item:nth-child(even) .portfolio-item__link-wrapper{
        justify-content: space-between;
        align-items: flex-start;
    }

    .portfolio__item:nth-child(odd) .portfolio-item__content,
    .portfolio__item:nth-child(even) .portfolio-item__content{
        flex-direction: column-reverse;
    }

    .portfolio__item:nth-child(odd) .portfolio-item__project-images,
    .portfolio__item:nth-child(even) .portfolio-item__project-images,
    .portfolio-item__project-description{
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
    }

    .portfolio__item:nth-child(odd) .portfolio-item__project-images .mobile-image,
    .portfolio__item:nth-child(even) .portfolio-item__project-images .mobile-image{
        right: 0;
        left: auto;
    }

    .portfolio-item__project-goals > ul{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .portfolio-item__project-goals > ul > li{
        width: 354px;
        max-width: calc(50% - 10px);
    }

    .portfolio-item__stats-list{
        width: 780px;
    }

    .portfolio-item__project-about {
        padding-top: 24px;
    }

    .portfolio-item__project-goals > ul{
        padding-top: 15px;
    }

    .portfolio-item__stats{
        padding-left: 60px;
    }

    .portfolio-item__stats .value{
        font-size: 36px;
        line-height: 44px;
        margin-bottom: -4px;
    }

    .portfolio-item__project-goals {
        padding: 30px 0 25px;
    }

    .portfolio-item__footer{
        padding-top: 0;
        padding-bottom: 33px;
    }

    .portfolio-item__button-wrapper {
        padding-bottom: 40px;
    }

    #smonta .mobile-image,
    #jerusalem .mobile-image,
    .portfolio__item:nth-child(odd) .portfolio-item__project-images .mobile-image,
    .portfolio__item:nth-child(even) .portfolio-item__project-images .mobile-image {
        left: auto;
        right: -20px;
    }

    #smonta .desktop-image,
    .portfolio__item:nth-child(odd) .portfolio-item__project-images .desktop-image,
    .portfolio__item:nth-child(even) .portfolio-item__project-images .desktop-image {
        position: relative;
        right: auto;
        left: -19px;
    }
}

@media only screen and (max-width: 767px) {
    .no-xs {
        display: none;
    }

    .xs {
        display: block;
    }

    .portfolio__title{
        font-size: 24px;
        line-height: 30px;
        padding-top: 20px;
        padding-bottom: 10px;
    }

    .portfolio__item:nth-child(odd) .portfolio-item__link-wrapper, .portfolio__item:nth-child(even) .portfolio-item__link-wrapper {
        justify-content: flex-start;
        align-items: center;
    }

    .portfolio-item__link{
        margin-top: -5px;
        margin-left: 20px;
    }

    .portfolio-item__label{
        padding: 5px 19px;
    }

    .portfolio-item__label span{
        font-size: 14px;
        line-height: 19px;
    }

    .portfolio-item__title {
        padding-top: 15px;
    }

    .portfolio-item__title h2 {
        font-weight: bold !important;
        font-size: 20px !important;
        line-height: 24px !important;
    }

    .portfolio-item__head {
        padding: 30px 0 20px;
    }

    .portfolio-item__project-about {
        padding-top: 14px;
    }

    .portfolio-item__footer {
        padding-top: 20px;
        padding-bottom: 30px;
    }

    .portfolio-item__stats-list {
        justify-content: flex-start;
        width: 100%;
    }

    .portfolio-item__stats {
        padding-left: 50px;
    }

    .portfolio-item__stats:not(:first-child) {
        margin-left: 60px;
    }

    .portfolio-item__stats::before {
        width: 40px;
        height: 40px;
        background-size: contain;
    }

    .portfolio-item__stats .value {
        font-size: 24px;
        line-height: 29px;
        letter-spacing: 0.03em;
        color: transparent;
        -webkit-text-stroke-width: 1px;
        -webkit-text-fill-color: transparent;
        margin-bottom: -4px;
    }

    .portfolio-item__footer {
        padding-top: 13px;
        padding-bottom: 16px;
    }

    .portfolio-item__button-wrapper {
        padding-bottom: 30px;
    }

    #smonta .mobile-image,
    #jerusalem .mobile-image,
    .portfolio__item:nth-child(odd) .portfolio-item__project-images .mobile-image,
    .portfolio__item:nth-child(even) .portfolio-item__project-images .mobile-image {
        position: absolute;
        left: auto;
        width: 120px;
        right: -20px;
    }

    #smonta .desktop-image,
    #smonta .desktop-image,
    .portfolio__item:nth-child(odd) .portfolio-item__project-images .desktop-image,
    .portfolio__item:nth-child(even) .portfolio-item__project-images .desktop-image,
    #kvint .portfolio-item__project-images .desktop-image {
        position: relative;
        right: 18px;
        width: 337px;
        left: auto;
    }
}

