/* Reviews Section */
.reviews-section {
  background: #F5F5F5;
  padding: 60px 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  scroll-margin-top: 100px;
}

.reviews-container {
  margin: 0 auto;
  width: 100%;
  padding: 0 80px;
  box-sizing: border-box;
}

.reviews-layout {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

/* Left Column: Image */
.reviews-image-column {
  flex: 0 0 45%;
  position: relative;
  display: flex;
  align-items: stretch;
}

.reviews-image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.reviews-image-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.reviews-stats-badge {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: #ff6600;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stats-number {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 5px;
}

.stats-label {
  font-size: 14px;
  color: white;
  font-weight: 500;
}

/* Right Column: Content */
.reviews-content-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  margin-left: 0;
  padding-left: 0;
}

.reviews-header {
  margin-bottom: 30px;
  text-align: left;
  width: 100%;
}

.reviews-title {
  font-size: 28px;
  font-weight: 700;
  color: black;
  margin: 0;
  line-height: 1.2;
  width: fit-content;
}

.reviews-carousel {
  position: relative;
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  align-self: flex-start;
  min-height: 0;
  height: auto;
}

.review-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  justify-content: flex-start;
  box-sizing: border-box;
}

.review-card.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.review-stars {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}

.review-stars i {
  color: #ff6600;
  font-size: 20px;
}

.review-text {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 25px 0;
  font-style: normal;
}

.review-author {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.review-author-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-author-details {
  display: flex;
  flex-direction: column;
}

.review-name {
  font-size: 18px;
  font-weight: 700;
  color: black;
  margin: 0 0 5px 0;
}

.review-role {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.review-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  width: fit-content;
}

.review-navigation-mobile {
  display: none;
}

.review-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
}

.review-nav-btn.prev-btn {
  background: #ff6600;
  color: white;
}

.review-nav-btn.next-btn {
  background: white;
  color: #ff6600;
  border: 1px solid #ff6600;
}

.review-nav-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

@media screen and (max-width: 799px) {
  .reviews-section {
    padding: 50px 20px;
    scroll-margin-top: 120px;
  }
  
  .reviews-container {
    padding: 0 20px;
  }
  
  .reviews-layout {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }
  
  .reviews-image-column {
    flex: 1;
    width: 100%;
  }
  
  .reviews-content-column {
    align-items: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  
  .reviews-header {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .reviews-title {
    font-size: 24px;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }
  
  .reviews-carousel {
    width: 100%;
    max-width: 100%;
    align-self: center;
    margin-left: 0;
    display: block;
    margin-bottom: 0;
    padding-bottom: 0;
    position: relative;
    min-height: 450px;
    transition: height 0.3s ease;
  }
  
  .review-card {
    margin: 0;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    justify-content: flex-start !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .review-card.active {
    position: absolute !important;
    margin-bottom: 0;
    padding-bottom: 0;
    height: auto !important;
    min-height: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
  }
  
  /* Update carousel height based on active card */
  .reviews-carousel:has(.review-card.active) {
    height: auto;
  }
  
  .review-navigation {
    display: none;
  }
  
  .review-navigation-mobile {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    width: 100%;
  }
  
  .review-card {
    padding-bottom: 20px;
  }
  
  /* Ensure carousel maintains height based on active card */
  .reviews-carousel:has(.review-card.active) {
    height: auto;
  }
  
  .reviews-stats-badge {
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
  }
  
  .stats-number {
    font-size: 24px;
  }
  
  .stats-label {
    font-size: 12px;
  }
  
  .review-card {
    padding: 30px 20px 10px 20px;
  }
  
  .review-card.active {
    min-height: 400px;
  }
  
  .review-text {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .review-author {
    margin-top: 5px;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  .reviews-content-column {
    gap: 0;
  }
  
  .review-card {
    padding-bottom: 10px !important;
  }
}

@media screen and (min-width: 800px) {
  .reviews-section {
    padding: 60px 0;
  }
  
  .reviews-container {
    padding: 0 80px;
  }
  
  .reviews-title {
    font-size: 28px;
  }
  
  .review-card {
    padding: 35px;
  }
  
  /* Constrain the content to match Our Process section */
  @media screen and (min-width: 1600px) {
    .reviews-container {
      padding-left: calc((100% - 1400px) / 2);
      padding-right: calc((100% - 1400px) / 2);
    }
  }
}
