.reviews-widget {
  background: #fff;
  padding: 40px 0 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reviews-title {
  font-family: Roboto-Bold, Arial, sans-serif;
  font-size: 2rem;
  color: #532b88;
  margin-bottom: 25px;
  text-align: center;
}
.reviews-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
  justify-content: center;
  width: 100%;
  max-width: 1300px;
}
.review-card {
  background: #f8f8fc;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(83,43,136,0.08);
  padding: 24px 20px 18px 20px;
  flex: 1 0 260px; /* Changed from 1 1 260px to prevent uneven wrapping */
  max-width: 340px;
  min-width: 260px;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.review-card:hover {
  box-shadow: 0 6px 24px rgba(83,43,136,0.16);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.review-stars-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.review-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.reviewer-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  /* Remove border */
  border: none;
  margin-right: 4px;
}
.default-icon {
  font-size: 1.7em;
  color: #7776b3;
  margin-right: 4px;
}
.review-name {
  font-family: Roboto-Bold, Arial, sans-serif;
  color: #24262b;
  font-size: 1.1rem;
  flex: 1;
}
.review-stars {
  font-size: 1.1rem;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 0;
}
.google-logo {
  width: 22px;
  height: 22px;
  margin-left: 8px;
  margin-right: 0;
  vertical-align: middle;
  flex-shrink: 0;
}
.star {
  color: #ccc;
  font-size: 1.1em;
  margin-right: 1px;
}
.star.filled {
  color: #ffd700;
}
.review-date {
  font-size: 0.97rem;
  color: #7776b3;
  margin-bottom: 10px;
  font-family: Roboto, Arial, sans-serif;
  font-style: italic;
}
.review-text {
  font-family: Roboto, Arial, sans-serif;
  color: #444;
  font-size: 1rem;
  line-height: 1.5;
}
.read-more-btn {
  display: inline-block;
  margin-left: 8px;
  color: #532b88;
  font-weight: bold;
  text-decoration: underline;
  font-size: 0.98em;
  cursor: pointer;
  transition: color 0.2s;
}
.read-more-btn:hover {
  color: #7776b3;
}
.reviews-pagination {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.carousel-arrow {
  background: #fff;
  border: 1px solid #7776b3;
  color: #532b88;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.carousel-indicator {
  font-size: 1.1rem;
  color: #532b88;
  font-family: Roboto-Bold, Arial, sans-serif;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  display: inline-block;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin: 0 0px; /* closer together */
  box-shadow: none;
}
.carousel-dot.active {
  background: #532b88;
  transform: scale(1.2);
  box-shadow: none;
}
.carousel-flex {
  display: flex;
  align-items: center; /* This ensures vertical centering */
  justify-content: center;
  width: 100%;
  gap: 0;
  position: relative;
  overflow: hidden;
}
.carousel-cards {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping to keep cards in a single row */
  gap: 24px;
  justify-content: center;
  width: 100%;
  max-width: 1300px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.carousel-arrow-side {
  background: none;
  border: none;
  padding: 0 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.2s;
  opacity: 1;
  height: 100%;
  z-index: 2;
  position: relative; /* Added to help with positioning */
  align-self: center; /* Ensures the button stays centered vertically */
}
.carousel-arrow-side:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.slide-left-out {
  animation: slideLeftOut 0.35s forwards;
}
.slide-left-in {
  animation: slideLeftIn 0.35s;
}
.slide-right-out {
  animation: slideRightOut 0.35s forwards;
}
.slide-right-in {
  animation: slideRightIn 0.35s;
}
.slide-up-in {
  animation: slideUpIn 0.35s;
}
.slide-down-in {
  animation: slideDownIn 0.35s;
}
.slide-up-out {
  animation: slideUpOut 0.35s forwards;
}
.slide-down-out {
  animation: slideDownOut 0.35s forwards;
}
@keyframes slideLeftOut {
  100% { transform: translateX(-60px); opacity: 0; }
}
@keyframes slideLeftIn {
  0% { transform: translateX(60px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideRightOut {
  100% { transform: translateX(60px); opacity: 0; }
}
@keyframes slideRightIn {
  0% { transform: translateX(-60px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideUpOut {
  100% { transform: translateY(-60px); opacity: 0; }
}
@keyframes slideUpIn {
  0% { transform: translateY(60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes slideDownOut {
  100% { transform: translateY(60px); opacity: 0; }
}
@keyframes slideDownIn {
  0% { transform: translateY(-60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (max-width: 1300px) {
  .reviews-list {
    max-width: 900px;
  }
  .carousel-cards {
    max-width: 900px;
  }
}
@media (max-width: 900px) {
  .reviews-list {
    gap: 16px;
    max-width: 100%;
  }
  .review-card {
    max-width: 48%; /* Ensure cards take up roughly half width on medium screens */
    flex: 0 0 auto; /* Don't allow cards to grow or shrink */
  }
  .carousel-cards {
    gap: 16px;
    max-width: 100%;
    justify-content: flex-start; /* Align to start when not all cards fill width */
  }
}
@media (max-width: 600px) {
  .reviews-widget {
    padding: 25px 0 15px 0;
  }
  .reviews-title {
    font-size: 1.3rem;
  }
  .review-card {
    padding: 18px 12px 14px 12px;
    max-width: 100%; /* Full width on mobile */
    min-width: 0;
    flex: 0 0 100%; /* Prevents review cards from stacking or sharing space */
  }
  .reviews-list {
    flex-direction: column;
    gap: 12px;
  }
  .carousel-flex {
    flex-direction: row;
    min-height: 220px; /* Ensures consistent height for arrow alignment */
  }
  .carousel-cards {
    flex-direction: row; /* Keep row direction but only show one card */
    gap: 12px;
    max-width: 100%;
    flex: 1;
  }
  /* Ensure only one card is visible on mobile */
  .carousel-cards .review-card:not(:first-child) {
    display: none;
  }
}
