/* 南宁市作家协会 - 主样式表 */

:root {
  --primary: #8B0000;
  --primary-light: #A52A2A;
  --primary-dark: #5C0000;
  --gold: #C9A96E;
  --gold-light: #E8D5B7;
  --bg-light: #FDF8F0;
  --text-dark: #2C2C2C;
  --text-gray: #666;
  --border: #E0D5C1;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ===== 顶部 ===== */
.header {
  position: relative;
  background: url("/static/images/header_bg.png") center/cover no-repeat;
  color: var(--white);
  padding: 0;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
}

.header > * {
  position: relative;
  z-index: 1;
}

.header-top {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.15);
  padding: 6px 0;
  font-size: 13px;
}

.header-top a { color: #333; }
.header-top a:hover { color: var(--gold-light); }

.header-main {
  padding: 25px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.header-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.header-logo img {
  width: 100%;
  height: 100%;
}

.header-text {
  text-align: left;
}

.site-title {
  font-family: 'SimHei', '黑体', 'Microsoft YaHei', '微软雅黑', sans-serif;
  font-size: 42px; font-weight: bold;
  color: #1a1a1a;
  letter-spacing: 6px;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(255,255,255,0.5);
  line-height: 1.3;
}

.site-subtitle {
  font-size: 13px;
  color: #555;
  letter-spacing: 4px;
  padding-left: 4px;
}

/* ===== 导航 ===== */
.navbar {
  background: rgba(80, 55, 40, 0.92) !important;
  border-top: 2px solid var(--gold);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.navbar .nav-link {
  color: rgba(255,255,255,0.9) !important;
  padding: 12px 24px !important;
  font-size: 15px;
  transition: all 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: rgba(0,0,0,0.2) !important;
  color: var(--gold) !important;
}

/* ===== 轮播 ===== */
.carousel-item { height: 380px; overflow: hidden; }
.carousel-item img { object-fit: cover; height: 100%; width: 100%; }
.carousel-caption {
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  bottom: 0; left: 0; right: 0;
  padding: 30px 20px 20px;
  text-align: left;
}
.carousel-caption h5 { font-size: 20px; font-weight: bold; }

/* ===== 静态Banner ===== */
.hero-banner {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.hero-banner img {
  width: 100%;
  display: block;
}

/* ===== 板块区域 ===== */
.section-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 16px;
}

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  height: 100%;
}

.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.news-card-img {
  height: 180px;
  overflow: hidden;
  background: var(--gold-light);
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-body { padding: 16px; }

.news-card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a { color: var(--text-dark); }
.news-card-title a:hover { color: var(--primary); }

.news-card-summary {
  font-size: 13px;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.news-card-meta {
  font-size: 12px;
  color: #999;
}

/* ===== 文章列表 ===== */
.article-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.3s;
}

.article-list-item:hover { box-shadow: var(--shadow); }

.article-list-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}
.article-list-title a { color: var(--text-dark); }
.article-list-title a:hover { color: var(--primary); }

.article-list-summary {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.article-list-meta {
  font-size: 12px;
  color: #999;
}

/* ===== 文章详情 ===== */
.article-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.article-detail h1 {
  font-size: 24px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-detail .meta {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.article-detail .content {
  font-size: 16px;
  line-height: 2;
  color: #333;
}

.article-detail .content h4 {
  color: var(--primary);
  font-size: 17px;
  margin: 20px 0 10px;
}

.article-detail .content p {
  margin-bottom: 14px;
  text-indent: 2em;
}

.article-detail .content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 10px 0;
}

.article-detail table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.article-detail table th,
.article-detail table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
}

.article-detail table th {
  background: var(--bg-light);
  font-weight: bold;
}

/* 相关文章 */
.related-articles {
  margin-top: 24px;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.related-articles li a {
  color: var(--text-dark);
  font-size: 14px;
}

.related-articles li a:hover { color: var(--primary); }

.related-articles li .date {
  float: right;
  color: #999;
  font-size: 12px;
}

/* ===== 会员卡片 ===== */
.member-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
  height: 100%;
}

.member-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.member-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 20px auto 12px;
  background: var(--gold-light);
  overflow: hidden;
  border: 3px solid var(--gold);
}

.member-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card .name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

.member-card .title {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.member-card .works {
  font-size: 12px;
  color: var(--text-gray);
  padding: 0 15px 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 会员详情 ===== */
.member-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.member-detail .avatar-large {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 4px solid var(--gold);
  overflow: hidden;
  margin: 0 auto 20px;
}

.member-detail .avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-detail .avatar-initial {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B0000, #C9A96E);
  color: white;
  font-size: 60px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 4px solid #C9A96E;
}

.member-detail .name {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
}

.member-detail .info-table {
  width: 100%;
  margin: 20px 0;
}

.member-detail .info-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.member-detail .info-table td:first-child {
  width: 100px;
  color: var(--text-gray);
  font-weight: bold;
}

/* ===== 搜索框 ===== */
.search-box {
  max-width: 400px;
  margin: 0 auto 30px;
}

.search-box .input-group {
  border: 2px solid var(--gold);
  border-radius: 50px;
  overflow: hidden;
}

.search-box input {
  border: none;
  padding: 10px 20px;
  font-size: 15px;
}

.search-box input:focus {
  box-shadow: none;
  outline: none;
}

.search-box button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 15px;
  cursor: pointer;
}

.search-box button:hover { background: var(--primary-light); }

/* ===== 面包屑 ===== */
.breadcrumb { background: transparent; padding: 10px 0; font-size: 14px; }

/* ===== 分页 ===== */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
}

.pagination .page-link:hover { background: var(--bg-light); }
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== 侧边栏 ===== */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

/* ===== 页脚 ===== */
.footer {
  background: #4a3528;
  color: rgba(255,255,255,0.85);
  margin-top: auto;
  padding: 30px 0 15px;
}

.footer h5 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 12px;
}

.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--gold-light); }

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  margin-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

/* ===== 404 ===== */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-page h1 {
  font-size: 100px;
  color: var(--primary);
  margin-bottom: 10px;
}

.error-page p {
  font-size: 18px;
  color: var(--text-gray);
}

/* ===== 机构介绍页 ===== */
.about-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
}

.about-section h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header-logo { width: 56px; height: 56px; }
  .header-main { gap: 12px; padding: 18px 10px; }
  .site-title { font-size: 26px; letter-spacing: 3px; }
  .site-subtitle { font-size: 11px; }
  .carousel-item { height: 220px; }
  .navbar .nav-link { padding: 8px 16px !important; font-size: 14px; }
  .article-detail { padding: 20px; }
  .article-detail h1 { font-size: 20px; }
  .member-detail { padding: 20px; }
}

@media (max-width: 576px) {
  .carousel-item { height: 180px; }
  .article-detail .content { font-size: 15px; }
}










