.torley-nav-header * {
    all: unset;
}

.torley-nav-header {
    background: var(--global-palette8);
    color: var(--global-palette1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #202024;
    padding: 0 0;
}

.ice .torley-nav-header {
    border-bottom: 1px solid #ededed;
}

.torley-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 0;
}

.torley-nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 10px;
}

.torley-nav-logo img {
    height: 56px;
    max-height: 70px;
    display: block;
}

.torley-nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.torley-nav-menu a {
    color: var(--global-palette1);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.torley-nav-menu a:hover,
.torley-nav-menu a.active {
    cursor: pointer;
    color: var(--global-palette1);
}

.torley-nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--global-palette1);
    transition: width 0.3s ease;
}

.torley-nav-menu a:hover::after,
.torley-nav-menu a.active::after {
    width: 100%;
}

.torley-nav-menu-item {
    position: relative;
}

.torley-nav-menu-item.has-children > a {
    padding-right: 18px;
}

.torley-nav-menu-item.has-children > a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

.torley-nav-menu-item.has-children:hover > a::before {
    transform: translateY(-50%) rotate(180deg);
}

.torley-nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--global-palette8);
    min-width: 220px;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.torley-nav-menu-item:hover > .torley-nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.torley-nav-submenu li {
    padding: 0;
}

.torley-nav-submenu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0.3px;
}

.torley-nav-submenu a::after {
    display: none;
}

.torley-nav-submenu a:hover {
    background: var(--global-palette7);
    cursor: pointer;
}

.torley-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.torley-nav-search {
    position: relative;
}

.torley-nav-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.torley-nav-search-input {
    background-color: #1a1a1a!important;
    border-color: var(--global-palette8)!important;
    color: white!important;
    padding: 8px 12px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.torley-nav-search-input:focus {
    outline: none;
    border-color: var(--global-palette3);
    width: 250px;
}

.torley-nav-search-input::placeholder {
    color: white;
}

.torley-nav-search-btn {
    border: none;
    color: white!important;
    padding: 3px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    border-radius: 10px;
    cursor: pointer;
}

.torley-nav-search-btn:hover,
.torley-nav-search-btn:focus,
.ice .torley-nav-search-btn {
    color: white!important;
    background-color: #1a1a1a!important;
}

.torley-nav-social {
    display: flex;
    gap: 10px;
}

.torley-nav-social-link {
    color: var(--global-palette1);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 3px;
    border-radius: 10px;
    cursor: pointer;
}

.torley-nav-social-link:hover, .ice .torley-nav-social-link {
    color: var(--global-palette3);
    background-color: #1a1a1a!important;
}

.torley-nav-mobile-toggle {
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: color 100ms;
    background-color: var(--global-palette8);
    display: none;
    align-items: center;
    justify-content: center;
}


.torley-nav-mobile-toggle:hover,
.torley-nav-mobile-toggle:focus,
.ice .torley-nav-mobile-toggle {
    background-color: #1a1a1a!important;
}

.torley-nav-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--global-palette8);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.torley-nav-mobile-menu.active {
    right: 0;
}

.torley-nav-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.torley-nav-mobile-overlay.active {
    display: block;
}

.torley-nav-mobile-header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--global-palette5);
}

.torley-nav-mobile-close {
    background: transparent;
    border: none;
    color: var(--global-palette1);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.torley-nav-mobile-list {
    list-style: none;
    padding: 20px;
}

.torley-nav-mobile-list li {
    border-bottom: 1px solid white;
}


.torley-nav-mobile-list li:last-child {
    border-bottom: none!important;
}

.torley-nav-mobile-list a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.torley-nav-mobile-list a:hover,
.torley-nav-mobile-list a.active,
.ice .torley-nav-mobile-list a {

    color: var(--global-palette3);
}

.torley-nav-mobile-list .has-children {
    position: relative;
}

.torley-nav-mobile-toggle-submenu, .torley-nav-mobile-toggle-submenu:hover, .torley-nav-mobile-toggle-submenu:focus {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent!important;
    border: none;
    color: white;
    cursor: pointer;
    padding: 15px;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.torley-nav-mobile-toggle-submenu.active {
    transform: translateY(-50%) rotate(180deg);
}

.torley-nav-mobile-submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.torley-nav-mobile-submenu.active {
    max-height: 500px;
}

.torley-nav-mobile-submenu a {
    font-size: 14px;
    padding: 10px 0;
    text-transform: none;
}

@media (max-width: 1024px) {
    .torley-nav-menu {
        display: none;
    }

    .torley-nav-mobile-toggle {
        display: flex;
    }

    .torley-nav-mobile-menu {
        display: block;
    }

    .torley-nav-search-input {
        width: 0;
        padding: 0;
        border: none;
        opacity: 0;
    }

    .torley-nav-search-input.expanded {
        width: 180px;
        padding: 8px 12px;
        border: 1px solid var(--global-palette5);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .torley-nav-social {
        display: none;
    }

    .torley-nav-search-input.expanded {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .torley-nav-logo img {
        height: 40px;
    }

    .torley-nav-main {
        height: 60px;
    }

    .torley-nav-container {
        padding: 0 15px;
    }
}
