/* ============================================================
   HEADER
   ============================================================ */

header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
}

header.fixed {
    box-shadow: var(--shadow-light-active);
}

header ul {
    padding-left: 0;
    margin-bottom: 0;
}

header .logoarea {
    display: flex;
    width: auto;
    position: relative;
    height: var(--header-height);
}

header .logoarea img {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: calc(var(--header-height) - 20px);
    width: auto;
    max-height: 100%;
}

header nav.navbar {
    height: var(--header-height);
    padding: 0;
}

header .navbar-collapse {
    position: relative;
}

@media (max-width: 991px) {
    .navbar-collapse {
        max-height: 90vh;
        overflow-y: auto;
        background: var(--white);
        box-shadow: 0px 30px 60px -12px rgba(50, 50, 93, 0.15),
                    0px 18px 36px -18px rgba(0, 0, 0, 0.20);
        padding: 20px;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
    }

    ul.navbar-nav {
        display: block;
    }
}

@media (min-width: 992px) {
    .navbar-expand-xl .navbar-nav,
    ul.navbar-nav {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 2.5rem;
        list-style: none;
        text-align: right;
        margin-left: auto;
        padding-left: 0;
    }
}


/* ============================================================
   NAV LINKS
   ============================================================ */

a.nav-link {
    text-decoration: none;
    color: var(--navy-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0;
    transition: color 0.25s ease;
}

@media (max-width: 991px) {
    a.nav-link {
        font-size: 1.15rem;
    }
}

.current-lang a,
.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show,
.nav-link:focus,
.nav-link:hover {
    color: var(--red);
}

@media (min-width: 992px) {
    .nav-link::after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        width: 100%;
        border-bottom: 0.15rem solid var(--red);
        transition: transform 0.25s ease;
    }

    .current-lang a::after,
    .navbar-nav .nav-link.active::after,
    .navbar-nav .nav-link.show::after,
    .navbar-nav .nav-link:focus::after,
    .navbar-nav .nav-link:hover::after,
    #main-menu .current-menu-parent .nav-link::after {
        transform: translateX(-50%) scaleX(1);
    }
}

@media (max-width: 991px) {
    .dropdown-menu li {
        padding-left: 10px;
    }

    .dropdown-menu li a {
        color: var(--navy-dark);
    }

    .dropdown-item.active,
    .dropdown-item:active {
        background: var(--white);
        color: var(--red);
    }
}


/* ============================================================
   DROPDOWN TOGGLE CARET
   ============================================================ */

@media (min-width: 992px) {
    .dropdown-toggle::after {
        border: none;
        border-top: 2px solid;
        margin: 0;
    }
}


/* ============================================================
   DROPDOWN MENU
   ============================================================ */

ul.dropdown-menu {
    background: transparent;
    border-color: transparent;
}

.nav-item .dropdown-menu {
    display: none;
    margin-top: 10px;
    margin-left: -18px;
    min-width: 380px;
    padding: 1rem 0;
    border-radius: 0 0 12px 12px;
    background: var(--white);
    box-shadow: 0 8px 40px rgba(0, 47, 97, 0.25);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease,
        transform 0.3s ease,
        visibility 0.3s ease;
}

@media (min-width: 992px) {
    .nav-item .dropdown-menu {
        display: block;
        padding-top: 18px;
    }

    .nav-item:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0s;
    }
}

