/* ================= 基础重置与变量 ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { 
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; 
    color: #333; 
    background: #f0f0f2; 
    line-height: 1.6; 
    user-select: none; /* 新增：禁止全站选中 */
    -webkit-user-select: none;
}
a { color: inherit; text-decoration: none; }
:root { --primary: #c8102e; --primary-dark: #9a0c23; --gold: #d5b064; --dark: #1a1a1a; }

/* ================= 顶部导航 ================= */
.site-header { position: fixed; top: 0; left: 0; width: 100%; height: 80px; background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); z-index: 999; display: flex; align-items: center; padding: 0 60px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.header-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-logo-img { height: 50px; width: auto; display: block; pointer-events: none; /* 新增：穿透鼠标 */ }
.main-nav { flex: 1; text-align: center; }
.main-nav ul { display: flex; gap: 36px; list-style: none; justify-content: center; }
.main-nav a {
    font-size: 15px;
    color: #333;
    position: relative;
    padding: 6px 0;
    white-space: nowrap;
    transition: color 0.28s ease;
}

/* 悬停下划线：从中间向两侧展开 */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 悬停：文字变红 + 下划线展开 */
.main-nav a:hover {
    color: var(--primary);
}
.main-nav a:hover::after {
    width: 100%;
}

/* 当前页：下划线常驻、文字常红 */
.main-nav a.active {
    color: var(--primary);
}
.main-nav a.active::after {
    width: 100%;
}

/* 键盘可访问性：聚焦时也有同样效果 */
.main-nav a:focus-visible {
    color: var(--primary);
    outline: none;
}
.main-nav a:focus-visible::after {
    width: 100%;
}

/* 汉堡按钮 */
.nav-toggle { display: none; width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; margin-left: auto; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #333; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= Banner ================= */
.page-banner {
    margin-top: 80px;
    height: 200px;
    background: linear-gradient(135deg, #5a0818 0%, #8b0f24 50%, #c8102e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.page-banner h1 {
    font-size: 34px;
    letter-spacing: 5px;
    margin-bottom: 8px;
}
.page-banner p {
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 3px;
}

/* ================= 新闻容器 ================= */
.news-container { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }

.news-col--full { margin-bottom: 56px; }
.news-col--full:last-child { margin-bottom: 0; }

.news-col-header { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 2px solid var(--primary); }
.news-col-title { font-size: 24px; font-weight: 700; color: #222; letter-spacing: 2px; position: relative; }
.news-col-title::before { content: ""; display: inline-block; width: 4px; height: 22px; background: var(--primary); margin-right: 10px; vertical-align: -3px; border-radius: 2px; }
.news-col-sub { font-size: 12px; color: #aaa; letter-spacing: 2px; text-transform: uppercase; }

/* ================= 横向滚动容器 ================= */
.news-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}
.news-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* 拖动状态 */
.news-scroll.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.news-scroll.is-dragging .news-card { pointer-events: none; }
/* 移除旧 img 拖拽禁用，因为已经换成背景图 */

/* 三个栏目统一：每行固定显示 5 张卡片 */
.news-col--full .news-scroll > .news-card { flex: 0 0 calc((100% - 56px) / 5); scroll-snap-align: start; }

/* ================= 新闻卡片 ================= */
.news-card {
    background: linear-gradient(145deg, #5a0818 0%, #9a0c23 45%, #c8102e 100%);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.14), 0 12px 24px rgba(0,0,0,0.18), 0 24px 48px rgba(0,0,0,0.12);
    border: 1px solid rgba(213,176,100,0.18);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    border-bottom: 3px solid rgba(0,0,0,0.25);
}
.news-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: rgba(255,255,255,0.25); z-index: 3; }
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 2px 4px rgba(200,16,46,0.20), 0 8px 16px rgba(200,16,46,0.28), 0 20px 40px rgba(200,16,46,0.35), 0 36px 72px rgba(200,16,46,0.20);
    border-bottom-color: var(--gold);
}
.news-card:hover .news-card-title { color: var(--gold); }
.news-card:hover .news-cover-bg { transform: scale(1.06); } /* 针对背景图的放大效果 */

.news-card-cover { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0,0,0,0.15); position: relative; box-shadow: inset 0 -6px 12px rgba(0,0,0,0.15); }

/* 新增：背景图样式 */
.news-cover-bg { 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    transition: transform 0.4s ease; 
}

.news-card-cover-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.55); font-size: 13px; letter-spacing: 3px; font-weight: bold;
    background: linear-gradient(135deg, #7a0c1e, #c8102e);
}

.news-card-body { flex: 1; padding: 10px 10px 0; }
.news-card-title {
    font-size: 12px; font-weight: 600; color: #fff; line-height: 1.45; margin-bottom: 5px; transition: color 0.2s;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-summary {
    font-size: 10.5px; color: rgba(255,255,255,0.75); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer { display: flex; justify-content: space-between; align-items: center; margin: 6px 10px 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.18); }
.news-card-date { font-size: 9.5px; color: rgba(255,255,255,0.6); }
.news-card-readmore { font-size: 9.5px; color: var(--gold); font-weight: 500; }

.news-empty { text-align: center; padding: 40px 0; color: #999; font-size: 14px; flex: 0 0 100%; }

/* ================= 页脚 ================= */
footer { background: var(--dark); color: #999; padding: 60px 20px; text-align: center; border-top: 1px solid #2a2a2a; }
.footer-logo { font-size: 24px; font-weight: bold; color: var(--primary); margin-bottom: 20px; letter-spacing: 4px; }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: #999; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 13px; color: #666; border-top: 1px solid #333; padding-top: 24px; margin-top: 24px; }

/* ================= 响应式 ================= */
@media (min-width: 1920px) {
    .site-header { padding: 0 120px; }
    .header-logo-img { height: 56px; }
    .news-container { max-width: 1280px; }
}
@media (min-width: 1366px) and (max-width: 1919px) {
    .site-header { padding: 0 80px; }
    .news-container { max-width: 1200px; }
}
@media (min-width: 1200px) and (max-width: 1365px) {
    .site-header { padding: 0 40px; }
    .main-nav ul { gap: 20px; }
    .main-nav a { font-size: 14px; }
    .news-container { max-width: 1100px; padding: 50px 20px; }
    .news-scroll { gap: 10px; }
    .news-col--full .news-scroll > .news-card { flex: 0 0 calc((100% - 40px) / 5); }
    .news-card-body { padding: 9px 9px 0; }
    .news-card-title { font-size: 11.5px; }
    .news-card-summary { font-size: 10px; }
    .news-card-footer { margin: 6px 9px 8px; }
    .news-card-date { font-size: 9px; }
    .news-card-readmore { font-size: 9px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .site-header { padding: 0 20px; height: 70px; }
    .header-logo-img { height: 44px; }
    .main-nav ul { gap: 12px; }
    .main-nav a { font-size: 13px; }
    .page-banner {
        margin-top: 70px;
        height: 170px;
    }
    .page-banner h1 { font-size: 28px; letter-spacing: 4px; }
    .page-banner p { font-size: 12px; }
    .news-container { padding: 50px 20px; max-width: 100%; }
    .news-col--full { margin-bottom: 40px; }
    .news-scroll { gap: 12px; }
    .news-col--full .news-scroll > .news-card { flex: 0 0 calc((100% - 48px) / 5); }
    .news-card-body { padding: 10px 10px 0; }
    .news-card-title { font-size: 12px; }
    .news-card-summary { font-size: 10.5px; }
}
@media (max-width: 767px) {
    .site-header { padding: 0 16px; height: 64px; }
    .header-logo-img { height: 40px; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; top: 64px; left: 0; width: 100%; background: #fff;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-120%);
        transition: transform 0.3s ease; z-index: 998; display: block; text-align: left;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
    .main-nav li { border-bottom: 1px solid #f0f0f0; }
    .main-nav a { display: block; padding: 14px 24px; font-size: 15px; }
    .main-nav a::after,
    .main-nav a.active::after,
    .main-nav a:hover::after { display: none; }

    .page-banner {
        margin-top: 64px;
        height: 130px;
    }
    .page-banner h1 { font-size: 21px; letter-spacing: 2px; }
    .page-banner p { font-size: 11px; letter-spacing: 1.5px; }

    .news-container { padding: 32px 16px; max-width: 100%; }
    .news-col--full { margin-bottom: 40px; }
    .news-col-title { font-size: 20px; }
    .news-col-sub { font-size: 11px; }
    .news-scroll { gap: 10px; }
    .news-col--full .news-scroll > .news-card { flex: 0 0 calc((100% - 10px) / 2); }
    .news-card-body { padding: 10px 10px 0; }
    .news-card-title { font-size: 12px; }
    .news-card-summary { font-size: 10.5px; }
    .news-card-footer { margin: 6px 10px 8px; }
}