/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #34495e;
    --accent-color: #f39c12;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #ffffff;
    --light-bg: #f5f7fa;
    --border-color: #e0e0e0;
    --success-color: #2ecc71;
    --warning-color: #e74c3c;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--secondary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 80px 0;
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--light-text);
}

.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo span {
    margin-left: 10px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

/* 主横幅样式 */
.hero {
    background-color: var(--light-bg);
    padding: 100px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--light-text);
}

.hero-image {
    flex: 1;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 特色服务模块样式 */
.features {
    background-color: white;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.feature-card h3 {
    padding: 20px 20px 10px;
    color: var(--secondary-color);
}

.feature-card p {
    padding: 0 20px 20px;
    color: var(--light-text);
}

/* 热门文章模块样式 */
.articles {
    background-color: var(--light-bg);
}

.article-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    display: flex;
}

.article-image {
    flex: 1;
    max-width: 300px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    flex: 2;
    padding: 20px;
}

.article-content h3 {
    margin-bottom: 10px;
}

.article-content p {
    color: var(--light-text);
    margin-bottom: 15px;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-block;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* 课程推荐模块样式 */
.courses {
    background-color: white;
}

.course-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.course-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.course-image {
    position: relative;
}

.course-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-content {
    padding: 20px;
}

.course-meta {
    display: flex;
    margin-bottom: 10px;
}

.course-level, .course-duration {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-right: 15px;
}

.course-card p {
    margin-bottom: 15px;
    color: var(--light-text);
}

/* 学习资源模块样式 */
.resources {
    background-color: var(--light-bg);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.resource-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.resource-item:hover {
    transform: translateY(-5px);
}

.resource-item img {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    object-fit: cover;
}

.resource-item h3 {
    margin-bottom: 15px;
}

.resource-item p {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* 用户反馈模块样式 */
.testimonials {
    background-color: white;
}

.testimonial-slider {
    display: flex;
    gap: 30px;
}

.testimonial-item {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    flex: 1;
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    color: var(--secondary-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* APP下载模块样式 */
.app-download {
    background-color: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.app-download .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-content {
    flex: 1;
    padding-right: 40px;
}

.app-content h2 {
    text-align: left;
}

.app-features {
    margin: 20px 0;
}

.app-features li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.app-features li:before {
    content: "✓";
    color: var(--success-color);
    position: absolute;
    left: 0;
    top: 0;
}

.download-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-download {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-download img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.app-image {
    flex: 1;
}

.app-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 联系我们模块样式 */
.contact {
    background-color: white;
}

.contact-wrapper {
    display: flex;
    gap: 40px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.contact-item h3 {
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--light-text);
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

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

/* 友情链接样式 */
.friend-links {
    background-color: var(--light-bg);
    padding: 40px 0;
}

.friend-links h2 {
    margin-bottom: 20px;
}

.friend-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links ul li {
    margin-bottom: 10px;
}

.friend-links ul li a {
    color: var(--light-text);
    font-size: 0.9rem;
}

.friend-links ul li a:hover {
    color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo span {
    margin-left: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-desc {
    max-width: 400px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-nav-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-nav-column h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-nav-column ul li {
    margin-bottom: 10px;
}

.footer-nav-column ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-nav-column ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
}

.social-link img {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright, .icp {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.terms {
    font-size: 0.9rem;
}

.terms a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 10px;
}

.terms a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .feature-cards, .course-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-slider {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-image {
        max-width: 100%;
    }
    
    .feature-cards, .course-cards, .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .app-download .container {
        flex-direction: column;
    }
    
    .app-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
    
    .footer-nav {
        flex-direction: column;
    }
}
