.certificates-gallery {
  text-align: center;
}

.certificate-item {
  display: inline-block;
  margin: 8px;
  width: 140px;
}

.certificate-item img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.certificate-item img:hover {
  transform: scale(1.05);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.modal-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.modal-wrapper {
  position: relative;
  display: inline-block;
}

.modal-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  padding: 4px 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #eee;
}

@media (max-width: 600px) {
  .certificate-item {
    width: 48vw !important;
  }

  .certificate-item img {
    height: 90px !important;
  }

  .certificates-section h4 {
    text-align: center;
  }

  .modal-image {
    max-width: 95%;
    max-height: 80vh;
  }
}
