/* Base Section Styling */
.reviews-section {
  padding: 60px 20px 80px 20px;
  background-color: #0b132b;
  color: #ffffff;
  text-align: center;
  /* DO NOT ADD overflow: hidden here as it flattens 3D space */
}

.reviews-header h2 {
  font-size: 2rem;
  margin-bottom: 5px;
  color: #ffffff;
}

.reviews-header p {
  color: #4ea8de;
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* 3D Stage Container */
.coverflow-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  height: 280px;
}

/* 3D Track - Perspective placed directly here for bulletproof 3D rendering */
.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 800px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}

/* Base Card Styling with Reflection */
.review-card {
  position: absolute;
  width: 340px;             /* Slightly wider to give text breathing room */
  height: 220px;
  left: 50%;
  top: 50%;
  margin-left: -170px;      /* Half of width */
  margin-top: -110px;       /* Half of height */
  background: #1c2541;
  border: 1px solid #3a506b;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, border-color 0.6s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;

  /* Keep 3D transformation calculations crisp */
  transform-style: preserve-3d;
  backface-visibility: hidden;

  /* Floor Reflection */
  -webkit-box-reflect: below 6px linear-gradient(transparent 70%, rgba(0, 0, 0, 0.25));

  /* Prevent text selection during rotation */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.card-stars {
  color: #ffc107;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #e0e1dd;
  font-style: italic;
}

.review-author {
  font-weight: bold;
  font-size: 0.85rem;
  color: #ffffff;
}

.google-badge {
  font-size: 0.75rem;
  color: #4ea8de;
}

/* Active Center Card (Facing Straight Forward) */
.review-card.active {
  transform: translateX(0) translateZ(0px) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 30;
  border-color: #e63946;

  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Inner Left Card - Controlled 3D Angle */
.review-card.prev {
  transform: translateX(-220px) translateZ(-120px) rotateY(45deg) scale(0.9);
  opacity: 0.75;
  z-index: 20;
}

/* Outer Left Card */
.review-card.prev2 {
  transform: translateX(-380px) translateZ(-240px) rotateY(55deg) scale(0.8);
  opacity: 0.35;
  z-index: 10;
}

/* Inner Right Card - Controlled 3D Angle */
.review-card.next {
  transform: translateX(220px) translateZ(-120px) rotateY(-45deg) scale(0.9);
  opacity: 0.75;
  z-index: 20;
}

/* Outer Right Card */
.review-card.next2 {
  transform: translateX(380px) translateZ(-240px) rotateY(-55deg) scale(0.8);
  opacity: 0.35;
  z-index: 10;
}

/* Hidden cards */
.review-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) translateZ(-400px) scale(0.5);
}

/* Controls & Indicator Dots */
.coverflow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 80px; /* Increased from 50px to push controls below reflection */
}

.coverflow-btn {
  background: #1c2541;
  border: 1px solid #3a506b;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.coverflow-btn:hover {
  background: #e63946;
  border-color: #e63946;
}

.coverflow-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a506b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #e63946;
  width: 24px;
  border-radius: 5px;
}

.stars-outer {
  display: inline-block;
  position: relative;
  font-family: sans-serif;
  color: #4b5563; /* Tailwind gray-600 for empty stars */
}

.stars-inner {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  width: 0%; /* Dynamic width updated by JS */
  color: #facc15; /* Tailwind yellow-400 for filled gold stars */
}