/**
 * 慈善会网站 - 红色爱心主题样式表
 * V2.0 - 统一前台样式（按海南仁爱网站前后台布局.docx）
 */

:root {
    --primary-color: #c62828;
    --primary-dark: #8e0000;
    --primary-light: #ef5350;
    --accent-color: #ffd54f;
    --gold-color: #ffd700;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(198,40,40,0.15);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; }

/* ===== 第一行：Logo行 1200x200mm ===== */
.top-bar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff url('../images/bg.jpg') repeat;
}
.top-bar .logo-img {
    width: 260px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.top-bar .logo-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.top-bar .nav-deco-right {
    flex-shrink: 0;
}
.top-bar .nav-deco-right img {
    width: 735px;
    height: 100px;
}

/* ===== 第二行：导航栏 1200x70mm ===== */
.nav-bar-wrap {
    background: var(--primary-color);
    height: 70px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-bar-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-list {
    display: flex;
    align-items: center;
    height: 100%;
    list-style: none;
}
.nav-list > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 70px;
    line-height: 70px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 1px;
}
.nav-list > li > a:hover,
.nav-list > li > a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.nav-list > li > a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px 2px 0 0;
}

/* 下拉菜单 */
.nav-list > li .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 0 0 6px 6px;
    z-index: 200;
    padding: 4px 0;
}
.nav-list > li:hover .dropdown {
    display: block;
}
.nav-list .dropdown a {
    display: block;
    padding: 10px 18px;
    color: #333;
    font-size: 13px;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-list .dropdown a:hover {
    background: #fef2f2;
    color: var(--primary-color);
}
.nav-list .has-dropdown > a::after {
    content: ' ▾';
    font-size: 10px;
    opacity: 0.7;
}

/* 搜索 */
.search-form {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.search-form input[type="text"] {
    width: 180px;
    height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    outline: none;
    color: #333;
}
.search-form button {
    height: 34px;
    padding: 0 16px;
    border: none;
    background: var(--primary-dark);
    color: #fff;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition);
}
.search-form button:hover {
    background: #600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
}

/* ===== Hero 横幅 ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #b71c1c, var(--primary-dark));
    color: #fff;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero + .container { margin-top: 20px; }
.hero::before {
    content: "♥";
    position: absolute;
    font-size: 300px;
    opacity: 0.04;
    top: -60px;
    right: -40px;
    line-height: 1;
}
.hero::after {
    content: "♥";
    position: absolute;
    font-size: 200px;
    opacity: 0.03;
    bottom: -50px;
    left: -20px;
    line-height: 1;
}
.hero h1 { font-size: 32px; margin-bottom: 8px; font-weight: 700; letter-spacing: 4px; }
.hero p { font-size: 16px; opacity: 0.85; letter-spacing: 2px; }

/* ===== 主内容 ===== */
.main-content { flex: 1; padding: 20px 0; }

/* ===== 首页布局 ===== */
.home-row { display: flex; gap: 20px; margin-bottom: 20px; }
.home-row > * { flex: 1; }
.home-row-full { width: 100%; margin-bottom: 20px; }

/* ===== 模块卡片 ===== */
.module-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.module-card:hover { box-shadow: var(--shadow-hover); }

.mc-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1px;
}
.mc-header .mc-more {
    color: var(--accent-color);
    font-size: 12px;
    font-weight: normal;
}
.mc-header .mc-more:hover { text-decoration: underline; }

.mc-body { padding: 8px 14px; }
.mc-body.news-list-part { padding: 4px 14px; }
.right-news-wrap { display: flex; flex-direction: column; height: 420px; }
.right-tab-wrap { display: flex; flex-direction: column; height: 420px; overflow: hidden; }
.tab-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    flex-shrink: 0;
}
.tab-btn {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.tab-btn:hover { opacity: 1; }
.tab-btn.active {
    opacity: 1;
    border-bottom-color: var(--accent-color);
}
.tab-more {
    margin-left: auto;
    padding: 0 16px;
    font-size: 12px;
}
.tab-more a { color: var(--accent-color); text-decoration: none; }
.tab-more a:hover { text-decoration: underline; }
.tab-body {
    flex: 1;
    padding: 6px 14px;
    overflow-y: auto;
}
.tab-body.hidden { display: none; }

.list-compact { list-style: none; }
.list-compact li {
    padding: 9px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}
.list-compact li:last-child { border-bottom: none; }
.list-compact li a {
    color: #333; font-size: 13px;
    flex: 1; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.list-compact li a:hover { color: var(--primary-color); }
.list-compact li time {
    color: var(--text-muted); font-size: 12px;
    white-space: nowrap; flex-shrink: 0;
}

/* ===== 轮播 ===== */
.carousel-box {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 420px;
    background: #2c2c2c;
}
.carousel-slide {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
}
.carousel-slide.active { opacity: 1; z-index: 1; }
.carousel-slide img { width:100%; height:100%; object-fit: cover; }
.carousel-caption {
    position: absolute;
    bottom:0; left:0; right:0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.75) 100%);
    color: #fff;
    padding: 40px 20px 16px;
}
.carousel-caption h3 { font-size: 18px; margin-bottom: 4px; }
.carousel-caption h3 a { color: #fff; }
.carousel-caption .meta { font-size: 13px; opacity: 0.8; }
.carousel-dots {
    position: absolute; bottom: 14px; right: 18px;
    display: flex; gap: 6px; z-index: 5;
}
.carousel-dots .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer; transition: var(--transition);
}
.carousel-dots .dot.active { background: #fff; transform: scale(1.25); }
.carousel-arrow {
    position: absolute; top:50%; transform:translateY(-50%);
    width:36px; height:48px; background:rgba(0,0,0,0.35);
    color:#fff; border:none; cursor:pointer; font-size:20px;
    z-index:5; transition:var(--transition);
    display:flex; align-items:center; justify-content:center;
}
.carousel-arrow:hover { background:rgba(0,0,0,0.6); }
.carousel-arrow.prev { left:6px; border-radius:0 4px 4px 0; }
.carousel-arrow.next { right:6px; border-radius:4px 0 0 4px; }

/* ===== "关于我们"横条 ===== */
.about-strip {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    gap: 30px;
    padding: 0;
}
.about-strip .about-img {
    width: 500px;
    min-height: 420px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #c62828, #8e0000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 80px;
}
.about-strip .about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.about-strip .about-text {
    flex: 1;
    padding: 25px 30px 25px 0;
}
.about-strip .about-text h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}
.about-strip .about-text p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 2;
}
.about-strip .about-text .about-more {
    margin-top: 16px;
    display: inline-block;
    padding: 8px 28px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
}
.about-strip .about-text .about-more:hover {
    background: var(--primary-dark);
}

