.splunk-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: white;

    @media (max-width: 1324px) {
        height: var(--mobile-header-height);
    }

    .search-dropdown {
        position: fixed;
        left: 50%;
        top: var(--header-height);
        transform: translateX(-50%) translateY(-20px);
        width: min(70%, 800px);
        background: white;
        border-radius: 6px;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        z-index: 1001;
        padding: 2rem;
        box-sizing: border-box;
        height: auto;
        max-height: 0;
        overflow: hidden;
        max-height: 500px;
        max-width: 1379px;
        width: 100%;

        @media (max-width: 1324px) {
            top: var(--mobile-header-height);
        }
    }

    .search-button:hover~.search-dropdown,
    .search-dropdown:hover,
    .search-dropdown:focus-within,
    .search-icon:hover~.search-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0px);

    }

    .search-dropdown-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .search-dropdown-content h3 {
        display: none;
    }

    .search-dropdown-content input[type="text"] {
        width: 100%;
        padding: 0.875rem 1rem;
        border: 1px solid #656c76;
        border-radius: 4px;
        font-size: 16px;
        background: white;
        color: var(--splunk-mineshaft);
        box-sizing: border-box;
        transition: border-color 0.2s ease;

        &::placeholder {
            color: #999;
        }

        &:focus {
            outline: none;
            border-color: var(--splunk-lipstick);
        }
    }

    .search-dropdown-content button[type="submit"] {
        display: none;
    }

    .language-button-container {
        position: relative;
    }

    .language-dropdown {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        z-index: 1001;
        padding: 0.5rem 0;
        box-sizing: border-box;
        left: 50%;
        top: var(--header-height);
        transform: translateX(-50%) translateY(-20px);
        width: min(70%, 800px);
        background: white;
        border-radius: 4px;
        width: max-content;
        height: auto;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);

        &:before {
            border-color: transparent transparent #fff;
            border-style: solid;
            border-width: 0 13px 13px;
            top: -14px;
            content: " ";
            -webkit-filter: drop-shadow(0px -1px 1px rgba(0, 0, 0, .1));
            filter: drop-shadow(0px -1px 1px rgba(0, 0, 0, 0.1));
            height: 0;
            left: 50%;
            position: absolute;
            -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
            width: 0;
            z-index: 1001;
        }

        a {
            text-decoration: none;
            width: 100%;
            padding: 0.5rem 2rem;
            margin: 0;
            font-weight: 700;
            color: var(--splunk-mineshaft);
            display: block;
        }

        a:hover {
            text-decoration: none;
            color: var(--splunk-lipstick);
            background-color: var(--splunk-lightgrey);
        }
    }

    .language-dropdown-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .globe-button:hover~.language-dropdown,
    .language-dropdown:hover,
    .language-dropdown:focus-within,
    .language-icon:hover~.language-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0px);
    }

    .user-button-container {
        position: relative;
    }

    .user-dropdown {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        z-index: 1001;
        padding: 0.5rem 0;
        box-sizing: border-box;
        left: 50%;
        top: var(--header-height);
        transform: translateX(-50%) translateY(-20px);
        width: min(70%, 800px);
        background: white;
        border-radius: 4px;
        width: max-content;
        height: auto;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);


        &:before {
            border-color: transparent transparent #fff;
            border-style: solid;
            border-width: 0 13px 13px;
            top: -14px;
            content: " ";
            -webkit-filter: drop-shadow(0px -1px 1px rgba(0, 0, 0, .1));
            filter: drop-shadow(0px -1px 1px rgba(0, 0, 0, 0.1));
            height: 0;
            left: 50%;
            position: absolute;
            -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
            width: 0;
            z-index: 1001;
        }

        a {
            text-decoration: none;
            width: 100%;
            padding: 0.5rem 2rem;
            margin: 0;
            font-weight: 700;
        }

        a:hover {
            text-decoration: none;
            color: var(--splunk-lipstick);
            background-color: var(--splunk-lightgrey);
        }
    }

    .user-dropdown-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .user-button:hover~.user-dropdown,
    .user-dropdown:hover,
    .user-dropdown:focus-within,
    .user-icon:hover~.user-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0px);
    }

    .glove-button:focus,
    .globe-button:focus-within,
    .user-button:focus,
    .user-button:focus-within,
    .search-button:focus,
    .search-button:focus-within,
    .splunk-hamburger:focus,
    .splunk-hamburger:focus-within {
        box-shadow: none;
    }
}

