/* 固定导航栏的CSS */
.ec-globalNaviRole {
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    /* 基础样式已在twig文件中设置为半透明 */
}

/* 导航链接悬停效果 */
.ec-globalNaviRole__navLink {
    transition: all 0.3s ease !important;
}

.ec-globalNaviRole__navLink:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 滚动后固定的样式 */
.ec-globalNaviRole.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    animation: slideDown 0.4s forwards;
    background: linear-gradient(135deg, rgba(0, 40, 95, 0.75) 0%, rgba(0, 65, 130, 0.75) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* 确保背景图层也是透明的 */
.ec-globalNaviRole:before,
.ec-globalNaviRole.is-fixed:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 40, 95, 0.8) 0%, rgba(0, 65, 130, 0.8) 100%);
    z-index: -1;
}

.ec-globalNaviRole__wrapper {
    position: relative;
    z-index: 2;
    background: transparent !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 确保在移动设备上正常显示 */
@media (max-width: 767px) {
    .ec-globalNaviRole.is-fixed {
        display: none !important;
    }
}

/* 添加活跃状态的闪光效果 */
.ec-globalNaviRole__navLink.is-active {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.ec-globalNaviRole__navLink.is-active::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shineEffect 2s infinite;
}

@keyframes shineEffect {
    0% {
        left: -50%;
        top: -50%;
    }
    100% {
        left: 100%;
        top: 100%;
    }
} 