/* Certification Page Styles */
#certication {
  padding: 60px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

.certification-container {
  max-width: 1200px;
  margin: 0 auto;
}

.certification-header {
  text-align: center;
  margin-bottom: 50px;
}

.certification-header h1 {
  font-size: 2.5rem;
  color: #557c00;
  margin-bottom: 15px;
  font-weight: 700;
  position: relative;
}

.certification-header h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #557c00, #7ba428);
  margin: 15px auto;
  border-radius: 2px;
}

.certification-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.certification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.certificate-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.certificate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #557c00, #7ba428);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.certificate-card:hover::before {
  transform: scaleX(1);
}

.certificate-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.05);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(85, 124, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-card:hover .certificate-overlay {
  opacity: 1;
}

.zoom-icon {
  width: 40px;
  height: 40px;
  fill: #fff;
}

.certificate-info {
  padding: 25px;
}

.certificate-info h3 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.certificate-info p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.certificate-date {
  display: inline-block;
  background: #557c00;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

#lightboxImage {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  padding: 20px;
  background: #fff;
  text-align: center;
}

.lightbox-caption h3 {
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Placeholder certificate styles */
.placeholder-cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f8f9fa;
  color: #6c757d;
}

.placeholder-cert p {
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Loading animation for images */
.certificate-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #557c00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .certification-header h1 {
    font-size: 2rem;
  }

  .certification-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .certificate-card {
    margin: 0 10px;
  }

  .certificate-image {
    height: 200px;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 95%;
  }

  #lightboxImage {
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  #certication {
    padding: 40px 15px;
  }

  .certification-header h1 {
    font-size: 1.8rem;
  }

  .certification-header p {
    font-size: 1rem;
  }

  .certificate-info {
    padding: 20px;
  }

  .certificate-info h3 {
    font-size: 1.1rem;
  }
}
