/* Certificates Section */
.certificates-section {
  padding: 4rem 2rem;
  background: #f8f9fa;
  text-align: center;
}

.certificates-section .section-header h4 {
  color: #c1964c;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.certificates-section .section-header h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.certificates-section .section-header p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #555;
}

/* Grid container */
.certificate-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Selalu 4 kolom di desktop */
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Responsif untuk tablet (max-width 992px) */
@media (max-width: 992px) {
  .certificate-container {
    grid-template-columns: repeat(2, 1fr); /* Jadi 2 kolom */
  }
}

/* Responsif untuk HP (max-width 600px) */
@media (max-width: 600px) {
  .certificate-container {
    grid-template-columns: 1fr; /* Jadi 1 kolom */
  }
}

/* Individual Card */
.certificate-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  border-top: 4px solid #c1964c; /* Garis gold di atas */
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(193, 150, 76, 0.4); /* Glow gold */
}

/* Gambar Sertifikat */
.certificate-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

/* Jika tidak ada gambar */
.no-image {
  width: 100%;
  height: 180px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
}

/* Info Sertifikat */
.certificate-info {
  padding: 1rem;
  text-align: left;
}

.certificate-info h3 {
  font-size: 1.2rem;
  color: #2b2111; /* Warna gold untuk judul */
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.certificate-info p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
}

/* Pesan jika tidak ada data */
.no-data {
  text-align: center;
  color: #666;
  font-size: 1rem;
}

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: popupFade 0.3s ease;
}

.popup-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  margin-bottom: 15px;
}

.popup-content h3 {
  font-size: 1.4rem;
  color: #c1964c;
  margin-top: 10px;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

.popup-close:hover {
  color: #c1964c;
}

@keyframes popupFade {
  from {opacity:0; transform:scale(0.8);}
  to {opacity:1; transform:scale(1);}
}

/* Popup Sertifikat */
.certificate-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75); /* lebih gelap biar fokus */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px); /* efek blur background */
}

.certificate-content {
  background: #fff;
  padding: 25px 20px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: popupFade 0.3s ease;
  border-top: 4px solid #c1964c; /* aksen gold */
}

.certificate-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  object-fit: contain;
}

.certificate-content h3 {
  font-size: 1.5rem;
  color: #2b2111;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 10px;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
}

.popup-close:hover {
  color: #c1964c;
}

/* Animasi muncul */
@keyframes popupFade {
  from {opacity: 0; transform: scale(0.85);}
  to {opacity: 1; transform: scale(1);}
}


