/* 
 * 导航修复样式
 * 注意：如果出现"Referrer 策略strict-origin-when-cross-origin"提示，这是正常现象
 * 这是Chrome的默认安全策略，用于保护用户隐私，不需要修复
 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    position: relative;
    z-index: 1001;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.2rem);  /* 减少顶部间距，使菜单更靠近触发元素 */
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);  /* 减少移动距离，使动画更平滑 */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    will-change: transform, opacity;
    margin-top: 0;
}

/* 添加一个空的伪元素，扩大可点击区域 */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: 999;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 激活状态的导航链接 */
.dropdown-menu a.active {
    background: transparent;
    color: #333;
    font-weight: 500;  /* 与非激活状态保持一致的字体粗细 */
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

/* 确保激活状态的悬停效果与非激活状态一致 */
.dropdown-menu a.active:hover {
    background: #f8fafc;
    color: inherit;
} 