/* ================================================
   宜宾学院图书馆 - 蓝色调主题样式
   ================================================ */

:root {
  --coffee-dark:    #0d2a4a;   /* 深蓝 */
  --coffee-main:    #1a4f8a;   /* 主蓝 */
  --coffee-mid:     #2e6db4;   /* 中蓝 */
  --coffee-light:   #4a9fd4;   /* 亮蓝/天蓝 */
  --coffee-pale:    #a8d4f0;   /* 浅蓝 */
  --coffee-cream:   #eaf4fb;   /* 浅蓝白 */
  --coffee-bg:      #f0f6fc;   /* 页面背景 */
  --text-dark:      #0a1628;
  --text-mid:       #1a3a5c;
  --text-light:     #4a6a8a;
  --white:          #ffffff;
  --shadow-sm:      0 2px 12px rgba(13,42,74,0.08);
  --shadow-md:      0 6px 24px rgba(13,42,74,0.12);
  --shadow-lg:      0 12px 40px rgba(13,42,74,0.16);
  --radius:         10px;
  --transition:     0.3s ease;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--text-dark);
  background: var(--coffee-bg);
  font-size: 15px;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── 公共标题 ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--coffee-pale);
}
.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--coffee-dark);
  position: relative;
  padding-left: 14px;
}
.section-header h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--coffee-light);
  border-radius: 2px;
}
.section-header.centered {
  flex-direction: column;
  text-align: center;
  border-bottom: none;
}
.section-header.centered h2 { padding-left: 0; }
.section-header.centered h2::before { display: none; }
.section-header.centered p {
  color: var(--text-light);
  margin-top: 8px;
  font-size: 14px;
}
.section-header .section-tabs { display: flex; gap: 6px; }
.more-link {
  font-size: 13px;
  color: var(--coffee-main);
  display: flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.more-link:hover { 
  color: var(--coffee-dark);
  text-decoration: underline;
}

/* ================================================
   顶部信息栏
   ================================================ */
.topbar {
  background: var(--coffee-dark);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  padding: 7px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar-left span i,
.topbar-right a i { margin-right: 5px; color: var(--coffee-pale); }
.topbar-right a { color: rgba(255,255,255,0.75); }
.topbar-right a:hover { color: var(--coffee-pale); }

/* ================================================
   主导航
   ================================================ */
.header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  box-shadow: 0 4px 20px rgba(62,30,10,0.14);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  height: 90px;
}
.logo-icon {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon img {
  height: 82px;
  width: auto;
  max-width: 480px;
  object-fit: contain;
}

/* 导航菜单 */
.navbar { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  gap: 4px;
}
.nav-menu > li {
  position: relative;
}
.nav-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text-dark);
  border-radius: 6px;
  font-weight: 500;
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  background: var(--coffee-cream);
  color: var(--coffee-main);
}
.nav-menu > li > a.active { font-weight: 700; }
.nav-menu > li > a i { font-size: 11px; }

/* 下拉菜单 */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--coffee-light);
  padding: 8px 0;
  z-index: 999;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--text-dark);
}
.dropdown li a:hover {
  background: var(--coffee-cream);
  color: var(--coffee-main);
}

/* 汉堡按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--coffee-dark);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ================================================
   Hero 轮播
   ================================================ */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
}
.hero-slider { height: 100%; }
.hero-slide {
  display: none;
  height: 100%;
  background-size: cover;
  background-position: center;
  align-items: center;
  justify-content: center;
}
.hero-slide.active { display: flex; }
.hero-content {
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  animation: fadeInUp 0.7s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-block;
  background: var(--coffee-light);
  color: var(--white);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 18px;
  font-weight: 600;
}
.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  letter-spacing: 2px;
}
.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(13, 42, 74, 0.12);
}
.btn-primary {
  background: var(--coffee-light);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--coffee-main);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 79, 138, 0.35);
}
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.8);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

/* Hero 控件 */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}
.hero-prev { left: 24px; }
.hero-next { right: 24px; }
.hero-prev:hover, .hero-next:hover {
  background: var(--coffee-main);
  box-shadow: var(--shadow-md);
}
.hero-dots {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 10;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer; transition: var(--transition);
  border: none;
}
.dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

/* ================================================
   快捷入口
   ================================================ */
