/* ================= 导航栏样式 ================= */
:root {
    --gn-primary: #8B0000;       /* 主色调 */
    --gn-text-dark: #333333;     /* 深色文字 */
    --gn-text-light: #666666;    /* 浅色文字 */
    --gn-bg-white: #ffffff;      /* 背景白 */
    --gn-bg-light: #f9f9f9;      /* 浅灰背景 */
    --gn-height: 80px;           /* 导航高度 */
    --gn-transition: 0.3s;       /* 动画速度 */
}

.global-navbar-container {
    position: fixed; /* 固定定位，覆盖全屏顶部 */
    top: 0; left: 0; width: 100%;
    z-index: 9999;
    font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
}

.gn-navbar {
    height: var(--gn-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Logo */
.gn-logo, .gn-mobile-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gn-primary);
    text-decoration: none;
    letter-spacing: 2px;
}

/* --- 桌面菜单 --- */
.gn-nav-menu {
    display: flex;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.gn-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.gn-nav-link {
    text-decoration: none;
    color: var(--gn-text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--gn-transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.gn-nav-link:hover { color: var(--gn-primary); }

.gn-arrow { font-size: 0.7rem; transition: transform var(--gn-transition); }
.gn-nav-item:hover .gn-arrow { transform: rotate(180deg); }

/* 二级下拉菜单 */
.gn-dropdown {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--gn-bg-white);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0; visibility: hidden;
    transition: all var(--gn-transition);
    z-index: 1001;
    list-style: none; margin: 0;
}
.gn-nav-item:hover .gn-dropdown {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.gn-dropdown li a {
    display: block; padding: 10px 20px;
    text-decoration: none; color: var(--gn-text-light);
    font-size: 0.95rem; transition: all 0.2s;
}
.gn-dropdown li a:hover {
    color: var(--gn-primary);
    background: var(--gn-bg-light);
    padding-left: 25px;
}

/* --- 右侧工具栏 --- */
.gn-right-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.gn-lang-switch {
    border: 1px solid #ddd;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--gn-transition);
    color: var(--gn-text-dark);
    text-decoration: none;
    display: inline-block;
}
.gn-lang-switch:hover { border-color: var(--gn-primary); color: var(--gn-primary); }

.gn-social-icons { display: flex; gap: 20px; }

.gn-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px 0;
}

.gn-social-icon {
    width: 22px; height: 22px;
    fill: var(--gn-text-light);
    transition: fill 0.3s;
}
.gn-icon-wrapper:hover .gn-social-icon { fill: var(--gn-primary); }

/* 悬浮卡片 (下方浮现) */
.gn-hover-card {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 12px;
    transform: translateX(-50%) translateY(-10px);
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    z-index: 1003;
    white-space: nowrap;
}
/* 箭头朝上 */
.gn-hover-card::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}
.gn-icon-wrapper:hover .gn-hover-card {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 卡片内容 */
.gn-qr-img { width: 100px; height: 100px; display: block; margin: 0 auto 5px; border: 1px solid #eee; }
.gn-qr-text { font-size: 0.8rem; color: var(--gn-text-light); }
.gn-phone-number { font-size: 1.1rem; font-weight: bold; color: var(--gn-primary); text-decoration: none; display: block; }
.gn-phone-label { font-size: 0.75rem; color: #999; margin-top: 4px; display: block; }

/* 汉堡按钮 */
.gn-hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    width: 30px; height: 20px;
    justify-content: center;
}
.gn-hamburger span {
    width: 100%; height: 3px;
    background: var(--gn-text-dark);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}
.gn-hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.gn-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.gn-hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- 移动端侧边栏 --- */
.gn-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
}
.gn-overlay.active { opacity: 1; visibility: visible; }

.gn-mobile-sidebar {
    position: fixed;
    top: 0; right: -100%;
    width: 85%; max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
}
.gn-mobile-sidebar.open { right: 0; }

.gn-mobile-header {
    height: var(--gn-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.gn-close-btn {
    width: 30px; height: 30px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gn-close-btn::before, .gn-close-btn::after {
    content: ''; position: absolute;
    width: 20px; height: 2px;
    background: #333; border-radius: 2px;
    transition: all 0.3s;
}
.gn-close-btn::before { transform: rotate(45deg); }
.gn-close-btn::after { transform: rotate(-45deg); }
.gn-close-btn:hover::before, .gn-close-btn:hover::after { background: var(--gn-primary); }

.gn-mobile-content { flex: 1; overflow-y: auto; padding: 20px 25px; }
.gn-mobile-menu { list-style: none; padding: 0; margin: 0; }
.gn-mobile-item { border-bottom: 1px solid #f5f5f5; }

.gn-mobile-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0;
    font-size: 1.1rem; color: var(--gn-text-dark);
    text-decoration: none; font-weight: 600;
    cursor: pointer; transition: color 0.3s;
}
.gn-mobile-link a{
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0;
    font-size: 1.1rem; color: var(--gn-text-dark);
    text-decoration: none; font-weight: 600;
    cursor: pointer; transition: color 0.3s;
}
.gn-mobile-link:hover { color: var(--gn-primary); }

.gn-mobile-arrow { font-size: 0.8rem; color: #999; transition: transform 0.3s; }
.gn-mobile-item.open .gn-mobile-arrow { transform: rotate(180deg); color: var(--gn-primary); }

.gn-mobile-submenu {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fafafa;
    margin: 0 -25px;
    padding: 0 25px;
}
.gn-mobile-item.open .gn-mobile-submenu {
    max-height: 400px;
    padding: 10px 0 20px 15px;
}
.gn-mobile-submenu a {
    text-align: left;
    display: block; padding: 12px 0;
    color: var(--gn-text-light); text-decoration: none;
    font-size: 0.95rem; border-left: 2px solid transparent;
    padding-left: 10px;
}
.gn-mobile-submenu a:hover {
    color: var(--gn-primary);
    border-left-color: var(--gn-primary);
    background: #fff;
}

.gn-mobile-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.gn-mobile-lang {
    display: block; width: 100%;
    text-align: center; padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: var(--gn-text-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

/* --- 响应式断点 --- */
@media (max-width: 1024px) {
    .gn-nav-menu { display: none; }
    .gn-hamburger { display: flex; }
    .gn-navbar { padding: 0 3%; }
    .gn-hover-card { display: none !important; } /* 移动端隐藏悬浮卡 */
}