/* 导航栏样式 - 完全按照原版 RiPro 样式 */

/* 头部样式 - 微透明（仿镜面效果） */
.site-header {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    padding: 10px 0;
    transition: background-color 0.5s cubic-bezier(0.77, 0, 0.175, 1), 
                box-shadow 0.5s cubic-bezier(0.77, 0, 0.175, 1),
                transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 99;
    width: 100%;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.ripro-dark .site-header {
    background-color: rgba(25, 22, 22, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ripro-dark .site-header.scrolled {
    background-color: rgba(25, 22, 22, 0.55);
    border-bottom-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.header-gap {
    height: 76px;
}

/* 导航栏 - 按照原版样式 */
.navbar {
    align-items: center;
    display: flex;
    height: 76px;
    position: relative;
    width: 100%;
}

.navbar .logo-wrapper {
    margin-right: 12px;
    margin-left: 0;
    flex-shrink: 0;
}

.navbar .logo {
    margin-right: 12px;
    max-width: 120px;
    max-height: 50px;
    height: auto;
    width: auto;
}

.navbar .logo.text {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.navbar .logo.text:hover {
    color: #0073aa;
}

.navbar .sep {
    display: flex;
    height: 100%;
    margin: 0 20px;
    width: 1px;
}

.navbar .sep:after {
    background-color: #e6e6e6;
    content: "";
    height: 50%;
    margin: auto;
    transition: background-color 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    width: 100%;
}

/* 导航菜单 */
.navbar .main-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
    overflow: visible;
}

.navbar .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
}

.navbar .menu-item {
    display: inline-block;
    position: relative;
}

.navbar .menu-item > a {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 14px;
    line-height: 76px;
    height: 76px;
    margin: 0 12px;
    padding: 0 2px;
    transition: color 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    color: #333;
    text-decoration: none;
    position: relative;
    text-align: center;
}

/* 菜单悬停效果 - 完全按照原版 RiPro 子主题样式 */
.navbar .nav-list > .menu-item > a:before {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #25b7f5;
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transition: .3s;
}

.navbar .nav-list > .menu-item > a:hover:before {
    opacity: 1;
    bottom: -1px;
}

.navbar .menu-item > a:hover,
.navbar .menu-item.current-menu-item > a,
.navbar .menu-item.current-menu-ancestor > a,
.navbar .menu-item.current-menu-parent > a {
    color: #25b7f5;
}

.navbar .nav-list > .menu-item.current-menu-item > a:before,
.navbar .nav-list > .menu-item.current-menu-ancestor > a:before,
.navbar .nav-list > .menu-item.current-menu-parent > a:before {
    opacity: 1;
    bottom: -1px;
}

/* 多级菜单右边小三角 - 使用细线CSS实现，完全居中 */
.navbar .menu-item.menu-item-has-children > a:after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid #aaa;
    margin-left: 5px;
    vertical-align: middle;
    transition: border-top-color 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    flex-shrink: 0;
    align-self: center;
}

.navbar .menu-item.menu-item-has-children > a:hover:after {
    border-top-color: #25b7f5;
}

.ripro-dark .navbar .menu-item.menu-item-has-children > a:hover:after {
    border-top-color: #FFC107;
}

.navbar .sub-menu .menu-item.menu-item-has-children > a:after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 3px solid #aaa;
    margin-left: auto;
    margin-right: 0;
    vertical-align: middle;
    transition: border-left-color 0.3s ease;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.navbar .sub-menu .menu-item.menu-item-has-children > a:hover:after {
    border-left-color: #25b7f5;
}

.ripro-dark .navbar .sub-menu .menu-item.menu-item-has-children > a:hover:after {
    border-left-color: #FFC107;
}

.navbar .sub-menu {
    background-color: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    list-style-type: none;
    margin: -1px 0 0 -18px !important;
    min-width: 220px;
    opacity: 0;
    padding: 8px 0 !important;
    position: absolute;
    top: 100%;
    transform: translateY(5px);
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    visibility: hidden;
    z-index: 80;
    overflow: hidden;
}

.navbar .menu-item:hover > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.navbar .sub-menu .menu-item {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.navbar .sub-menu li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.navbar .sub-menu .menu-item > a {
    align-items: center;
    display: flex;
    font-size: 11px;
    line-height: 2.5 !important;
    padding: 6px 30px 6px 30px !important;
    margin: 0 !important;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    height: auto !important;
    min-height: auto !important;
}

.navbar .sub-menu .menu-item.menu-item-has-children > a {
    padding-right: 40px !important;
}

/* 子菜单左边短线 - 完全按照原版样式 */
.navbar .sub-menu .menu-item > a:before {
    content: '';
    height: 1px;
    width: 10px;
    background-color: #25b7f5;
    opacity: 0;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 300ms linear 0ms;
}

.navbar .sub-menu .menu-item > a:hover,
.navbar .sub-menu .menu-item.current-menu-item > a {
    color: #25b7f5;
    padding-left: 1.75rem;
    opacity: 1;
}

.navbar .sub-menu .menu-item > a:hover:before,
.navbar .sub-menu .menu-item.current-menu-item > a:before {
    opacity: 1;
}


/* 操作按钮区域 */
.navbar .actions {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
    gap: 10px;
}

.navbar .navbar-button {
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    font-size: 18px;
    height: 36px;
    width: 36px;
    justify-content: center;
    background: linear-gradient(125deg, #18cef2 0%, #448aff 100%);
    box-shadow: 4px 3px 10px #2f6bd024;
    border: 0;
    color: #fff;
    transition: transform 0.1s;
    position: relative;
}

.navbar .navbar-button:hover {
    transform: scale(1.05);
}

.navbar .navbar-button svg {
    width: 20px;
    height: 20px;
}

.navbar .telegram-btn {
    background: linear-gradient(125deg, #2cace2 0%, #2f80ed 100%);
}

.navbar .burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 36px;
    width: 36px;
}

.navbar .burger-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

.ripro-dark .navbar .burger-line {
    background-color: #FFC107;
}

body.mobile-nav-open {
    overflow: hidden;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 110;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 340px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
    z-index: 111;
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 24px 24px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav-panel.open {
    right: 0;
}

.ripro-dark .mobile-nav-panel {
    background: rgba(25, 22, 22, 0.95);
    color: #fff;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.mobile-nav-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.ripro-dark .mobile-nav-title {
    color: #fff;
}

.mobile-nav-close {
    position: relative;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-nav-close span {
    position: absolute;
    left: 8px;
    top: 17px;
    width: 20px;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.mobile-nav-close span:first-child {
    transform: rotate(45deg);
}

.mobile-nav-close span:last-child {
    transform: rotate(-45deg);
}

.ripro-dark .mobile-nav-close span {
    background-color: #fff;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav-list .menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-list .menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav-list .menu-item.current-menu-item > a {
    color: #25b7f5;
}

.ripro-dark .mobile-nav-list .menu-item > a {
    color: #f5f5f5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ripro-dark .mobile-nav-list .menu-item.current-menu-item > a {
    color: #FFC107;
}

.mobile-nav-panel .sub-menu {
    list-style: none;
    padding-left: 16px;
    margin: 6px 0 0;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-nav-panel .sub-menu .menu-item > a {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
    border: 0;
}

.ripro-dark .mobile-nav-panel .sub-menu {
    border-left-color: rgba(255, 255, 255, 0.15);
}

.ripro-dark .mobile-nav-panel .sub-menu .menu-item > a {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-nav-panel .menu-item-has-children > a {
    position: relative;
    padding-right: 20px;
}

/* 暗色模式切换按钮图标 - 修正逻辑：白天显示月亮（点击切换到暗夜），暗夜显示太阳（点击切换到白天） */
.navbar .tap-dark .theme-icon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

/* 白天模式：显示月亮图标（表示点击后切换到暗夜模式） */
.navbar .tap-dark .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.navbar .tap-dark .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* 暗夜模式：显示太阳图标（表示点击后切换到白天模式） */
.ripro-dark .navbar .tap-dark .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.ripro-dark .navbar .tap-dark .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* 搜索框已移除 */

/* 暗色模式样式 */
.ripro-dark .navbar .logo.text {
    color: #fff;
}

.ripro-dark .navbar .sep:after {
    background-color: rgba(255, 255, 255, 0.2);
}

.ripro-dark .navbar .menu-item > a {
    color: #eee;
}

.ripro-dark .navbar .menu-item > a:hover,
.ripro-dark .navbar .menu-item.current-menu-item > a {
    color: #FFC107;
}

.ripro-dark .navbar .nav-list > .menu-item > a:before {
    background-color: #FFC107;
}

.ripro-dark .navbar .sub-menu .menu-item > a:hover,
.ripro-dark .navbar .sub-menu .menu-item.current-menu-item > a {
    color: #FFC107;
}

.ripro-dark .navbar .sub-menu .menu-item > a:before {
    background-color: #FFC107;
}

.ripro-dark .navbar .sub-menu {
    background-color: #191616;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.ripro-dark .navbar .navbar-button {
    background: linear-gradient(125deg, #333 0%, #000000 100%);
    box-shadow: 4px 3px 10px #40404024;
    border: 2px solid #000;
    color: #FFC107;
}

.ripro-dark .navbar .navbar-button:hover {
    transform: scale(1.05);
}


/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .main-menu {
        display: none;
    }
    
    .navbar .actions {
        gap: 8px;
    }
    
    .navbar .sep {
        display: none;
    }
    
    .navbar .burger {
        display: flex;
    }
    
    .site-header {
        padding: 10px 0;
        margin-top: 0;
        box-shadow: 0 0;
    }
    
    .header-gap {
        height: 76px;
    }
    
    .navbar {
        height: 76px;
    }
    
    .mobile-nav-panel {
        padding-top: 32px;
    }
}

