/* ========================================
   北京及周边红色教育基地 - 庄重经典风主题
   ======================================== */

/* === 全局重置与基础 === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; color: #333; background: #f5f5f5; line-height: 1.6; }
a { color: #8B0000; text-decoration: none; transition: color 0.3s; }
a:hover { color: #C41E3A; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.clearfix::after { content: ''; display: table; clear: both; }

/* === 顶部信息栏 === */
.top-bar { background: #8B0000; color: #fff; font-size: 13px; line-height: 36px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #ffd700; }
.top-bar a:hover { color: #fff; }
.top-bar .top-tel { font-weight: bold; }
.top-bar .top-tel i { margin-right: 5px; }

/* === 主导航 === */
.main-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 70px; overflow: visible; }
.logo { display: flex; align-items: center; }
.logo img { height: 50px; margin-right: 10px; }
.logo h1 { font-size: 20px; color: #8B0000; font-weight: bold; line-height: 1.2; white-space: nowrap; }
.logo h1 small { display: block; font-size: 12px; color: #666; font-weight: normal; letter-spacing: 2px; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { display: flex; flex-wrap: nowrap; }
.main-nav li { position: relative; }
.main-nav li a { display: block; padding: 0 12px; line-height: 70px; font-size: 14px; color: #333; font-weight: 500; transition: all 0.3s; border-bottom: 3px solid transparent; white-space: nowrap; }
.main-nav li a:hover,
.main-nav li.active a { color: #8B0000; border-bottom-color: #8B0000; background: rgba(139,0,0,0.05); }

/* 下拉菜单 */
.main-nav li .sub-menu { display: none; position: absolute; top: 70px; left: 0; background: #fff; min-width: 180px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border-top: 3px solid #8B0000; z-index: 100; }
.main-nav li:hover .sub-menu { display: block; }
.main-nav li .sub-menu a { line-height: 42px; padding: 0 20px; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.main-nav li .sub-menu a:hover { background: #8B0000; color: #fff; }

/* 移动端菜单按钮 */
.mobile-menu-btn { display: none; font-size: 24px; cursor: pointer; color: #8B0000; }

/* === Banner轮播 === */
.hero-banner { position: relative; height: 500px; overflow: hidden; }
.hero-banner .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s; }
.hero-banner .slide.active { opacity: 1; }
.hero-banner .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-banner .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(139,0,0,0.6)); display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-banner .overlay h2 { font-size: 42px; color: #fff; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); margin-bottom: 15px; letter-spacing: 4px; }
.hero-banner .overlay p { font-size: 18px; color: rgba(255,255,255,0.9); letter-spacing: 2px; }

/* === 服务对象区块 === */
.service-targets { background: #fff; padding: 50px 0; }
.service-targets .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service-card { text-align: center; padding: 30px 20px; border-radius: 8px; transition: all 0.3s; border: 1px solid #eee; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(139,0,0,0.15); border-color: #8B0000; }
.service-card .icon { width: 70px; height: 70px; margin: 0 auto 15px; background: linear-gradient(135deg, #8B0000, #C41E3A); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.service-card .icon img { width: 36px; height: 36px; filter: brightness(0) invert(1); }
.service-card .icon i { font-size: 32px; color: #fff; }
.service-card h3 { font-size: 18px; color: #333; margin-bottom: 8px; }
.service-card p { font-size: 13px; color: #888; line-height: 1.6; }

/* === 通用区块标题 === */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 28px; color: #333; position: relative; display: inline-block; padding-bottom: 15px; }
.section-title h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: #8B0000; }
.section-title p { font-size: 14px; color: #999; margin-top: 10px; }

/* === 培训方案精选 === */
.training-plans { background: #f9f5f0; padding: 60px 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.plan-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: all 0.3s; }
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.plan-card .plan-header { background: linear-gradient(135deg, #8B0000, #B22222); color: #fff; padding: 20px; text-align: center; }
.plan-card .plan-header h3 { font-size: 20px; margin-bottom: 5px; }
.plan-card .plan-header .price { font-size: 14px; opacity: 0.9; }
.plan-card .plan-body { padding: 20px; }
.plan-card .plan-body ul { margin-bottom: 20px; }
.plan-card .plan-body li { padding: 6px 0; font-size: 14px; color: #666; padding-left: 20px; position: relative; }
.plan-card .plan-body li::before { content: '✓'; position: absolute; left: 0; color: #8B0000; font-weight: bold; }
.plan-card .plan-btn { display: block; text-align: center; background: #8B0000; color: #fff; padding: 10px; border-radius: 4px; font-size: 14px; transition: background 0.3s; }
.plan-card .plan-btn:hover { background: #A52A2A; color: #fff; }

/* === 基地展示 === */
.base-showcase { background: #fff; padding: 60px 0; }
.base-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.base-item { position: relative; border-radius: 8px; overflow: hidden; height: 220px; cursor: pointer; }
.base-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.base-item:hover img { transform: scale(1.1); }
.base-item .caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; padding: 15px; }
.base-item .caption h4 { font-size: 15px; }

/* === 新闻动态 === */
.news-section { background: #f5f5f5; padding: 60px 0; }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.news-item { display: flex; background: #fff; border-radius: 8px; overflow: hidden; transition: all 0.3s; }
.news-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.news-item .news-img { width: 200px; min-height: 140px; flex-shrink: 0; }
.news-item .news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-item .news-info { padding: 15px 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.news-item .news-info h4 { font-size: 16px; color: #333; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .news-info p { font-size: 13px; color: #999; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .news-info .date { font-size: 12px; color: #bbb; margin-top: 8px; }

/* === 页脚 === */
.site-footer { background: #1a1a1a; color: #ccc; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #8B0000; display: inline-block; }
.footer-col p { font-size: 13px; line-height: 2; color: #aaa; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 13px; }
.footer-col ul li a:hover { color: #ffd700; }
.footer-bottom { border-top: 1px solid #333; padding: 20px 0; text-align: center; font-size: 12px; color: #888; }
.footer-bottom a { color: #aaa; }

/* === 内页通用 === */
.page-banner { height: 280px; background: linear-gradient(135deg, #8B0000, #4a0000); display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.page-banner::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>') repeat; }
.page-banner h2 { font-size: 36px; color: #fff; letter-spacing: 4px; position: relative; z-index: 1; }
.page-banner .breadcrumb { position: relative; z-index: 1; margin-top: 10px; font-size: 14px; color: rgba(255,255,255,0.7); }
.page-banner .breadcrumb a { color: rgba(255,255,255,0.7); }
.page-banner .breadcrumb a:hover { color: #ffd700; }

/* 内页内容区 */
.page-content { padding: 50px 0; }
.content-wrapper { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.content-main { background: #fff; border-radius: 8px; padding: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

/* 侧边栏 */
.sidebar { }
.sidebar-widget { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.sidebar-widget h3 { font-size: 16px; color: #333; padding-bottom: 10px; margin-bottom: 15px; border-bottom: 2px solid #8B0000; }
.sidebar-widget ul li { padding: 8px 0; border-bottom: 1px dashed #eee; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { font-size: 14px; color: #666; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-widget ul li a:hover { color: #8B0000; padding-left: 5px; }

/* 联系信息侧边栏 */
.sidebar-contact { background: linear-gradient(135deg, #8B0000, #B22222); color: #fff; border-radius: 8px; padding: 25px; }
.sidebar-contact h3 { color: #ffd700; border-bottom-color: rgba(255,255,255,0.3); }
.sidebar-contact p { font-size: 14px; line-height: 2; }
.sidebar-contact .tel { font-size: 20px; font-weight: bold; color: #ffd700; }

/* === 文章列表 === */
.article-list { }
.article-item { display: flex; padding: 20px 0; border-bottom: 1px solid #f0f0f0; transition: all 0.3s; }
.article-item:hover { background: #fafafa; padding-left: 10px; }
.article-item:last-child { border-bottom: none; }
.article-item .thumb { width: 200px; height: 130px; flex-shrink: 0; border-radius: 6px; overflow: hidden; margin-right: 20px; }
.article-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-item:hover .thumb img { transform: scale(1.05); }
.article-item .info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.article-item .info h3 { font-size: 18px; color: #333; margin-bottom: 8px; }
.article-item .info h3 a { color: #333; }
.article-item .info h3 a:hover { color: #8B0000; }
.article-item .info p { font-size: 14px; color: #999; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-item .info .meta { margin-top: 10px; font-size: 12px; color: #bbb; }
.article-item .info .meta span { margin-right: 15px; }

/* === 基地卡片列表 === */
.base-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.base-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: all 0.3s; }
.base-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.base-card .card-img { height: 200px; overflow: hidden; }
.base-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.base-card:hover .card-img img { transform: scale(1.1); }
.base-card .card-body { padding: 20px; }
.base-card .card-body h3 { font-size: 17px; color: #333; margin-bottom: 8px; }
.base-card .card-body h3 a { color: #333; }
.base-card .card-body h3 a:hover { color: #8B0000; }
.base-card .card-body p { font-size: 13px; color: #999; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.base-card .card-body .tag { display: inline-block; background: #f9f5f0; color: #8B0000; font-size: 12px; padding: 2px 10px; border-radius: 3px; margin-right: 5px; }

/* === 培训案例瀑布流 === */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: all 0.3s; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.case-card .case-img { height: 200px; overflow: hidden; position: relative; }
.case-card .case-img img { width: 100%; height: 100%; object-fit: cover; }
.case-card .case-img .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(139,0,0,0.7); opacity: 0; transition: opacity 0.3s; display: flex; align-items: center; justify-content: center; }
.case-card:hover .case-img .overlay { opacity: 1; }
.case-card .case-img .overlay span { color: #fff; font-size: 14px; border: 1px solid #fff; padding: 8px 20px; border-radius: 4px; }
.case-card .case-body { padding: 15px; }
.case-card .case-body h4 { font-size: 15px; color: #333; margin-bottom: 5px; }
.case-card .case-body p { font-size: 13px; color: #999; }

/* === 联系我们 === */
.contact-section { padding: 60px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { }
.contact-info h3 { font-size: 22px; color: #333; margin-bottom: 20px; }
.contact-info .info-item { display: flex; align-items: flex-start; margin-bottom: 20px; }
.contact-info .info-item .icon { width: 45px; height: 45px; background: #8B0000; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; flex-shrink: 0; }
.contact-info .info-item .icon i { color: #fff; font-size: 18px; }
.contact-info .info-item .text h4 { font-size: 15px; color: #333; margin-bottom: 3px; }
.contact-info .info-item .text p { font-size: 14px; color: #888; }

.contact-form { background: #fff; border-radius: 8px; padding: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.contact-form h3 { font-size: 22px; color: #333; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus,
.form-group textarea:focus { border-color: #8B0000; outline: none; }
.form-group textarea { height: 120px; resize: vertical; }
.btn-submit { background: #8B0000; color: #fff; border: none; padding: 12px 40px; border-radius: 4px; font-size: 15px; cursor: pointer; transition: background 0.3s; }
.btn-submit:hover { background: #A52A2A; }

/* === 文章详情 === */
.article-detail { }
.article-detail .article-header { margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.article-detail .article-header h1 { font-size: 24px; color: #333; line-height: 1.4; margin-bottom: 10px; }
.article-detail .article-header .meta { font-size: 13px; color: #999; }
.article-detail .article-header .meta span { margin-right: 20px; }
.article-detail .article-body { font-size: 15px; line-height: 1.8; color: #555; }
.article-detail .article-body p { margin-bottom: 15px; }
.article-detail .article-body img { max-width: 100%; border-radius: 4px; margin: 15px 0; }
.article-detail .article-body h2 { font-size: 20px; color: #333; margin: 25px 0 15px; padding-left: 12px; border-left: 3px solid #8B0000; }
.article-detail .article-body h3 { font-size: 18px; color: #333; margin: 20px 0 10px; }

/* 上下篇导航 */
.article-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.article-nav a { font-size: 14px; color: #666; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-nav a:hover { color: #8B0000; }

/* === 分页 === */
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 30px; gap: 5px; }
.pagination a,
.pagination span { display: inline-block; padding: 8px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #666; transition: all 0.3s; }
.pagination a:hover { background: #8B0000; color: #fff; border-color: #8B0000; }
.pagination .current { background: #8B0000; color: #fff; border-color: #8B0000; }

/* === 分类筛选标签 === */
.filter-tabs { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.filter-tabs a { display: inline-block; padding: 6px 20px; border: 1px solid #ddd; border-radius: 20px; font-size: 14px; color: #666; transition: all 0.3s; }
.filter-tabs a:hover,
.filter-tabs a.active { background: #8B0000; color: #fff; border-color: #8B0000; }

/* === 悬浮咨询 === */
.floating-contact { position: fixed; right: 20px; bottom: 100px; z-index: 999; }
.floating-contact a { display: block; width: 55px; height: 55px; background: #8B0000; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; box-shadow: 0 4px 15px rgba(139,0,0,0.4); transition: all 0.3s; margin-bottom: 10px; }
.floating-contact a:hover { background: #A52A2A; transform: scale(1.1); }

/* === 响应式 === */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .base-grid { grid-template-columns: repeat(2, 1fr); }
    .content-wrapper { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .main-nav.active { display: block; position: absolute; top: 70px; left: 0; right: 0; background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
    .main-nav.active ul { flex-direction: column; }
    .main-nav.active li a { line-height: 50px; border-bottom: 1px solid #f0f0f0; }
    
    .hero-banner { height: 300px; }
    .hero-banner .overlay h2 { font-size: 24px; }
    .hero-banner .overlay p { font-size: 14px; }
    
    .service-targets .grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .plan-grid { grid-template-columns: 1fr; }
    .base-grid { grid-template-columns: 1fr; }
    .base-card-grid { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .page-banner { height: 180px; }
    .page-banner h2 { font-size: 24px; }
    
    .article-item { flex-direction: column; }
    .article-item .thumb { width: 100%; height: 180px; margin-right: 0; margin-bottom: 10px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
