﻿/* Variables */
:root {
    --showcase-panel-height: calc(var(--screen-width) * 9/16);
    --showcase-panel-tilt-offset: calc(var(--showcase-panel-height) * 0.105); /* 0.105 is an approximation of the tangent of 4 degrees */
    --showcase-title-font-size: 1.75rem;
}

@media screen and (min-width: 1200px) {
    :root {
        --showcase-panel-height: calc(var(--screen-width) * 9/16 * 0.6);
    }
}

/* Services header */
.services-section {
    padding-top: 0;
}

.services-header {
    margin-bottom: 1.0rem;
}

.services-header-icon {
    display: block;
    margin: 0 auto 1.0rem auto;
    width: calc(0.7 * 45px);
}

@media screen and (min-width: 1200px) {
    .services-header-icon {
        width: 45px;
    }
}

/* Showcase item styling: general */
.showcase-panel {
    position: relative;
    padding-top: 7px; /* Should be equal to border overlay height */
    padding-bottom: 7px; /* Should be equal to border overlay height */
    border-top: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
}

.showcase-panel .border-overlay-top {
    position: absolute;
    height: 7px; /* Should be equal to showcase panel padding */
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 3;
}

.showcase-panel .border-overlay-bottom {
    position: absolute;
    height: 7px; /* Should be equal to showcase panel padding */
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 3;
}

.showcase-carousel-panel {
    position: relative;
    height: var(--showcase-panel-height);
    /* Custom column-like width */
    width: 100%;
    max-width: 100%;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
}

.showcase-carousel-panel .carousel {
    height: 100%;
}

.showcase-title-panel {
    position: relative;
    min-height: var(--showcase-panel-height);
    /* Custom column-like width */
    width: 10%;
    max-width: 10%;
    -ms-flex: 0 0 10%;
    flex: 0 0 10%;
}

.showcase-text-panel {
    position: relative;
    min-height: var(--showcase-panel-height);
    /* Custom column-like width */
    width: 90%;
    max-width: 90%;
    -ms-flex: 0 0 90%;
    flex: 0 0 90%;
    z-index: 2;
}

@media screen and (min-width: 1200px) {
    .showcase-carousel-panel {
        /* Custom column-like width */
        width: 60%;
        max-width: 60%;
        -ms-flex: 0 0 60%;
        flex: 0 0 60%;
    }

    .showcase-title-panel {
        /* Custom column-like width */
        width: 3%;
        max-width: 3%;
        -ms-flex: 0 0 3%;
        flex: 0 0 3%;
    }

    .showcase-text-panel {
        /* Custom column-like width */
        width: 37%;
        max-width: 37%;
        -ms-flex: 0 0 37%;
        flex: 0 0 37%;
    }
}

.showcase-title-panel .inner-1 {
    position: relative;
    margin-left: 0;
    margin-right: calc(-1 * var(--showcase-panel-tilt-offset));
    height: 100%;
    background-color: #ffffff;
    z-index: 2;
}

.showcase-title-panel .inner-2 {
    position: relative;
    margin-left: 0;
    margin-right: 4px;
    height: 100%;
    clip-path: inherit;
    background-color: #000000;
}

.showcase-title-panel .inner-3 {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    clip-path: inherit;
}

.showcase-title-panel .inner-3 img {
    /* NOTE: this image ensures parent width equals parent height, allowing children to be rotated where their width equals their parents height */
    height: 100%;
    width: auto;
}

.showcase-title-panel .title {
    position: absolute;
    top: 0;
    left: calc(-100% + var(--showcase-title-font-size) + 0.3rem);
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    transform: rotate(90deg);
    padding: 0 calc(.45rem);
    line-height: 1;
    font-size: var(--showcase-title-font-size);
    color: #ffffff;
    text-transform: uppercase;
}

@media screen and (min-width: 1200px) {

    .showcase-title-panel .title {
        left: calc(-100% + var(--showcase-title-font-size) + 0.35rem);
        padding: 0 calc(.5rem);
    }
}

.showcase-text-panel .inner-1 {
    position: relative;
    height: 100%;
    background-color: #ffffff;
    z-index: 1;
}

.showcase-text-panel .inner-2 {
    position: relative;
    height: 100%;
    clip-path: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('../img/services/Services-Text-Panel-Background.png?version=9');
    background-size: 100% 100%;
}

.showcase-text-panel .header {
    width: 70%;
    color: #ffffff;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.showcase-text-panel .text {
    width: 70%;
    text-align: center;
    line-height: 1.2;
    color: #ffffff;
}

@media screen and (min-width: 1200px) {
    .showcase-text-panel .text {
        text-align: justify;
        text-align-last: center;
    }
}

@media screen and (min-width: 1200px) {
    .showcase-text-panel .text {
        text-align: justify;
        text-align-last: center;
    }
}

