/* page8 证书样本 专属样式 */

/* Banner 背景 */
.page8-banner {
  background-size: cover;
  background-position: center;
}

/* 页面主区域 */
.page-main {
  padding: 60px 20px 80px;
}

/* 页面介绍区 */
.page-intro {
  text-align: center;
  margin-bottom: 48px;
}

.page-intro .section-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: 0;
}

.page-intro .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.page-intro .intro-desc {
  color: var(--text-light);
  font-size: 15px;
  margin-top: 20px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* 证书网格布局 */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

/* 证书卡片样式 */
.cert-card {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  position: relative;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.cert-card:hover::before {
  opacity: 1;
}

.cert-card .cert-thumb {
  display: block;
  width: 100%;
  height: 260px;
  overflow: hidden;
  cursor: zoom-in;
  border-bottom: 1px solid var(--border-color);
}

.cert-card .cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cert-card:hover .cert-thumb img {
  transform: scale(1.05);
}

.cert-card .cert-info {
  padding: 20px;
}

.cert-card .cert-info h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.cert-card .cert-info p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
}

/* 证书说明区块 */
.cert-note {
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 32px 36px;
  border-left: 4px solid var(--primary-color);
}

.cert-note h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-note h3::before {
  content: '';
  width: 6px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 3px;
}

.cert-note .note-content {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
  white-space: pre-line;
}

/* 证书预览弹窗 */
.cert-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  animation: fadeIn 0.25s ease;
}

.cert-preview-modal img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  animation: zoomIn 0.3s ease;
}

.cert-preview-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cert-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 响应式适配 */
@media (max-width: 1024px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .cert-card .cert-thumb {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .page-main {
    padding: 40px 20px 60px;
  }
  .page-intro .section-title {
    font-size: 24px;
  }
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cert-card .cert-thumb {
    height: 220px;
  }
  .cert-note {
    padding: 24px 20px;
  }
  .cert-note h3 {
    font-size: 18px;
  }
  .cert-preview-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
}