.splunk-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
    max-width: 1880px;
    margin: 0 auto;

    @media (max-width: 768px) {
        padding: 0 1rem;
    }
}

body:has(.splunk-homepage),
body:has(.splunk-sitesection),
body:has(.search-results-container),
body:has(.error-container) {
    .splunk-nav {
        max-width: 1440px;
        padding: 0 2rem;

        @media (max-width: 768px) {
            padding: 0 1rem;
        }
    }

    .section-description {
        margin-top: unset;
    }
}

body:has(.splunk-homepage) .splunk-nav,
body:has(.splunk-sitesection) .splunk-nav {
    @media (max-width: 1440px) {
        padding: 0 4rem;
    }

    @media (max-width: 1024px) {
        padding: 0 2rem;
    }

    @media (max-width: 768px) {
        padding: 0 1rem;
    }
}

.splunk-nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.splunk-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;

    .logo-img {
        height: 47px;
        width: auto;
        margin-top: 5px;

        @media (max-width: 1324px) {
            height: 36px;
        }

        @media (max-width: 768px) {
            height: 28px;
        }
    }

}

.splunk-nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.splunk-nav-item {
    position: relative;
    margin-top: 0;
}

.splunk-nav-link {
    background: none;
    border: none;
    color: var(--splunk-mineshaft);
    font-weight: 600;
    padding: 1rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    transition: color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
    }
}

.splunk-nav-item:hover .splunk-nav-link,
.splunk-nav-item.active .splunk-nav-link {
    color: var(--splunk-lipstick);
}

.splunk-nav-chevron {
    width: 16px;
    height: 16px;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

.splunk-nav-item:hover .splunk-nav-chevron {
    transform: rotate(180deg);
}

.splunk-dropdown {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: min(calc(100% - 4rem), 1440px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, height 0.5s ease;
    z-index: 1001;
    box-sizing: border-box;
    height: 0;
}

.splunk-nav-item:hover .splunk-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    height: auto;
}

.splunk-dropdown-content {
    display: flex;
    gap: 20px;
    align-items: stretch
}

.splunk-dropdown-left {
    flex: 0 0 280px;
    min-width: 280px;
    padding: 2rem;
}

.splunk-dropdown-section {
    margin-bottom: 2rem;

    &:last-child {
        margin-bottom: 0;
    }
}

.splunk-dropdown-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--splunk-mineshaft);
}

.splunk-dropdown-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--splunk-darkgrey);
    margin: 0 0 0.75rem 0;
}

.splunk-dropdown-link {
    font-size: 14px;
    color: var(--splunk-lipstick);
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

.splunk-dropdown-right {
    flex: 1;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    border-left: 1px solid #e5e5e5;
    padding-left: 20px;
    background-color: var(--splunk-lightgrey);
    padding: 2rem;
    font-family: "Splunk Data Sans Pro", var(--pico-font-family);
    font-weight: 700;
    color: var(--splunk-darkgrey);
}

.splunk-dropdown-column {
    flex: 1;
    min-width: 200px;
}

.splunk-dropdown-column-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--splunk-grey);
    margin: 0 0 1rem 0;
}

.splunk-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: baseline;

    li {
        margin-top: 0;
    }
}

.splunk-dropdown-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--splunk-mineshaft);
    text-decoration: none;
    display: block;

    &:hover {
        color: var(--splunk-lipstick);
        text-decoration: underline;
    }
}

.splunk-nav-right {
    display: flex;
    align-items: center;
    gap: .5rem;

    button {
        height: var(--header-height);
    }
}