@media screen and (min-width: 1400px) {
    .showcase-text-panel .text {
        font-size: 1.15rem;
    }
}

.showcase-link {
    position: relative;
    padding: 0.9rem;
    margin-bottom: 1rem;
}

.showcase-link:hover {
    text-decoration: none;
}

.showcase-link-background {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 6px 3px rgba(0, 0, 0, 0.39);
}

.showcase-link span {
    position: relative;
    font-family: 'Futura-Medium-Bt';
    text-transform: uppercase;
    color: #000000;
}

/* Showcase item styling: variant 1 (skewed left) */
.showcase-panel.variant-1 .showcase-title-panel .inner-1 {
    clip-path: polygon(0% 0%, calc(100% - var(--showcase-panel-tilt-offset)) 0%, 100% 100%, 0% 100%);
}

.showcase-panel.variant-1 .showcase-title-panel .title {
    text-align: right;
}

.showcase-panel.variant-1 .showcase-text-panel .inner-1 {
    margin-left: 0;
    margin-right: 0;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, var(--showcase-panel-tilt-offset) 100%);
}

.showcase-panel.variant-1 .showcase-text-panel .inner-2 {
    padding-left: calc(0.5 * var(--showcase-panel-tilt-offset));
}

.showcase-panel.variant-1 .showcase-link-background {
    transform: skew(6deg);
}

@media screen and (min-width: 1200px) {
    .showcase-panel.variant-1 .showcase-carousel-panel {
        order: 2;
    }

    .showcase-panel.variant-1 .carousel-control-prev {
        padding-left: calc(0.5 * var(--showcase-panel-tilt-offset) + 11px);
    }

    .showcase-panel.variant-1 .carousel-control-next {
        right: 2px; /* Offset because this control seems to fall behind the diagonal more than the left control does */
        padding-right: calc(0.5 * var(--showcase-panel-tilt-offset) + 11px);
    }

    @supports (-ms-ime-align:auto) {
        /* Edge browser */
        .showcase-panel.variant-1 .carousel-control-prev {
            padding-left: calc(var(--showcase-panel-tilt-offset) + 11px);
        }

        .showcase-panel.variant-1 .carousel-control-next {
            right: 0;
            padding-right: calc(var(--showcase-panel-tilt-offset) + 11px);
        }
    }

    .showcase-panel.variant-1 .showcase-title-panel {
        order: 1;
    }

    .showcase-panel.variant-1 .showcase-text-panel {
        order: 3;
    }

    .showcase-panel.variant-1 .showcase-text-panel .inner-1 {
        margin-left: calc(-1 * var(--showcase-panel-tilt-offset));
        margin-right: 0;
    }

    .showcase-panel.variant-1 .showcase-text-panel .inner-2 {
        margin-left: 4px;
    }
}

/* Showcase item styling: variant 2 (skewed right) */
.showcase-panel.variant-2 .showcase-title-panel .inner-1 {
    clip-path: polygon(0% 0%, 100% 0%, calc(100% - var(--showcase-panel-tilt-offset)) 100%, 0% 100%);
}

.showcase-panel.variant-2 .showcase-title-panel .title {
    text-align: left;
}

.showcase-panel.variant-2 .showcase-text-panel .inner-1 {
    margin-left: 0;
    margin-right: 0;
    clip-path: polygon(var(--showcase-panel-tilt-offset) 0%, 100% 0%, 100% 100%, 0% 100%);
}

.showcase-panel.variant-2 .showcase-text-panel .inner-2 {
    padding-left: calc(0.5 * var(--showcase-panel-tilt-offset));
}

.showcase-panel.variant-2 .showcase-link-background {
    transform: skew(-6deg);
}

@media screen and (min-width: 1200px) {
    .showcase-panel.variant-2 .showcase-carousel-panel {
        order: 3;
    }

    .showcase-panel.variant-2 .carousel-control-prev {
        padding-left: calc(0.5 * var(--showcase-panel-tilt-offset) + 11px);
    }

    @supports (-ms-ime-align:auto) {
        /* Edge browser */
        .showcase-panel.variant-2 .carousel-control-prev {
            padding-left: calc(var(--showcase-panel-tilt-offset) + 11px);
        }
    }

    .showcase-panel.variant-2 .showcase-title-panel {
        order: 1;
    }

    .showcase-panel.variant-2 .showcase-text-panel {
        order: 2;
    }

    .showcase-panel.variant-2 .showcase-text-panel .inner-1 {
        margin-left: 0;
        margin-right: calc(-1 * var(--showcase-panel-tilt-offset));
        clip-path: polygon(var(--showcase-panel-tilt-offset) 0%, 100% 0%, calc(100% - var(--showcase-panel-tilt-offset)) 100%, 0% 100%);
    }

    .showcase-panel.variant-2 .showcase-text-panel .inner-2 {
        margin-right: 4px;
        padding-left: 0;
    }
}

