/* PC Navigation Bar Styles */
#pc {
    display: block;
    background-color: #f8f9fa;
    padding: 0.3rem 5%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    line-height: 1;
    border-bottom: 1px solid #e9ecef; /* 比背景稍深的灰色 */
}

#pc .navbarLeft,
#pc .navbarRight {
    display: flex;
    align-items: center;
}

#pc .navbarLeft {
    float: left;
}

#pc .navbarRight {
    float: right;
}

#pc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

#pc li {
    display: inline-block;
}

#pc a {
    color: #777;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0;
    position: relative;
    transition: all 0.3s ease;
}

#pc a:hover {
    color: #A71F1B;
}

#pc a::after {
    content: '';
    position: absolute;
    bottom: -0.2rem;
    left: 0;
    width: 0;
    height: 2px;
    background: #A71F1B;
    transition: all 0.3s ease;
}

#pc a:hover::after {
    width: 100%;
}

#pc i {
    margin-right: 5px;
}

/* Hide on mobile */
@media (max-width: 768px) {
    #pc {
        display: none;
    }
}

/* 导航栏 */
.navbar {
    background-color: #f8f9fa;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.logo {
    width: 120px;
}

/* 桌面端导航链接 */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #be002f;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: #be002f;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
    display: inline-block;
}

/* 下拉菜单内容 */
.dropdown-content {
    display: none; /* 默认隐藏 */
    position: absolute;
    top: 100%; /* 位于触发按钮的下方 */
    left: 0;
    background-color: #ffffff; /* 纯白背景 */
    min-width: 200px; /* 最小宽度 */
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); /* 柔和的阴影 */
    border-radius: 8px; /* 圆角 */
    z-index: 1000; /* 确保在最上层 */
    padding: 8px 0; /* 内边距 */
    border: 1px solid #eeeeee; /* 添加边框 */
    opacity: 0; /* 初始透明度为0 */
    transform: translateY(10px); /* 初始向下偏移 */
    transition: opacity 0.3s ease, transform 0.3s ease; /* 平滑过渡 */
}

/* 鼠标悬停时显示下拉菜单 */
.dropdown:hover .dropdown-content {
    display: block; /* 显示菜单 */
    opacity: 1; /* 完全不透明 */
    transform: translateY(0); /* 取消偏移 */
}

/* 下拉菜单链接 */
.dropdown-content a {
    color: #333333; /* 深灰色字体 */
    padding: 10px 16px; /* 内边距 */
    text-decoration: none; /* 去掉下划线 */
    display: block; /* 块级显示 */
    font-size: 0.9rem; /* 字体大小 */
    font-weight: 500; /* 中等字体粗细 */
    transition: all 0.3s ease; /* 平滑过渡 */
}

/* 下拉菜单链接的悬停效果 */
.dropdown-content a:hover {
    background-color: #f8f9fa; /* 浅灰色背景 */
    color: #be002f; /* 红色字体 */
    border-radius: 4px; /* 圆角 */
}

/* 下拉菜单分隔线 */
.dropdown-content a:not(:last-child) {
    border-bottom: 1px solid #eeeeee; /* 添加分隔线 */
}

/* 每列样式 */
.dropdown-column {
    flex: 1;
    min-width: 150px;
    padding: 0 15px;
    margin-bottom: 15px;
}

/* 新增折叠相关样式 */
.dropdown-column h4 {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
    user-select: none;
}

.dropdown-column h4::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: transform 0.2s;
}

.dropdown-column.active h4::after {
    content: "-";
}

.dropdown-column .column-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.dropdown-column.active .column-content {
    max-height: 1000px;
    border-bottom: 1px solid #e9ecef; /* 与标题边框保持一致 */
}

/* 下拉菜单列标题 - 移动端风格 */
.dropdown-column h4 {
    width: 100%;
    text-align: left;
    margin: 0;
    padding: 1rem 2rem 1rem 1rem;
    color: #2c3e50;
    font-size: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
}

/* 悬停效果保持与移动菜单一致 */
.dropdown-column h4:hover {
    background: #e9ecef;
}

/* 折叠指示箭头 - 与移动端风格统一 */
.dropdown-column h4::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* 激活状态样式 */
.dropdown-column h4.active {
    background: #e9ecef;
    color: #be002f; /* 保持与主色调一致 */
}

.dropdown-column h4.active::after {
    content: "-";
    color: #be002f;
}

