.preloader {
    align-items: center;
    cursor: default;
    display: flex;
    height: 100%;
    justify-content: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 9999999;

    .animation-preloader {
        z-index: 1000;

        .spinner {
            animation: spinner 1s infinite linear;
            border-radius: 50%;
            border: 3px solid rgba(0, 0, 0, 0.2);
            border-top-color: $theme-color;
            height: 9em;
            margin: 0 auto 3.5em auto;
            width: 9em;

            @media (max-width: 767px) {
                width: 7.5em;
                height: 7.5em;
                margin: 0 auto 1.5em auto;
            }
        }

        .txt-loading {
            font: bold 5em $title-font, $body-font;
            text-align: center;
            user-select: none;

            @media (max-width: 767px) {
                font-size: 2.5em;
            }

            .letters-loading {
                color: $theme-color;
                position: relative;

                &:nth-child(2):before {
                    animation-delay: 0.2s;
                }

                &:nth-child(3):before {
                    animation-delay: 0.4s;
                }

                &:nth-child(4):before {
                    animation-delay: 0.6s;
                }

                &:nth-child(5):before {
                    animation-delay: 0.8s;
                }

                &:nth-child(6):before {
                    animation-delay: 1s;
                }

                &:nth-child(7):before {
                    animation-delay: 1.2s;
                }

                &:nth-child(8):before {
                    animation-delay: 1.4s;
                }

                &::before {
                    animation: letters-loading 4s infinite;
                    color: $title-color;
                    content: attr(data-text-preloader);
                    left: 0;
                    opacity: 0;
                    font-family: $title-font;
                    position: absolute;
                    top: -3px;
                    transform: rotateY(-90deg);
                }
            }
        }
    }

    p {
        font-size: 15px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 8px;
        color: $theme-color;
    }

    .loader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        font-size: 0;
        z-index: 1;
        pointer-events: none;

        .row {
            height: 100%;
        }

        .loader-section {
            padding: 0px;

            .bg {
                background-color: $bg-color;
                height: 100%;
                left: 0;
                width: 100%;
                transition: all 800ms cubic-bezier(0.77, 0, 0.175, 1);
            }
        }
    }

    &.loaded {
        .animation-preloader {
            opacity: 0;
            transition: 0.3s ease-out;
        }

        .loader-section {
            .bg {
                width: 0;
                transition: 0.7s;
                -webkit-transition: 0.7s;
                -moz-transition: 0.7s;
                -ms-transition: 0.7s;
                -o-transition: 0.7s;
            }
        }
    }
}



.back-to-top {
    border-radius: 12px;
    background-color: $theme-color-2;
    width: 50px;
    height: 50px;
    line-height: 50px;
    color: $white;
    font-size: 18px;
    position: fixed;
    display: inline-block;
    z-index: 99;
    right: 30px;
    bottom: 30px;
    @include transition;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);

    &:hover {
        background-color: $title-color;
    }

    &.show {
        opacity: 1;
        visibility: visible;
        transform: translate(0);
    }
}