@media (max-width: 991px) {
    .nav-item .dropdown-menu {
        display: none;
        width: auto;
        max-width: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav-item .dropdown-menu.show {
        display: block;
    }
}


/* ============================================================
   DROPDOWN ITEMS
   ============================================================ */

.dropdown-menu li.menu-item {
    padding: 0;
}

.dropdown-menu li.menu-item a.dropdown-item {
    display: block;
    padding: 0.35rem 1.5rem;
    color: var(--navy-dark);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    white-space: normal;
    word-break: break-word;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.dropdown-menu li.menu-item a.dropdown-item::after {
    display: none;
}

@media (max-width: 991px) {
    .dropdown-menu li.menu-item a.dropdown-item {
        font-size: 1.05rem;
    }
}

@media (min-width: 992px) {
    ul.dropdown-menu.depth_0 li:last-child a {
        border-bottom: none;
        padding-bottom: 0.5rem;
    }
}

.dropdown-menu li.menu-item a.dropdown-item:hover,
.dropdown-menu li.menu-item a.dropdown-item:focus {
    background-color: var(--lightestgray);
    color: var(--red);
    border-left-color: var(--red);
}

.dropdown-menu li.menu-item a.dropdown-item.active,
.dropdown-menu li.menu-item a.dropdown-item:active {
    background-color: var(--lightestgray);
    color: var(--red);
    border-left-color: var(--red);
    font-weight: 600;
}


/* ============================================================
   NAV ITEMS — level 1
   ============================================================ */

@media (min-width: 992px) {
    .navbar-nav > li.nav-item {
        display: inline-block;
    }
}

@media (max-width: 991px) {
    .navbar-nav > li.nav-item {
        margin-bottom: 20px;
    }
}

.navbar-nav > li.nav-item:last-of-type {
    margin-right: 10px;
}


/* ============================================================
   LANG SWITCHER
   ============================================================ */

.lang-switcher li {
    margin: 0 15px;
    display: inline;
}

.lang-switcher li img {
    width: 19px;
    height: 16px;
}


/* ============================================================
   HAMBURGER
   ============================================================ */

.navbar-toggler:focus {
    box-shadow: none;
}

.custom-toggler {
    border: none;
    background: transparent;
    padding: 0;
    outline: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 35px;
    width: 40px;
    float: right;
}

.hamburger .line {
    background-color: var(--navy-dark);
    border-radius: 100rem;
    display: block;
    height: 3px;
    width: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger .line:nth-child(2),
.hamburger .line:nth-child(4) {
    width: 30px;
}

.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(4) {
    opacity: 0;
}


/* ============================================================
   HOME ICON
   ============================================================ */

.menu-item-home {
    width: 24px;
    height: 24px;
    color: var(--navy-dark);
}

.menu-item-home::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--navy-dark);
    -webkit-mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/>\
</svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/>\
</svg>") no-repeat center / contain;
    position: relative;
    top: 5px;
    transition: background-color 0.25s ease;
}

.menu-item-home:hover::before {
    background-color: var(--red);
}

header .lang-item.menu-item-home::before {
    display: none;
}

@media (max-width: 991px) {
    header .lang-item {
        display: inline-block;
        margin-right: 30px;
    }
}


/* ============================================================
   HIGHLIGHT NAV ITEM (CTA button style)
   ============================================================ */

.menu-item.highlight .nav-link {
    padding: 6px 18px;
    background: var(--red);
    color: var(--white);
    border-radius: 20px;
}

.menu-item.highlight .nav-link:hover,
.current-menu-item.highlight .nav-link {
    background: var(--red);
    color: var(--white);
}

.menu-item.highlight .nav-link::after {
    display: none;
}


/* ============================================================
   SEARCH
   ============================================================ */

.search-icon {
    margin-top: -2px;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
}

.search-icon circle,
.search-icon line {
    stroke: var(--navy-dark);
    transition: stroke 0.25s ease;
}

.search-icon:hover circle,
.search-icon:hover line {
    stroke: var(--red);
}

.search-form-container {
    position: absolute;
    top: -35px;
    left: 220px;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.search-form-container.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-form-container .searchform {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.search-form-container .searchform input[type="text"] {
    flex: 1;
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--lightestgray);
    color: var(--navy-dark);
    box-shadow: none;
    margin: 0;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.search-form-container .searchform input[type="text"]:focus {
    outline: none;
    border-color: var(--red);
    background: var(--white);
    box-shadow: var(--shadow-light);
}

.search-form-container .searchform button {
    flex-shrink: 0;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    margin: 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.search-form-container .searchform button:hover {
    background: var(--red-accent);
    box-shadow: var(--shadow-light-hover);
}

.search-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 0.5rem;
    color: var(--slate);
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.search-close:hover {
    color: var(--red);
    background: var(--lightestgray);
}

@media (max-width: 991px) {
    .search-form-container {
        top: auto;
        bottom: 0;
        left: 0;
        padding: 0 1rem;
    }

    .search-form-container .searchform input[type="text"] {
        font-size: 1rem;
        padding: 10px 14px;
    }

    .search-form-container .searchform button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}