@keyframes ribbonShine {
  0% { left: -100%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Ribbon Tails - Animated */
.ribbon-tail-left,
.ribbon-tail-right {
  display: block;
  position: absolute;
  bottom: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  animation: tailWave 2s ease-in-out infinite;
}

.ribbon-tail-left {
  left: 0;
  border-width: 8px 8px 0 0;
  border-color: #c52a1a transparent transparent transparent;
  animation-delay: 0s;
}

.ribbon-tail-right {
  right: 0;
  border-width: 8px 0 0 8px;
  border-color: #c52a1a transparent transparent transparent;
  animation-delay: 0.5s;
}

@keyframes tailWave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(2px) rotate(2deg); }
}

/* Gold Ribbon */
.award-ribbon.gold-ribbon {
  background: linear-gradient(135deg, #ffd700 0%, #ffcc00 25%, #fff4a3 50%, #ffcc00 75%, #ffd700 100%);
  background-size: 200% 200%;
  color: #5a4a00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    0 3px 15px rgba(255, 215, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  animation: goldRibbonShimmer 3s ease-in-out infinite;
}

.award-ribbon.gold-ribbon .ribbon-tail-left,
.award-ribbon.gold-ribbon .ribbon-tail-right {
  border-color: #cc9900 transparent transparent transparent;
}

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

.card-service:hover .award-ribbon.gold-ribbon {
  box-shadow:
    0 5px 30px rgba(255, 215, 0, 0.7),
    0 0 20px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Silver Ribbon */
.award-ribbon.silver-ribbon {
  background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 25%, #f5f5f5 50%, #c0c0c0 75%, #e8e8e8 100%);
  background-size: 200% 200%;
  color: #444;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  box-shadow:
    0 3px 15px rgba(192, 192, 192, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  animation: silverRibbonShimmer 3s ease-in-out infinite;
}

.award-ribbon.silver-ribbon .ribbon-tail-left,
.award-ribbon.silver-ribbon .ribbon-tail-right {
  border-color: #909090 transparent transparent transparent;
}

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

.card-service:hover .award-ribbon.silver-ribbon {
  box-shadow:
    0 5px 25px rgba(192, 192, 192, 0.6),
    0 0 15px rgba(192, 192, 192, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Ribbon Sparkle Effect */
.award-ribbon .ribbon-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: ribbonSparkle 2s ease-in-out infinite;
}

.award-ribbon .ribbon-sparkle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.award-ribbon .ribbon-sparkle:nth-child(2) { top: 50%; left: 70%; animation-delay: 0.5s; }
.award-ribbon .ribbon-sparkle:nth-child(3) { top: 80%; left: 40%; animation-delay: 1s; }

@keyframes ribbonSparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* Achievement Card Enhancements */
.card-service[data-level] {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-service[data-level="gold"] {
  border: 2px solid rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 230, 0.95) 100%);
}

.card-service[data-level="gold"]:hover {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 15px 50px rgba(255, 215, 0, 0.3);
}

.card-service[data-level="silver"] {
  border: 2px solid rgba(192, 192, 192, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 250, 0.95) 100%);
}

.card-service[data-level="silver"]:hover {
  border-color: rgba(192, 192, 192, 0.6);
  box-shadow: 0 15px 50px rgba(192, 192, 192, 0.3);
}

.card-service.winner::after {
  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: winnerShimmer 4s infinite;
  pointer-events: none;
}

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

/* Particle Container */
.ach-particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.ach-particle-container.active::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffd700;
  border-radius: 50%;
  animation: particleBurst 1s ease-out forwards;
}

@keyframes particleBurst {
  0% {
    transform: scale(0) translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: scale(1) translate(var(--tx, 50px), var(--ty, -50px));
    opacity: 0;
  }
}

/* Dynamic Particles (created by JavaScript) */
.dynamic-particle {
  position: absolute;
  pointer-events: none;
  animation: dynamicParticleBurst 1.5s ease-out forwards;
  z-index: 10;
}

@keyframes dynamicParticleBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(
      calc((var(--random-x, 0.5) - 0.5) * 200px),
      calc((var(--random-y, 0.5) - 0.5) * 200px - 50px)
    ) scale(0);
  }
}

