/**
/**
 * Header Customization
 *
 * Overrides default Material for MkDocs header styles to create a custom layout.
 */

/* Header: Main container layout */

@media screen and (min-width: 1220px) {
.md-header__inner {
    display: flex !important;
    justify-content: flex-start !important; 
    align-items: center !important;
    width: 100%;
}

/* Header: Hide original title element to prevent duplication */
.md-header__title {
    display: none !important;
}

/* Header: Custom left-aligned group container */
.header-left-group {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Header: Adjust margin for custom title block */
.header-left-group > .custom-title-wrapper {
    margin-left: -0.5rem;
}

/* Header: Adjust margin for top navigation */
.header-left-group > .custom-top-nav {
    margin-left: 2.5rem;
}


/* Header: Adjust margin for the moved search box */
.header-left-group > .md-search {
    margin-left: 1.5rem;
}


/*
.header-left-group > .md-search {
    margin-left: auto;
}
*/

/**
 * Custom Header Content
 */

.header-left-group > .custom-title-wrapper {
    margin-left: -0.1rem;
    margin-top: 2px;
}

/* Custom Header: Title and Subtitle wrapper */
.custom-title-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 2px;
    margin-top: 20px;
}
.site-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}
.site-subtitle {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}


/**
 * Custom Top Navigation
 */

/* Custom Navigation: Main container */
.custom-top-nav {
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Space between navigation items */
}

/* Navigation Button: Base styles */
.nav-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

/* Navigation Button: Hover state */
.nav-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}


/**
 * Dropdown Menu (Alibaba Style)
 */

/* Dropdown: Main container */
.dropdown-container { 
    position: relative; 
}

/* Dropdown: Menu box styling */
.dropdown-menu { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    min-width: 160px;
    background: white; 
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000; 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-10px); 
    transition: all 0.2s ease; 
    margin-top: 0.25rem; 
    padding: 6px; 
    overflow: hidden; 
}

/* Dropdown: Visibility on hover/active */
.dropdown-container:hover .dropdown-menu, 
.dropdown-container.active .dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

/* Dropdown: Menu item styling */
.dropdown-item { 
    display: block; 
    padding: 8px 12px;
    color: #1f1f1f;
    text-decoration: none; 
    font-size: 14px;
    font-weight: 400;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* Dropdown: Menu item hover state */
.dropdown-item:hover { 
    background-color: #f5f5f5;
    color: #1f1f1f;
}

/* Dropdown Arrow: Custom styling (from previous request) */
.dropdown-arrow {
    margin-left: 0.25rem; 
    font-size: 0.6em;
}


/**
 * Responsive Design
 */

/* Adjustments for smaller screens (e.g., mobile) */
@media (max-width: 768px) {
    .custom-title-wrapper,
    .custom-top-nav {
        display: none !important;
    }
}

.md-search__overlay {
  background: transparent !important;
  backdrop-filter: none !important;
}
}

.md-header__option[data-md-component="palette"] {
    display: none !important;
}

@media screen and (min-width: 1220px) {
    .md-header__inner {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease-out;
    }

    .md-header__inner.header-ready {
        opacity: 1;
        visibility: visible;
    }
}

@media screen and (min-width: 1220px) {
    .md-header {
        z-index: 100 !important;
    }

    .md-search__output {
        z-index: 101 !important;
        background-color: #fff; 
    }

    .md-search__overlay {
        z-index: 99 !important;
    }
