/*PORTFOLIO PAGE*/

.portfolio .portfolio-item {
    display: none;
}

.portfolio .main {
    padding-top: 0;
    padding-bottom: 0;
}

.portfolio h1.title {
    display: inline-block;
    width: 320px;
    vertical-align: top;
    line-height: 80px;
}

.tabs {
    width: 100%;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: calc(100vh - 80px - 160px);
    font-size: 0;
    padding-top: 15px;
    padding-bottom: 15px;
}

.tabs__caption {
    display: inline-block;
    width: calc(100% - 320px);
    height: 80px;
    text-align: right;
    vertical-align: top;
}

.tabs__caption li {
    display: inline-block;
    vertical-align: baseline;
    padding: 0 0 0 30px;
    line-height: 80px;
    font-size: 20px;
    cursor: pointer;
    -webkit-transition: all 0.5s;
    -o-transition: all 0.5s;
    transition: all 0.5s;
    text-shadow: 0 0 3px #000;
}

.tabs__caption li:hover {
    font-size: 34px;
    text-shadow: 0 0 3px #000;
}

.tabs__caption li.active {
    font-size: 34px;
    font-family: 'Raleway-Bold';
    color: #fff;
    text-shadow: 0 0 3px #000;
}

.tabs__content {
    display: none;
}

.tabs__content.active {
    display: block;
    width: 100%;
}

.ac-wrapper {
    width: 100%;
    position: relative;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    -webkit-perspective-origin: 50% 25%;
    perspective-origin: 50% 25%;
    padding-top: 0px;
}

.ac-wrapper h2 {
    top: 20%;
    width: 50%;
    position: absolute;
    font-weight: 300;
    text-align: right;
    padding: 0 180px 0 50px;
    pointer-events: none;
    font-size: 20px;
}

.ac-wrapper h2 span {
    display: block;
    color: #fff;
}

.ac-device {
    background: url(../img/portfolio/iPhone.png) no-repeat;
    background-size: contain;
    width: 190px;
    height: 400px;
    margin: 0 auto;
    position: relative;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transform: translateY(10px);
    -ms-transform: translateY(10px);
    transform: translateY(10px);
}

.ac-device a {
    height: 289px;
    width: 166px;
    margin: 55px 0 0 12px;
    overflow: hidden;
    display: inline-block;
}

.ac-device a img {
    display: block;
}

.ac-device h3 {
    position: absolute;
    font-size: 20px;
    left: 100%;
    width: 100%;
    top: 60%;
    margin-left: 30px;
    font-weight: 300;
    color: #fff;
}

.ac-grid {
    position: absolute;
    width: 100%;
    z-index: 1000;
    top: 20px;
    left: 0;
    text-align: center;
    pointer-events: none;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.ac-grid a {
    width: 200px;
    display: inline-block;
    position: relative;
    margin: 7.5px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-transform: translateZ(-350px);
    transform: translateZ(-350px);
    -webkit-transition-delay: 0s;
    -o-transition-delay: 0s;
    transition-delay: 0s;
    border-radius: 5px;
    overflow: hidden;
}

.ac-grid a:first-child {
    -webkit-transform-origin: right center;
    -ms-transform-origin: right center;
    transform-origin: right center;
}

.ac-grid a:last-child {
    -webkit-transform-origin: left center;
    -ms-transform-origin: left center;
    transform-origin: left center;
}

.ac-grid a img {
    display: block;
    width: 100%;
}

.ac-grid a span.overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    text-transform: uppercase;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    width: 100%;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    z-index: 100;
    color: #fff;
    background: rgba(12, 103, 110, 0.7803921568627451);
    font-family: 'Raleway-Bold';
    opacity: 0;
    -webkit-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    padding: 0;
}

.ac-grid a span i {
    font-size: 50px;
    margin: 0 auto;
    margin-bottom: 10px;
}

.sample-title {
    display: block;
    width: 100%;
    padding: 0 15px;
}

.ac-grid a:hover span.overlay {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    font-size: 18px;
}

.ac-wrapper.ac-gridview .ac-device {

    opacity: 0;
    margin-top: 0px;
}

.ac-wrapper.ac-gridview .ac-grid {
    pointer-events: auto;
}

.ac-wrapper.ac-gridview .ac-grid a {
    opacity: 1;
    pointer-events: auto;
}

.ac-wrapper.ac-gridview .ac-grid a:first-child {
    -webkit-transform: rotateY(-20deg) translateZ(0px);
    transform: rotateY(-20deg) translateZ(0px);
}

.ac-wrapper.ac-gridview .ac-grid a:nth-child(2) {
    -webkit-transition-delay: 100ms;
    -o-transition-delay: 100ms;
    transition-delay: 100ms;
    -webkit-transform: translateZ(0px);
    transform: translateZ(0px);
}

.ac-wrapper.ac-gridview .ac-grid a:nth-child(3) {
    -webkit-transition-delay: 150ms;
    -o-transition-delay: 150ms;
    transition-delay: 150ms;
    -webkit-transform: translateZ(0px);
    transform: translateZ(0px);
}

