:root {
  --card-yellow: #ffefd3;
  --card-green: #e6f7eb;
  --card-border-radius: 60px;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --card-width: 496px;
  --card-spacing: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.testimonial-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  position: relative;
  height: 600px;
  gap: 0 160px;
}

.title-section {
  margin-top: 100px;
  max-width: 400px;
}

.star-rating {
  margin-bottom: 15px;
}

.star {
  color: #ffd700;
  font-size: 24px;
}

.title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 15px;
}

.subtitle {
  font-size: 26px;
  color: var(--text-color);
  margin-bottom: 25px;
  line-height: 1.4;
}

.controls {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.prev-btn,
.next-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: white;
  border: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
}

.prev-btn:hover,
.next-btn:hover {
  background-color: #f5f5f5;
}

.prev-btn:disabled,
.next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-wrapper {
  position: relative;
  margin-top: 30px;
  height: 380px;
  overflow: visible;
}

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

.card {
  width: var(--card-width);
  height: 600px;
  border-radius: var(--card-border-radius);
  padding: 30px;
  box-shadow: var(--card-shadow);
  position: absolute;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  top: 0;
  left: 0;
  will-change: transform, opacity, left;
  overflow: hidden;
  background-color: var(--background-color)
}

.card.visible {
  opacity: 1;
  visibility: visible;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin: 15px;
}

.teacher-info h3 {
  font-size: 20px;
  margin-bottom: 3px;
  font-weight: bold;
}

.teacher-info p {
  font-size: 15px;
  color: var(--text-color);
}

.comment {
  flex: 1;
  font-size: 22px;
  line-height: 1.5;
  overflow-y: auto;
  margin-bottom: 25px;
}

.rating {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background-color-second);
  padding: 8px 15px;
  border-radius: 50px;
  margin-top: auto;
}

.student-name {
  font-weight: bold;
  font-size: 14px;
}

@media (max-width: 768px) {
  :root {
    --card-width: 320px;
    --card-spacing: 15px;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 15px;
  }

  .card {
    padding: 20px;
  }

  .comment {
    font-size: 15px;
  }
}
