/* 电子书框架样式 */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
/* 翻书容器 */
#flipbook-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

/* 翻书主体 */
#flipbook {
  width: 100%;
  max-width: 1920px;
  height: 100vh;
  max-height: none;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* 页面基础样式 */
.page {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 硬封面样式 */
.hard {
  background: #333;
  border: 1px solid #666;
}

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

/* 内容页样式 */

.page-content {
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 1fr auto; /* 内容区域自适应，页码区域固定 */
  grid-template-areas:
    "content"
    "page-number";
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  background-color: #fdfdfd;
  position: relative;
  overflow: hidden;
}

/* 内容区域 */
.page-content
  > *:not(.page-number):not(.certificate-showcase-grid):not(
    .page-inquiry-icon
  ) {
  grid-area: content;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  min-height: 0; /* 允许内容区域收缩 */
  overflow: hidden; /* 防止内容溢出 */
}

/* 特殊页面容器处理 */
.certificate-gallery-container,
.company-intro-container {
  grid-area: content;
  padding: 0; /* 移除默认padding，使用自己的padding */
  overflow: hidden;
}

/* 页码样式 - 使用Grid布局 */
.page-number {
  grid-area: page-number;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.875rem;
  font-weight: normal;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
  padding-bottom: 10px;
  margin-top: 10px;
}

/* 侧边箭头导航样式 - 替代原来的底部导航 */
#side-navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  pointer-events: none; /* 让容器本身不阻挡点击 */
  z-index: 1000;
}

.side-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  pointer-events: auto; /* 让按钮可以点击 */
  color: #333;
}

.side-nav-left {
  left: 20px;
}

.side-nav-right {
  right: 20px;
}

.side-nav-arrow:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.side-nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.side-nav-arrow svg {
  width: 24px;
  height: 24px;
}

/* 侧边导航按钮禁用状态 */
.side-nav-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* 不同屏幕尺寸下的侧边导航位置调整 */
@media (min-width: 1180px) and (max-width: 1366px) {
  .side-nav-left {
    left: 30px;
  }

  .side-nav-right {
    right: 30px;
  }

  .navigation-inquiry-icon {
    right: 30px !important; /* 与下一页按钮对齐 */
  }
}

@media (min-width: 1366px) {
  .side-nav-left {
    left: 40px;
  }

  .side-nav-right {
    right: 40px;
  }

  .navigation-inquiry-icon {
    right: 40px !important; /* 与下一页按钮对齐 */
  }
}

/* 箭头按钮的脉冲动画效果 */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  100% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
}

.side-nav-arrow:not(.disabled):hover {
  animation: pulse 2s infinite;
}

/* 翻页动画效果 */
.turn-page {
  transition: all 0.6s ease-in-out;
}

/* 页面阴影效果 */
.page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.1) 0%,
    transparent 5%,
    transparent 95%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 滚动条样式 */
.page-content::-webkit-scrollbar {
  width: 6px;
}

.page-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 打印样式 */
@media print {
  #flipbook-wrapper {
    background: white;
    padding: 0;
  }

  #flipbook {
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    height: auto;
  }
}

/* 响应式设计 - 只针对平板横屏、笔记本、PC端和超大屏幕 */

/* 平板端 768px - 1366px（包括横屏和竖屏） */
@media (min-width: 768px) and (max-width: 1366px) {
  #flipbook {
    width: 95%;
    height: 100vh;
  }

  .page-number {
    font-size: 0.75rem; /* 12px */
  }

  /* 平板端询价图标样式 - 更大更突出 */
  .page-inquiry-icon {
    width: 55px;
    height: 55px;
    top: 25px;
    right: 25px;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.98),
      rgba(248, 250, 252, 0.95)
    );
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
  }

  .page-inquiry-icon img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  }

  /* 平板端：隐藏PC端的全局询价图标 */
  .global-inquiry-icon {
    display: none !important;
  }

  /* 平板端：显示导航区域的询价图标 */
  .navigation-inquiry-icon {
    display: flex !important;
  }
}

/* 笔记本 1025px - 1280px */
@media (min-width: 1025px) and (max-width: 1280px) {
  .page-number {
    font-size: 0.875rem; /* 14px */
  }
}

/* PC端 1281px 以上 */
@media (min-width: 1281px) {
  .page-number {
    font-size: 0.9375rem; /* 15px */
  }
}

/* 超大屏幕 1920px 以上 */
@media (min-width: 1920px) {
  .page-number {
    font-size: 1rem; /* 16px */
  }
}

/* PC端全局询价图标 - 固定在页面右上角 */
.global-inquiry-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.global-inquiry-icon img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.global-inquiry-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.5);
}

/* 导航区域询价图标 - 在下一页按钮上面 */
.navigation-inquiry-icon {
  position: fixed;
  top: 37%;
  right: 20px; /* 与下一页按钮对齐 */
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 9999;
  display: none; /* 默认隐藏，平板端显示 */
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: auto; /* 确保可以点击 */
}

.navigation-inquiry-icon img {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navigation-inquiry-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.5);
}

.page-inquiry-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 1);
}

.page-inquiry-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.page-inquiry-icon:hover img {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4)) brightness(1.2);
  transform: scale(1.05);
}

/* 页面询价图标禁用状态 */
.page-inquiry-icon.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: rgba(200, 200, 200, 0.7);
}

.page-inquiry-icon.disabled:hover {
  transform: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  background: rgba(200, 200, 200, 0.7);
}

.page-inquiry-icon.disabled img {
  filter: grayscale(100%) opacity(0.7);
}

.page-inquiry-icon.disabled:hover img {
  filter: grayscale(100%) opacity(0.7);
  transform: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .page-inquiry-icon {
    width: 35px;
    height: 35px;
    top: 10px;
    right: 10px;
  }

  .page-inquiry-icon img {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 1281px) {
  .page-inquiry-icon {
    width: 45px;
    height: 45px;
    top: 20px;
    right: 20px;
  }

  .page-inquiry-icon img {
    width: 26px;
    height: 26px;
  }
}
