/* ============================================
   甘肃省图书馆 - 首页样式
   ============================================ */

.home-bg {
  width: 100%;
  height: 800px;
  background: url('../assets/images/BG1.png') no-repeat center center;
  background-size: cover;
  position: relative;
}

/* 搜索区 */
.search-tabs {
  position: absolute;
  top: 51px;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  height: 136px;
  background: url('../assets/images/SEARCHbg.png') no-repeat center center;
  background-size: 100% 100%;
  padding: 20px 30px;
}

/* Tab 按钮行 */
.tab-hd ul {
  display: flex;
  gap: 0;
}

.tab-hd ul {
  display: flex;
  gap: 8px;
}

.tab-btn {
  width: 133px;
  height: 37px;
  line-height: 37px;
  text-align: center;
  font-size: 16px;
  color: #3f78c5;
  background: #e2edfa;
  cursor: pointer;
  border-radius: 16px 16px 0 0;
}

.tab-btn.active {
  background: #2e6aba;
  color: #fff;
}

.tab-btn a {
  display: block;
  color: inherit;
}

/* 搜索表单行 */
.tab-bd {
  margin-top: 0;
}

.search-box {
  width: 1355px;
  height: 58px;
  background: #fff;
  border: 1px solid #d0d8e0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  height: 100%;
}

.search-field,
.search-lib {
  height: 35px;
  padding: 0 14px;
  border: 1px solid #d0d8e0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #fff;
  cursor: pointer;
}

.search-field {
  margin-right: 14px;
  width: 120px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f3e5d2' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.search-lib {
  margin-right: 23px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f3e5d2' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.search-input {
  flex: 1;
  height: 100%;
  padding: 0 14px;
  border: none;
  font-size: 15px;
  color: #333;
  background: #fff;
}

.search-input::placeholder {
  color: #aaa;
}

.search-submit {
  height: 38px;
  line-height: 38px;
  width: 120px;
  text-align: center;
  background: #f4e9d5;
  color: #b0915a;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  font-weight: normal;
  letter-spacing: 2px;
  margin-right: 10px;
}

.adv-search {
  height: 38px;
  line-height: 38px;
  width: 120px;
  text-align: center;
  background: #2e6aba;
  color: #fff;
  border-radius: 4px;
  font-size: 16px;
  white-space: nowrap;
}

.site-search-btn {
  margin-left: auto;
}

/* 三列板块 */
.home-cols {
  position: absolute;
  top: 219px;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  display: flex;
  gap: 33px;
}

.col-box {
  height: 440px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.col-left {
  width: 382px;
}

.col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 0;
}

#yugao{
  padding: 13px 20px 12px;

}
.col-title .more\+ {
  margin-left: auto;
  font-size: 14px;
  color: #71a4e7;
}

.col-title span {
  font-size: 22px;
  font-family: "SimSun", "宋体", serif;
  color: #333;
  font-weight: 900;
  text-shadow: 0.2px 0 0 #333;
}

.col-res-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 10px;
  padding: 15px 20px 0;
}

.col-res-item {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  color: #3d2c1e;
  gap: 6px;
  line-height: 1.4;
  font-family: "Source Han Serif SC", "Source Han Serif CN", "思源宋体", "Noto Serif CJK SC", serif;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-res-dot {
  width: 5px;
  height: 5px;
  background: #c9a86c;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 6px;
  margin-left: 1px;
}

.col-res-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 102px);
  gap: 15px;
  padding: 15px 20px 0;
}

.res-thumb {
  width: 102px;
  height: 75px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.res-thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 30%, transparent calc(100% - 40px), rgba(0,0,0,0.08) 100%);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
}

.res-thumb img,
.res-thumb span {
  position: relative;
  z-index: 1;
}

.res-thumb img {
  width: auto;
  height: 23px;
}

.res-thumb span {
  font-size: 14px;
  color: #fff;
}

.col-mid {
  width: 570px;
}

.mid-banner {
  width: 100%;
  height: 340px;
  display: block;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.mid-content {
  padding: 0 20px;
}

.mid-p {
  font-size: 16px;
  padding-top: 10px;
  line-height: 1.6;
}

.mid-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
}