/* ===== 底栏 ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 0;
    margin-top: 30px;
    border-top: 2px solid var(--primary-color);
}
.footer-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
    min-height: 120px;
}
.footer-left { flex: 1; }
.footer-left p { margin-bottom: 4px; font-size: 13px; }
.footer-nav { display: flex; gap: 0; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.footer-nav a { color: rgba(255,255,255,0.75); font-size: 14px; padding: 0 12px; }
.footer-nav a:hover { color: var(--accent-color); }
.footer-nav .nav-divider { color: rgba(255,255,255,0.3); font-size: 12px; }
.footer-copyright p { margin-bottom: 3px; font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-copyright .beian a { color: rgba(255,255,255,0.4); font-size: 12px; }
.footer-copyright .beian a:hover { color: var(--accent-color); }
.footer-copyright .tech-support { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.footer-copyright .tech-support a { color: rgba(255,255,255,0.5); }
.footer-copyright .tech-support a:hover { color: var(--accent-color); }
.footer-right { display: flex; gap: 20px; flex-shrink: 0; }
.footer-qr { text-align: center; width: 100px; }
.footer-qr img { width: 90px; height: 90px; background: #fff; padding: 4px; border-radius: 4px; }
.footer-qr span { display: block; font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.footer-qr-placeholder {
    width: 180px;
    height: 100px;
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

/* ===== 面包屑 ===== */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb .sep { margin: 0 8px; }

