/*   ========================CERTIFICATION BADGES ===============*/
/* Enhanced Certification Badges with Flip Effect */
.cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.5rem;
  justify-content: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Card wrapper for flip effect - wider but shorter */
.cert-card-wrapper {
  perspective: 1500px;
  width: 230px;
  height: 100px;
  margin-bottom: 0.5rem;
}

.cert-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cert-card-wrapper:hover .cert-card {
  transform: rotateY(180deg);
}

.cert-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-front {
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pending certification styling */
.cert-front.pending {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.3);
}

.pending .cert-front-content {
  opacity: 0.7;
}

.pending .cert-front-content img {
  filter: grayscale(30%) brightness(0.9);
}

.cert-back {
  z-index: 1;
  transform: rotateY(180deg);
  background: var(--accent-color, var(--ztc-bg-btn-bg1));
  text-align: center;
  padding: 1rem;
}

/* Pending certification back face */
.cert-back.pending {
  background: #6c757d;
}

/* Content styling */
.cert-front-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  width: 100%;
  height: 100%;
  justify-content: center;
}

.cert-front-content img {
  height: 28px;
  width: auto;
  filter: brightness(1.2);
}

.cert-front-content span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ztc-text-text-1);
}

.cert-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cert-back-content h4 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.cert-back-content a.view-cert-btn,
.cert-back-content .coming-soon-btn {
  background: white;
  color: var(--ztc-text-btn-text1);
  border: 1px solid white;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 10;
  cursor: pointer;
}

.cert-back-content .coming-soon-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: default;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cert-back-content a.view-cert-btn:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Add badge indicator */
.cert-front::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color, var(--ztc-bg-btn-bg1));
  box-shadow: 0 0 5px var(--accent-color, var(--ztc-bg-btn-bg1));
}

.cert-front.pending::after {
  background: #6c757d;
  box-shadow: 0 0 5px #6c757d;
}

/* Light mode styles */
.light-mode .cert-front {
  background: rgba(6, 29, 30, 0.05);
  border: 1px solid rgba(6, 29, 30, 0.1);
}

.light-mode .cert-front.pending {
  background: rgba(6, 29, 30, 0.03);
  border: 1px dashed rgba(6, 29, 30, 0.2);
}

.light-mode .cert-front-content span {
  color: var(--ztc-text-text-1);
}

/* Microsoft Edge specific fixes */
@supports (-ms-ime-align:auto) {
  .cert-front {
    z-index: 2;
    opacity: 1;
    transition: all 0.8s;
  }

  .cert-back {
    z-index: 1;
    opacity: 0;
    transition: all 0.8s;
  }

  .cert-card-wrapper:hover .cert-front {
    opacity: 0;
    pointer-events: none;
  }

  .cert-card-wrapper:hover .cert-back {
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
  }

  /* Ensure links are clickable */
  .cert-back a {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
  }
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
  .cert-badges {
    gap: 1rem;
  }

  .cert-card-wrapper {
    width: 210px;
    height: 90px;
  }

  .cert-front-content {
    padding: 0.6rem 1rem;
  }

  .cert-front-content img {
    height: 24px;
  }

  .cert-front-content span {
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 480px) {
  .cert-badges {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .cert-card-wrapper {
    width: 180px;
    height: 80px;
  }

  .cert-front-content span {
    font-size: 0.8rem;
  }

  .cert-front-content img {
    height: 20px;
  }
}
/*   ========================CERTIFICATION BADGES ENDS ===============*/