/* Alternative burst animation with more visual impact */
.ach-particle-container.burst-active .dynamic-particle {
  animation: particleScatter 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes particleScatter {
  0% {
    opacity: 1;
    transform: scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.5) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.5) rotate(180deg) translateY(-100px);
  }
}

/* Star-shaped particles */
.dynamic-particle[style*="clipPath"] {
  animation: starParticleBurst 2s ease-out forwards;
}

@keyframes starParticleBurst {
  0% {
    opacity: 1;
    transform: scale(0) rotate(0deg);
    filter: brightness(1);
  }
  30% {
    opacity: 1;
    transform: scale(1.2) rotate(72deg);
    filter: brightness(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(360deg) translateY(-80px);
    filter: brightness(0.5);
  }
}

/* Glow effect for gold particles */
[data-level="gold"] .dynamic-particle {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8),
              0 0 20px rgba(255, 215, 0, 0.4);
}

/* Glow effect for silver particles */
[data-level="silver"] .dynamic-particle {
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.8),
              0 0 20px rgba(192, 192, 192, 0.4);
}

/* Achievement Revealed State */
.card-service.ach-revealed {
  animation: achievementReveal 0.6s ease-out forwards;
}

@keyframes achievementReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Achievement Glow Effect */
.ach-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse at center bottom, rgba(239, 55, 36, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-service:hover .ach-glow {
  opacity: 1;
}

[data-level="gold"] .ach-glow {
  background: radial-gradient(ellipse at center bottom, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
}

[data-level="silver"] .ach-glow {
  background: radial-gradient(ellipse at center bottom, rgba(192, 192, 192, 0.2) 0%, transparent 70%);
}

/* Trophy Animation Container */
.trophy-animation-container {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 60px;
  z-index: 5;
}

.ach-featured .trophy-animation-container {
  width: 80px;
  height: 80px;
}

/* Confetti Particles for Featured */
.ach-featured .card-service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle, #ffd700 1px, transparent 1px),
    radial-gradient(circle, #ef3724 1px, transparent 1px),
    radial-gradient(circle, #ff6b5b 1px, transparent 1px);
  background-size: 50px 50px, 70px 70px, 90px 90px;
  background-position: 0 0, 25px 25px, 50px 10px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  animation: confettiFloat 20s linear infinite;
}

.ach-featured .card-service:hover::before {
  opacity: 0.3;
}

@keyframes confettiFloat {
  0% { background-position: 0 0, 25px 25px, 50px 10px; }
  100% { background-position: 50px 50px, 75px 75px, 100px 60px; }
}

/* Star Burst Animation for Top Awards */
.ach-featured .card-service[data-ach-type="featured"]::after {
  content: '★';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 200px;
  color: rgba(255, 215, 0, 0.1);
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
}

.ach-featured .card-service[data-ach-type="featured"]:hover::after {
  transform: translate(-50%, -50%) scale(1) rotate(15deg);
}

/* Achievement Counter Animation Styles */
.ach-counter {
  display: inline-block;
  font-weight: 700;
  color: #ef3724;
}

/* Responsive Masonry Grid */
@media (max-width: 992px) {
  .achievements-masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .ach-grid-item.ach-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .ach-grid-item.ach-featured .card-service {
    min-height: auto;
  }

  .cert-counter-card {
    flex-direction: column;
    text-align: center;
    padding: 25px 30px;
  }

  .cert-badges-preview {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .achievements-masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

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

  .award-ribbon {
    font-size: 0.65rem;
    padding: 6px 35px;
    right: -40px;
  }

  .trophy-animation-container {
    width: 40px;
    height: 40px;
  }

  .cert-count {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .achievements-masonry-grid {
    grid-template-columns: 1fr;
  }

  .ach-grid-item.ach-featured {
    grid-column: span 1;
  }

  .ach-grid-item.ach-featured .icon img {
    width: 70px;
    height: 70px;
  }

  .ach-grid-item.ach-featured .caption h4 {
    font-size: 1.4rem;
  }

  .award-ribbon {
    top: 10px;
    right: -45px;
    font-size: 0.6rem;
    padding: 5px 40px;
  }

  .cert-counter-card {
    padding: 20px;
    gap: 15px;
  }

  .cert-count {
    font-size: 2rem;
  }

  .cert-label {
    font-size: 0.85rem;
  }

  .cert-badges-preview img {
    width: 35px;
    height: 35px;
  }
}

/* ============================================
   ACHIEVEMENTS SECTION - LIGHT/DARK MODE THEMES
   ============================================ */

/* ----------------------------------------
   LIGHT MODE (Default) - Achievements
   ---------------------------------------- */

/* Achievement Section Background */
#ach {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
  position: relative;
}

#ach::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(239, 55, 36, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Section Title Light Mode */
#ach .section-title {
  color: #1a1a2e;
}

#ach .section-title::after {
  background: linear-gradient(90deg, #ef3724, #ffd700, #ef3724);
}

/* Certification Counter Card - Light Mode */
.cert-counter-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 240, 0.9) 100%);
  border: 2px solid rgba(239, 55, 36, 0.2);
  box-shadow:
    0 10px 40px rgba(239, 55, 36, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.cert-counter-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 250, 235, 0.95) 100%);
  border-color: rgba(239, 55, 36, 0.4);
  box-shadow:
    0 20px 60px rgba(239, 55, 36, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

.cert-label {
  color: #555;
}

/* Achievement Cards - Light Mode */
#ach .card-service {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

#ach .card-service:hover {
  background: linear-gradient(145deg, #ffffff 0%, #fff 100%);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* Caption Text - Light Mode */
#ach .card-service .caption h4 {
  color: #1a1a2e;
}

#ach .card-service .caption h4.fg-theme {
  color: #ef3724;
}