.quick-entry {
  background: var(--white);
  padding: 20px 0;
  border-bottom: 1px solid var(--coffee-pale);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.quick-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius);
  color: var(--text-mid);
  transition: color var(--transition), background var(--transition), transform var(--transition);
  cursor: pointer;
}
.quick-item:hover {
  background: var(--coffee-cream);
  color: var(--coffee-main);
  transform: translateY(-3px);
}
.quick-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--coffee-cream) 0%, #d6eaf8 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--coffee-mid);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(13,42,74,0.08);
}
.quick-item:hover .quick-icon {
  background: linear-gradient(135deg, var(--coffee-mid) 0%, var(--coffee-light) 100%);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(26,79,138,0.25);
  transform: scale(1.08);
}
.quick-item span {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}

/* ================================================
   检索区
   ================================================ */
.search-section {
  background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-main) 60%, #1e6fba 100%);
  padding: 50px 0;
}
.search-header {
  text-align: center;
  color: var(--white);
  margin-bottom: 28px;
}
.search-header h2 {
  font-size: 26px; font-weight: 700;
  margin-bottom: 8px;
}
.search-header p { opacity: 0.8; font-size: 14px; }

.search-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  width: fit-content;
  margin-left: auto; margin-right: auto;
  padding: 4px;
}
.stab {
  padding: 8px 22px;
  border: none; background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 14px; cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}
.stab.active,
.stab:hover {
  background: var(--white);
  color: var(--coffee-main);
  font-weight: 600;
}

.search-body {
  max-width: 760px;
  margin: 0 auto;
}
.search-box {
  display: flex;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  margin-bottom: 14px;
}
.search-select {
  border: none; outline: none;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-mid);
  background: #f8f0e8;
  border-right: 1px solid var(--coffee-pale);
  cursor: pointer;
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  padding: 15px 20px;
  border: none; outline: none;
  font-size: 15px;
  color: var(--text-dark);
}
.search-btn {
  padding: 0 28px;
  background: linear-gradient(135deg, var(--coffee-main), var(--coffee-light));
  color: var(--white);
  border: none; cursor: pointer;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(26, 79, 138, 0.25);
}
.search-btn:hover { 
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-main));
  box-shadow: 0 4px 12px rgba(26, 79, 138, 0.35);
}

.hot-search {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.hot-search span { margin-right: 6px; }
.hot-search a {
  color: var(--coffee-pale);
  margin: 0 6px;
  padding: 2px 10px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: var(--transition);
}
.hot-search a:hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

/* ================================================
   数据统计
   ================================================ */
.stats-section {
  background: linear-gradient(90deg, var(--coffee-cream) 0%, #fff 50%, var(--coffee-cream) 100%);
  padding: 40px 0;
  border-bottom: 1px solid var(--coffee-pale);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 20px 10px;
  position: relative;
}
.stat-item + .stat-item::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; height: 60%;
  width: 1px;
  background: var(--coffee-pale);
}
.stat-number {
  font-size: 38px;
  font-weight: 800;
  color: var(--coffee-main);
  line-height: 1;
  margin-bottom: 6px;
  font-family: "Arial", sans-serif;
}
.stat-label {
  font-size: 13px;
  color: var(--text-light);
}

/* ================================================
   内容区：新闻 + 侧边
   ================================================ */
.content-section {
  padding: 56px 0;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}

/* 新闻区块 */
.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--coffee-pale);
}
.block-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--coffee-dark);
}
.block-tabs { display: flex; gap: 0; }
.ntab {
  padding: 7px 18px;
  border: none; background: transparent;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -14px;
  transition: var(--transition);
}
.ntab.active,
.ntab:hover {
  color: var(--coffee-main);
  border-bottom-color: var(--coffee-light);
}
.news-pane { display: none; }
.news-pane.active { display: block; }

/* 新闻内容左右布局 */
.news-content {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 20px;
}
.news-list-content {
  min-height: 0;
}

