/* ============================================
   ABOUT SECTION ENHANCEMENTS
   ============================================ */

/* 1. Gradient Text Animation for Section Title */
.gradient-text-animated {
  background: linear-gradient(
    90deg,
    #ef3724,
    #ff6b5b,
    #ffd700,
    #ef3724,
    #ff6b5b
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientTextFlow 4s ease infinite;
}

@keyframes gradientTextFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 2. Floating Decorative Elements */
.about-floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-element {
  position: absolute;
  opacity: 0.15;
  animation: floatElement 6s ease-in-out infinite;
}

.floating-element.element-1 {
  top: 10%;
  left: 5%;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ef3724, #ff6b5b);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.floating-element.element-2 {
  top: 60%;
  left: 8%;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ffd700, #ffeb3b);
  border-radius: 50%;
  animation-delay: 1s;
  animation-duration: 5s;
}

.floating-element.element-3 {
  top: 30%;
  right: 10%;
  width: 80px;
  height: 80px;
  border: 3px solid #ef3724;
  border-radius: 50%;
  animation-delay: 2s;
  animation-duration: 8s;
}

.floating-element.element-4 {
  top: 70%;
  right: 5%;
  width: 30px;
  height: 30px;
  background: #ef3724;
  transform: rotate(45deg);
  animation-delay: 0.5s;
  animation-duration: 6s;
}

.floating-element.element-5 {
  top: 15%;
  right: 25%;
  width: 20px;
  height: 20px;
  background: #ffd700;
  border-radius: 50%;
  animation-delay: 3s;
  animation-duration: 4s;
}

.floating-element.element-6 {
  bottom: 20%;
  left: 15%;
  width: 50px;
  height: 50px;
  border: 2px dashed #ef3724;
  border-radius: 50%;
  animation-delay: 1.5s;
  animation-duration: 9s;
}

@keyframes floatElement {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-25px) rotate(3deg);
  }
}

/* 3. Profile Image SVG Morphing Border */
.profile-morph-container {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.profile-morph-svg {
  position: absolute;
  top: -15px;
  left: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  z-index: 1;
}

.morph-path {
  fill: none;
  stroke: url(#morphGradient);
  stroke-width: 4;
  animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
  0%, 100% {
    d: path("M 180,20 C 280,20 340,80 340,180 C 340,280 280,340 180,340 C 80,340 20,280 20,180 C 20,80 80,20 180,20");
  }
  25% {
    d: path("M 180,30 C 260,10 350,90 330,180 C 350,270 260,350 180,330 C 100,350 10,270 30,180 C 10,90 100,10 180,30");
  }
  50% {
    d: path("M 180,15 C 290,30 330,100 340,180 C 330,260 290,330 180,345 C 70,330 30,260 20,180 C 30,100 70,30 180,15");
  }
  75% {
    d: path("M 180,25 C 270,15 345,85 335,180 C 345,275 270,345 180,335 C 90,345 15,275 25,180 C 15,85 90,15 180,25");
  }
}

.profile-morph-image {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.profile-morph-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 8px;
  transition: transform 0.5s ease;
}

.profile-morph-container:hover .profile-morph-image img {
  transform: scale(1.05);
}

/* Morph glow effect */
.profile-morph-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: radial-gradient(ellipse, rgba(239, 55, 36, 0.3) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* 4. Stats Counter Section */
.stats-counter-section {
  padding: 40px 0;
  margin-top: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 25px 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ef3724, #ffd700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(239, 55, 36, 0.15);
}

.stat-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef3724, #ff6b5b);
  border-radius: 12px;
  color: white;
  font-size: 24px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ef3724;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-number .counter-suffix {
  font-size: 1.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 5. Interactive Mini Timeline */
.mini-timeline {
  position: relative;
  padding: 30px 0;
  margin-top: 20px;
}

.mini-timeline-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Timeline Title Container - Enhanced Styling */
.timeline-title-container {
  text-align: center;
  margin-bottom: 35px;
}

.timeline-title-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.timeline-decoration-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border-radius: 2px;
  animation: lineGlow 2s ease-in-out infinite;
}

.timeline-decoration-line:first-child {
  background: linear-gradient(90deg, transparent, var(--color-primary));
}

.timeline-decoration-line:last-child {
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

@keyframes lineGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.timeline-decoration-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(239, 55, 36, 0.4);
  animation: iconFloat 3s ease-in-out infinite, iconRotate 8s linear infinite;
  position: relative;
}

.timeline-decoration-icon::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-primary));
  z-index: -1;
  animation: borderRotate 3s linear infinite;
}