.mid-date-label {
  font-size: 14px;
  color: #888;
}

.mid-slider {
  font-size: 14px;
  color: #888;
}

.ms-cur {
  color: #f8c193;
  font-weight: bold;
}

.ms-arrow {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid #c1c4c7;
  border-bottom: 1.5px solid #c1c4c7;
  cursor: pointer;
  user-select: none;
}

.ms-prev { transform: rotate(135deg); }
.ms-next { transform: rotate(-45deg); }

.ms-arrow:hover {
  border-color: #333;
}
.week-range {
  text-align: center;
  background: #cfe2f8;
  color: #2e6aba;
  font-size: 14px;
  padding: 6px 0;
  margin: 0 20px;
  border-radius: 4px 4px 0 0;
}

.week-calendar {
  margin: 0 20px;
}

.wc-row {
  display: flex;
  text-align: center;
}

.wc-row:first-child {
  font-size: 14px;
  color: #333;
}

.wc-cell {
  flex: 1;
  padding: 8px 0 4px;
  position: relative;
}

.wc-cell .wc-num {
  display: block;
  font-size: 16px;
  color: #333;
  margin-top: 0px;
  position: relative;
}

.wc-cell.today .wc-num {
  color: #2e6aba;
  font-weight: bold;
  position: relative;
  z-index: 1;
  
}

.wc-cell.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 25px;
  background: #cfe2f8;
  border-radius: 4px;

}

.wc-badge {
  position: absolute;
  top: -6px;
  right: 0.5px;
  width: 17px;
  height: 17px;
  background: #ffc066;
  border-radius: 50%;
  font-size: 12px;
  color: #fff;
  line-height: 17px;
  text-align: center;
}

.activity-list {
  padding: 24px 20px 0;
}