.splunk-nav-icon {
    background: none;
    border: none;
    color: var(--splunk-grey);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
    }

    svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }
}

@media (min-width: 1480px) {

    /* On large screens, align to right edge of 1440px centered container */
    .splunk-nav-item-resources .splunk-dropdown {
        right: calc((100% - 1440px) / 2);
    }
}

/* Ensure dropdown stays open when hovering over it */
.splunk-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Active state for nav items */
.splunk-nav-item.active .splunk-nav-link {
    color: var(--splunk-lipstick);
}

/* Hamburger button */
.splunk-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--splunk-mineshaft);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
    }

    svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }
}

/* Mobile Menu Overlay */
.splunk-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.splunk-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.splunk-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background-color: white;
    z-index: 1002;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);

    li {
        list-style: none;
    }
}

.splunk-mobile-menu.active {
    right: 0;
}

.splunk-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.splunk-mobile-menu-close {
    background: none;
    border: none;
    color: var(--splunk-mineshaft);
    cursor: pointer;
    padding: 0.5rem 0 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
    }

    svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }
}

.splunk-mobile-menu-content {
    padding: 1rem 0;
}

.splunk-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.splunk-mobile-nav-item {
    border-bottom: 1px solid #e5e5e5;
    margin: 0;
}

.splunk-mobile-nav-link {
    box-shadow: none;
    width: 100%;
    background: none;
    border: none;
    color: var(--splunk-mineshaft);
    font-weight: 600;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    transition: color 0.2s ease, background-color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
        /* background-color: #f5f5f5; */
    }
}

.splunk-mobile-nav-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.splunk-mobile-nav-item.active .splunk-mobile-nav-chevron {
    transform: rotate(180deg);
}

.splunk-mobile-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.splunk-mobile-nav-item.active .splunk-mobile-dropdown {
    max-height: 2000px;
}

.splunk-mobile-dropdown-content {
    padding: 1rem;
    background-color: #f9f9f9;
}

.splunk-mobile-dropdown-left {
    margin-bottom: 1rem;
}

.splunk-mobile-dropdown-section {
    margin-bottom: 1.5rem;

    &:last-child {
        margin-bottom: 0;
    }
}

.splunk-mobile-dropdown-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--splunk-mineshaft);
}

.splunk-mobile-dropdown-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--splunk-darkgrey);
    margin: 0 0 0.75rem 0;
}

.splunk-mobile-dropdown-link {
    font-size: 14px;
    color: var(--splunk-lipstick);
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

.splunk-mobile-dropdown-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.splunk-mobile-dropdown-column {
    flex: 1;
}

.splunk-mobile-dropdown-column-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--splunk-grey);
    margin: 0 0 1rem 0;
}

.splunk-mobile-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.splunk-mobile-dropdown-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--splunk-mineshaft);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;

    &:hover {
        color: var(--splunk-lipstick);
        text-decoration: underline;
    }
}

.splunk-mobile-menu-icons {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    gap: 0.5remrem;
    padding: 1rem 1rem 1rem 0;
}

.splunk-mobile-nav-icon {
    background: none;
    border: none;
    color: var(--splunk-grey);
    cursor: pointer;
    padding: 0.5rem 1rem 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;

    &:hover {
        color: var(--splunk-lipstick);
    }

    svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }
}

/* Responsive adjustments */
@media (max-width: 1324px) {
    .splunk-nav-menu {
        display: none;
    }

    .splunk-hamburger {
        display: flex;
    }

    .splunk-mobile-menu-overlay {
        display: block;
    }

    .splunk-mobile-menu {
        display: block;
    }
}

@media (min-width: 1325px) {
    .splunk-mobile-menu-overlay {
        display: none !important;
    }

    .splunk-mobile-menu {
        display: none !important;
    }
}

@media (max-width: 1280px) {

    .splunk-nav-link {
        font-size: 13px;
        padding: 1rem 0.25rem;
    }
}