/*=======================================
        General
========================================*/

header {
    background-color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    transition: all 0.3s ease-in-out;

    &.nav-up {
        top: -20vh;

        @media (max-width: 900px) {
            top: -50vh;
        }

    }

}


/* Homepage Header */

.home header {
    background-color: transparent;

    .contents {

        .logo svg path {
            fill: #fff;
        }

        .header-main {

            .menu-wrap .menu-item a {
                color: #fff;

                &:before {
                    background-color: #fff;
                }

            }

            .icons .icon svg path#target {
                fill: #fff;
            }

            .menu-toggle .btn-menu .btn-menu__bars {
                background-color: #fff;

                &:before,
                &:after {
                    background-color: #fff;
                }

            }

        }



    }

    &:hover,
    &.fill {
        background-color: #fff;

        .contents {

            .logo svg path {
                fill: var(--black);
            }

            .header-main {

                .menu-wrap .menu-item a {
                    color: var(--black);

                    &:before {
                        background-color: var(--black);
                    }

                }

                .icons .icon svg path#target {
                    fill: var(--black);
                }

                .menu-toggle .btn-menu .btn-menu__bars {
                    background-color: var(--black);

                    &:before,
                    &:after {
                        background-color: var(--black);
                    }

                }

            }



        }

    }

}




/*=======================================
                Main
========================================*/

header {

    .contents {
        justify-content: space-between;
        align-items: center;
        padding: 30px 0;
        position: relative;

        @media (max-width: 600px) {
            padding: 20px 0;
        }

        .logo {
            width: 300px;
            position: relative;

            .mobile {
                display: none;
            }

            svg {
                width: 100%;
                height: auto;
                position: relative;
                top: 5px;

                path {
                    fill: var(--black);
                }

            }

            @media (max-width: 1100px) {
                width: 250px;
            }

            @media (max-width: 600px) {
                width: 200px;
            }

            @media (max-width: 450px) {
                width: 60px;

                .desktop {
                    display: none;
                }

                .mobile {
                    display: block;
                }

            }

        }

        .header-main {
            justify-content: flex-end;
            align-items: center;

            .menu-wrap {
                justify-content: flex-end;
                align-items: center;

                @media (max-width: 1000px) {
                    display: none;
                }

                .menu-item {
                    margin-left: 30px;
                    position: relative;

                    @media (max-width: 1100px) {
                        margin-left: 20px;
                    }

                    &:before {
                        content: "";
                        width: 0px;
                        height: 1px;
                        background-color: var(--black);
                        position: absolute;
                        bottom: -1px;
                        left: 0;
                        transition: all 0.3s ease-in-out;
                    }

                    &:hover {

                        &:before {
                            width: 100%;
                        }

                    }

                    a {
                        font-size: 18px;
                        font-weight: 400;
                        line-height: 1;
                        color: var(--black);
                        text-decoration: none;
                        position: relative;

                        &:hover {

                            &:before, &:after {
                                display: block;
                            }

                        }

                        &:before {
                            content: "";
                            position: absolute;
                            top: 0;
                            left: -30px;
                            width: calc(100% + 60px);
                            height: 100%;
                            background-color: transparent !important;
                            display: none;
                            /* border: 1px dashed red; */
                        }

                        &:after {
                            content: "";
                            position: absolute;
                            top: 100%;
                            left: calc(-50vw);
                            width: 100vw;
                            height: 100px;
                            background-color: transparent;
                            display: none;
                            /* border: 1px dashed red; */
                        }

                    }

                }

            }

            .icons {
                justify-content: flex-start;
                align-items: center;
                margin-left: 30px;

                .icon {
                    margin-left: 22px;
                    position: relative;
                    top: 2px;
                    cursor: pointer;

                    svg {
                        width: 100%;
                        height: auto;
                    }

                    svg path#target {
                        fill: var(--black);
                    }

                    &#search {
                        width: 28px;
                        margin-left: 0;

                        @media (max-width: 600px) {
                            width: 24px;
                        }

                    }

                    &#profile {
                        width: 26px;

                        @media (max-width: 600px) {
                            width: 22px;
                        }

                    }

                    &#schedule {
                        width: 20px;

                        @media (max-width: 600px) {
                            width: 16px;
                        }

                    }

                }

            }

            .menu-toggle {
                display: none;
                margin-left: 25px;

                @media (max-width: 1000px) {
                    display: block;
                }

                .btn-menu {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    min-height: 18px;
                    padding-left: 0;
                    padding-right: 0;
                    border: none;
                    background-color: transparent;
                    color: inherit;
                    cursor: pointer;
                    transition: 0.3s ease;
                }

                .btn-menu:focus {
                    outline: none;
                }

                .btn-menu__text {
                    margin-left: 10px;
                    font-size: 1.125rem;
                    font-weight: 700;
                    line-height: 1;
                }

                .btn-menu__bars {
                    display: block;
                    position: relative;
                    width: 30px;
                    height: 1px;
                    background-color: var(--black);
                    transition: 0.3s;
                }

                .btn-menu__bars:before, .btn-menu__bars:after {
                    content: "";
                    display: block;
                    position: absolute;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: var(--black);
                    transition: 0.3s;
                }

                .btn-menu__bars:before {
                    transform: translate(0, -10px);
                }

                .btn-menu__bars:after {
                    transform: translate(0, 10px);
                }

                &.menu-open {

                    .btn-menu .btn-menu__bars {
                        background-color: transparent !important;
                    }

                    .btn-menu .btn-menu__bars:before {
                        transform: rotate(45deg);
                    }

                    .btn-menu .btn-menu__bars:after {
                        transform: rotate(-45deg);
                    }

                }

            }

        }

    }

}






