/* ----------------------------------------------------------
   Candor Property - Header
   Bootstrap 4.5.3 navigation, with bespoke Candor styling
---------------------------------------------------------- */

.cp-site-header {
    background-color: #ffffff;
}

/* Navigation container */
.cp-site-header .navbar {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Candor logo */
.cp-logo {
    display: block;
    width: 225px;
    max-width: 100%;
    height: auto;
}

/* Navigation */
.cp-site-header .navbar-nav {
    align-items: center;
}

.cp-site-header .nav-item {
    margin-left: 14px;
}

.cp-site-header .nav-link {
    position: relative;
    color: #17145b !important;
    font-family: 'Manrope', Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 10px !important;
    transition: opacity 0.2s ease;
}

.cp-site-header .nav-link:hover {
    opacity: 0.65;
}

/* Active main page: ::before avoids clashing with the Bootstrap
   .dropdown-toggle::after caret used by Sales. */
.cp-site-header .navbar-nav > .nav-item.active > .nav-link {
    font-weight: 600;
}

.cp-site-header .navbar-nav > .nav-item.active > .nav-link::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    background-color: #b6a58f;
    border-radius: 2px;
}

/* Keep the Sales underline under the word, not under its caret. */
.cp-site-header .navbar-nav > .nav-item.dropdown.active > .nav-link::before {
    right: 25px;
}

/* Sales dropdown */
.cp-site-header .dropdown-menu {
    min-width: 220px;
    margin-top: 8px;
    padding: 7px;
    border: 1px solid #eee8e1;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 12px 32px rgba(23, 20, 91, 0.12);
}

.cp-site-header .dropdown-item {
    padding: 11px 14px;
    border-radius: 6px;
    color: #17145b;
    font-family: 'Manrope', Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.cp-site-header .dropdown-item:hover,
.cp-site-header .dropdown-item:focus {
    color: #17145b;
    background-color: #f7f3ee;
}

.cp-site-header .dropdown-item.active,
.cp-site-header .dropdown-item.active:hover,
.cp-site-header .dropdown-item.active:focus,
.cp-site-header .dropdown-item:active {
    color: #17145b;
    background-color: #f5f0e9;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #b6a58f;
}

/* ==========================================================
   TABLET / MOBILE
========================================================== */
@media (max-width: 991.98px) {
    .cp-site-header .navbar {
        padding: 14px 15px;
    }

    .cp-logo {
        width: 180px;
    }

    .cp-site-header .navbar-collapse {
        padding-top: 15px;
    }

    .cp-site-header .navbar-nav {
        align-items: flex-start;
    }

    .cp-site-header .nav-item {
        width: 100%;
        margin-left: 0;
    }

    .cp-site-header .nav-link {
        padding: 10px 0 !important;
    }

    /* Active page on mobile: colour instead of an underline. */
    .cp-site-header .navbar-nav > .nav-item.active > .nav-link {
        color: #b6a58f !important;
        font-weight: 700;
    }

    .cp-site-header .navbar-nav > .nav-item.active > .nav-link::before {
        display: none;
    }

    /* Keep the dropdown inside the expanded Bootstrap mobile menu. */
    .cp-site-header .dropdown-menu {
        position: static;
        float: none;
        width: calc(100% - 12px);
        min-width: 0;
        margin: 0 0 8px 12px;
        padding: 4px 0 4px 8px;
        border: 0;
        border-left: 2px solid #e6dbcf;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .cp-site-header .dropdown-item {
        padding: 10px 13px;
    }
}

/* ==========================================================
   SMALL MOBILE
========================================================== */
@media (max-width: 575.98px) {
    .cp-logo {
        width: 160px;
    }
}