:root {
  --primary-gradient: linear-gradient(135deg, #00c1ee 0%, #009acc 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.15);
  --text-dark: #1a202c;
}

/* Carousel section */
.carousel-section {
  padding-top: 80px;
}

.carousel-wrapper {
  position: relative;
  height: 320px;
  margin: 0 10px 25px;
  perspective: 1000px;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.ad-card {
  width: 100%;
  max-width: 480px;
  height: 280px;
  border-radius: 20px;
  padding: 25px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.4s ease;
  color: white;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card stacking effect */
.carousel-slide.active {
  transform: translateX(0) translateY(0) scale(1) rotateY(0deg);
  z-index: 10;
}

.carousel-slide.next {
  transform: translateX(100px) translateY(10px) scale(0.9) rotateY(-10deg);
  opacity: 0.7;
  z-index: 5;
}

.carousel-slide.prev {
  transform: translateX(-100px) translateY(10px) scale(0.9) rotateY(10deg);
  opacity: 0.7;
  z-index: 5;
}

.carousel-slide.hidden {
  transform: translateX(180px) translateY(20px) scale(0.8) rotateY(-20deg);
  opacity: 0.3;
  z-index: 1;
}

.ad-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Card background gradient */
.ad-card.math-center {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ad-card.english-center {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ad-card.science-center {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ad-card.chinese-center {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.ad-card.art-center {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ad-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(30px, -30px);
}

.ad-header {
  margin-bottom: 15px;
  position: relative;
  z-index: 2;
}

.center-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.center-tagline {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 400;
}

.ad-image {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  margin-bottom: 15px;
}

.ad-content {
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.offer-text {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.offer-detail {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 400;
}

.cta-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: inline-block;
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation control area */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-direction: column;
  gap: 20px;
}

.nav-buttons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-btn {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  font-size: 20px;
  color: #4a5568;
  border: 2px solid rgba(255, 255, 255, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:hover {
  background: var(--primary-gradient);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.nav-btn:active {
  transform: scale(1.05);
  transition: all 0.1s ease;
}

/* Indication Point */
.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--primary-gradient);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .carousel-wrapper {
    height: 280px;
  }

  .ad-card {
    padding: 20px;
  }

  .center-name {
    font-size: 20px;
  }

  .offer-text {
    font-size: 16px;
  }

  .nav-btn {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .nav-buttons {
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .carousel-slide.next,
  .carousel-slide.prev {
    transform: translateX(60px) translateY(15px) scale(0.85);
  }

  .carousel-slide.hidden {
    opacity: 0;
  }

  .nav-btn {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

  .nav-buttons {
    gap: 40px;
  }
}