/* 新闻滚动图片 */
.news-slider {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.news-slide {
  display: none;
}
.news-slide.active {
  display: block;
}
.news-slide-img {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,0.9);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.news-slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-slide-info {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.news-slide-tag {
  flex-shrink: 0;
  padding: 3px 10px;
  background: var(--coffee-light);
  color: var(--white);
  font-size: 11px;
  border-radius: 4px;
  font-weight: 600;
}
.news-slide-info a {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.news-slide-info a:hover {
  color: var(--coffee-main);
}
.news-slide-dots {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 6px;
}
.ndot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.ndot.active {
  background: var(--white);
  width: 16px;
  border-radius: 3px;
}

/* 新闻列表 */
.news-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--coffee-pale);
  transition: var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item:hover {
  background: rgba(59, 169, 217, 0.03);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 6px;
}
.news-item:hover .news-title { 
  color: var(--coffee-main);
  text-decoration: underline;
}
.news-date {
  flex-shrink: 0;
  width: 52px;
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-main));
  color: var(--white);
  border-radius: 8px;
  text-align: center;
  padding: 8px 4px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 61, 130, 0.15);
}
.news-date .day {
  display: block; 
  font-size: 22px; 
  font-weight: 700;
  font-family: "Arial", sans-serif;
  letter-spacing: -0.5px;
}
.news-date .month {
  display: block; 
  font-size: 11px; 
  margin-top: 4px; 
  opacity: 0.9;
  font-weight: 500;
}
.news-title {
  font-size: 15px;
  font-weight: 600;
  color: #0a1628;
  line-height: 1.5;
  display: block;
  margin-bottom: 6px;
  transition: var(--transition);
}
.news-brief {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 公告列表 */
.notice-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #f0e8dc;
  gap: 10px;
}
.notice-list li:last-child { border-bottom: none; }
.notice-list li i {
  color: var(--coffee-light);
  flex-shrink: 0;
}
.notice-list li a {
  flex: 1;
  font-size: 14px;
  color: var(--text-dark);
}
.notice-list li a:hover { color: var(--coffee-main); }
.notice-list li span {
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* 活动列表 */
.activity-list { }
.activity-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed #f0e8dc;
}
.activity-item:last-child { border-bottom: none; }
.act-date {
  flex-shrink: 0;
  width: 54px; height: 54px;
  border-radius: 8px;
  background: var(--coffee-cream);
  border: 2px solid var(--coffee-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  color: var(--coffee-main);
}
.act-info a {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text-dark); margin-bottom: 4px;
}
.act-info a:hover { color: var(--coffee-main); }
.act-info span { font-size: 12px; color: var(--text-light); }

/* 侧边块 */
.side-blocks { display: flex; flex-direction: column; gap: 24px; }

