/* 全局样式 */
:root {
    --primary-color: #000000;
    --secondary-color: #86868b;
    --accent-color: #0066cc;
    --background-color: #ffffff;
    --section-background: #f5f5f7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-color);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.nav-toggle:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    padding: 0;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease-in-out;
    }

    .nav-links.show {
        display: flex;
        max-height: 500px; /* 增加最大高度，确保所有链接都能显示 */
        padding: 15px 0;
        animation: fadeIn 0.3s ease-in-out;
        background-color: rgba(255, 255, 255, 0.98); /* 增加背景不透明度 */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 12px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links li:last-child {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links a {
        display: block;
        font-size: 16px;
        padding: 8px 15px;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background-color: rgba(0, 102, 204, 0.1);
    }

    .nav-links a::after {
        display: none;
    }
}

/* Hero 区域样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1555597673-b21d5c935865?ixlib=rb-1.2.1&auto=format&fit=crop&w=2560&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #004499;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 关于我们部分 */
.about {
    padding: 120px 0;
    background-color: var(--section-background);
}

.about h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    font-weight: 700;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.about-item {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.about-item:hover {
    transform: translateY(-10px);
}

.about-item i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.about-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* 课程部分 */
.courses {
    padding: 120px 0;
}

.courses h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    font-weight: 700;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.course-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

.course-card h3 {
    padding: 25px 20px 15px;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-card h3 i {
    color: var(--accent-color);
}

.course-card p {
    padding: 0 20px 25px;
    color: var(--secondary-color);
}

/* 名师团队部分 */
.masters {
    padding: 120px 0;
    background-color: var(--section-background);
}

.masters h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    font-weight: 700;
}

.masters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.master-card {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.master-card:hover {
    transform: translateY(-10px);
}

.master-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 25px;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--accent-color);
}

.master-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.master-card p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.master-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.master-social a {
    color: var(--secondary-color);
    font-size: 20px;
    transition: color 0.3s ease;
}

.master-social a:hover {
    color: var(--accent-color);
}

/* 联系我们部分 */
.contact {
    padding: 120px 0;
}

.contact h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    font-weight: 700;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
}

.input-group textarea {
    height: 150px;
    resize: vertical;
    padding-top: 45px;
}

.input-group textarea + i {
    top: 25px;
    transform: none;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 18px 36px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #004499;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-info h3,
.footer-links h3,
.footer-social h3 {
    font-size: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--secondary-color);
    font-size: 24px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 20px;
    }

    .about h2,
    .courses h2,
    .masters h2,
    .contact h2 {
        font-size: 36px;
    }

    .about-item,
    .course-card,
    .master-card {
        margin: 0 20px;
    }

    .footer-content {
        text-align: center;
    }

    .footer-links a,
    .footer-info p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* 媒体中心页面样式 */
.media-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1557130641-1b14718f096a?ixlib=rb-1.2.1&auto=format&fit=crop&w=2560&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    margin-top: 80px;
}

.media-content {
    padding: 80px 0;
}

/* 标签页样式 */
.media-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-btn i {
    font-size: 20px;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-btn:hover {
    color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 视频网格样式 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-10px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
    font-weight: 600;
}

.video-card p {
    padding: 0 20px 20px;
    color: var(--secondary-color);
}

/* 图片网格样式 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.photo-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-card:hover img {
    transform: scale(1.1);
}

.photo-card:hover .photo-overlay {
    transform: translateY(0);
}

.photo-overlay h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.photo-overlay p {
    font-size: 14px;
    opacity: 0.8;
}

/* 新闻网格样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--secondary-color);
    font-size: 14px;
}

.news-content h3 {
    margin: 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.news-content p {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 10px;
}

/* 响应式设计补充 */
/* 媒体中心页面标题样式 */
.media-hero .hero-content h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.media-hero .hero-content p {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .media-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .video-grid,
    .photo-grid,
    .news-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .media-hero {
        height: 40vh;
    }
    
    .media-hero .hero-content h1 {
        font-size: 40px;
    }
    
    .media-hero .hero-content p {
        font-size: 20px;
    }
}