/*=======================================
            Mobile Menu
========================================*/

.mobile-menu {
    position: fixed;
    width: 100%;
    height: calc(100% - 97px);
    background-color: #fff;
    top: 97px;
    z-index: 99;
    padding: 30px 0;
    display: none;
    overflow-y: auto;

    @media (max-width: 600px) {
        top: 70px;
        height: calc(100% - 70px);
    }

    @media (max-width: 450px) {
        top: 87px;
        height: calc(100% - 87px);
    }

    .inner {
        max-width: 800px;
        margin: 0 auto;

        .link {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            border-top: 1px solid var(--black);
            padding: 15px 10px;

            .top-link {
                text-decoration: none;
                display: inline-block;
                font-size: 30px;
                line-height: 1;
                width: calc(100% - 20px);
            }

            &.has-children {

                .arrow {
                    width: 20px;
                    position: relative;
                    top: 1px;
                    transition: all 0.3s ease-in-out;
                }

                &.open {

                    .arrow {
                        transform: rotate(180deg);
                    }

                }

            }

            .sub-links {
                width: 100%;
                padding-top: 20px;
                padding-left: 20px;
                display: none;

                a {
                    font-size: 20px;
                    line-height: 1;
                    text-decoration: none;
                    display: block;
                    margin-bottom: 15px;
                }

            }

        }

    }

}






/*=======================================
            Mega Menus
========================================*/

.mega-menu {
    position: fixed;
    top: 103px;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 999999;
    padding: 45px 0 70px;
    display: none;

    &:hover {
        display: block !important;
    }

    @media (max-width: 1200px) {
        padding: 45px 0;
    }

    @media (max-width: 1100px) {
        top: 97px;
    }

    @media (max-width: 1000px) {
        display: none;
    }

    .contents {
        align-items: flex-start;

        .left-links {
            width: calc(40%);
            margin-top: 20px;

            @media (max-width: 1200px) {
                width: 100%;
                margin-top: 0;
                margin-bottom: 30px;
            }

            .links-wrap {
                column-count: 2;
                column-gap: normal;

                @media (max-width: 1200px) {
                    column-count: 5;
                }

            }

            a {
                font-size: 18px;
                line-height: 1.2;
                font-weight: 300;
                color: var(--black);
                text-decoration: none;
                display: inline-block;
                margin-bottom: 25px;
                position: relative;

                @media (max-width: 1200px) {
                    margin-bottom: 20px;
                }

                &:before {
                    content: "";
                    width: 0px;
                    height: 1px;
                    background-color: var(--black);
                    position: absolute;
                    bottom: -2px;
                    left: 0;
                    transition: all 0.3s ease-in-out;
                }

                &:hover {

                    &:before {
                        width: 100%;
                    }

                }

            }

            .all a {
                font-weight: 600;
            }

        }

        &.cards-only {

            .link-cards {
                width: 100%;

                .card {
                    width: calc(100% / 5 - 16px);
                }

            }

        }

        .link-cards {
            width: calc(60%);
            justify-content: flex-start;
            align-items: flex-start;
            margin: 0 -8px;

            @media (max-width: 1200px) {
                width: 100%;
            }

            .card {
                width: calc(100% / 3 - 16px);
                margin: 0 8px;
                border-bottom: 1px solid var(--beige);
                position: relative;

                .image {
                    overflow: hidden;

                    img {
                        transition: all 1s ease-in-out;
                    }

                }

                &:hover {

                    img {
                        transform: scale(1.05);
                    }

                }

                p {
                    margin: 25px 0 5px;
                    font-size: 18px;
                    line-height: 1.2;
                    font-weight: 400;
                }

            }

        }

    }

}