/* 数据库导航 */
/* 活动讲座板块 */
.event-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.event-block .block-header {
  border-bottom: none;
  padding-bottom: 0;
}
.event-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--coffee-pale);
  position: relative;
}
.etab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.etab.active,
.etab:hover {
  color: var(--coffee-main);
  border-bottom-color: var(--coffee-light);
}
.etab.active {
  font-weight: 700;
}
.event-pane { display: none; }
.event-pane.active { display: block; }
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.event-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
.event-list li:last-child {
  border-bottom: none;
}
.event-tag {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
.event-tag.lecture { background: #e3f2fd; color: #1976d2; }
.event-tag.exhibition { background: #f3e5f5; color: #7b1fa2; }
.event-tag.training { background: #e8f5e9; color: #388e3c; }
.event-tag.activity { background: #fff3e0; color: #f57c00; }
.event-tag.donor { background: #fce4ec; color: #c2185b; }
.event-tag.thanks { background: #e0f7fa; color: #0097a7; }
.event-list a {
  flex: 1;
  font-size: 13px;
  color: #0a1628;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  min-width: 0;
}
.event-list a:hover {
  color: var(--coffee-main);
  text-decoration: underline;
}
.event-date {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

/* ================================================
   学科空间 - 文字版
   ================================================ */
.subject-spaces-section {
  padding: 56px 0;
  background: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)), url('../img/lib90.png') center center / cover no-repeat;
  border-top: 1px solid var(--coffee-pale);
}
.subject-text-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.subject-text-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: var(--coffee-cream);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}
.subject-text-item:hover {
  background: var(--white);
  border-color: var(--coffee-light);
  color: var(--coffee-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
  .subject-text-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 576px) {
  .subject-text-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .subject-text-item {
    padding: 14px 10px;
    font-size: 13px;
  }
}

/* ================================================
   新书推荐
   ================================================ */
.new-books {
  padding: 56px 0;
  background: var(--white);
  border-top: 1px solid var(--coffee-pale);
}
.btab {
  padding: 6px 14px;
  border: 1px solid var(--coffee-pale);
  background: transparent;
  font-size: 13px;
  color: var(--text-mid);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.btab.active, .btab:hover {
  background: var(--coffee-main);
  color: var(--white);
  border-color: var(--coffee-main);
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.book-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.book-cover { position: relative; }
.book-img {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  color: rgba(255,255,255,0.7);
}
.book-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--coffee-light);
  color: var(--white);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.book-info {
  padding: 14px 14px 16px;
  border-top: 1px solid #f5ede0;
}
.book-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.book-author, .book-press {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.book-status {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 8px;
  font-weight: 600;
}
.book-status.available {
  background: #eaf7f0;
  color: #2a8a5a;
}
.book-status.borrowed {
  background: #fdf0f0;
  color: #c04040;
}

/* ================================================
   馆内空间
   ================================================ */
.spaces-section {
  padding: 56px 0;
  background: var(--coffee-bg);
}
.spaces-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 180px);
  gap: 16px;
}
.space-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.space-card.large { grid-row: span 2; }
.space-img {
  height: 100%;
  display: flex; align-items: flex-end;
  transition: var(--transition);
  background-color: var(--coffee-mid);
  background-size: cover;
  background-position: center;
}
.space-card:hover .space-img { filter: brightness(1.1); }
.space-overlay {
  padding: 18px;
  width: 100%;
  background: linear-gradient(to top, rgba(40,15,0,0.75) 0%, transparent 100%);
}
.space-overlay h3 {
  font-size: 17px;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 4px;
}
.space-overlay p { font-size: 12px; color: rgba(255,255,255,0.8); }

/* ================================================
   图书馆数据
   ================================================ */
.library-data-section {
  padding: 56px 0;
  background: #f5f7fa;
}
.data-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.data-section-header .section-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--coffee-main);
  font-family: "Arial", sans-serif;
}
.data-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.data-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.service-data {
  gap: 12px;
  justify-content: space-between;
}
.data-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  min-height: 32px;
}
.data-card-title i {
  width: 32px;
  height: 32px;
  background: var(--coffee-cream);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee-main);
  font-size: 14px;
}

/* 服务数据 */
.service-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 12px;
  background: #f8fafc;
  border-radius: 10px;
  min-height: 86px;
}
.service-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-label {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.3;
}
.service-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  font-family: "Arial", sans-serif;
  line-height: 1.2;
  white-space: nowrap;
}
.service-value small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 2px;
}
.service-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--white);
  flex-shrink: 0;
}
.service-icon.blue { background: #4a90d9; }
.service-icon.cyan { background: #5ac8d8; }
.service-icon.orange { background: #f5a623; }

/* 资源数据 */
.resource-data {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.resource-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.resource-item {
  text-align: center;
  padding: 18px 12px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fc 100%);
  border-radius: 10px;
  border: 1px solid #e0ecf8;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74,144,217,0.15);
}
.resource-label {
  display: block;
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.resource-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--coffee-main);
  font-family: "Arial", sans-serif;
  white-space: nowrap;
}
.resource-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  margin-left: 2px;
}



/* ================================================
   友情链接
   ================================================ */
.friend-links-section {
  padding: 40px 0;
  background: var(--coffee-dark);
}
.friend-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.friend-link-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}
.friend-link-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.friend-link-item i {
  font-size: 20px;
  opacity: 0.9;
}
@media (max-width: 768px) {
  .friend-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .friend-link-item {
    padding: 14px 16px;
    font-size: 14px;
  }
}
@media (max-width: 480px) {
  .friend-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   页脚
   ================================================ */
.footer-top {
  background: linear-gradient(rgba(13, 42, 74, 0.9), rgba(13, 42, 74, 0.9)), url('../img/lib90.png') center center / cover no-repeat;
  padding: 40px 0 36px;
  color: rgba(255,255,255,0.9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
.footer-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.footer-logo i {
  font-size: 32px;
  color: var(--coffee-pale);
}
.footer-logo span {
  display: block; font-size: 11px; letter-spacing: 1.5px;
  color: var(--coffee-pale); opacity: 0.8;
}
.footer-logo strong {
  display: block; font-size: 18px;
  color: var(--white);
}
.footer-about p {
  font-size: 13px; line-height: 1.8;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--coffee-light);
  color: var(--white);
}
/* 联系方式 */
.footer-contact-info h4, .footer-hours h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--coffee-pale);
  margin-bottom: 18px;
}
.contact-row {
  display: flex;
  gap: 40px;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.contact-address {
  margin-top: 14px;
}
.contact-address p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 6px;
}
.contact-address strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