.act-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.act-date {
  width: 80px;
  height: 60px;
  background: linear-gradient(to bottom, #cfe2f8 35px, #fff 35px);
  border-radius: 4px;
  display: grid;
  grid-template-rows: 35px 25px;
  flex-shrink: 0;
}

.act-day {
  font-size: 20px;
  color: #5e9eeb;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-ym {
  font-size: 14px;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-desc {
  font-size: 16px;
  color: #333;
  line-height: 2.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-date-box {
  display: flex;
  align-items: center;
  width: 335px;
  height: 100px;
  background: #f5faff;
  border-radius: 6px;
  margin: 18px auto 0;
  padding: 0 20px;
}

.ad-month {
  font-size: 48px;
  font-weight: bold;
  color: #2e6aba;
  line-height: 1;
}

.ad-day {
  font-size: 48px;
  font-weight: bold;
  color: #333;
  line-height: 1;
  margin: 0 20px;
}

.ad-info {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-left: auto;
}

.col-right {
  width: 382px;
}

/* 底部长条 */
.home-bar {
  position: absolute;
  top: 689px;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  height: 65px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.hb-label {
  width: 66px;
  height: 65px;
  background: #cfe2f8;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  place-items: center;
  padding: 11px;
}

.hb-label span {
  font-size: 18px;
  color: #2e6aba;
  font-weight: bold;
  transform: skewX(-8deg);
  line-height: 1;
}

.hb-content {
  display: flex;
  flex: 1;
  align-items: center;
  margin: 0 33px;
}

.hb-title {
  font-size: 16px;
  color: #333;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hb-divider {
  width: 2px;
  height: 27px;
  background: #e5e5e5;
  flex-shrink: 0;
}

.hb-more {
  margin-right: 20px;
  font-size: 14px;
  color: #71a4e7;
  white-space: nowrap;
  flex-shrink: 0;
  background: #eef9ff;
  border-radius: 12px;
  padding: 2px 8px;
}

/* 在线咨询浮动盒 */
.float-consult {
  position: fixed;
  right: 6px;
  bottom: 95px;
  width: 240px;
  height: 495px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 99;
}

.fc-title {
  text-align: center;
  color: #fff;
  background: #6696ff;
  height: 45px;
  line-height: 45px;
  font-size: 16px;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.fc-title-l {
  position: absolute;
  left: 13px;
  bottom: 0;
  height: auto;
  width: auto;
  max-height: none;
}

.fc-title-r {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  
  height: auto;
}

.float-consult {
  overflow: visible;
}

.fc-body {
  padding: 7px 8px 0;
  background: #fff;
  overflow-y: auto;
  height: 383px;
}

.fc-body::-webkit-scrollbar {
  width: 4px;
}

.fc-body::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 2px;
}

.fc-body::-webkit-scrollbar-track {
  background: transparent;
}

.fc-time {
  text-align: center;
  font-size: 13px;
  color: #888;
}

.fc-msg {
  margin-top: 3px;
  padding: 7px;
  background: #f0f6ff;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  
}

.fc-input {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 67px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: flex-start;
  padding: 2px 10px 0;
  gap: 8px;
}

.fc-input input {
  flex: 1;
  height: 30px;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13px;
  outline: none;
  text-align: left;
}

.fc-input input::placeholder {
  color: #888;
}

.fc-input button {
  position: absolute;
  right: 10px;
  bottom: 7px;
  width: 70px;
  height: 27px;
  background: #6696ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.btn-more {
  display: block;
  margin: 55px auto 0;
  width: 150px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  font-size: 16px;
  color: #ffc067;
  background: url('../assets/images/btn.png') no-repeat center center;
  background-size: 100% 100%;
}

/* BG2 背景区 */
.home-bg2 {
  width: 100%;
  height: 580px;
  background: #eaf5ff url('../assets/images/bg2.png') no-repeat center center;
  background-size: cover;
  position: relative;
}

/* 图书展示行 */
.book-row {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 72px;
}

.book-item {
  text-align: center;
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.book-item img {
  width: 270px;
  height: 340px;
  display: block;
  border-radius: 4px;
  -webkit-box-reflect: below 10px linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,0) 94%, rgba(0,0,0,1) 100%);
}

.book-desc {
  width: 270px;
  height: 60px;
  margin-top: 36px;
  background: url('../assets/images/btnBG.png') no-repeat center center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-desc span {
  font-size: 20px;
  color: #333;
}

.book-arrow {
  position: absolute;
  top: 470px;
  width: 25px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 18px;
  color: #fff;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.book-arrow:hover {
  color: #fff;
  background: #2e6aba;
}

.book-prev {
  left: 50%;
  margin-left: -700px;
}

.book-next {
  right: 50%;
  margin-right: -700px;
}

/* 底部内容区 */
.home-bottom {
  width: 100%;
  height: 565px;
  background: #f5faff;
  position: relative;
}

.section-head {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.section-head img {
  height: 36px;
  width: auto;
}

.section-head h2 {
  font-size: 36px;
  color: #333;
  font-weight: 900;
  font-family: "SimSun", "宋体", serif;
  text-shadow: 0.2px 0 0 #333;
}

/* 甘图动态 2x3 网格 */
.news-grid {
  width: 1400px;
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px 58px;
}

.news-card {
  display: flex;
  gap: 35px;
  position: relative;
  color: inherit;
}

.nc-img {
  width: 155px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.nc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nc-text {
  flex: 1;
  position: relative;
  padding-bottom: 32px;
}

.nc-desc {
  font-size: 18px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  position: absolute;
  bottom: 54px;
  left: 0;
  right: 0;
}

.nc-date {
  position: absolute;
  right: 0;
  bottom: 18px;
  font-size: 14px;
  color: #ffc067;
}

.nc-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  border-bottom: 1px dashed #ffc067;
}


.fc-chat {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 75px;
}

.chat-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-item.user {
  flex-direction: row-reverse;
}

.chat-item .chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-item .chat-bubble {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 100%;
}

.chat-item.reply .chat-bubble {
  background: #f0f6ff;
  color: #555;
  line-height: 1.5;
}

.chat-item.user .chat-bubble {
  background: #7baaff;
  color: #fff;
  text-align: right;
}
