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

a {
    text-decoration: none;
    color: inherit;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f8f9fa;
}

/* ============ 幻灯片 ============ */
.slideshow {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
    background: #111;
}

.slides {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
    transform: scale(1.05);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1s ease, transform 6s ease-out;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    z-index: 5;
    pointer-events: none;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 22px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    border-radius: 50%;
}

.slide-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slide-btn.prev {
    left: 30px;
}

.slide-btn.next {
    right: 30px;
}

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

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

.dot.active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

/* ============ 导航条 ============ */
.navbar {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.nav-item {
    position: relative;
    text-align: center;
    padding: 18px 36px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    color: #667eea;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 28px;
}

/* ============ 教程列表区块 ============ */
.episode-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 60px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.episode-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.episode-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.episode-video {
    width: 100%;
    background: #000;
}

.episode-video video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.episode-info {
    padding: 20px 24px 24px;
}

.episode-title {
    font-size: 17px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.episode-item:hover .episode-title {
    color: #667eea;
}

.episode-desc {
    font-size: 13px;
    line-height: 1.8;
    color: #999;
}

/* ============ 子页面横幅 ============ */
.page-banner {
    position: relative;
    height: 320px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.banner-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.banner-text h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.banner-text p {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
}

/* ============ 通用页面内容 ============ */
.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

.content-block {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.content-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 24px;
    display: block;
}

.content-block h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 16px;
}

.content-block p {
    font-size: 15px;
    line-height: 2;
    color: #666;
}

/* ============ 时间线 ============ */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #e8e8e8;
}

.timeline-item {
    position: relative;
    padding: 0 0 28px 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
}

.timeline-year {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 6px;
}

.timeline-item p {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
}

/* ============ 新闻列表 ============ */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 24px 30px;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.news-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    margin-right: 28px;
    border-right: 1px solid #eee;
    padding-right: 28px;
}

.news-date .day {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.news-date .month {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-top: 6px;
}

.news-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.news-item:hover .news-info h3 {
    color: #667eea;
}

.news-info p {
    font-size: 13px;
    color: #999;
    line-height: 1.8;
}

/* ============ 联系我们 ============ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 36px;
    margin-bottom: 14px;
    color: #667eea;
}

.contact-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 13px;
    color: #999;
}

.contact-form {
    margin-top: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-row input:focus {
    border-color: #667eea;
}

.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form textarea:focus {
    border-color: #667eea;
}

.submit-btn {
    display: block;
    margin: 20px auto 0;
    padding: 12px 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.85;
}

/* ============ 产品网格 ============ */
.product-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.1);
}

.product-thumb {
    width: 100%;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-item:hover .product-thumb img {
    transform: scale(1.05);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3436;
    padding: 14px 16px 4px;
    transition: color 0.3s;
}

.product-item:hover .product-name {
    color: #667eea;
}

.product-brief {
    font-size: 12px;
    color: #aaa;
    padding: 0 16px 16px;
    line-height: 1.6;
}

/* ============ 翻页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 60px;
}

.page-btn,
.page-num {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #555;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.page-num:hover,
.page-btn:hover {
    border-color: #333;
    color: #333;
    background: #f5f5f5;
}

.page-num.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.page-btn.disabled {
    color: #ccc;
    pointer-events: none;
    border-color: #eee;
    background: #fafafa;
}

/* ============ 滚动淡入动画 ============ */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ 页脚 ============ */
.footer {
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    color: #999;
    padding: 50px 20px 40px;
    margin-top: 0;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

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

.footer-divider {
    width: 60px;
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 0 auto 24px;
}

.copyright {
    font-size: 13px;
    color: #666;
}

/* ============ WhatsApp 悬浮按钮 ============ */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float .wf-icon {
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.whatsapp-float .wf-icon svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

.whatsapp-float .wf-tooltip {
    position: absolute;
    right: 66px;
    background: #fff;
    color: #333;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.3s, transform 0.3s;
}

.whatsapp-float:hover .wf-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-float .wf-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #fff;
    border-right: none;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .slideshow {
        height: 280px;
    }

    .slide-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .slide-btn.prev { left: 12px; }
    .slide-btn.next { right: 12px; }

    .nav-item {
        padding: 14px 16px;
        font-size: 13px;
        letter-spacing: 0;
    }

    .episode-list {
        padding: 30px 12px 40px;
        gap: 16px;
    }

    .episode-list {
        grid-template-columns: 1fr;
    }

    .episode-info {
        padding: 16px;
    }

    .episode-title {
        font-size: 16px;
    }

    .footer-links {
        gap: 16px;
    }

    .page-banner {
        height: 200px;
    }

    .banner-text h1 {
        font-size: 24px;
    }

    .content-block {
        padding: 24px 20px;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .news-date {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 12px;
        margin-right: 0;
        margin-bottom: 12px;
        width: 100%;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .news-date .day {
        font-size: 22px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
    }
}