#ach .card-service .caption p {
  color: #555;
}

/* Gold Level Cards - Light Mode */
#ach .card-service[data-level="gold"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 230, 0.95) 100%);
  border: 2px solid rgba(255, 215, 0, 0.25);
}

#ach .card-service[data-level="gold"]:hover {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow:
    0 15px 50px rgba(255, 215, 0, 0.2),
    0 0 30px rgba(255, 215, 0, 0.1);
}

/* Silver Level Cards - Light Mode */
#ach .card-service[data-level="silver"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 250, 0.95) 100%);
  border: 2px solid rgba(192, 192, 192, 0.25);
}

#ach .card-service[data-level="silver"]:hover {
  border-color: rgba(192, 192, 192, 0.5);
  box-shadow:
    0 15px 50px rgba(192, 192, 192, 0.25),
    0 0 25px rgba(192, 192, 192, 0.1);
}

/* Featured Achievement - Light Mode */
.ach-grid-item.ach-featured .card-service {
  background: linear-gradient(135deg, rgba(255, 252, 240, 0.98) 0%, rgba(255, 248, 220, 0.95) 100%);
  border: 3px solid rgba(255, 215, 0, 0.35);
}

.ach-grid-item.ach-featured .card-service:hover {
  background: linear-gradient(135deg, rgba(255, 255, 245, 1) 0%, rgba(255, 250, 225, 0.98) 100%);
  border-color: rgba(255, 215, 0, 0.6);
}

.ach-grid-item.ach-featured .caption p {
  color: #555;
}

/* Icon styling - Light Mode */
#ach .card-service .icon img {
  filter: none;
}

/* Badge Icons - Light Mode */
.cert-badge-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.8));
  border: 2px solid rgba(239, 55, 36, 0.3);
}

.cert-badge-icon i {
  color: #ef3724;
}

/* ----------------------------------------
   DARK MODE - Achievements Section
   ---------------------------------------- */

