/* Achievement Cards Animation Styles */
.achievement-cards-container {
  position: relative;
  width: 100%;
  min-height: 280px;
  height: auto;
  overflow-x: auto;
  overflow-y: visible;
  margin: 40px 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  scroll-behavior: smooth;
}

.achievement-cards-container::-webkit-scrollbar {
  height: 8px;
}

.achievement-cards-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.achievement-cards-container::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #4a90e2, #357abd);
  border-radius: 4px;
}

.achievement-card {
  position: relative;
  width: 320px;
  min-height: 220px;
  height: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  padding-bottom: 50px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
  cursor: pointer;
}

.achievement-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.achievement-card.expanded {
  width: 500px;
  min-height: 300px;
  z-index: 20 !important;
  transform: translateY(-20px) scale(1.08) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.achievement-card.expanded:hover {
  transform: translateY(-20px) scale(1.08) !important;
}

.achievement-text {
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  transform: skew(-2deg, 0deg);
  text-align: justify;
  margin: 0;
  position: relative;
  z-index: 2;
  max-height: 120px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.achievement-card.expanded .achievement-text {
  max-height: 1000px;
  transform: skew(0deg, 0deg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-line-clamp: unset;
  display: block;
}

.view-more-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: linear-gradient(45deg, #4a90e2, #357abd);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  z-index: 10;
}

.achievement-card:hover .view-more-btn,
.achievement-card.expanded .view-more-btn {
  opacity: 1;
  transform: translateY(0);
}

.view-more-btn:hover {
  background: linear-gradient(45deg, #357abd, #2c5aa0);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.view-more-btn.expanded {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  opacity: 1;
}

.view-more-btn.expanded:hover {
  background: linear-gradient(45deg, #c0392b, #a93226);
}

.achievement-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 15px;
  font-size: 60px;
  color: #4a90e2;
  font-family: serif;
  opacity: 0.3;
  z-index: 1;
}

.achievement-card::after {
  content: '"';
  position: absolute;
  bottom: -20px;
  right: 15px;
  font-size: 60px;
  color: #4a90e2;
  font-family: serif;
  opacity: 0.3;
  z-index: 1;
}

.achievement-number {
  position: absolute;
  top: 10px;
  right: 15px;
  background: linear-gradient(45deg, #4a90e2, #357abd);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
  z-index: 5;
}

/* Animation keyframes */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Card entrance animations - NO CONTINUOUS ANIMATIONS */
.achievement-card:nth-child(1) {
  animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

.achievement-card:nth-child(2) {
  animation: slideInFromLeft 0.8s ease-out 0.4s both;
}

.achievement-card:nth-child(3) {
  animation: slideInFromLeft 0.8s ease-out 0.6s both;
}

.achievement-card:nth-child(4) {
  animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

/* Remove animation after entrance to prevent conflicts */
.achievement-card.expanded,
.achievement-card.expanded:hover {
  animation: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .achievement-cards-container {
    min-height: 260px;
    padding: 15px;
    gap: 15px;
  }
  
  .achievement-card {
    width: 280px;
    min-height: 200px;
    padding: 20px;
    padding-bottom: 50px;
  }
  
  .achievement-text {
    font-size: 13px;
  }
  
  .achievement-card.expanded {
    width: 400px;
  }
}

@media (max-width: 480px) {
  .achievement-cards-container {
    min-height: 240px;
    padding: 10px;
    gap: 10px;
  }
  
  .achievement-card {
    width: 250px;
    min-height: 180px;
    padding: 15px;
    padding-bottom: 45px;
  }
  
  .achievement-text {
    font-size: 12px;
    max-height: 100px;
    -webkit-line-clamp: 4;
  }
  
  .achievement-number {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  
  .achievement-card.expanded {
    width: 280px;
  }
}