.timeline-decoration-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  z-index: 0;
}

.timeline-decoration-icon span {
  position: relative;
  z-index: 1;
  font-size: 22px;
  color: white;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes iconRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes borderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Disable full rotation, keep float only */
.timeline-decoration-icon {
  animation: iconFloat 3s ease-in-out infinite;
}

.timeline-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-decoration-line {
    width: 40px;
  }

  .timeline-decoration-icon {
    width: 40px;
    height: 40px;
  }

  .timeline-decoration-icon span {
    font-size: 18px;
  }

  .mini-timeline-title {
    font-size: 1.2rem;
  }

  .timeline-subtitle {
    font-size: 0.85rem;
  }
}

.timeline-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 3px;
  background: #e0e0e0;
  transform: translateY(-50%);
  z-index: 0;
}

.timeline-progress {
  position: absolute;
  top: 50%;
  left: 20px;
  height: 3px;
  background: linear-gradient(90deg, #ef3724, #ffd700);
  transform: translateY(-50%);
  z-index: 1;
  width: 0;
  transition: width 1.5s ease;
}

.timeline-track.animated .timeline-progress {
  width: calc(100% - 40px);
}

.timeline-point {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s ease;
}

.timeline-point.active {
  border-color: #ef3724;
  background: #ef3724;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(239, 55, 36, 0.4);
}

.timeline-point:hover {
  transform: scale(1.15);
  border-color: #ef3724;
}

.timeline-point-icon {
  font-size: 18px;
}

.timeline-point-label {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-point:hover .timeline-point-label,
.timeline-point.active .timeline-point-label {
  opacity: 1;
}

.timeline-tooltip {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #333;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.timeline-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #333;
}

.timeline-point:hover .timeline-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 6. Enhanced Text Reveal Animation with Masking */
.reveal-text {
  overflow: hidden;
  position: relative;
}

.reveal-text .text-line {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  animation: revealLine 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.reveal-text .text-line:nth-child(1) { animation-delay: 0.1s; }
.reveal-text .text-line:nth-child(2) { animation-delay: 0.2s; }
.reveal-text .text-line:nth-child(3) { animation-delay: 0.3s; }
.reveal-text .text-line:nth-child(4) { animation-delay: 0.4s; }

@keyframes revealLine {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Text mask reveal effect */
.text-mask-reveal {
  position: relative;
  overflow: hidden;
}

.text-mask-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, white 50%);
  animation: maskReveal 1.5s ease forwards;
}

@keyframes maskReveal {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Responsive Styles for About Enhancements */
@media (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ============================================
     PREMIUM MOBILE TIMELINE - Card-Based Design
     ============================================ */
  .mini-timeline {
    padding: 30px 15px;
    background: linear-gradient(180deg, rgba(239, 55, 36, 0.03) 0%, rgba(255, 215, 0, 0.03) 100%);
    border-radius: 20px;
    margin: 20px 0;
  }

  .timeline-title-container {
    margin-bottom: 25px;
  }

  .timeline-track {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    position: relative;
  }

  /* Central glowing timeline line */
  .timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
      #ef3724 0%,
      #ffd700 25%,
      #ef3724 50%,
      #ffd700 75%,
      #ef3724 100%);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(239, 55, 36, 0.4),
                0 0 30px rgba(239, 55, 36, 0.2);
    transform: none;
  }

  /* Hide progress bar on mobile - not needed */
  .timeline-progress {
    display: none;
  }

  /* Timeline Point as Card Container */
  .timeline-point {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 20px 0;
    padding: 0;
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: default;
    transform: none !important;
    box-shadow: none;
  }

  .timeline-point:last-child {
    margin-bottom: 0;
  }

  .timeline-point.active,
  .timeline-point:hover {
    background: transparent;
    border: none;
    transform: none !important;
    box-shadow: none;
  }

  /* Circular Icon Badge */
  .timeline-point-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ef3724, #ff6b5b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 55, 36, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.9),
                0 0 0 6px rgba(239, 55, 36, 0.3);
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
  }

  .timeline-point-icon img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  /* Year Label - Badge Style */
  .timeline-point-label {
    position: absolute;
    bottom: auto;
    top: auto;
    left: auto;
    right: 10px;
    transform: none;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ef3724, #ffd700);
    padding: 4px 10px;
    border-radius: 20px;
    opacity: 1;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 55, 36, 0.3);
  }

  /* Tooltip as Info Card */
  .timeline-tooltip {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    flex: 1;
    background: white;
    color: #333;
    padding: 15px 18px;
    padding-right: 70px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: normal;
    line-height: 1.4;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ef3724;
    transition: all 0.3s ease;
  }

  .timeline-tooltip::after {
    display: none;
  }

  .timeline-point:hover .timeline-tooltip,
  .timeline-point:active .timeline-tooltip {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(239, 55, 36, 0.15),
                0 2px 5px rgba(0, 0, 0, 0.08);
    border-left-color: #ffd700;
  }

  /* Animation for timeline points */
  .timeline-point {
    animation: slideInMobile 0.6s ease forwards;
    opacity: 0;
  }

  .timeline-point:nth-child(1) { animation-delay: 0.1s; }
  .timeline-point:nth-child(2) { animation-delay: 0.2s; }
  .timeline-point:nth-child(3) { animation-delay: 0.3s; }
  .timeline-point:nth-child(4) { animation-delay: 0.4s; }
  .timeline-point:nth-child(5) { animation-delay: 0.5s; }
  .timeline-point:nth-child(6) { animation-delay: 0.6s; }
  .timeline-point:nth-child(7) { animation-delay: 0.7s; }

  @keyframes slideInMobile {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .floating-element {
    display: none;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-item {
    padding: 15px 10px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .profile-morph-container {
    max-width: 280px;
  }

  /* Extra small mobile timeline refinements */
  .mini-timeline {
    padding: 25px 12px;
    margin: 15px 0;
  }

  .timeline-track::before {
    left: 20px;
    width: 3px;
  }

  .timeline-point {
    gap: 12px;
    margin-bottom: 16px;
  }

  .timeline-point-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
    box-shadow: 0 3px 12px rgba(239, 55, 36, 0.35),
                0 0 0 3px rgba(255, 255, 255, 0.9),
                0 0 0 5px rgba(239, 55, 36, 0.25);
  }

  .timeline-point-icon img {
    width: 18px !important;
    height: 18px !important;
  }

  .timeline-tooltip {
    padding: 12px 14px;
    padding-right: 60px;
    font-size: 0.82rem;
    border-radius: 10px;
    border-left-width: 3px;
  }

  .timeline-point-label {
    right: 8px;
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Title section adjustments */
  .timeline-title-container {
    margin-bottom: 20px;
  }

  .timeline-decoration-line {
    width: 30px;
  }

  .timeline-decoration-icon {
    width: 36px;
    height: 36px;
  }

  .timeline-decoration-icon span {
    font-size: 16px;
  }

  .mini-timeline-title {
    font-size: 1.1rem;
    letter-spacing: 1.5px;
  }

  .timeline-subtitle {
    font-size: 0.8rem;
  }
}

/* Extra refinements for very small screens */
@media (max-width: 400px) {
  .mini-timeline {
    padding: 20px 10px;
  }

  .timeline-track::before {
    left: 18px;
  }

  .timeline-point {
    gap: 10px;
    margin-bottom: 14px;
  }

  .timeline-point-icon {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .timeline-point-icon img {
    width: 16px !important;
    height: 16px !important;
  }

  .timeline-tooltip {
    padding: 10px 12px;
    padding-right: 55px;
    font-size: 0.78rem;
  }

  .timeline-point-label {
    font-size: 0.6rem;
    padding: 2px 6px;
    right: 6px;
  }
}

/* ==========================================================================
   ACHIEVEMENT SECTION ENHANCEMENTS
   ========================================================================== */

/* Certification Counter Section */
.certification-counter-section {
  margin: 40px 0 60px;
  display: flex;
  justify-content: center;
}

.cert-counter-card {
  background: linear-gradient(135deg, rgba(239, 55, 36, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
  border: 2px solid rgba(239, 55, 36, 0.3);
  border-radius: 20px;
  padding: 30px 50px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(239, 55, 36, 0.15);
  transition: all 0.4s ease;
}

.cert-counter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(239, 55, 36, 0.25);
  border-color: rgba(239, 55, 36, 0.5);
}

.cert-counter-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 215, 0, 0.1) 50%, transparent 60%);
  animation: certShimmer 3s infinite;
}

@keyframes certShimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.cert-trophy-container {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.cert-counter-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.cert-count {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ef3724 0%, #ffd700 50%, #ef3724 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease infinite;
  line-height: 1;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.cert-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cert-badges-preview {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cert-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 55, 36, 0.15), rgba(255, 215, 0, 0.15));
  border: 2px solid rgba(239, 55, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cert-badge-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ef3724, #ffd700);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.cert-badge-icon i {
  font-size: 18px;
  color: #ef3724;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.cert-badge-icon:hover {
  transform: scale(1.2) rotate(15deg);
  border-color: #ef3724;
  box-shadow: 0 8px 25px rgba(239, 55, 36, 0.5),
              0 0 0 4px rgba(239, 55, 36, 0.1);
}

.cert-badge-icon:hover::before {
  opacity: 1;
}

.cert-badge-icon:hover i {
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Staggered animation for badges */
.cert-badge-icon:nth-child(1) { animation-delay: 0.1s; }
.cert-badge-icon:nth-child(2) { animation-delay: 0.2s; }
.cert-badge-icon:nth-child(3) { animation-delay: 0.3s; }
.cert-badge-icon:nth-child(4) { animation-delay: 0.4s; }

/* Legacy img support */
.cert-badges-preview img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(239, 55, 36, 0.3);
  transition: all 0.3s ease;
  object-fit: cover;
}

.cert-badges-preview img:hover {
  transform: scale(1.2) rotate(10deg);
  border-color: #ef3724;
  box-shadow: 0 5px 20px rgba(239, 55, 36, 0.4);
}

/* Achievements Masonry Grid - Enhanced Variable Heights */
.achievements-masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 25px;
  margin-top: 40px;
  perspective: 1000px;
}

.ach-grid-item {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

/* Variable height classes */
.ach-grid-item.ach-tall {
  grid-row: span 2;
}

.ach-grid-item.ach-wide {
  grid-column: span 2;
}

/* Featured Achievement - Large Card */
.ach-grid-item.ach-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.ach-grid-item.ach-featured .card-service {
  height: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 250, 230, 0.98) 0%, rgba(255, 245, 200, 0.95) 100%);
  border: 3px solid rgba(255, 215, 0, 0.4);
}

.ach-grid-item.ach-featured .card-service::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, #ffd700, #ef3724, #ffd700);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
  filter: blur(10px);
  animation: featuredGlow 3s ease-in-out infinite;
}

