/* Full-width background */
.p-nav {
    position: relative;
    z-index: 18;
    background: #f68d51;
    color: #fff;
    font-family: "Tiempos-HeadlineMedium", Tiempos-TextRegular, sans-serif !important;
    font-size: 16px;
    font-weight: 400;
}

/* Max-width inner container */
.p-nav-inner {
    max-width: 1450px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

/* Top bar */
.p-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.p-menu-label {
    display: none;
    color: #fff;
    font-size: 1rem;
}

.p-nav-toggle {
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.p-nav-toggle:hover,
.p-nav-toggle:focus {
    background: none !important;
}

.p-nav-downarrow {}

/* Main menu row */
.p-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    background: #f68d51;
}

.p-nav-menu>li {
    position: relative;
    flex: 0 0 auto;
    text-align: center;
    z-index: 1;
}

.p-nav-menu>li>a,
.p-nav-menu>li>.p-submenu-row>a {
    display: block;
    padding: 13px 20px;
    color: #1E3047;
    text-decoration: none;
    line-height: 1;
}

.p-nav-menu>li>a:after,
.p-nav-menu>li>.p-submenu-row>a:after {
    content: "";
    bottom: 0;
    height: 3px;
    width: 100%;
    left: 0;
    background-color: #55595c;
    z-index: 2;
    display: block;
    position: absolute;
    -webkit-transition: .3s;
    -o-transition: .3s;
    transition: .3s;
    transition-timing-function: ease;
    -webkit-transition-timing-function: cubic-bezier(.58, .3, .005, 1);
    -o-transition-timing-function: cubic-bezier(.58, .3, .005, 1);
    transition-timing-function: cubic-bezier(.58, .3, .005, 1);
    opacity: 0;
}

.p-nav-menu>li>a:hover:after,
.p-nav-menu>li>.p-submenu-row>a:hover:after {
    opacity: 1;
}

.p-nav-menu>li>a>i,
.p-nav-menu>li>.p-submenu-row>a>i {
    position: relative;
    top: -5px;
}

.p-nav-menu>li>a:hover,
.p-nav-menu>li>.p-submenu-row>a:hover {}

.p-nav-menu .parent-selected,
.p-nav-menu .nav-selected {
    color: #fff !important;
    background: #373a3c;
    font-weight: bold;
}

/* Submenu panel */
.p-subnav {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 12rem;
    width: 100%;
    background: #fff8f4;
    margin: 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    z-index: 10;
}

.p-subnav li a {
    display: block;
    padding: .7rem 1rem;
    color: #1E3047;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    font-weight: normal;
    font-size: 19.2px;
    font-family: "Tiempos-TextRegular", serif;
}

.p-subnav li a:hover {}

@media (min-width: 769px) and (max-width: 1078px) {
    .p-nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* Desktop: pure CSS hover */
@media (min-width: 769px) {
    .p-nav-bar {
        display: none;
    }

    .p-menu-label {
        display: none;
    }

    .p-nav-toggle {
        display: none;
    }

    .p-submenu-toggle {
        display: none;
    }

    .p-nav-menu {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .p-nav-menu>li {
        z-index: unset;
    }

    .p-nav-menu>li:hover>.p-subnav,
    .p-nav-menu>li:focus-within>.p-subnav,
    .p-nav-menu>li>.p-subnav:hover {
        display: block;
    }

    .p-has-submenu::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 10px;
        background: transparent;
        z-index: 5;
    }

    .p-subnav {
        /* left: 50%;
        transform: translateX(-50%); */
        width: max-content;
        min-width: 12rem;
        padding-left: 0;
    }

    .p-subnav li a:hover {
        background-color: #ffffff;
    }

    .p-subnav li .nav-selected:hover {
        background-color: #373a3c
    }
}

/* Mobile */
@media (max-width: 768px) {
    .p-nav-downarrow {
        display: none;
        visibility: hidden;
    }

    .p-nav-inner {
        padding: 0.5rem 1rem;
    }

    .p-menu-label {
        display: inline-block;
    }

    .p-nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        border-top: 1px solid #444;
    }

    .p-nav-menu.p-active {
        display: flex;
    }

    .p-nav-menu>li {
        text-align: left;
        flex: 0 0 auto;
    }

    .p-subnav {
        padding-left: 15px;
        background: none;
    }

    .p-submenu-row {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .p-submenu-toggle {
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        padding: 0 1rem;
        font-size: 1rem;
        line-height: 1;
    }

    .p-submenu-toggle:hover,
    .p-submenu-toggle:focus {
        background: none;
    }

    .p-submenu-toggle::after {
        content: "▾";
        display: inline-block;
        transition: transform .2s ease;
    }

    .p-has-submenu.p-open>.p-submenu-row>.p-submenu-toggle::after {
        transform: rotate(180deg);
    }

    .p-has-submenu .p-subnav {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .p-has-submenu.p-open>.p-subnav {
        display: block;
    }

    .p-nav-menu>li>a:hover:after,
    .p-nav-menu>li>.p-submenu-row>a:hover:after {
        opacity: 0 !important;
    }

    .p-nav-menu .parent-selected,
    .p-nav-menu .nav-selected {
        background: none;
    }

    .p-subnav li a:hover {
        background: none;
        font-weight: bold;
    }
}