.ac-wrapper.ac-gridview .ac-grid a:last-child {
    -webkit-transition-delay: 200ms;
    -o-transition-delay: 200ms;
    transition-delay: 200ms;
    -webkit-transform: rotateY(20deg) translateZ(0px);
    transform: rotateY(20deg) translateZ(0px);
}

@media screen and (max-width: 63.875em) {
    .ac-wrapper {
        font-size: 60%;
        width: 100%;
        padding: 0 20px;
    }

    /*
    .ac-device {
        margin: 0;
        width: 100%;
    }
*/
    .ac-device h3 {
        width: 50%;
        left: 290px;
    }

    .ac-wrapper h2 {
        left: 308px;
        padding: 0;
        text-align: left;
        margin-left: 30px;
    }
}

@media screen and (max-width: 58em) {
    .ac-grid {
        width: 90%;
        left: 5%;
        margin-left: 0;
    }

    .ac-grid a {
        width: 22%;
    }
}


@media screen and (max-width: 35.6875em) {
    .ac-wrapper {
        padding: 0 20px 100px;
    }

    .ac-wrapper h2 {
        width: 100%;
        /*        text-align: center;*/
        margin: 0 0 1em;
        top: 0;
        left: auto;
        position: relative;
    }

    .ac-device {
        margin: 0 auto;
        width: 189px;
    }

    .ac-device h3 {
        position: relative;
        margin: 0;
        left: auto;
        width: 100%;
        top: 100px;
        display: block;
        text-align: center;
    }

    .ac-grid a {
        width: 40%;
    }

    .ac-wrapper.ac-gridview .ac-grid a {
        -webkit-transform: translateZ(0px) !important;
        transform: translateZ(0px) !important;
    }
}


.ac-device nav {
    position: absolute;
    bottom: 50px;
    left: 100%;
    margin-left: 30px;
    width: 100%;
}

.ac-device nav span {
    display: block;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    color: #fff;
    background: #ddd;
    margin-right: 5px;
    float: left;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
}

.prev-btn,
.next-btn {
    position: absolute;
    top: 50%;
    display: block;
    width: 50px;
    height: 50px;
    display: none;
    text-align: center;
    cursor: pointer;
    /*    border: 1px solid rgba(255, 255, 255, 0.7);*/
    -webkit-box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
    border-radius: 5px;
    top: 50%;
    margin-top: 12px;
}

.prev-btn.active,
.next-btn.active {
    display: block;
}

.prev-btn:hover,
.next-btn:hover {
    background: #8083843b;
    -webkit-box-shadow: 0 0 10px 0px #8083843b;
    box-shadow: 0 0 10px 0px #8083843b;
}

.prev-btn i,
.next-btn i {
    line-height: 50px;
    font-size: 50px;
}

.prev-btn {
    left: 82px;
}

.next-btn {
    right: 82px;
}

/*MEDIA*/

@media (max-width: 767px) {

    .portfolio .main {
        padding: 0;
    }

    .tabs {
        height: auto;
        padding: 0;
    }

    .portfolio h1.title {
        line-height: 1.3;
        display: block;
        width: 100%;
        margin-bottom: 15px;
        padding: 25px 15px 0 15px;
    }



    .tabs__caption {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        width: 100%;
        max-width: 100%;
        overflow-y: auto;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        height: auto;
    }

    .tabs__caption li,
    .tabs__caption li:hover {
        font-size: 16px;
        padding: 10px 15px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .tabs__caption li.active {
        font-size: 24px;
        margin-top: -5px;
    }

    .ac-grid {
        top: 20px;
    }

    .next-btn {
        right: 50%;
        margin-right: -57.5px;
    }

    .prev-btn {
        left: 50%;
        margin-left: -57.5px;
    }

    .ac-grid a {
        margin: 7.5px;
    }

    .ac-wrapper {
        padding: 0;
        padding-top: 60px;
    }

    .prev-btn,
    .next-btn {
        top: auto;
        bottom: 40px;
        display: block !important;
        width: calc(50vw - 24px);
        height: 60px;
        line-height: 60px;
        margin-top: 0;
    }

    i.icon-left,
    i.icon-right {
        height: 60px;
        width: 60px;
    }

    .prev-btn i,
    .next-btn i {

        line-height: 60px;
    }

    .prev-btn,
    .next-btn,
    .prev-btn:hover,
    .next-btn:hover {
        background: transparent;
        -webkit-box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
    }

    .tabs__content.active {
        height: 59vw;
        overflow: hidden;
    }



    .ac-grid a:hover span {
        opacity: 0;
    }

    .next-btn {
        right: 0;
        margin-right: 15px;
    }

    .prev-btn {
        left: 0;
        margin-left: 15px;
    }


}

@media (max-width: 415px) {
    .tabs__content.active {
        height: 170vw;
    }
}

@media (max-width: 376px) {
    .tabs__content.active {
        height: 177vw;
    }

    .ac-wrapper {
        padding-top: 25px;
    }
}

@media (max-width: 361px) {
    .tabs__content.active {
        height: 178vw;
    }
}

@media (max-width: 321px) {
    .tabs__content.active {
        height: 185vw;
    }
}
