.footer {
    background: #333645;

    .footer-top {
        .footer-logo {
            display: flex;
            height: 64px;
            width: 200px;
            align-items: center;
            text-decoration: none;

            h2 {
                color: #fafafa;
            }

            img {
                max-height: 100%;
                max-width: 100%;
            }

        }

        .footer-brief {
            margin-top: 10px;

            @include themify {
                color: themed('white-dark');
            }
        }
        
        .footer-two {
            > * {
                @include themify {
                    color: themed('white-dark');
                }
            }
            
            h4.title {
                padding: 8px 0;
                margin-bottom: 5px;
                
                @include themify {
                    color: themed('white-lite');
                }
            } 
        }

        .contact {
            padding: 15px 18px;
            margin-top: 15px;
            border-radius: $radius-default;
            background: rgba(38, 41, 56, 0.4);

            .list-inline > li {
                font-size: 15px;
                line-height: 25px;
                display: block;
                white-space: nowrap;

                @include themify {
                    color: themed('white-dark');
                }

                > i {
                    margin-top: 5px;
                    float: left;

                    @include themify {
                        color: themed('primary');
                    }
                }
            }

            .contact-info {
                display: block;
                margin-left: 25px;
                white-space: pre-wrap;
                word-break: break-all;
            }
        }

        .links {
            
            h4 {
                position: relative;
                padding: 8px 0;
                margin-bottom: 5px;
                transition: 200ms ease-in-out;

                @include themify {
                    color: themed('white-lite');
                }
            }
            

            .list-inline {
                overflow: hidden;

                > li {
                    display: block;

                    > a {
                        font-size: 15px;
                        display: inline-block;
                        line-height: 32px;
                        transition: 200ms ease-in-out;

                        @include themify {
                            color: themed('white-dark');
                        }

                        &:hover {
                            @include themify {
                                color: themed('primary');
                            }
                        }
                    }
                }
            }

            .show {
                margin-bottom: 10px;
            }
        }

        .links.ebook-tag {
            .list-inline {
                margin-top: 14px;

                li {
                    float: left;

                    > a {
                        border-radius: $radius-default;
                        display: inline-block;
                        padding-right: 5px;
                        padding-left: 5px;
                        margin-bottom: 5px;

                        @include themify {
                            border: 1px solid themed('border-black');
                        }

                        &:hover {
                            border-style: solid;
                            text-decoration: none;

                            @include themify {
                                border-color: themed('white');
                            }
                        }
                    }
                }
            }
        }
    }

    .footer-middle {
        border-top: 1px solid rgba(255, 255, 255, 0.05);

        .subscribe {
            display: inline-block;

            .form-group {
                display: inline-block;
                vertical-align: bottom;
                margin: 0;

                .form-control {
                    width: 300px;
                }
            }

            button {
                margin-left: 15px;
            }

            input {
                height: 42px;
                border-radius: $radius-default;

                @include themify {
                    background: themed('black-dark');
                    border: 1px solid themed('border-black');
                    color: themed('white-dark');
                }

                &:focus {
                    box-shadow: none;

                    @include themify {
                        border-color: themed('primary');
                    }
                }
            }
        }
    }

    .footer-bottom {
        color: #c2c2c2;
        background: #262938;

        .copyright {
            margin-top: 3px;

            > a {
                font-family: $font-opensans;
                font-weight: 600;
                transition: 200ms ease-in-out;

                @include themify {
                    color: themed('primary');
                }

                &:hover {
                    @include themify {
                        color: themed('primary-hover');
                    }
                }
            }
        }

    }
}

.social-links {
    display: inline-block;
    vertical-align: top;
    margin-left: -15px;
    margin-top: 2px;

    > li {
        vertical-align: middle;

        a {
            display: table;
            text-align: center;
            font-size: 20px;
            transition: 200ms ease-in-out;

            @include themify {
                color: themed('white-dark');
            }

            &:hover, &:focus {
                text-decoration: none;

                @include themify {
                    opacity: 0.7;
                }
            }

            > i {
                display: table-cell;
                vertical-align: middle;
            }
        }
    }
}

.theme-black .footer {
    .footer-top {
        .contact {
            .list-inline > li > i {
                color: #0068e1;
            }
        }

        .links {
            .list-inline > li > a {
                &:hover {
                    color: #0068e1;
                }
            }
        }

        .links.ebook-tag {
            .list-inline {
                li > a {
                    &:hover {
                        border-color: #0068e1;
                    }
                }
            }
        }
    }

    .footer-middle {
        .social-links {
            > li {
                a:hover,
                a:focus {
                    color: #0068e1;
                }
            }
        }
    }

    .footer-bottom {
        .copyright {
            > a {
                color: #0068e1;

                &:hover {
                    color: #1a86ff;
                }
            }
        }
    }
}

@media screen and (max-width: $md) {
    .footer {
        .footer-top {
            .contact {
                margin-bottom: 20px;
            }
        }

        .footer-middle .subscribe .form-group {
            .form-control {
                width: 280px;
            }
        }
    }
}

@media screen and (max-width: $sm) {
    .footer {
        .footer-top {
            .links {
                .mobile-collapse {
                    h4 {
                        position: relative;
                        cursor: pointer;

                        &:before {
                            position: absolute;
                            content: "\f107";
                            font-family: Fontawesome;
                            top: 10px;
                            right: 10px;
                            transition: 200ms ease-in-out;
                        }

                        &:hover {
                            @include themify {
                                color: themed('white');
                            }
                        }
                    }

                    &.active h4 {
                        &:before {
                            transform: rotateX(180deg);
                        }
                    }
                }
            }
        }
    }

    .social-links {
        display: block !important;;
        text-align: center;
        margin: 0;
    }

    .footer .footer-middle .subscribe {
        float: none !important;
        display: block !important;
        margin-top: 10px;
        text-align: center;

        .form-group .form-control {
            width: 300px;
        }
    }

    .copyright {
        float: none !important;
        text-align: center;
        display: block;
    }

    
}

@media screen and (max-width: 520px) {
    .footer {
        .footer-middle .subscribe {
            .form-control {
                width: 100% !important;
            }

            button {
                float: none !important;
                margin: 15px 0 0 0;
            }
        }
    }
}
