/* Navbar Background */
.navbar {
    background-color: #144562;
    background-image: none;
    border: none;
    box-shadow: none;
    min-height: 80px;
    height: 50px;
}

/* Navbar container */
.navbar.fixed-top {
    background-color: #144562;
    overflow: visible;
}

/* Make the nav collapse area flex */
.navbar .navbar-collapse {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding-left: 10px;
}

/* Navbar Links */
.navbar-dark .navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    gap: 5px;
    flex: 1;
    max-width: 60%;
}

.navbar-dark .navbar-nav > li {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.navbar-welcome-name,
.navbar-dark .navbar-nav > li > a {
    color: #ffffff;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    padding: 10px 5px;
    text-decoration: none;
}

.navbar-dark .navbar-nav > li > a:hover,
.navbar-dark .navbar-nav > li > a:focus {
    background-color: #DA4528;
    color: #ffffff;
}

/* Spacer to push right-side content to the right */
.navbar .navbar-collapse > .navbar-nav:first-child {
    margin-right: auto;
}

/* Right side nav and form container */
.navbar-dark .navbar-nav.pull-right,
.navbar-form.pull-right {
    margin-left: 5px;
    justify-content: flex-end;
}

.navbar-dark .navbar-nav.pull-right {
    gap: 5px;
}

.navbar-dark .navbar-nav.pull-right > li {
    flex: 0 0 auto;
    height: min-content;
}

.navbar-brand {
    background-color: #ffffff;
    width: 180px;
    height: 130px;
    position: relative;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 100%;
    object-fit: cover;
    overflow: visible;
}

/* Log Out Button */
.navbar-log-out {
    background-color: #ffffff;
    color: #2d5f6f !important;
    border-radius: 3px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    margin-left: 10px;
}

.navbar-log-out:hover {
    background-color: #DA4528;
    color: #ffffff !important;
}

/* Login Form */
.navbar-form {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 5px;
    justify-content: flex-end;
}

.navbar-form input[type="text"],
.navbar-form input[type="password"] {
    background-color: #ffffff;
    width: 30%;
    border-radius: 3px;
    padding: 8px 12px;
    margin-right: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #144562;
}

.navbar-form input::placeholder {
    color: #808285;
    font-weight: 400;
}

.navbar-form .btn {
    background-color: #ffffff;
    background-image: none;
    color: #2d5f6f;
    border: 1px solid #ffffff;
    border-radius: 3px;
    padding: 8px 20px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

.navbar-form .btn:hover {
    background-color: #DA4528;
    color: #ffffff;
    border-color: #DA4528;
}

.dropdown-menu.show {
    background-color: #ffffff;
    width: 100%;
}

.dropdown-menu > li > a {
    display: flex;
    padding: 5px;
    color: #2d5f6f;
    font-family: 'Barlow Condensed', sans-serif;
    text-decoration: none;
    width: 100%;
}

.dropdown-menu > li > a:hover {
    background-color: #DA4528;
    color: #ffffff;
}

/* Mobile Styles */
@media (max-width: 991px) {

    .navbar {
        height: 60px !important;
        padding: 0;
    }

    .navbar .container {
        padding: 0;
        display: flex;
        align-items: stretch;
        height: 100%;
        max-width: 100%;
    }

    .navbar-brand {
        width: 40%;
        height: 100%;
        background-color: #ffffff;
        box-shadow: none;
        position: static;
        padding: 8px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .navbar-brand img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        position: static;
        transform: none;
    }

    .navbar .navbar-toggler {
        margin-left: auto;
        margin-right: 10px;
        border: none;
        align-self: center;
        padding: 10px;
    }

    .navbar .navbar-toggler .icon-bar {
        background-color: #ffffff;
        width: 25px;
        height: 3px;
        margin: 4px 0;
        display: block;
    }

    .navbar .navbar-collapse {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #144562;
        padding: 0;
        z-index: 1000;
        flex-direction: column;
        border-top: 1px solid rgba(255,255,255,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .navbar .navbar-collapse.show {
        display: flex;
        max-height: 800px;
    }

    .navbar .navbar-collapse.collapsing {
        display: flex;
        transition: max-height 0s ease-in-out;
    }

    .navbar-dark .navbar-nav {
        display: block;
        flex: none;
        gap: 0;
        max-width: 100%;
        width: 100%;
    }

    .navbar-dark .navbar-nav > li {
        width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .navbar .navbar-collapse > .navbar-nav:first-child {
        margin-right: 0;
        padding-top: 25px;
    }

    .navbar-dark .navbar-nav > li > a {
        padding: 15px;
        font-size: 20px;
    }

    .navbar li.text {
        padding: 15px;
    }

    .navbar-form {
        gap: 0;
        display: block;
        padding: 15px;
    }

    .navbar-dark .navbar-nav.pull-right {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .navbar-dark .navbar-nav.pull-right > li.text {
        padding: 15px;
        font-size: 20px;
        border-top: 1px solid #808285;
    }

    .navbar-dark .navbar-nav.pull-right > li:not(.text) {
        display: block;
        margin: 0;
        padding: 0 15px;
    }

    .navbar-dark .navbar-nav.pull-right > li:not(.text) > a {
        margin: auto auto 10px;
        display: block;
        text-align: center;
        width: 95%;
    }

    .navbar-welcome-name {
        text-align: start;
    }

    .navbar-form.pull-right {
        margin: 15px;
        width: 100%;
        max-width: 500px;
    }

    .navbar-form input[type="text"],
    .navbar-form input[type="password"] {
        width: 100%;
        height: 45px;
        display: block;
        margin: 0 0 10px 0;
        box-sizing: border-box;
    }

    .navbar-form .btn {
        width: 100%;
        display: block;
        margin: 5px 0 0;
    }
    
    .dropdown {
        display: flex;
        flex-direction: column;
    }
}