/* 开馆时间 */
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.hours-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--coffee-pale);
  margin-bottom: 8px;
}
.hours-col p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.9;
}

.footer-bottom {
  background: #081830;
  padding: 14px 0;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: var(--coffee-pale); }
.footer-bottom a:hover { color: var(--white); }

/* ================================================
   内页通用样式
   ================================================ */

/* 页面横幅 */
.page-banner {
  background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-main) 100%);
  padding: 40px 0;
  color: var(--white);
}
.page-banner h1 {
  font-size: 28px;
  font-weight: 700;
}
.page-banner .breadcrumb {
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.9;
}
.page-banner .breadcrumb a {
  color: var(--white);
}
.page-banner .breadcrumb a:hover {
  text-decoration: underline;
}
.page-banner .breadcrumb i {
  margin: 0 8px;
  font-size: 11px;
}

/* 页面布局 */
.page-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  padding: 40px 0;
}

/* 侧边栏 */
.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: fit-content;
}
.sidebar-header {
  background: linear-gradient(135deg, var(--coffee-dark), var(--coffee-main));
  color: var(--white);
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 600;
}
.sidebar-menu {
  list-style: none;
  padding: 10px 0;
}
.sidebar-menu li {
  border-bottom: 1px solid var(--coffee-pale);
}
.sidebar-menu li:last-child {
  border-bottom: none;
}
.sidebar-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: var(--text-dark);
  font-size: 14px;
  transition: var(--transition);
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--coffee-cream);
  color: var(--coffee-main);
}
.sidebar-menu a i {
  font-size: 12px;
  color: var(--text-light);
}

/* 主内容区 */
.main-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  min-height: 500px;
}
.content-header {
  border-bottom: 2px solid var(--coffee-pale);
  padding-bottom: 15px;
  margin-bottom: 25px;
}
.content-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--coffee-dark);
}

/* 列表页样式 */
.list-item {
  display: flex;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--coffee-pale);
  transition: var(--transition);
}
.list-item:hover {
  background: var(--coffee-cream);
  margin: 0 -15px;
  padding-left: 15px;
  padding-right: 15px;
}
.list-item:last-child {
  border-bottom: none;
}
.list-date {
  flex-shrink: 0;
  width: 50px;
  text-align: center;
}
.list-date .day {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--coffee-main);
  line-height: 1;
}
.list-date .month {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.list-body {
  flex: 1;
}
.list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  display: block;
}
.list-title:hover {
  color: var(--coffee-main);
}
.list-summary {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}
.list-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--coffee-cream);
  color: var(--coffee-main);
  font-size: 12px;
  border-radius: 4px;
  margin-right: 8px;
}

/* 分页 - 旧版样式（template等页面使用） */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--coffee-pale);
}
.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-mid);
  background: var(--coffee-cream);
  transition: var(--transition);
}
.pagination a:hover,
.pagination a.active {
  background: var(--coffee-main);
  color: var(--white);
}
.pagination .prev,
.pagination .next {
  padding: 0 15px;
}

/* 分页 - JS组件翻页样式（pagebar规范） */
.pagebar {
  font-size: 13px;
  line-height: 13px;
  color: var(--text-mid);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
}
.pagebar a {
  text-decoration: none;
}
.pagebar .p_pages {
  margin-left: -5px;
}
.pagebar .p_fun_d,
.pagebar .p_no_d,
.pagebar .p_fun a,
.pagebar .p_no a {
  border: 1px solid var(--coffee-pale);
  padding: 6px 10px;
  margin: 0 0 0 5px;
  height: 30px;
  line-height: 16px;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  transition: var(--transition);
}
.pagebar .p_t {
  line-height: 13px;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}
