/* 书籍展示样式 */

/* 容器样式 */
.books-container {
  display: flex;
  min-height: calc(100vh - 80px); /* 减去头部高度 */
  background-color: #f5f7fa;
  padding: 20px 0;
}

/* 书籍网格布局 */
.books-list {
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 书籍卡片样式 */
.book-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 320px;
  width: 100%;
  cursor: pointer;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* 特定书籍的特殊样式：id为1、22、23的书籍封面 */
.book-card[data-book-id="1"] .book-photo img,
.book-card[data-book-id="22"] .book-photo img,
.book-card[data-book-id="23"] .book-photo img {
  width: 130%;
  max-width: 130%;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 书籍图片容器 */
.book-photo {
  height: 210px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f0f0f0;
  overflow: hidden;
  flex-shrink: 0;
}

.book-photo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}



.book-card:hover .book-photo img {
  transform: scale(1.02);
}

/* 书籍信息区域 */
.book-info {
  padding: 15px 20px 20px;
  background: white;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-info h3 {
  margin: 0;
  font-size: 1.1em;
  color: #2c3e50;
  text-align: center;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  height: 3.2em;
}

/* 加载状态和错误处理 */
.book-photo img[src*="placeholder"] {
  opacity: 0.6;
  filter: grayscale(50%);
}

/* 支持两行标题的样式 */

/* 特殊书籍格式：中国资本运营 经典案列 */
.book-info h3 .main-title {
  display: block;
  font-size: 1.1em;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.book-info h3 .subtitle {
  display: block;
  font-size: 0.8em;
  color: #2c3e50;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}
.title-first-line {
  font-size: 1.1em;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 4px;
}

.title-second-line {
  font-size: 0.85em;
  color: #666;
  font-weight: 500;
  line-height: 1.3;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .books-list {
    max-width: 1000px;
    gap: 18px;
  }

  .book-card {
    height: 300px;
    max-width: 320px;
  }

  .book-photo {
    height: 190px;
  }

  .book-info h3 {
    font-size: 1.0em;
  }
}

@media (max-width: 900px) {
  .books-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    gap: 15px;
  }

  .book-card {
    height: 280px;
    max-width: 320px;
  }

  .book-photo {
    height: 170px;
  }

  .book-info h3 {
    font-size: 0.95em;
    height: 2.8em;
  }
}

@media (max-width: 768px) {
  .books-container {
    padding: 10px 0;
  }

  .books-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px;
    max-width: 500px;
  }

  .book-card {
    height: 260px;
    max-width: 240px;
  }

  .book-photo {
    height: 150px;
  }

  .book-info {
    padding: 12px 15px 15px;
  }

  .book-info h3 {
    font-size: 0.9em;
    height: 2.6em;
  }
}

@media (max-width: 480px) {
  .books-list {
    grid-template-columns: 1fr;
    justify-content: stretch;
    max-width: 320px;
  }

  .book-card {
    width: 100%;
    height: 280px;
    max-width: 300px;
    margin: 0 auto;
  }

  .book-photo {
    height: 170px;
  }

  .book-info h3 {
    font-size: 0.95em;
    height: 2.8em;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-card {
  animation: fadeInUp 0.6s ease-out;
}

/* 为不同位置的卡片添加延迟动画 */
.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }
.book-card:nth-child(5) { animation-delay: 0.5s; }
.book-card:nth-child(6) { animation-delay: 0.6s; }

/* 滚动优化 */
.books-container {
  scroll-behavior: smooth;
}

/* 特定书籍的特殊样式：id为1、22、23的书籍封面 */
.book-card[data-book-id="1"] .book-photo img,
.book-card[data-book-id="22"] .book-photo img,
.book-card[data-book-id="23"] .book-photo img {
  width: 130% !important;
  max-width: 130% !important;
}

/* 辅助功能 */
.book-card:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.book-card[tabindex] {
  outline: none;
}

.book-card[tabindex]:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* 关于我们页面样式 - 基于原有aboutus.css */
.staff-container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.category-menu {
    width: 250px;
    background: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
}

.category-menu h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.category-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    padding: 12px 15px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.category-menu li:hover {
    background: #e9ecef;
}

.category-menu li.active {
    background: #007bff;
    color: white;
}

.expert-list {
    flex: 1;
    padding: 30px;
}

.content-section {
    max-width: 800px;
}

.content-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.content-section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}

.photo-placeholder {
    text-align: center;
    margin: 30px 0;
}

.photo-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .staff-container {
        flex-direction: column;
        margin: 10px;
    }

    .category-menu {
        width: 100%;
        order: 2;
    }

    .category-menu ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .category-menu li {
        white-space: nowrap;
        margin-bottom: 0;
    }

    .expert-list {
        order: 1;
        padding: 20px;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section p {
        font-size: 1rem;
    }

    .photo-placeholder img {
        max-width: 300px;
    }
}

