.certificates {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 40px 0;
  overflow: hidden;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  color: #2c3e50;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.tiles-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.tiles-track {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  animation: slideTiles 20s linear infinite;
}

.tile {
  flex: 0 0 auto;
  width: 300px;
  height: 180px;
  margin: 0 15px;
  border-radius: 12px;
  background: white;
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.08),
    0 6px 12px rgba(0,0,0,0.05),
    0 0 0 1px rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: perspective(800px) rotateY(-1deg);
}

.tile:hover {
  transform: perspective(800px) rotateY(0) scale(1.02);
  box-shadow: 
    0 15px 30px rgba(0,0,0,0.12),
    0 10px 20px rgba(0,0,0,0.08),
    0 0 0 1px rgba(0,0,0,0.04);
  z-index: 2;
}

.tile-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Certificate image styling */
.certificate-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  transition: transform 0.3s ease;
  background: linear-gradient(135deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);
}

.tile:hover .certificate-image {
  transform: scale(1.05);
}

/* Certificate title styling */
.certificate-title {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@keyframes slideTiles {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Seamless looping adjustment */
.tiles-track:hover {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tiles-container {
    height: 180px;
  }
  
  .tile {
    width: 240px;
    height: 150px;
    margin: 0 10px;
  }
  
  .certificate-image {
    border-radius: 10px;
  }
  
  .certificate-title {
    font-size: 0.9rem;
    margin-top: 8px;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
}

/* Additional responsive adjustments for smaller screens */
@media (max-width: 480px) {
  .tile {
    width: 200px;
    height: 130px;
  }
  
  .certificate-image {
    border-radius: 8px;
  }
  
  .certificate-title {
    font-size: 0.8rem;
    margin-top: 6px;
  }
}