.certification-section {
  padding: 64px 0 54px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.96));
}

.certification-heading {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.certification-heading > span {
  display: inline-flex;
  padding: 6px 15px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.92);
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.certification-heading h4 {
  margin: 14px 0 0;
  color: #0f172a;
  font-size: 42px;
  line-height: 1.18;
  font-weight: 900;
}

.certification-heading p {
  margin: 14px auto 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.75;
}

.certification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.certificate-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe8f8;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.certificate-card:hover,
.certificate-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.13);
}

.certificate-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.certificate-preview {
  position: relative;
  height: 310px;
  overflow: hidden;
  background: #f8fafc;
  isolation: isolate;
}

.certificate-preview img {
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.certificate-preview::before,
.certificate-zoom-open .image-zoom-dialog::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='96' viewBox='0 0 170 96'%3E%3Ctext x='10' y='54' fill='%232563eb' fill-opacity='.72' font-family='Arial,sans-serif' font-size='14' font-weight='700' transform='rotate(-18 85 48)'%3EYIBAOER OFFICIAL%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 170px 96px;
  opacity: 0.25;
  pointer-events: none;
}

.certificate-preview::after,
.certificate-zoom-open .image-zoom-dialog::after {
  content: "余姚伊宝尔 · 官网展示";
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  padding: 5px 12px;
  border: 1px solid rgba(37, 99, 235, 0.42);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(30, 64, 175, 0.68);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.08em;
  transform: translate(-50%, -50%) rotate(-16deg);
  pointer-events: none;
}

.certificate-caption {
  padding: 14px 16px 16px;
  border-top: 1px solid #edf2f7;
}

.certificate-caption strong,
.certificate-caption span,
.certificate-caption small {
  display: block;
}

.certificate-caption strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.certificate-caption span {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.certificate-caption small {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.certification-notice {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.certification-notice i {
  margin-right: 6px;
  color: #2563eb;
}

.certificate-zoom-open .image-zoom-dialog::before {
  border-radius: 5px;
  background-size: 220px 124px;
  opacity: 0.28;
}

.certificate-zoom-open .image-zoom-dialog::after {
  padding: 8px 18px;
  font-size: clamp(13px, 2vw, 20px);
}

.certificate-zoom-open .image-zoom-dialog img {
  user-select: none;
  -webkit-user-drag: none;
}

.certificate-zoom-open .image-zoom-title {
  position: relative;
  z-index: 4;
}

@media (max-width: 991px) {
  .certification-section {
    padding: 52px 0 44px;
  }

  .certificate-preview {
    height: 260px;
  }
}

@media (max-width: 767px) {
  .certification-section {
    padding: 42px 0 34px;
  }

  .certification-heading {
    margin-bottom: 24px;
    padding: 0 8px;
  }

  .certification-heading > span {
    padding: 5px 12px;
    font-size: 13px;
  }

  .certification-heading h4 {
    margin-top: 10px;
    font-size: 29px;
  }

  .certification-heading p {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.65;
  }

  .certification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .certificate-card {
    border-radius: 10px;
  }

  .certificate-preview {
    height: 190px;
  }

  .certificate-preview img {
    padding: 7px;
  }

  .certificate-preview::before {
    background-size: 118px 68px;
    opacity: 0.23;
  }

  .certificate-preview::after {
    padding: 4px 7px;
    font-size: 9px;
  }

  .certificate-caption {
    min-height: 88px;
    padding: 10px 9px 11px;
  }

  .certificate-caption strong {
    font-size: 13px;
  }

  .certificate-caption span {
    font-size: 10px;
  }

  .certificate-caption small {
    font-size: 9px;
  }

  .certification-notice {
    padding: 0 10px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .certificate-card {
    transition: none;
  }
}
