/* Colors */

:root {
    --black: #000000;
    --dark-gray: #222222;
    --gray: #0B0B0B;
    --medium-gray: #6B6B6B;
    --light-gray: #9f9f9f;
    --off-white: #FCF9F4;
    --blue: #067CC9;
    --dark-blue: #041D35;
    --orange: #FE5E32;
    --white: #ffffff;
}

/* BG Colors */

.bg-off-white {
    background-color: var(--off-white);
}

.bg-dark-blue {
    background-color: var(--dark-blue);
}

.bg-blue {
    background-color: var(--blue);
}

.bg-orange {
    background-color: var(--orange);
}

.bg-black {
    background-color: var(--black);
}

/* Gradients */

.bg-gradient-blue {
    background-image: linear-gradient(to right, var(--blue), var(--black));
}

/* Text Colors */

.text-white {
    color: var(--white);
}

.text-black {
    color: var(--black);
}

.text-blue {
    color: var(--blue);
}

.bg-dark-blue .text-blue {
    color: #0788DF;
}

.text-orange {
    color: var(--orange);
}

.font-body-color {
    color: var(--dark-blue) !important;
}

/* Buttons */

.btn {
    background: var(--orange);
    border: none;
    border-radius: 0.6rem;
    display: inline-block;
    font-family: var(--font-headline);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    line-height: 1.2;
    position: relative;
    white-space: normal;
    transition: all .25s;

    &:hover, &:active, &:focus {
        background: var(--dark-blue);
        color: var(--off-white);
    }

    &.btn-white {
        background: var(--white);
        color: var(--orange);

        &:hover {
            background: var(--orange);
            color: var(--dark-blue);
        }
    }
    &.btn-dark-blue {
        background: var(--dark-blue);
        color: var(--off-white);

        &:hover {
            background: var(--orange);
            color: var(--dark-blue);
        }
    }
}

.bg-dark-blue .btn:hover {
    background: var(--white);
    color: var(--dark-blue);
}

button {
    transition: all .25s;
    cursor: pointer;
}

/* Header */

.header-margin {
    margin-top: 80px;
}

.header-padding {
    padding-top: 80px;
}

@media (min-width:992px) {
    .header-margin {
        margin-top: 99px;
    }

    .header-padding {
        padding-top: 99px;
    }
}

.anchor-margin {
    padding-top: 125px;
    margin-top: -125px;
}

.nav-link {
    font-weight: 500;
    font-size: .8em;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

.navbar {
    background-color: var(--off-white);
    transition: all .35s !important;
    padding: 1em 0;
    -webkit-box-shadow: 0 10px 20px -2px rgba(0, 0, 0, .2);
    -moz-box-shadow: 0 10px 20px -2px rgba(0, 0, 0, .2);
    box-shadow: 0 10px 20px -2px rgba(0, 0, 0, .2);

    @media (max-width:992px) {
        padding: 0.5em 0;
    }

    .nav-item {
        .nav-link, .dropdown-item {
            color: var(--dark-blue);
        }

        .nav-link {
            @media only screen and (min-width: 992px) and (max-width: 1199px)  {
                padding-right: 0.7rem;
                padding-left: 0.7rem;
            }
            
            &:hover {
                color: var(--orange);
            }
        }

        &.active {
            .nav-link {
                color: var(--orange);
            }
        }

        .dropdown-item {
            background-color:transparent;
            &:hover {
                background-color:transparent;
            }
        }

        .dropdown-toggle.show::after {
            transform: rotate(180deg);
            transition: transform 0.2s;
        }
    }

    .main-nav {
        .nav-link {
            font-size: var(--fs-sm);
            font-family: var(--font-headline);
            font-weight: 700;

            @media (max-width: 991px) {
                font-size: var(--fs-md);
            }
        }
    }

    .secondary-nav {
        .nav-link {
            color: var(--medium-gray);
            &:hover {
                color: var(--dark-blue);
            }
            @media (max-width: 991px) {
                font-size: var(--fs-base);
            }
        }
    }

    .dropdown-menu {
        border: 0;
        border-radius: 0;
        margin-top: 0;

        @media (min-width:992px) {
            background-color:var(--off-white);
            box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .2);
            &:not(.mega-menu) {
                top: calc(100% + 30px);
            }
        }

        @media (max-width:991px) {
            padding-top: 0;
        }

        .dropdown-item {
            @media (min-width:992px) {
                font-size: var(--fs-sm);
                padding-top: 0.5rem;
                padding-bottom: 0.5rem;

                &:hover, &.active {
                    background-color:var(--white);
                }
            }
        }
    }

    .btn-close {
        color: var(--dark-blue);
        opacity: 1;
    }
}

