/* Certificates showcase styling */
.certifications-section {
  margin-top: 60px;
  width: 100%;
}

.certifications-section h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #fff;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.certifications-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.certificates-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.certificate-item {
  width: 200px;
  text-align: center;
  transition: transform 0.3s ease;
}

.certificate-item:hover {
  transform: translateY(-10px);
}

.certificate-img {
  position: relative;
  height: 130px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.certificate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-img:hover .certificate-overlay {
  opacity: 1;
}

.certificate-overlay span {
  color: white;
  font-size: 0.9rem;
  padding: 5px 10px;
  border: 1px solid white;
  border-radius: 4px;
}

.certificate-title {
  margin-top: 15px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
}

/* Lightbox styling */
.certificate-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 1.1rem;
}

.lightbox-controls {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.lightbox-close {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animation for entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.certifications-section {
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.certificate-item:nth-child(1) { animation: fadeInUp 0.6s forwards; animation-delay: 0.3s; opacity: 0; }
.certificate-item:nth-child(2) { animation: fadeInUp 0.6s forwards; animation-delay: 0.4s; opacity: 0; }
.certificate-item:nth-child(3) { animation: fadeInUp 0.6s forwards; animation-delay: 0.5s; opacity: 0; }
.certificate-item:nth-child(4) { animation: fadeInUp 0.6s forwards; animation-delay: 0.6s; opacity: 0; }

/* Responsive adjustments */
@media screen and (max-width: 900px) {
  .certificates-container {
    gap: 20px;
  }
  
  .certificate-item {
    width: calc(50% - 20px);
    max-width: 180px;
  }
}

@media screen and (max-width: 500px) {
  .certificates-container {
    gap: 15px;
  }
  
  .certificate-item {
    width: calc(50% - 15px);
    max-width: 150px;
  }
  
  .certificate-title {
    font-size: 0.9rem;
  }
}