/**
 * Modern Header Styles
 */
/* 顶部头部 */
.top-header {
    background: #000;
    color: #fff;
    padding: 20px 0;
}

/* Logo */
.custom-logo-link {
    display: block;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
    display: block;
}
/* Header Container */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

/* Top Bar */
.top-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-item {
    margin-right: 20px;
}

.top-bar-item:last-child {
    margin-right: 0;
}

.top-bar a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: #0275d8;
}

.top-bar .bi {
    margin-right: 5px;
}

/* Main Header */
.main-header {
    padding: 15px 0;
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-description {
    font-size: 0.9rem;
    margin: 0;
    color: #6c757d;
}

.header-actions {
    display: flex;
    align-items: center;
}

.header-action-item {
    margin-left: 20px;
    position: relative;
}

.header-action-link {
    color: #343a40;
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.header-action-link:hover {
    color: #0275d8;
}

.header-action-text {
    margin-left: 5px;
    font-size: 0.9rem;
}

.header-action-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #0275d8;
    color: #fff;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Navigation */
.main-nav {
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    /* Removed bottom border as requested */
}

.navbar {
    padding: 0;
}

.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #343a40;
    font-weight: 500;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: #0275d8;
    /* Removed background hover effect */
}

.nav-link .bi {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* Dropdown Menu */
.dropdown-menu.submenu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%; /* Full width container */
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    border-top: 3px solid #0275d8;
    border-radius: 0 0 4px 4px;
    padding: 20px;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

/* Make nav items position static to allow full-width submenu */
.nav-item.has-submenu {
    position: static !important;
}

/* Show submenu on hover */
.nav-item.has-submenu:hover > .dropdown-menu.submenu {
    opacity: 1;
    visibility: visible;
}

.submenu-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.submenu-columns.row {
    margin: 0 -15px;
    display: flex;
    flex-wrap: wrap;
}

.submenu-column {
    display: flex;
    height: 400px;
    overflow: auto;
    padding: 0 15px;
    margin-bottom: 20px;
}

.submenu-group {
    margin-bottom: 15px;
    padding: 0 15px;
}

.submenu-heading {
    margin: 0 0 10px 0;
    padding: 0 0 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.submenu-heading a {
    color: #343a40;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.submenu-heading a:hover {
    color: #0275d8;
}

.submenu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-items li {
    margin-bottom: 5px;
}

.submenu-items a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.submenu-items a:hover {
    color: #0275d8;
    padding-left: 5px;
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 10px;
    font-size: 1.5rem;
    color: #343a40;
}

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

/* Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background-color: #fff;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 1050;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    .navbar-nav {
        flex-direction: column;
    }
    
    .nav-item {
        border-bottom: 1px solid #e9ecef;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .dropdown-menu.submenu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid #0275d8;
        border-radius: 0;
        padding: 0 0 0 15px;
        margin: 0 0 10px 15px;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .dropdown-menu.submenu.show {
        display: block;
    }
    
    .submenu-columns.row {
        display: block;
        margin: 0;
    }
    
    .submenu-column {
        padding: 0;
        margin-bottom: 15px;
    }
    
    .submenu-heading {
        font-size: 1rem;
    }
}

/* Animation Effects */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects - removed underline */
.nav-link:hover {
    color: #0275d8;
}

/* Active State */
.nav-item.active > .nav-link {
    color: #0275d8;
}

.nav-item.active > .nav-link::after {
    width: 100%;
    left: 0;
}

/* Additional Hover Effects */
.menu-link {
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #0275d8;
    transition: width 0.3s ease;
}

.menu-link:hover::before,
.menu-item.active > .menu-link::before {
    width: 100%;
}

/* Animation Effects */
.mega-menu.show {
    animation: fadeInDown 0.3s ease;
}

.submenu-wrapper.show {
    animation: fadeInRight 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Make sure ALL MENUS is visible */
.all-menus-wrapper {
    display: block !important;
}

/* Enhance mobile experience */
@media (max-width: 991.98px) {
    .menu-link::before {
        display: none;
    }
    
    .mega-menu.show,
    .submenu-wrapper.show,
    .menu-level-3.show {
        animation: none;
    }
    
    .submenu-header h4 {
        font-size: 1rem;
        padding: 10px 0;
    }
    
    .menu-level-1 > .menu-item > .menu-link {
        font-weight: 500;
    }
}
