/* 2025可持续发展论坛 - Header和导航条样式 */

/* 白色Header */
#white-header {
    position: relative;
    z-index: 10000;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-link {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.home-link:hover {
    transform: scale(1.02);
}

.header-logo {
    height: 100px !important;
    width: auto !important;
    max-height: 100px !important;
    max-width: none !important;
    object-fit: contain;
    display: block;
}

/* 绿色导航条 - 恢复sticky行为 */
#green-navigation {
    position: sticky;
    top: 0;
    z-index: 999999;
    background: #367F54;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
}

/* WordPress管理员工具栏适配 */
.admin-bar #green-navigation {
    top: 32px;
}

/* 导航内容容器 */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0;
    padding: 0;
}

/* 导航链接样式 - 绿色背景白字 */
.nav-link {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-radius: 0;
}

/* 导航链接悬停效果 */
.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* 活动状态样式 */
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* 导航条底部边框效果 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

/* 页面内容不需要预留空间，因为导航栏使用sticky定位 */
body {
    padding-top: 0;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式调整 - 平板 */
@media (max-width: 1024px) {
    .nav-container {
        padding: 8px 20px;
    }
    
    .header-logo {
        height: 45px;
    }
}

/* 响应式调整 - 小屏幕平板 */
@media (max-width: 768px) {
    .nav-container {
        padding: 6px 15px;
    }
    
    .header-logo {
        height: 40px;
    }
}

/* 防止内容跳动 */
.nav-container * {
    box-sizing: border-box;
}

/* 优化字体渲染 */
.nav-link {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 焦点状态（移除outline） */
.nav-link:focus {
    outline: none;
}


/* 打印样式 */
@media print {
    #custom-forum-header {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}