.navbar.scrolled {
    padding: 0.5em 0;

    .dropdown-menu {
        &:not(.mega-menu) {
            top: calc(100% + 20px);
        }
    }
}

/* Custom styles for nested dropdown on mobile */
@media (max-width: 991px) {
    .dropdown-menu .dropdown-menu {
        margin-left: 0;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        position: static !important;
        display: none;
    }
    
    .dropdown-menu .dropdown-menu .dropdown-item {
        padding: 0.35rem 1rem;
    }
    
    /* Style for nested dropdown items */
    .nested-dropdown-item {
        font-size: var(--fs-sm);
    }
}

.dropdown-mega-menu {
    position: static;
    
    .mega-menu {
        width: 100%;
        margin-top: 0;
        background-color: var(--off-white);
        
        .parent {
            color: var(--orange);
            font-family: var(--font-headline);
            font-weight: 700;
            font-size: var(--fs-base);
            text-decoration: none;
            display: inline-block;
        }
        ul li {
            margin-bottom: 1rem;
            a {
                text-decoration: none;
                &:hover {
                    opacity: 0.7;
                }
            }
        }
        .content-wrap {
            padding: 1em 0 2em;
            max-width: 48em;
            margin: auto;
        }
    }
}

/* Offcanvas Menu */

.offcanvas {
    background-color: var(--white);
}

/* Header Search */

#searchForm {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  text-align: right;
  visibility: hidden;
  opacity: 0;
  z-index: 1000;

  &.active {
    visibility: visible;
    opacity: 1;
    animation: dropdown 0.4s forwards;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: var(--dark-blue);
  }

  input {
    padding-top: 13px;
    padding-bottom: 13px;
    border: 0;
    background-color: transparent;
    outline: 0;
    flex: 1;
    text-align: right;
    margin-bottom: 0;
    color: var(--white);

    &::placeholder {
        color: var(--white);
    }
  }

  button {
    width: 30px;
    border: 0;
    background-color: transparent;
    height: 100%;
    outline: 0;
    transition: all .15s;
    float: right;
    padding: 13px 0;
    height: 100%;
    text-align: right;
    color: var(--white);
  }
}
  
.search-toggle {
    background-color: transparent;
    color: inherit;
    border: 0;
    width: 28px;
    height: 100%;
    color: var(--medium-gray);
    font-size: var(--fs-sm);

    &:hover:before {
        color: var(--dark-blue);
    }

    &.active:before {
        content: "\f00d";
    }
}

/* Custom hamburger menu */

.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;

    &:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        background-image: none !important;
        background-color: var(--dark-blue);
        height: 2px;
        width: 100%;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);

        &::before,
        &::after {
            content: '';
            background-color: var(--dark-blue);
            height: 2px;
            width: 100%;
            position: absolute;
            left: 0;
        }

        &::before {
            top: -8px;
        }

        &::after {
            bottom: -8px;
        }
    }
}

/* Logo */

.logo {
    display: block;
    width: 185px;
    opacity: 1;
    transition: all 0.35s;
}

/* Main Content - footer reveal */

main {
    min-height: 100vh;
    background: white;
    position: relative;
    z-index: 1;
}

/* Footer */

.corner-overlay {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
}

.footer-cta {
    position: relative;
    .corner-overlay {
        transform: rotate(180deg);
    }

    @media (min-width:1600px) {
        h3 {
            font-size: 1.95em;
        }
    }
}

.footer, .footer-cta {
    .footer-nav {
        .parent {
            color: var(--orange);
            font-weight: 600;
            text-decoration: none;
            display: inline-block;
            &:hover {
                opacity: 1;
            }
        }
        a.parent {
            &:hover {
                opacity: 0.7;
            }
        }
        ul li {
            margin-bottom: 1.25rem;
            a {
                text-decoration: none;
            }
        }
        a:hover {
            opacity: 0.7;
        }
    }
    .terms-list {
        a {
            text-decoration: none;
            font-weight: 600;
            &:hover {
                opacity: 0.7;
            }
        }
    }
}

@media (min-width:992px) {
    .footer {
        position: sticky;
        bottom: 0;
        left: 0;
        width: 100%;
    }
}

.lp-footer {
    .corner-overlay {
        transform: rotate(180deg);
        position: relative;
        left: initial;
        margin-bottom: -5rem;
        @media (min-width:1400px) {
            margin-bottom: -7rem;
        }
    }
    > .container {
        position: relative;
    }
}