[data-theme="dark"] #ach {
  background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
}

[data-theme="dark"] #ach::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(239, 55, 36, 0.08) 0%, transparent 50%);
}

/* Section Title Dark Mode */
[data-theme="dark"] #ach .section-title {
  color: #ffffff;
}

[data-theme="dark"] #ach .section-title::after {
  background: linear-gradient(90deg, #ef3724, #ffd700, #ef3724);
}

/* Certification Counter Card - Dark Mode */
[data-theme="dark"] .cert-counter-card {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(40, 35, 55, 0.9) 100%);
  border: 2px solid rgba(239, 55, 36, 0.3);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(239, 55, 36, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .cert-counter-card:hover {
  background: linear-gradient(135deg, rgba(35, 35, 55, 0.98) 0%, rgba(45, 40, 60, 0.95) 100%);
  border-color: rgba(239, 55, 36, 0.5);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(239, 55, 36, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

[data-theme="dark"] .cert-label {
  color: #b0b0b0;
}

/* Achievement Cards - Dark Mode */
[data-theme="dark"] #ach .card-service {
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.95) 0%, rgba(25, 25, 40, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

[data-theme="dark"] #ach .card-service:hover {
  background: linear-gradient(145deg, rgba(35, 35, 55, 0.98) 0%, rgba(30, 30, 50, 0.95) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(239, 55, 36, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Caption Text - Dark Mode */
[data-theme="dark"] #ach .card-service .caption h4 {
  color: #ffffff;
}

[data-theme="dark"] #ach .card-service .caption h4.fg-theme {
  color: #ff6b5b;
}

[data-theme="dark"] #ach .card-service .caption p {
  color: #b0b0b0;
}

/* Gold Level Cards - Dark Mode */
[data-theme="dark"] #ach .card-service[data-level="gold"] {
  background: linear-gradient(135deg, rgba(40, 38, 30, 0.95) 0%, rgba(50, 45, 35, 0.9) 100%);
  border: 2px solid rgba(255, 215, 0, 0.35);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 215, 0, 0.1);
}

[data-theme="dark"] #ach .card-service[data-level="gold"]:hover {
  background: linear-gradient(135deg, rgba(50, 48, 35, 0.98) 0%, rgba(60, 55, 40, 0.95) 100%);
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 215, 0, 0.2),
    0 0 0 1px rgba(255, 215, 0, 0.1) inset;
}

/* Silver Level Cards - Dark Mode */
[data-theme="dark"] #ach .card-service[data-level="silver"] {
  background: linear-gradient(135deg, rgba(35, 35, 45, 0.95) 0%, rgba(40, 40, 55, 0.9) 100%);
  border: 2px solid rgba(192, 192, 192, 0.3);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(192, 192, 192, 0.08);
}

[data-theme="dark"] #ach .card-service[data-level="silver"]:hover {
  background: linear-gradient(135deg, rgba(45, 45, 55, 0.98) 0%, rgba(50, 50, 65, 0.95) 100%);
  border-color: rgba(192, 192, 192, 0.5);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 35px rgba(192, 192, 192, 0.15),
    0 0 0 1px rgba(192, 192, 192, 0.08) inset;
}

/* Featured Achievement - Dark Mode */
[data-theme="dark"] .ach-grid-item.ach-featured .card-service {
  background: linear-gradient(135deg, rgba(45, 42, 30, 0.98) 0%, rgba(55, 50, 35, 0.95) 100%);
  border: 3px solid rgba(255, 215, 0, 0.4);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 215, 0, 0.15);
}

[data-theme="dark"] .ach-grid-item.ach-featured .card-service:hover {
  background: linear-gradient(135deg, rgba(55, 52, 38, 1) 0%, rgba(65, 58, 42, 0.98) 100%);
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 215, 0, 0.25),
    0 0 0 1px rgba(255, 215, 0, 0.15) inset;
}

[data-theme="dark"] .ach-grid-item.ach-featured .card-service::before {
  opacity: 0.2;
}

