/* =============================================
   动筋针宣传网站 - 主样式
   ============================================= */

:root {
    --primary: #1a6e3a;
    --primary-light: #2a8f4e;
    --primary-dark: #0f4f28;
    --accent: #d4a13e;
    --accent-light: #e8c46a;
    --bg: #f5f7f5;
    --bg-card: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --header-h: 60px;
}

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

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-light); }

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

/* ---- Header ---- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center;
    height: 100%; padding: 0 20px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-size: 20px; font-weight: bold;
}
.logo img { height: 36px; border-radius: 50%; }
.logo span { white-space: nowrap; }

.nav {
    display: flex; align-items: center; gap: 8px;
    margin-left: auto;
}
.nav a {
    color: rgba(255,255,255,0.85);
    padding: 8px 16px; border-radius: 20px;
    font-size: 14px; transition: all 0.3s;
}
.nav a:hover, .nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* 移动端汉堡菜单 */
.menu-toggle {
    display: none;  /* 手机才显示 */
    background: none; border: none; color: #fff;
    font-size: 28px; cursor: pointer;
    margin-left: auto; padding: 4px;
}

/* ---- Banner 轮播 ---- */
.banner-wrap {
    margin-top: var(--header-h);
    position: relative;
    overflow: hidden;
    height: 460px;
}
.banner-slider {
    display: flex; height: 100%;
    transition: transform 0.6s ease;
}
.banner-item {
    min-width: 100%; height: 100%;
    position: relative;
    background-size: cover; background-position: center;
}
.banner-item .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}
.banner-item .banner-text {
    position: absolute; bottom: 60px; left: 5%; right: 5%;
    color: #fff; text-align: center;
}
.banner-item .banner-text h2 {
    font-size: 32px; margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.banner-item .banner-text p {
    font-size: 16px; opacity: 0.9;
    max-width: 600px; margin: 0 auto;
}
.banner-dots {
    position: absolute; bottom: 20px;
    left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px;
}
.banner-dots .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.3s;
}
.banner-dots .dot.active { background: #fff; transform: scale(1.2); }

/* ---- 通用 Section ---- */
.section {
    max-width: 1200px; margin: 0 auto;
    padding: 50px 20px;
}
.section-title {
    text-align: center; margin-bottom: 36px;
}
.section-title h2 {
    font-size: 28px; color: var(--primary-dark);
    position: relative; display: inline-block;
    padding-bottom: 12px;
}
.section-title h2::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px; border-radius: 2px;
    background: var(--accent);
}
.section-title p {
    color: var(--text-light); margin-top: 8px; font-size: 14px;
}

