/* Certificate Grid and Lightbox */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.certificate-card {
  background-color: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--secondary);
}

.certificate-img-wrapper {
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: #FAF8F5;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.certificate-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.certificate-info {
  padding: 15px 20px;
  text-align: center;
}

.certificate-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 5px;
}

.certificate-desc {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.4;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(58, 43, 32, 0.9);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-container {
  max-width: 700px;
  width: 100%;
  background-color: var(--light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: zoomIn 0.3s ease;
}

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

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--dark);
  transition: var(--transition);
}

.lightbox-close:hover {
  background-color: var(--primary);
  color: var(--light);
  transform: rotate(90deg);
}

.lightbox-body {
  padding: 30px;
  text-align: center;
}

.lightbox-image-wrapper {
  max-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background-color: #FAF8F5;
  border-radius: 8px;
  overflow: hidden;
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.lightbox-caption-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.lightbox-caption-desc {
  font-size: 0.9rem;
  color: #666;
}