/* 移动端适配调整 */
@media (max-width: 768px) {
    .dropdown-column h4 {
        padding: 0.8rem 2rem 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .dropdown-column h4::after {
        right: 0.8rem;
        font-size: 1rem;
    }
    
    .dropdown-column .column-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown-column.active .column-content {
        max-height: 1000px; /* 设置一个足够大的值 */
    }
    
    .dropdown-column a {
        display: block;
        padding: 5px 0;
        color: #666;
        text-decoration: none;
        transition: all 0.3s;
    }
    
    .dropdown-column a:hover {
        color: #be002f;
    }
}

/* 移动端样式 */
@media (max-width: 768px) {
    .dropdown-content {
        min-width: 160px; /* 减小宽度 */
        font-size: 0.85rem; /* 减小字体大小 */
    }
    
    .dropdown-content a {
        padding: 8px 12px; /* 减小内边距 */
    }
    
    .dropdown-column {
        min-width: 100%; /* 移动端每列占满宽度 */
    }
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 1rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #2c3e50;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #f8f9fa;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-menu a {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    color: #2c3e50;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.mobile-menu a:hover {
    background: #e9ecef;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: flex;
    }
    
    /* 菜单按钮动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ===== Mega Menu 样式 ===== */
.mega-menu {
    position: absolute;
    right: 0;
    top: 100%;
    width: 225px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 10px 10px;
    padding: 30px;
    display: none;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    z-index: 1000;
}

.menu-item {
    position: relative;
    display: inline-block;
}

@media (max-width: 1200px) {
    .mega-menu {
        width: 175px;
        right: -50%;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        width: 100vw;
        right: 0;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        border-radius: 10px 10px 0 0;
    }
}

/* 默认菜单项样式（红背景） */
.menu-item > a {
    display: block;
    padding: 12px 20px;
    background: var(--redchinese);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item > a:hover {
    color: white;
    background: var(--reded);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 红背景菜单项样式 */
.menu-item.red-bg > a {
    display: block;
    padding: 12px 20px;
    background: var(--redchinese);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item.red-bg > a:hover {
    color: white;
    background: var(--reded);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 白背景菜单项样式 */
.menu-item.white-bg > a {
    background: transparent;  
    color: #2c3e50;  
    border: none;
    padding: 0.5rem 1rem; 
}

.menu-item.white-bg > a:hover {
    color: #be002f; 
    background: transparent; 
    transform: none;  
    box-shadow: none;  
}
.menu-item.white-bg {
    position: relative;
}
.menu-item:hover .mega-menu {
    display: grid;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-column h4 {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--redchinese);
    text-transform: uppercase;
}

.mega-menu-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-column ul li {
    margin-bottom: 8px;
}

.mega-menu-column ul li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 5px 0;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.mega-menu-column ul li a:hover {
    color: var(--redchinese);
    border-left-color: var(--redchinese);
    padding-left: 15px;
    background: #f8f9ff;
}

.dropdown > a {
    display: block;
    padding: 12px 20px;
    background: white;           /* 改为白色背景 */
    color: var(--redchinese);    /* 文字改为中国红色 */
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--redchinese);   /* 添加1px中国红边框 */
}

.dropdown > a:hover {
    color: white;                /* 悬停时文字变为白色 */
    background: var(--redchinese); /* 悬停时背景变为中国红 */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 增强mega-menu样式 */
.mega-menu-column .sub-section {
    margin-bottom: 15px;
}

.mega-menu-column .sub-section h5 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 15px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-menu-column .sub-section ul {
    list-style: none;
    padding-left: 5px;
}

.mega-menu-column .sub-section li {
    margin-bottom: 5px;
}

/* 热门推荐网格 */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.featured-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.featured-item i {
    color: var(--primary);
    font-size: 16px;
}

/* CTA按钮样式 */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.cta-primary {
    background: var(--redchinese);
    color: white !important;;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-primary:hover {
    background: var(--reded);
    transform: translateY(-2px);
}

.cta-secondary {
    background: white;
    color: var(--redchinese);
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--redchinese);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--redchinese);
    color: white!important;
}

/* 高亮样式 */
.premium {
    font-weight: 600;
    position: relative;
}

.premium::before {
    content: "⭐";
    margin-right: 5px;
}

.highlight {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-left: 3px solid var(--redchinese);
}


/* 大屏桌面 - 1200px 以上 */
.mega-menu {
    width: 225px;
    grid-template-columns: repeat(1, 1fr);
}

/* 笔记本/小桌面 - 992px - 1199px */
@media (max-width: 1199px) and (min-width: 992px) {
    .mega-menu {
        width: 200px;
        grid-template-columns: repeat(1, 1fr); 
        gap: 25px 40px;                       
        padding: 30px;
    }
    
    /* 让每列内容平均分布 */
    .mega-menu-column {
        min-width: 200px;
    }
}

/* 平板横屏 - 768px - 991px */
@media (max-width: 991px) and (min-width: 769px) {
    .mega-menu {
        width: 95vw;
        right: 2.5%;
        grid-template-columns: repeat(1, 1fr); 
        gap: 20px;
        padding: 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* 平板竖屏 - 577px - 768px */
@media (max-width: 768px) and (min-width: 577px) {
    .mega-menu {
        position: absolute;
        left: 0;
        width: 200px;
        grid-template-columns: 1fr;     
        padding: 15px;
        max-height: 400px;
        overflow-y: auto;
    }
}

/* 手机 - 576px 以下 */
@media (max-width: 576px) {
    .mega-menu {
        position: static;
        width: 100%;
        grid-template-columns: 1fr;   
        padding: 10px;
        border-top: 1px solid #eee;
        background: #fafafa;
    }
}