/* 站点主导航：电脑横排 / 手机三分组下拉 */
.main-nav {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    min-height: 56px;
}

/* —— 电脑端：一级横排 —— */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    flex-wrap: wrap;
}

.nav-links a {
    display: block;
    padding: 18px 14px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: #c41e3a;
    border-bottom-color: #c41e3a;
    background: #fef2f2;
}

/* —— 手机端：首页 + 三个下拉（默认隐藏） —— */
.nav-mobile-bar {
    display: none;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
}

.nav-mobile-home {
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-mobile-home.active,
.nav-mobile-home:hover {
    color: #c41e3a;
    background: #fef2f2;
}

.nav-m-dropdown {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
}

.nav-m-dropdown__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    max-width: 100%;
    font-family: inherit;
    line-height: 1.2;
    -webkit-tap-highlight-color: rgba(196, 30, 58, 0.15);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.nav-m-dropdown__btn:hover,
.nav-m-dropdown.open .nav-m-dropdown__btn,
.nav-m-dropdown.is-parent-active .nav-m-dropdown__btn {
    color: #c41e3a;
    border-color: #fecaca;
    background: #fef2f2;
}

.nav-m-dropdown__btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nav-m-dropdown.open .nav-m-dropdown__btn svg {
    transform: rotate(180deg);
}

.nav-m-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 132px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    z-index: 120;
}

.nav-m-dropdown.open .nav-m-dropdown__panel {
    display: block;
}

.nav-m-dropdown__panel a {
    display: block;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.nav-m-dropdown__panel a:hover,
.nav-m-dropdown__panel a.active {
    color: #c41e3a;
    background: #fef2f2;
}

/* 废弃：汉堡全屏菜单（由三分组替代） */
.mobile-menu-btn,
.mobile-menu {
    display: none !important;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-mobile-bar {
        display: flex;
    }

    .nav-container {
        padding: 0 10px;
        gap: 6px;
    }
}

@media (max-width: 380px) {
    .nav-m-dropdown__btn {
        font-size: 0.72rem;
        padding: 7px 6px;
    }

    .nav-mobile-home {
        font-size: 0.82rem;
        padding: 7px 8px;
    }
}