[data-theme="dark"] .ach-grid-item.ach-featured .caption p {
  color: #c0c0c0;
}

/* Icon styling - Dark Mode */
[data-theme="dark"] #ach .card-service .icon img {
  filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Badge Icons - Dark Mode */
[data-theme="dark"] .cert-badge-icon {
  background: linear-gradient(135deg, rgba(40, 40, 55, 0.9), rgba(35, 35, 50, 0.8));
  border: 2px solid rgba(239, 55, 36, 0.4);
}

[data-theme="dark"] .cert-badge-icon i {
  color: #ff6b5b;
}

[data-theme="dark"] .cert-badge-icon:hover {
  background: linear-gradient(135deg, rgba(50, 50, 65, 0.95), rgba(45, 45, 60, 0.9));
  border-color: #ef3724;
  box-shadow:
    0 8px 25px rgba(239, 55, 36, 0.4),
    0 0 0 4px rgba(239, 55, 36, 0.15);
}

/* Award Ribbons - Dark Mode Enhancements */
[data-theme="dark"] .award-ribbon {
  box-shadow:
    0 3px 15px rgba(239, 55, 36, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .award-ribbon.gold-ribbon {
  box-shadow:
    0 3px 15px rgba(255, 215, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .card-service:hover .award-ribbon.gold-ribbon {
  box-shadow:
    0 5px 30px rgba(255, 215, 0, 0.7),
    0 0 40px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .award-ribbon.silver-ribbon {
  box-shadow:
    0 3px 15px rgba(192, 192, 192, 0.5),
    0 0 15px rgba(192, 192, 192, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .card-service:hover .award-ribbon.silver-ribbon {
  box-shadow:
    0 5px 25px rgba(192, 192, 192, 0.6),
    0 0 30px rgba(192, 192, 192, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Glow Effects - Dark Mode */
[data-theme="dark"] .ach-glow {
  background: radial-gradient(ellipse at center bottom, rgba(239, 55, 36, 0.25) 0%, transparent 70%);
}

[data-theme="dark"] [data-level="gold"] .ach-glow {
  background: radial-gradient(ellipse at center bottom, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
}

[data-theme="dark"] [data-level="silver"] .ach-glow {
  background: radial-gradient(ellipse at center bottom, rgba(192, 192, 192, 0.25) 0%, transparent 70%);
}

/* Trophy Animation Container - Dark Mode */
[data-theme="dark"] .trophy-animation-container {
  filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

/* Achievement Counter - Dark Mode */
[data-theme="dark"] .ach-counter {
  color: #ff6b5b;
  text-shadow: 0 0 20px rgba(239, 55, 36, 0.5);
}

/* Particle Effects - Dark Mode Enhancement */
[data-theme="dark"] [data-level="gold"] .dynamic-particle {
  box-shadow:
    0 0 15px rgba(255, 215, 0, 1),
    0 0 30px rgba(255, 215, 0, 0.6);
}

[data-theme="dark"] [data-level="silver"] .dynamic-particle {
  box-shadow:
    0 0 15px rgba(192, 192, 192, 1),
    0 0 30px rgba(192, 192, 192, 0.6);
}

/* Winner Shimmer - Dark Mode */
[data-theme="dark"] .card-service.winner::after {
  background: linear-gradient(45deg, transparent 40%, rgba(255, 215, 0, 0.15) 50%, transparent 60%);
}

/* Featured Star - Dark Mode */
[data-theme="dark"] .ach-featured .card-service[data-ach-type="featured"]::after {
  color: rgba(255, 215, 0, 0.15);
}

[data-theme="dark"] .ach-featured .card-service[data-ach-type="featured"]:hover::after {
  color: rgba(255, 215, 0, 0.25);
}

/* Confetti Background - Dark Mode */
[data-theme="dark"] .ach-featured .card-service::before {
  background-image:
    radial-gradient(circle, rgba(255, 215, 0, 0.4) 1px, transparent 1px),
    radial-gradient(circle, rgba(239, 55, 36, 0.4) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 107, 91, 0.4) 1px, transparent 1px);
}

[data-theme="dark"] .ach-featured .card-service:hover::before {
  opacity: 0.4;
}

/* Masonry Grid Background - Dark Mode */
[data-theme="dark"] .achievements-masonry-grid {
  background: transparent;
}

/* ============================================
   PREMIUM NAVBAR STYLES
   ============================================ */

.premium-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 12px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.premium-navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.premium-navbar.scrolled {
  padding: 8px 0;
  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.05);
}

.premium-navbar.scrolled::before {
  opacity: 0;
}

.navbar-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(239, 55, 36, 0.5) 20%, 
    rgba(255, 215, 0, 0.5) 50%, 
    rgba(239, 55, 36, 0.5) 80%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.premium-navbar.scrolled .navbar-glow {
  opacity: 1;
  animation: glowPulse 3s ease-in-out infinite;
}

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

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

/* Logo Styles */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: translateY(-2px);
}

.logo-icon {
  position: relative;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef3724 0%, #ff6b5b 50%, #ffd700 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(239, 55, 36, 0.4);
  transition: all 0.3s ease;
}

.navbar-logo:hover .logo-icon {
  box-shadow: 0 6px 25px rgba(239, 55, 36, 0.6);
  transform: rotate(-5deg) scale(1.05);
}

.logo-letter {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef3724, #ffd700);
  opacity: 0;
  z-index: -1;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.logo-title {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Navigation Menu */
.navbar-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links .nav-item {
  position: relative;
}

.nav-links .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-links .nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(239, 55, 36, 0.1), rgba(255, 215, 0, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.nav-links .nav-link:hover::before,
.nav-links .nav-item.active .nav-link::before {
  opacity: 1;
}

.nav-links .nav-link:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-links .nav-item.active .nav-link {
  color: white;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.nav-icon i {
  font-size: 0.85rem;
}

.nav-links .nav-link:hover .nav-icon,
.nav-links .nav-item.active .nav-link .nav-icon {
  opacity: 1;
  color: #ef3724;
}

.nav-text {
  position: relative;
  z-index: 1;
}

.nav-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, #ef3724, #ffd700);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.nav-links .nav-link:hover .nav-indicator,
.nav-links .nav-item.active .nav-link .nav-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lang-switcher:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.lang-flag {
  font-size: 1.1rem;
}

.lang-text {
  letter-spacing: 0.5px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  pointer-events: none;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
  pointer-events: none;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Responsive */
@media (max-width: 1200px) {
  .nav-links .nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .nav-icon {
    display: none;
  }
}

@media (max-width: 992px) {
  .mobile-toggle {
    display: flex;
  }
  
  .navbar-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
    z-index: 998;
  }

  .navbar-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .nav-links .nav-link {
    font-size: 1.3rem;
    padding: 15px 30px;
    justify-content: center;
  }
  
  .nav-icon {
    display: flex;
    width: 30px;
    height: 30px;
  }
  
  .nav-icon i {
    font-size: 1.2rem;
  }
  
  .nav-indicator {
    bottom: 8px;
    width: 40px;
    height: 4px;
  }
  
  .navbar-actions {
    position: relative;
    z-index: 999;
  }

  .mobile-toggle {
    position: relative;
    z-index: 1000;
  }
  
  .lang-switcher {
    padding: 8px 12px;
  }
  
  .lang-text {
    display: none;
  }
}

@media (max-width: 576px) {
  .navbar-container {
    padding: 0 15px;
  }
  
  .logo-text {
    display: none;
  }
  
  .logo-icon {
    width: 40px;
    height: 40px;
  }
  
  .logo-letter {
    font-size: 1.3rem;
  }
  
  .nav-links .nav-link {
    font-size: 1.1rem;
    padding: 12px 25px;
  }
}

/* Hide old navbar */
.navbar.navbar-expand-lg {
  display: none !important;
}