.pagebar .p_fun_d,
.pagebar .p_no_d {
  color: var(--coffee-pale);
  cursor: default;
}
.pagebar .p_fun a,
.pagebar .p_no a {
  color: var(--text-dark);
}
.pagebar .p_no a:hover,
.pagebar .p_fun a:hover,
.pagebar .p_goto a:hover {
  background-color: var(--coffee-cream);
  border-color: var(--coffee-light);
  color: var(--coffee-main);
}
.pagebar .p_dot {
  margin-left: 4px;
  margin-right: -4px;
  color: var(--text-light);
}
.pagebar .p_no_d {
  border-color: var(--coffee-main);
  color: var(--white);
  background-color: var(--coffee-main);
}
.pagebar .p_first,
.pagebar .p_first_d,
.pagebar .p_last,
.pagebar .p_last_d {
  display: none;
}
.pagebar .p_goto input {
  font-size: 13px;
  border: 1px solid var(--coffee-pale);
  height: 26px;
  line-height: 24px;
  box-sizing: border-box;
  vertical-align: middle;
  outline-width: thin;
  outline-color: var(--coffee-main);
  margin: 0 2px;
  padding: 0 1px;
  width: 28px;
  text-align: center;
  border-radius: 4px;
  transition: var(--transition);
}
.pagebar .p_goto input:hover,
.pagebar .p_goto input:focus {
  border-color: var(--coffee-main);
}
.pagebar .p_goto a {
  border: 1px solid var(--coffee-pale);
  padding: 6px 10px;
  color: var(--text-dark);
  margin: 0;
  height: 30px;
  line-height: 16px;
  display: inline-block;
  box-sizing: border-box;
  vertical-align: middle;
  border-radius: 6px;
  transition: var(--transition);
}

/* 内容页文章样式 */
.article-header {
  text-align: center;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--coffee-pale);
  margin-bottom: 30px;
}
.article-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
}
.article-meta span i {
  margin-right: 5px;
}
.article-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-mid);
  min-height: 400px;
}
.article-body p {
  margin-bottom: 18px;
  text-indent: 2em;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--coffee-dark);
  margin: 30px 0 18px;
  padding-left: 12px;
  border-left: 3px solid var(--coffee-main);
}
.article-body ul,
.article-body ol {
  margin: 18px 0;
  padding-left: 2em;
}
.article-body li {
  margin-bottom: 10px;
}
.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}
.article-body a {
  color: var(--coffee-main);
  text-decoration: underline;
}
.article-body a:hover {
  color: var(--coffee-dark);
}

/* 文章底部 */
.article-footer {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--coffee-pale);
}
.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.article-share span {
  font-size: 13px;
  color: var(--text-light);
}
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coffee-cream);
  color: var(--coffee-main);
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(13, 42, 74, 0.1);
}
.share-btn:hover {
  background: var(--coffee-main);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(26, 79, 138, 0.25);
  transform: translateY(-2px);
}
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.article-nav a {
  padding: 15px;
  background: var(--coffee-cream);
  border-radius: 8px;
  font-size: 13px;
}
.article-nav a:hover {
  background: var(--coffee-pale);
}
.article-nav .prev {
  text-align: left;
}
.article-nav .next {
  text-align: right;
}
.article-nav .label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 5px;
}
.article-nav .title {
  color: var(--text-dark);
  font-weight: 500;
}

/* 内页响应式 */
@media (max-width: 992px) {
  .page-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .main-content {
    padding: 25px;
  }
  .article-title {
    font-size: 20px;
  }
}

/* ================================================
   回到顶部
   ================================================ */
.back-top {
  position: fixed;
  right: 28px; bottom: 40px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--coffee-main);
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center; justify-content: center;
  transition: var(--transition);
  z-index: 999;
}
.back-top.show { display: flex; }
.back-top:hover {
  background: var(--coffee-dark);
  transform: translateY(-3px);
}

/* ================================================
   响应式
   ================================================ */
@media (max-width: 1100px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .data-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .spaces-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .space-card.large { grid-row: span 1; }
}

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item + .stat-item::before { display: none; }
  .stats-grid .stat-item { border-bottom: 1px solid var(--coffee-pale); }
  .hero-title { font-size: 30px; }
}

@media (max-width: 768px) {
  .topbar { display: none; }

  .hamburger { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-md);
    padding: 10px 0;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { border-radius: 0; padding: 12px 20px; }
  .dropdown {
    position: static;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--coffee-pale);
    margin-left: 20px;
    border-radius: 0;
  }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; }

  .hero { height: 380px; }
  .hero-title { font-size: 24px; letter-spacing: 1px; }
  .hero-desc { font-size: 13px; }

  .quick-grid { grid-template-columns: repeat(4, 1fr); }

  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .spaces-grid { grid-template-columns: 1fr; }
  .db-grid { grid-template-columns: repeat(4, 1fr); }

  .service-stats { grid-template-columns: 1fr; }
  .service-value { font-size: 18px; }
  .resource-stats { grid-template-columns: 1fr; gap: 12px; }

  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 20px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .books-grid { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 28px; }
}