/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 配色方案 */
:root {
    --primary-color: #364f6b;
    --secondary-color: #3d5a80;
    --accent-color: #98c1d9;
    --light-color: #e0fbfc;
    --dark-color: #293241;
}

/* 导航条样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    z-index: 1001;
}

/* 移动端面包屑菜单按钮 */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.breadcrumb-icon {
    font-size: 1.5rem;
    color: white;
    margin-right: 0.5rem;
    font-weight: bold;
}

.current-page {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: all 0.3s ease;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

.nav-link.active {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        gap: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
        text-align: left;
    }
    
    .nav-link:hover {
        background-color: var(--accent-color);
        color: var(--dark-color);
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .mobile-menu-toggle {
        padding: 0.4rem 0.8rem;
    }
    
    .breadcrumb-icon {
        font-size: 1.3rem;
    }
    
    .current-page {
        font-size: 0.9rem;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
    }
}

/* 功能区样式 - 修改：移除display: none，让所有内容默认显示 */
.section {
    padding: 80px 2rem 40px;  /* 减少上下内边距 */
    min-height: 70vh;  /* 减少最小高度 */
    /* 移除 display: none */
}

/* 移除 .section.active 的 display: block */
.section.active {
    /* 保留其他样式，移除display属性 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 首页样式 - 减少高度 */
#home {
    background: linear-gradient(135deg, var(--light-color), white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;  /* 为首页设置更小的最小高度 */
}

.hero-content h1 {
    font-size: 2.8rem;  /* 稍微减小标题字体大小 */
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;  /* 稍微减小描述字体大小 */
    color: var(--secondary-color);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.8rem;  /* 稍微减小按钮内边距 */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;  /* 稍微减小按钮字体大小 */
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 功能页样式 */
#features {
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* 资源页样式 - 修改为一行3列布局 */
#resources {
    background: var(--light-color);
}

.resources-list {
    max-width: 1200px;  /* 增加最大宽度以容纳3列 */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 一行3列 */
    gap: 1.5rem;  /* 列间距 */
}

.resource-item {
    background: white;
    padding: 1.5rem;  /* 稍微减小内边距以适应网格布局 */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;  /* 改为垂直布局 */
    align-items: center;  /* 居中对齐 */
    text-align: center;  /* 文本居中 */
    min-height: 250px;  /* 设置最小高度保持一致性 */
}

.resource-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.resource-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;  /* 图标下方间距 */
}

.resource-content {
    flex: 1;
    display: flex;
flex-direction: column;
    justify-content: space-between;  /* 内容均匀分布 */
}

.resource-item h3 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.resource-item p {
    color: #666;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;  /* 描述文本占据剩余空间 */
}

.resource-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    margin-top: auto;  /* 链接位于底部 */
}

.resource-link:hover {
    background: var(--secondary-color);
}

/* 定价页样式 */
#pricing {
    background: white;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.price {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* 联系页样式 - 修改为左右布局 */
#contact {
    background: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 左右两列 */
    gap: 3rem;  /* 列间距 */
    align-items: start;  /* 顶部对齐 */
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: var(--secondary-color);
}

/* 联系方式区域样式 */
.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--light-color);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.contact-text h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-text p {
    color: #666;
    margin: 0.2rem 0;
    line-height: 1.4;
}

/* 页脚样式 */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;  /* 移动端更小的标题 */
    }
    
    .section {
        padding: 100px 1rem 30px;  /* 移动端调整内边距 */
        min-height: auto;  /* 移动端取消最小高度限制 */
    }
    
    #home {
        min-height: 50vh;  /* 移动端更小的首页高度 */
    }
    
    /* 移动端资源区改为一行2列 */
    .resources-list {
        grid-template-columns: repeat(2, 1fr);  /* 移动端一行2列 */
        gap: 1rem;
    }
    
    .resource-item {
        padding: 1rem;
        min-height: 220px;
    }
    
    .resource-icon {
        font-size: 2rem;
    }
    
    /* 移动端联系我们改为单列 */
    .contact-content {
        grid-template-columns: 1fr;  /* 移动端单列 */
        gap: 2rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* 小屏幕移动端资源区改为单列 */
    .resources-list {
        grid-template-columns: 1fr;  /* 小屏幕单列 */
    }
    
    .resource-item {
        min-height: auto;
        padding: 1.5rem;
    }
    
    /* 小屏幕移动端联系方式调整 */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-icon {
        font-size: 1.8rem;
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 80px;  /* 修改：从30px改为80px，上移50px */
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;  /* 修改：从20px改为820px，保持上移60px */
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 80px;  /* 修改：从15px改为80px，保持上移65px */
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}