/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav li {
    position: relative;
    margin: 0 20px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #e74c3c;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn, .register-btn {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.login-btn {
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.register-btn {
    background: #e74c3c;
    color: #fff;
}

.login-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.register-btn:hover {
    background: #c0392b;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    outline: none;
    width: 200px;
}

.search-box button {
    padding: 8px 15px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #c0392b;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
.main-content {
    margin-top: 80px;
}

/* 轮播图区域 */
.hero-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-slider {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    flex: 1;
    color: #fff;
    z-index: 2;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.slide-image {
    flex: 1;
    text-align: center;
}

.slide-image img {
    max-width: 100%;
    height: auto;
    opacity: 0.8;
}

slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 3;
}

.slider-controls button {
    background: rgba(255,255,255,0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: rgba(255,255,255,0.5);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
}

/* 课程区域 */
.courses-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #e74c3c;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.course-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.course-image {
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-info {
    padding: 25px;
}

.course-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.course-info p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.students {
    color: #666;
    font-size: 0.9rem;
}

.course-btn {
    display: block;
    text-align: center;
    padding: 12px 0;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.course-btn:hover {
    background: #c0392b;
}

/* 特色服务区域 */
.features-section {
    padding: 80px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* 新闻资讯区域 */
.news-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.news-image {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.4;
    height: 1.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.news-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    height: 3.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
    margin-top: auto;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #e74c3c;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.contact-info p {
    margin-bottom: 10px;
    color: #bdc3c7;
}

.address {
    margin-bottom: 10px;
}

.address p {
    margin-bottom: 5px;
    color: #bdc3c7;
}

.address-detail {
    padding-left: 3em;
    margin-bottom: 10px !important;
}

.social-links {
    margin-top: 20px;
}

.social-link {
    display: inline-block;
    margin-right: 15px;
    padding: 8px 15px;
    background: #34495e;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
}
