/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

/* 导航栏样式 */
.navbar {
    background-color: #6c63ff;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* 导航链接 */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffd166;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #ffd166;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Banner样式 */
.banner {
    background-color: #f0f0f0;
    min-height: 250px;
    height: 50vh;
    max-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    margin-bottom: 2rem;
}

.banner h2 {
    font-size: 2.5rem;
    color: #333;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 内容区域样式 */
.content {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.card a {
    display: inline-block;
    color: #6c63ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.card a:hover {
    color: #5a52e8;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn {
    background-color: #6c63ff;
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #5a52e8;
}

/* 底部样式 */
.footer {
    background-color: #6c63ff;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row;
        gap: 0;
    }

    /* 显示汉堡菜单 */
    .menu-toggle {
        display: flex;
    }

    /* 隐藏并设置导航链接 */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #6c63ff;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* 导航栏展开状态 */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .banner h2 {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 更小屏幕的响应式调整 */
@media (max-width: 576px) {
    .container {
        width: 95%;
    }

    .banner h2 {
        font-size: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }

    .content h3 {
        font-size: 1.5rem;
    }

    .card-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .logo h1 {
        font-size: 1rem;
    }
}