/* ===== 分类页面 ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 30px 0;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.page-header h1 { font-size: 26px; margin-bottom: 6px; letter-spacing: 2px; }
.page-header p { opacity: 0.85; font-size: 14px; }

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}
.article-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.article-card .ac-img {
    width: 100%; height: 200px; object-fit: cover; display: block;
}
.article-card .ac-body { padding: 16px 18px; }
.article-card .ac-body h3 { margin-bottom: 8px; font-size: 16px; }
.article-card .ac-body h3 a { color: #333; }
.article-card .ac-body h3 a:hover { color: var(--primary-color); }
.article-card .ac-body p { color: var(--text-light); font-size: 13px; }
.article-card .ac-meta {
    display: flex; gap: 16px;
    padding: 10px 18px; border-top: 1px solid #f5f5f5;
    font-size: 12px; color: var(--text-muted);
}

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination .current {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 12px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-color);
    font-size: 14px; transition: var(--transition);
}
.pagination a:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination .current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ===== 文章详情 ===== */
.detail-wrap {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 35px;
    max-width: 1000px; margin: 0 auto;
}
.detail-wrap h1 { color: var(--text-color); font-size: 24px; margin-bottom: 16px; }
.detail-meta {
    padding-bottom: 18px; margin-bottom: 22px;
    border-bottom: 1px solid #eee;
    font-size: 13px; color: var(--text-muted);
    display: flex; gap: 18px; flex-wrap: wrap;
}
.detail-body { font-size: 15px; line-height: 1.9; color: var(--text-color); }
.detail-body p { margin-bottom: 14px; }
.detail-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.detail-body table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.detail-body th, .detail-body td {
    border: 1px solid var(--border-color); padding: 8px; text-align: left; font-size: 14px;
}
.detail-nav {
    display: flex; justify-content: space-between;
    margin-top: 25px; padding-top: 18px;
    border-top: 1px solid #eee;
    font-size: 13px;
}

/* ===== 单页 ===== */
.page-wrap-single {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 35px;
    max-width: 1000px; margin: 0 auto;
}
.page-wrap-single h1 { color: var(--primary-color); font-size: 24px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 3px solid var(--primary-color); }
.page-body { font-size: 15px; line-height: 1.9; color: var(--text-color); }
.page-body p { margin-bottom: 14px; }
.page-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }

.no-data { text-align: center; color: #bbb; padding: 20px; font-size: 13px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .top-bar { height: auto; flex-wrap: wrap; padding: 12px 20px; gap: 10px; }
    .top-bar .logo-wrap { flex-direction: column; align-items: flex-start; }
    .top-bar .logo-wrap .logo-img { width: 130px; height: 100px; }
    .top-bar .logo-wrap .site-title { font-size: 22px; }
    .top-bar .nav-deco-right { display: none; }
    .nav-bar-wrap { height: auto; }
    .nav-toggle { display: block; }
    .nav-list { display: none; width: 100%; flex-direction: column; }
    .nav-list.open { display: flex; }
    .nav-list > li { height: auto; }
    .nav-list > li > a { height: 40px; line-height: 40px; }
    .nav-bar-inner { flex-wrap: wrap; }
    .search-form { width: 100%; margin: 8px 0; }
    .search-form input[type="text"] { flex: 1; }
    .hero { height: 150px; }
    .hero h1 { font-size: 24px; }
    .home-row { flex-direction: column; }
    .about-strip { flex-direction: column; }
    .about-strip .about-img { width: 100%; min-height: 200px; }
    .about-strip .about-text { padding: 20px; }
    .footer-inner { flex-direction: column; text-align: center; min-height: auto; padding: 20px; }
    .footer-nav { justify-content: center; }
    .footer-right { justify-content: center; }
    .list-grid { grid-template-columns: 1fr; }
    .detail-wrap, .page-wrap-single { padding: 20px; }
}

@media (min-width: 769px) and (max-width: 1000px) {
    .nav-list > li > a { padding: 0 10px; font-size: 13px; }
    .search-form input[type="text"] { width: 130px; }
}