/* ---- 视频卡片网格 ---- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.video-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.video-card .thumb {
    position: relative; overflow: hidden;
    aspect-ratio: 16/9; background: #e8ece8;
}
.video-card .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s;
}
.video-card:hover .thumb img { transform: scale(1.05); }
.video-card .thumb .play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(26,110,58,0.85);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px;
    transition: transform 0.3s;
}
.video-card:hover .play-icon { transform: translate(-50%,-50%) scale(1.1); }
.video-card .info {
    padding: 14px 16px;
}
.video-card .info h3 {
    font-size: 15px; font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4; min-height: 42px;
}
.video-card .info .meta {
    display: flex; justify-content: space-between;
    color: var(--text-light); font-size: 12px;
    margin-top: 8px;
}

/* ---- 文章卡片 ---- */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.article-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.article-card .cover {
    height: 200px; overflow: hidden;
    background: #e8ece8;
}
.article-card .cover img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s;
}
.article-card:hover .cover img { transform: scale(1.05); }
.article-card .body {
    padding: 18px; flex: 1; display: flex; flex-direction: column;
}
.article-card .body h3 {
    font-size: 17px; font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .body .summary {
    font-size: 14px; color: var(--text-light);
    margin: 8px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.article-card .body .meta {
    display: flex; justify-content: space-between;
    color: #999; font-size: 12px;
    border-top: 1px solid var(--border); padding-top: 10px;
}

/* ---- 关于我们 ---- */
.about-section {
    background: var(--bg-card);
}
.about-content {
    max-width: 800px; margin: 0 auto;
    font-size: 15px; line-height: 1.8;
    color: var(--text-light);
}

/* ---- 页脚 ---- */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center; padding: 30px 20px;
    font-size: 13px;
}
.footer .links { margin-bottom: 12px; }
.footer .links a {
    color: rgba(255,255,255,0.6);
    margin: 0 10px; font-size: 13px;
}
.footer .links a:hover { color: #fff; }
.footer-qrcode {
    margin-top: 16px;
}
.footer-qrcode img {
    display: inline-block;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.2);
}
.footer-qrcode p {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ---- 文章详情页 ---- */
.detail-wrap {
    max-width: 800px; margin: calc(var(--header-h) + 20px) auto 40px;
    padding: 0 20px;
}
.detail-wrap .back-link { margin-bottom: 16px; }
.detail-wrap h1 {
    font-size: 28px; color: var(--text); margin-bottom: 10px;
}
.detail-wrap .detail-meta {
    color: #999; font-size: 13px;
    padding-bottom: 20px; border-bottom: 1px solid var(--border);
    margin-bottom: 24px; display: flex; gap: 16px;
}
.detail-wrap .detail-cover {
    margin-bottom: 24px; border-radius: var(--radius); overflow: hidden;
}
.detail-wrap .detail-content {
    font-size: 16px; line-height: 1.9;
    color: var(--text);
}
.detail-wrap .detail-content img {
    max-width: 100%; height: auto; margin: 16px auto;
    border-radius: 8px;
}
.detail-wrap .detail-content p {
    margin-bottom: 16px;
}

/* ---- 视频详情（视频播放器） ---- */
.video-player-wrap {
    max-width: 900px; margin: calc(var(--header-h) + 20px) auto 40px;
    padding: 0 20px;
}
.video-player-wrap video {
    width: 100%; border-radius: var(--radius);
    background: #000; outline: none;
}
.video-player-wrap h1 {
    font-size: 24px; margin: 16px 0 8px;
}
.video-player-wrap .video-meta {
    color: #999; font-size: 13px;
    display: flex; gap: 16px; margin-bottom: 16px;
}
.video-player-wrap .video-desc {
    font-size: 15px; line-height: 1.8; color: var(--text-light);
}

/* ---- 分类列表 ---- */
.category-bar {
    display: flex; gap: 10px; margin-bottom: 30px;
    flex-wrap: wrap; justify-content: center;
}
.category-bar a {
    padding: 8px 22px; border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 14px; color: var(--text-light);
    transition: all 0.3s;
}
.category-bar a:hover, .category-bar a.active {
    background: var(--primary);
    color: #fff; border-color: var(--primary);
}

/* ---- 分页 ---- */
.pagination {
    display: flex; justify-content: center;
    gap: 6px; margin-top: 36px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; border-radius: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 14px; color: var(--text);
    transition: all 0.3s;
}
.pagination a:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.pagination .current {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: #bbb;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ---- 滚动至顶部 ---- */
.scroll-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff;
    border: none; cursor: pointer; font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none; align-items: center; justify-content: center;
    z-index: 99; transition: all 0.3s;
}
.scroll-top:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .banner-wrap { height: 300px; }
    .banner-item .banner-text h2 { font-size: 22px; }
    .banner-item .banner-text p { font-size: 14px; }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .article-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .section { padding: 30px 16px; }
    .section-title h2 { font-size: 22px; }

    .nav {
        display: none;  /* 默认隐藏 */
        position: fixed; top: var(--header-h); left: 0; right: 0;
        background: var(--primary);
        flex-direction: column; padding: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .nav.open { display: flex; }
    .menu-toggle { display: block; }

    .detail-wrap h1 { font-size: 22px; }

    .article-card .cover { height: 180px; }
}
