nav {
    position: sticky;
    top: 0px;
    z-index: 1030;
    background: #ffffff;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 2rem 2rem;
    -webkit-border-radius: 0 0 2rem 2rem;
    -moz-border-radius: 0 0 2rem 2rem;
    -ms-border-radius: 0 0 2rem 2rem;
    -o-border-radius: 0 0 2rem 2rem;
}

nav.custom-border {
    border-radius: 0;
    border-bottom: 1px solid #0090D6;
}

nav .nav-top {
    max-width: 100%;
    height: 2rem;
    background-color: #0090D6;
    display: flex;
    align-items: center;
    justify-content: end;
    padding-right: 8rem;
}

nav .nav-top .lang-section {
    position: relative;
    width: 35px;
    margin-bottom: -5px;
}
nav .nav-top .lang-section a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
nav .nav-top .lang-section a span {
    color: #FFFFFF;
}
nav .nav-top .lang-section:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
nav .nav-top .lang-section > .lang-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
    position: absolute;
    top: 10px;
    right: 0px;
    width: 60px;
    min-height: 100px;
    transition-delay: .5s;
}
nav .nav-top .lang-section > .lang-menu .lang-panel {
    margin-top: 40px;
    z-index: 10;
    right: 100px;
    position: relative;
    background: #FFFFFF;
    min-height: 95px;
    padding-left: 100px;
    padding-right: 100px;
    padding-top: 10px;
    box-shadow: 0px 1px 12px 0px rgba(0, 0, 0, 0.12);
    -webkit-box-shadow: 0px 1px 12px 0px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 0px 1px 12px 0px rgba(0, 0, 0, 0.12);
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}
nav .nav-top .lang-section > .lang-menu .lang-panel:hover {
    display: block;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul {
    display: block;
    text-align: left;
    margin-left: -70px;
    padding-top: 0px;
    top: 4rem !important;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul li {
    padding-right: 10px;
    display: flex;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul li a {
    height: 33px;
    font-weight: bold;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul li a .lang-image img {
    width: 30px;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul li a .lang-name {
    position: relative;
    left: 15px;
    color: #0090D6;
}
nav .nav-top .lang-section > .lang-menu .lang-panel > ul li a .lang-name:hover {
    color: #67C042;
}
nav .nav-top .lang-section > .lang-menu .lang-panel:after {
    bottom: 100%;
    right: 43px;
    border: solid transparent;
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
nav .nav-top .lang-section > .lang-menu .lang-panel:before {
    bottom: 100%;
    right: 42px;
    border: solid transparent;
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
nav .nav-top .lang-section > .lang-menu .lang-panel:after {
    border-color: rgba(136, 183, 213, 0);
    border-bottom-color: #FFFFFF;
    border-width: 20px;
    margin-left: -20px;
}
nav .nav-top .lang-section > .lang-menu .lang-panel:before {
    border-color: rgba(194, 225, 245, 0);
    border-bottom-color: #e6e6e6;
    border-width: 22px;
    margin-left: -22px;
    filter: blur(2px);
}

nav .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* max-width: 1440px; */
    height: 5rem;
    margin: auto;
    padding: 0 4.5rem 0 4.5rem;
    user-select: none;
    transition: height 0.3s ease;
}

nav .header.scrolled {
    height: 3.5rem;
}

nav .header .logo {
    flex: 0 0 40%;
}

nav .header .logo .nav-img-logo {
    height: 3.5rem;
    transition: height 0.3s ease-in-out;
    -webkit-transition: height 0.3s ease-in-out;
    -moz-transition: height 0.3s ease-in-out;
    -ms-transition: height 0.3s ease-in-out;
    -o-transition: height 0.3s ease-in-out;
}

nav .header .logo .nav-img-logo.scrolled {
    height: 2.5rem;
}

.check-container {
    display: flex;
    align-items: center;
}

.checkbtn, .checkbtnsearch {
    display: none;
    width: 3rem;
    color: #000000;
    cursor: pointer;
}

#check, #check-search {
    display: none;
}

.trigram-icon, .search-icon {
    font-size: 1.3rem;
    color: #0090D6 !important;
}

.times-icon, .search-times-icon {
    font-size: 2.1rem;
    color: #0090D6;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 0 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 0 60%;
    justify-content: flex-end;
}

nav ul li a {
    display: inline-block;
    color: #0090D6;
    font-size: 1rem;
    font-weight: 400;
    padding: 7px 10px;
    transition: all 100ms;
}

nav ul li:not(.active) a:hover {
    text-shadow:
        0.1px 0.1px 0 currentColor,
        0.1px -0.1px 0 currentColor,
        -0.1px 0.1px 0 currentColor,
        -0.1px -0.1px 0 currentColor;
    color: #0090D6 !important;
}

nav ul li.main-menu:hover .sub-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.sub-menu {
    display: block;
    position: absolute;
    top: 7.5rem;
    width: 160px;
    background-color: #ffffff;
    padding: 3px;
    visibility: hidden;
    opacity: 0;
    z-index: 1000;
    transition-delay: .6s;
    transition: opacity 1s ease, visibility 1s ease;
}
.sub-menu.scrolled {
    top: 6rem;
}
.sub-menu:after {
    bottom: 100%;
    left: 20%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: rgba(136, 183, 213, 0);
    border-bottom-color: #ffffff;
    border-width: 10px;
    margin-left: -20px;
}
.sub-menu:hover {
    display: block;
    opacity: 1;
}

.search-container {
    position: absolute;
    left: 42%;
    width: 50%;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.search-container.show {
    opacity: 1;
    visibility: visible;
}

.times-icon-search {
    display: none;
    font-size: 30px !important;
}

.tb-search {
    width: 96%;
    background-color: #fff;
    text-align: left;
    border: none;
    border-radius: 5px;
    padding: 5px 0;
    color: #0090D6;
    z-index: 10000;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}
.tb-search::placeholder {
    color: #0090D6 !important;
    text-align: left !important;
}
.tb-search:-ms-input-placeholder {
    color: #0090D6;
}
.tb-search::-ms-input-placeholder {
    color: #0090D6;
}
.tb-search:focus {
    outline-width: 0;
}
.btn-search:active ~ .tb-search {
    visibility: visible;
}
.btn-search:focus ~ .tb-search {
    visibility: visible;
}
.tb-search:hover {
    visibility: visible;
}
.tb-search:focus {
    visibility: visible;
}

nav .header input::placeholder {
    text-align: center;
    font-size: 12px;
    color: #FFFFFF;
}

li.active a {
    font-weight: bold;
    transition: .5s;
    -webkit-transition: .5s;
    -moz-transition: .5s;
    -ms-transition: .5s;
    -o-transition: .5s;
}

@media all and (min-width: 1024px) and (max-width: 1110px) {
    nav ul li a {
        padding: 7px 6px;
        font-size: .8rem;
    }
}

@media all and (max-width: 1024px) {
    nav .header {
        padding: 0 4rem;
    }

    .search-container {
        left: 26%;
        width: 64%;
        gap: .5rem;
    }

    nav ul li a {
        padding: 7px 3px;
        font-size: .8rem;
    }
}

@media all and (max-width: 920px) {
    .search-container {
        left: 23%;
        width: 67%;
        gap: .5rem;
    }
    nav ul li a {
        font-size: .7rem;
    }
}

@media all and (max-width: 768px) {
    .checkbtn, .checkbtnsearch {
        display: flex;
        justify-content: center;
    }

    nav .header.float-right {
        justify-content: end;
    }

    .search-container {
        left: 10%;
        width: 77%;
        gap: .5rem;
    }

    nav .header ul li:nth-child(5).move {
        margin-top: 8rem;
    }

    .sub-menu.active {
        display: block;
        position: relative;
        top: 0;
        visibility: visible;
        opacity: 1;
        left: 1rem;
        padding: 0;
        height: 0;
    }

    nav .header {
        height: 4rem;
        padding: 0 2rem;
        transition: height 0.3s ease-in-out;
    }

    nav .header .logo .nav-img-logo {
        height: 33px;
        transition: height 0.3s ease-in-out;
    }

    nav .header .logo .nav-img-logo.scrolled {
        height: 30px;
    }

    nav ul {
        flex-flow: column;
        position: fixed;
        align-items: stretch;
        top: 6.04rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        padding: 1.5rem 1.5rem;
        background: #FFFFFF;
        flex: 1 1 auto;
        justify-content: start;
        transition: left .5s ease-in-out;
        -webkit-transition: left .5s ease-in-out;
        -moz-transition: left .5s ease-in-out;
        -ms-transition: left .5s ease-in-out;
        -o-transition: left .5s ease-in-out;
    }

    nav ul li a {
        display: block;
        padding: .5rem 0;
        font-size: 16px;
        color: #0090D6;
    }

    nav ul li a:hover {
        color: #0090D6 !important;
        font-weight: bold;
    }

    nav .header ul li:nth-child(7).hide {
        display: none;
    }

    .checkbtn.hide {
        display: none;
    }

    .logo.hide {
        display: none;
    }

    .left-ul {
        left: 0;
    }
    .check-container #check:checked ~ label .trigram-icon,
    .check-container #check:not(:checked) ~ label .times-icon {
        display: none;
    }
    .check-container #check:checked ~ label .times-icon,
    .check-container #check:not(:checked) ~ label .trigram-icon {
        display: inline-block;
    }
    .check-container #check-search:checked ~ label .search-icon,
    .check-container #check-search:not(:checked) ~ label .search-times-icon {
        display: none;
    }
    .check-container #check-search:checked ~ label .search-times-icon,
    .check-container #check-search:not(:checked) ~ label .search-icon {
        display: inline-block;
    }
}

@media all and (max-width: 575px) {
    nav .header {
        padding: 0 1rem 0 1.5rem;
}
}