/* === Certification Carousel - Clean Responsive Design === */
#testimonials {
  margin: 0;
  padding: 60px 5%;
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.card {
  position: absolute;
  width: 340px;
  height: 380px;
  border-radius: 20px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  opacity: 0;
  filter: blur(6px);
  transform: translateX(0) scale(0.8) rotateY(0deg);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #3b82f6;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card.active {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0) scale(1) rotateY(0deg);
  z-index: 5;
}

.card.active::before {
  opacity: 1;
}

.card.left {
  opacity: 0.6;
  filter: blur(4px);
  transform: translateX(-320px) scale(0.85) rotateY(45deg);
  z-index: 3;
}

.card.right {
  opacity: 0.6;
  filter: blur(4px);
  transform: translateX(320px) scale(0.85) rotateY(-45deg);
  z-index: 3;
}

.card.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.certification {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.certification-img {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  padding: 3px;
  margin-bottom: 18px;
  cursor: pointer;
  object-fit: cover;
  border: 3px solid #3b82f6;
  transition: all 0.4s ease;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.card:hover .certification-img {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.quote-icon {
  font-size: 44px;
  color: #3b82f6;
  opacity: 0.3;
  margin-bottom: 8px;
  font-family: Georgia, serif;
  line-height: 1;
}

.certification-title {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #1a1a2e;
}

.certification-role {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.certification-description {
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
  font-style: italic;
  padding: 0 8px;
}

.star-rating {
  display: flex;
  gap: 3px;
  margin-top: 12px;
}

.star {
  font-size: 16px;
  color: #fbbf24;
}

.star.empty {
  color: #e2e8f0;
}

/* Gallery Section */
#img-gallery {
  height: auto;
  width: 100%;
  align-items: center;
  justify-content: center;
  justify-items: center;
  padding: 0 5%;
  background: #f8fafc;
  margin-bottom: 30px;
}

.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 30px 0;
}

.img-gallery .card {
  position: relative;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  height: auto;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 1;
  display: block;
  filter: blur(0);
  overflow: hidden;
}

.img-gallery .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.img-gallery img {
  width: 100%;
  padding: 10px 10px 0;
  height: 220px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: transform 0.4s ease;
}

.img-gallery .card:hover img {
  transform: scale(1.03);
}

.card-title {
  padding: 14px 14px 4px;
  font-weight: 700;
  text-align: center;
  font-size: 15px;
  color: #1a1a2e;
}

.card-subtitle {
  padding: 4px 14px 14px;
  margin-bottom: 8px;
  font-size: 12px;
  text-align: center;
  color: #64748b;
}

/* Modal */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  justify-items: center;
  align-items: center;
  background-color: rgba(26, 26, 46, 0.92);
}

.modal-content {
  text-align: center;
  max-width: 90%;
  max-height: 90%;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin-bottom: 15px;
  border: 3px solid #e5e7eb;
}

.modal-title {
  color: white;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: #cbd5e1;
  font-size: 15px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 34px;
  color: white;
  cursor: pointer;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #db1a1a;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #2563eb;
  transform: rotate(90deg);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1400px) {
  #testimonials {
    padding: 80px 8%;
  }
  
  .carousel {
    max-width: 1100px;
    height: 450px;
  }
  
  .card {
    width: 360px;
    height: 400px;
  }
  
  .img-gallery {
    padding: 40px 0;
    gap: 28px;
  }
}

/* Desktop */
@media (max-width: 1200px) {
  .carousel {
    max-width: 900px;
    height: 400px;
  }
  
  .card {
    width: 320px;
    height: 360px;
  }
  
  .card.left {
    transform: translateX(-280px) scale(0.85) rotateY(40deg);
  }
  
  .card.right {
    transform: translateX(280px) scale(0.85) rotateY(-40deg);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  #testimonials {
    padding: 50px 4%;
  }
  
  .carousel {
    max-width: 100%;
    height: 380px;
  }
  
  .card {
    width: 300px;
    height: 350px;
  }
  
  .card.left {
    transform: translateX(-240px) scale(0.82) rotateY(35deg);
  }
  
  .card.right {
    transform: translateX(240px) scale(0.82) rotateY(-35deg);
  }
  
  .img-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    padding: 25px 0;
  }
  
  .img-gallery img {
    height: 200px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  #testimonials {
    padding: 40px 3%;
  }
  
  .carousel {
    height: 340px;
  }
  
  .card {
    width: 280px;
    height: 320px;
  }
  
  .card.left {
    transform: translateX(-180px) scale(0.78) rotateY(25deg);
  }
  
  .card.right {
    transform: translateX(180px) scale(0.78) rotateY(-25deg);
  }
  
  .certification-img {
    width: 75px;
    height: 75px;
  }
  
  .certification-title {
    font-size: 18px;
  }
  
  .certification-description {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
  
  .quote-icon {
    font-size: 38px;
  }
  
  .star {
    font-size: 14px;
  }
  
  .img-gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    padding: 20px 0;
  }
  
  .img-gallery img {
    height: 180px;
    padding: 8px 8px 0;
  }
  
  .card-title {
    font-size: 14px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  #testimonials {
    padding: 30px 3%;
  }
  
  .carousel {
    height: 300px;
  }
  
  .card {
    width: 250px;
    height: 290px;
  }
  
  .card.left {
    transform: translateX(-140px) scale(0.75);
  }
  
  .card.right {
    transform: translateX(140px) scale(0.75);
  }
  
  .certification-img {
    width: 65px;
    height: 65px;
  }
  
  .certification {
    padding: 22px 16px;
  }
  
  .certification-title {
    font-size: 16px;
  }
  
  .certification-role {
    font-size: 10px;
  }
  
  .certification-description {
    font-size: 12px;
  }
  
  .quote-icon {
    font-size: 32px;
  }
  
  .img-gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
  }
  
  .img-gallery img {
    height: 150px;
    padding: 6px 6px 0;
  }
  
  .card-title {
    font-size: 13px;
    padding: 12px 12px 4px;
  }
  
  .card-subtitle {
    font-size: 11px;
    padding: 4px 12px 12px;
  }
  
  .close-btn {
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .carousel {
    height: 280px;
  }
  
  .card {
    width: 230px;
    height: 270px;
  }
  
  .card.left {
    transform: translateX(-120px) scale(0.72);
  }
  
  .card.right {
    transform: translateX(120px) scale(0.72);
  }
  
  .certification-img {
    width: 58px;
    height: 58px;
  }
  
  .certification-title {
    font-size: 15px;
  }
}
