.certificates-page {
  background: #fff;
}

.certificates-hero {
  min-height: 330px;
  padding: 120px 20px 70px;
  background:
    linear-gradient(
      135deg,
      rgba(233, 121, 34, 0.12),
      rgba(255, 255, 255, 0.95)
    ),
    #fff7f0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.certificates-hero-content span {
  color: #e97922;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.certificates-hero-content h1 {
  margin: 12px 0 0;
  color: #2f251f;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
}

.certificates-section {
  padding: 70px 20px 90px;
}

.certificates-container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.certificate-card {
  position: relative;
  height: 330px;
  border-radius: 22px;
  overflow: hidden;
  background: #f8f8f8;
  border: 1px solid rgba(45, 37, 30, 0.1);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.certificate-card:hover {
  transform: translateY(-6px);
  border-color: rgba(233, 121, 34, 0.34);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.14);
}

.certificate-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  display: block;
  background: #fff;
}

.certificate-zoom {
  width: 48px;
  height: 48px;
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 50%;
  color: #fff;
  background: rgba(233, 121, 34, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.certificate-card:hover .certificate-zoom {
  opacity: 1;
  transform: translateY(0);
}

.certificates-pagination {
  margin-top: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.certificates-pagination a {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(45, 37, 30, 0.12);
  color: #332820;
  background: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.certificates-pagination a:hover,
.certificates-pagination a.active {
  color: #fff;
  background: #e97922;
  border-color: #e97922;
}

.certificates-empty {
  min-height: 320px;
  padding: 70px 20px;
  border-radius: 24px;
  background: #fff7f0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.certificates-empty i {
  margin-bottom: 18px;
  color: #e97922;
  font-size: 48px;
}

.certificates-empty h2 {
  margin: 0 0 10px;
  color: #2f251f;
  font-size: 28px;
  font-weight: 800;
}

.certificates-empty p {
  margin: 0;
  color: #756b63;
  font-size: 16px;
}

.certificate-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.certificate-lightbox.is-open {
  display: flex;
}

.certificate-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.76);
  backdrop-filter: blur(6px);
}

.certificate-lightbox-content {
  width: min(980px, 100%);
  max-height: calc(100vh - 90px);
  position: relative;
  z-index: 2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-lightbox-content img {
  width: 100%;
  max-height: calc(100vh - 90px);
  object-fit: contain;
  display: block;
  background: #fff;
}

.certificate-lightbox-close {
  width: 46px;
  height: 46px;
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.certificate-lightbox-close:hover {
  background: #e97922;
  transform: rotate(90deg);
}

@media (max-width: 991px) {
  .certificates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .certificate-card {
    height: 300px;
  }
}

@media (max-width: 575px) {
  .certificates-hero {
    min-height: 260px;
    padding: 105px 18px 55px;
  }

  .certificates-section {
    padding: 46px 16px 70px;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .certificate-card {
    height: 310px;
    border-radius: 18px;
  }

  .certificate-zoom {
    opacity: 1;
    transform: none;
  }

  .certificate-lightbox {
    padding: 16px;
  }

  .certificate-lightbox-close {
    top: 14px;
    right: 14px;
  }
}