@keyframes featuredGlow {
  0%, 100% { opacity: 0.3; filter: blur(10px); }
  50% { opacity: 0.5; filter: blur(15px); }
}

.ach-grid-item.ach-featured .icon img {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.3));
}

.ach-grid-item.ach-featured .caption h4 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #ef3724, #ff6b5b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ach-grid-item.ach-featured .caption p {
  font-size: 1.1rem;
  color: #555;
}

/* Staggered animation for grid items */
.ach-grid-item:nth-child(1) { animation-delay: 0s; }
.ach-grid-item:nth-child(2) { animation-delay: 0.1s; }
.ach-grid-item:nth-child(3) { animation-delay: 0.2s; }
.ach-grid-item:nth-child(4) { animation-delay: 0.3s; }
.ach-grid-item:nth-child(5) { animation-delay: 0.4s; }
.ach-grid-item:nth-child(6) { animation-delay: 0.5s; }
.ach-grid-item:nth-child(7) { animation-delay: 0.6s; }
.ach-grid-item:nth-child(8) { animation-delay: 0.7s; }

.ach-grid-item .card-service {
  height: 100%;
  animation: cardFloatIn 0.6s ease-out forwards;
  animation-delay: inherit;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes cardFloatIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover lift effect for all grid items */
.ach-grid-item:hover {
  z-index: 10;
}

.ach-grid-item:hover .card-service {
  transform: translateY(-8px) scale(1.02);
}

/* Award Ribbons - Enhanced Animated SVG Style */
.award-ribbon {
  position: absolute;
  top: 15px;
  right: -35px;
  background: linear-gradient(135deg, #ef3724 0%, #ff6b5b 50%, #ef3724 100%);
  background-size: 200% 200%;
  color: white;
  padding: 8px 40px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(45deg);
  box-shadow:
    0 3px 15px rgba(239, 55, 36, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  z-index: 10;
  overflow: visible;
  animation: ribbonPulse 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

.award-ribbon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: ribbonShine 2.5s ease-in-out infinite;
}

.award-ribbon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
}

.card-service:hover .award-ribbon::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.card-service:hover .award-ribbon {
  transform: rotate(45deg) scale(1.05);
  box-shadow:
    0 5px 25px rgba(239, 55, 36, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

@keyframes ribbonPulse {
  0%, 100% {
    background-position: 0% 50%;
    filter: brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.1);
  }
}
