/* ----------------------------------------------------------------------------
    Common styles
---------------------------------------------------------------------------- */


// Micro ClearFix Mixin
.clearfix {
    zoom:1;

    &:before,
    &:after {
        content: "";
        display: table;
    }

    &:after {
        clear: both;
    }
}

body {
    overflow-x: hidden;
    min-height: 100px;

    & > .container {
        padding-top: 65px;
    }
}

img {
    max-width: 100%;
}

.retina-show {
    display: none;
}

.base-clr-bd {
    border-color: @base-color;
}

.base-clr-bg {
    background-color: @base-color;
}

.base-clr-txt {
    color: @text-base-color;
}

::selection {
    color: @text-white;
    background-color: fade(@base-color, 85%);
}

::-moz-selection {
    color: @text-white;
    background-color: fade(@base-color, 85%);
}

.fa,
.icon {
    &:extend(.base-clr-txt);
}

.bg-low-poly,
div.bg-low-poly,
footer.bg-low-poly,
section.bg-low-poly {
    background-image: url("@{img-path}background/controls_bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
}

hr {
    display: inline-block;
    width: 100%;
    height: 1px;
    border: none;
    background-color: @gray-lighter;

    &.no-margin {
        margin: 0;
    }
}

ul {
    margin: 0 0 10px;
}

li {
    margin-bottom: 7px;
}

.visible {
    opacity: 1;
}

.section {
    position: relative;
    padding: 90px 0;
}

.fullwidth-section {
    .clearfix();
    .box-shadow(0 0 24px 0 fade(@black, 18%));

    margin: 50px 0;
    padding: 0;
}

.fullwidth-path {
    .clearfix();

    position: relative;
}

.fullwidth-column {
    padding: 100px 73px 85px;
}

.fullwidth-section-bg {
    .background-size(cover);

    position: absolute;
    top: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-position: top center;

    &.bg-right {
        right: 0;
        left: 50%;
    }

    &.bg-left {
        left: 0;
        right: 50%;
    }
}

.icon,
.fa {
    line-height: 1;
}

.section-icon {
    display: block;
    margin-bottom: 20px;
    font-size: 50px;
}

.container {
    position: relative;
}

.bg-cover {
    .background-size(cover);

    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.overlay {
    position: relative;
    z-index: 1;

    &:before {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        content: "";
        background-color: @gray-darker;
        z-index: -1;
    }

    &.overlay-clr .fa,
    &.overlay-clr .icon {
        color: inherit;
    }

    & > * {
        z-index: 1;
    }
}

.base-clr-ovl {
    background-color: transparent;

    &:before {
        &:extend(.base-clr-bg);

        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        content: "";
        opacity: 0.8;
        z-index: -1;
    }
}

.video-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;

    video {
        min-width: 100%;
        min-height: 100%;
    }
}

.heading-block {
    padding: 150px 0;
}

.hero-heading-top,
.hero-heading-bottom {
    position: absolute;
    left: 0;
    right: 0;
}

.hero-heading-top {
    top: 60px;
}

.hero-heading-bottom {
    bottom: 40px;
}

.img-column {
    padding-top: 20px;
    padding-bottom: 20px;
}

.list {
    padding: 5px 0;

    & > li {
        margin: 15px 0;

        .icon:first-child,
        .fa:first-child {
            margin-right: 25px;
            vertical-align: middle;
        }
    }
}

.list-inline {
    padding: 5px 0;

    & > li {
        margin: 15px 0;

        .icon:first-child,
        .fa:first-child {
            margin-right: 25px;
            vertical-align: middle;
        }
    }
}

.masonry {
    width: 100%;
    font-size: 0;
    line-height: 0;

    &.width720 .masonry-item {
        width: 32.833333%;
        padding: 10px;
    }

    &.width400 .masonry-item {
        width: 49.5%;
        padding: 5px;
    }

    .masonry-item {
        margin: 0;
        display: inline-block;
        width: 24.5%;
        padding: 15px;
        font-size: @font-size-base;
        line-height: 1.5625;
    }
}


// Media queries

@media (max-width: @screen-sm-max) {
    .wrapper {
        width: 90%;
    }

    .img-column {
        padding-bottom: 20px;
    }

    .heading-block {
        padding: 80px 0;
    }

    .hero-heading-top {
        top: 30px;
    }

    .fullwidth-column {
        padding: 50px 30px 35px;
    }
}

@media (max-width: @screen-xs-max) {
    body {
        padding-top: 91px;
    }

    .fullwidth-section-bg {
        position: relative;

        &.bg-right,
        &.bg-left {
            height: 250px;
            top: auto;
            left: auto;
            right: auto;
            bottom: auto;
        }
    }

    .wrapper {
        width: 100%;
    }

    .bg-cover {
        background-attachment: scroll;
    }

    .heading-block {
        padding: 40px 0;
    }

    .hero-heading-top {
        position: relative;
        top: auto;
        margin-top: 30px;
    }

    .hero-heading-bottom {
        position: relative;
        bottom: auto;
        margin-bottom: 30px;
    }
}

@media (max-width: @screen-xs-min) {
    blockquote {
        padding: 0 35px;
        font-size: @font-size-small;
        line-height: 1.8;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .retina-hide {
        display: none;
    }

    .retina-show {
        display: block;
        display: initial;
    }
}
