/* ----------------------------------------------------------------------------
    Team
---------------------------------------------------------------------------- */


.team-member {
    width: 100%;

    .photo-wrapper {
        position: relative;

        &:before {
            content: "";
            display: block;
            padding-top: 100%;
        }
    }

    .overlay-content,
    .overlay-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        img {
            max-width: 100%;
            max-height: 100%;
            width: 100%;
            height: auto;
            z-index: 1;
        }
    }

    .overlay-wrapper:before {
        .transition(~"opacity 0.3s ease");
        &:extend(.base-clr-bg);

        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0;
        content: "";
        z-index: 2;
    }

    .name {
        &:extend(.base-clr-txt);

        margin: 15px 0 5px;
        font-size: @font-size-small + 1px;
        font-weight: @bold-weight;
        text-transform: uppercase;
        line-height: 18px;
    }

    .position {
        &:extend(.heading-font);

        margin-bottom: 10px;
        display: inline-block;
        width: 100%;
        font-size: @font-size-small;
        line-height: 20px;
    }
}

.team-member .overlay-content {
    padding: 8%;
    z-index: 3;
    color: @text-white;

    .text-wrapper {
        .transition(~"opacity 0.3s ease");

        height: 70%;
        overflow: hidden;
        opacity: 0;
    }

    .text-container {
        display: table;
        width: 100%;
        height: 100%;

        & > * {
            display: table-cell;
            vertical-align: middle;
            font-size: @font-size-small;
            line-height: 18px;
            color: @text-white;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}

.team-member .socials-block {
    .transition(~"opacity 0.3s ease");

    position: absolute;
    bottom: 8%;
    display: block;
    width: 84%;
    height: 13%;
    font-size: 0;
    text-align: justify;
    opacity: 0;

    &:after {
        display: inline-block;
        width: 100%;
        content: '';
    }

    &.align-center {
        text-align: center;

        & > li {
            margin: 0 7px;
        }
    }

    & > li {
        display: inline-block;
        width: 15%;
        height: 100%;
        list-style-type: none;

        a {
            .transition(~"background 0.2s ease, border 0.2s ease");
            &:extend(.base-clr-bg all);
            &:extend(.base-clr-bd all);

            position: relative;
            display: block;
            height: 100%;
            border-style: solid;
            border-width: 1px;
            border-radius: 2px;
        }

        .fa {
            .transition(~"color 0.2s ease");
            &:extend(.base-clr-txt);

            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            margin-top: -7px;
            font-size: @font-size-small;
            text-align: center;
        }
    }
}



@media (min-width: @screen-sm-min) {
    .team-member:hover {
        .overlay-wrapper:before {
            opacity: 0.82;
        }

        .socials-block,
        .overlay-content .text-wrapper {
            opacity: 1;
        }
    }

    .team-member .socials-block > li > a {
        border-color: @white;
        background-color: transparent;

        &:hover,
        &:active {
            background-color: @white;
        }

        &:not(:hover):not(:active) .fa {
            color: @text-white;
        }
    }
}

@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
    .team-member .socials-block > li .fa {
        margin-top: -6px;
        font-size: @font-size-thin;
    }
}

@media (max-width: @screen-xs-max) {
    .team-member {
        padding-bottom: 80px;

        .name,
        .position {
            text-align: left;
        }
    }

    .team-member .socials-block {
        bottom: -100px;
        left: 0;
        height: 30px;
        opacity: 1;
        text-align: left;

        &.align-center {
            text-align: left;
        }

        & > li,
        &.align-center > li {
            margin: 0 4px 4px 0;
            width: 30px;
            height: 30px;

            a {
                &:not(:hover):not(:active) {
                    border-color: darken(@gray-lighter, 1%);
                    background-color: transparent;
                }

                &:hover .fa,
                &:active .fa {
                    color: @text-white;
                }
            }
        }
    }
}
