/* 顶部导航栏样式 */
.header {
    background: url('/npm/image.png') no-repeat center top; /* 背景图片 */
    background-size: cover;
    text-align: center;
    padding: 20px 0;
}

.top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-right: 20px;
}

/* 桌面端导航容器样式 */
.dh-nav-desktop {
    display: flex;
    flex-wrap: wrap; /* 支持多行显示 */
    justify-content: flex-start;
    padding: 10px 20px;
    color: #fff;
}

/* 一级导航样式（桌面端） */
.dh-nav-desktop > .nav-item {
    position: relative;
    margin-right: 20px;
}

.dh-nav-desktop > .nav-item > a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    display: block;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.dh-nav-desktop > .nav-item > a:hover {
    background: #0056b3;
}

/* 二级导航样式（桌面端） */
.dropdown {
    display: none;
    position: absolute;
    top: 100%; /* 定位到一级导航下方 */
    left: 0;
    background: #f0f0f0; /* 灰色背景 */
    color: #fff; /* 默认文字白色 */
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 5px;
    min-width: 150px; /* 最小宽度 */
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333; /* 默认深灰色文字 */
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease, color 0.3s ease;
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background: #d6d6d6; /* 浅灰色背景悬停效果 */
    color: #000; /* 黑色文字悬停效果 */
}

/* 悬停显示二级导航（桌面端） */
.dh-nav-desktop > .nav-item:hover .dropdown {
    display: block;
}

/* 搜索框样式 */
.search-container {
    margin-top: 20px;
}

.search-container form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-container input {
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.search-container button {
    padding: 10px 20px;
    background-color: #f90;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-container button:hover {
    background-color: #e88;
}
/* 底部样式 */
footer {
    background-color: #f9f9f9;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 移动端菜单切换按钮 */
.menu-toggle {
    display: none;
    background-color: #333;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* 移动端导航容器样式 */
.dh-nav-mobile {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    background: #444;
    padding: 10px;
}

/* 一级导航样式（移动端） */
.dh-nav-mobile > .nav-item {
    padding: 10px 0;
    border-bottom: 1px solid #555;
}

.dh-nav-mobile > .nav-item > a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

/* 二级分类直接展示（移动端） */
.sub-categories {
    margin-top: 5px;
    padding-left: 20px;
}

.sub-categories a {
    display: block;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    margin: 5px 0;
}

.sub-categories a:hover {
    color: #fff;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px; /* 按钮间距 */
    flex-wrap: wrap; /* 支持多行显示 */
}

.pagination a {
    margin: 0;
    text-decoration: none;
    padding: 8px 15px; /* 按钮内边距 */
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #007bff;
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #f0f0f0;
    color: #0056b3;
}

.pagination .active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
.hot-search {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.hot-search a {
    margin-right: 10px;
    text-decoration: none;
    color: #edeff1;
    transition: color 0.3s ease;
}

.hot-search a:hover {
    color: #0056b3;
}

/* 隐藏热搜词在移动端 */
.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
}
/* 响应式调整 */
@media screen and (max-width: 768px) {
    .pagination {
        flex-direction: column; /* 分页按钮垂直排列 */
        gap: 5px; /* 垂直间距 */
    }

    .pagination a {
        width: 100%; /* 按钮宽度填满 */
        text-align: center;
    }

    .dh-nav-desktop {
        display: none; /* 隐藏桌面端导航 */
    }

    .menu-toggle {
        display: block; /* 显示菜单切换按钮 */
        width: 100%;
        text-align: left;
    }

    .dh-nav-mobile {
        display: none;
    }

    .dh-nav-mobile.open {
        display: flex; /* 显示移动端导航 */
    }
	
    .search-container input {
        width: 100%;
    }

    .search-container button {
        width: 100%;
    }
}