/* Reviews Section Styles */

.reviews-section {
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  width: 100%;
}

.reviews-section > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.reviews-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  
  color: #000000;
}

.reviews-header {
  text-align: center;
  margin-bottom: 10px;
}

.rating-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.google-rating {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgb(255, 255, 255);
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-logo {
  width: 40px;
  height: 40px;
}

.rating-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stars {
  display: flex;
  gap: 3px;
}

.star {
  font-size: 24px;
  color: #ddd;
}

.star.filled {
  color: #fbbc04;
}

.star.partial {
  background: linear-gradient(90deg, #fbbc04 0%, #fbbc04 70%, #ddd 50%, #ddd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rating-text {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.review-link {
  margin-top: 15px;
  display: inline-block;
  color: #007bff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border: 2px solid #007bff;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.review-link:hover {
  background: #007bff;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.reviews-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 25px;
}

.review-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid #007bff;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.reviewer-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.reviewer-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.reviewer-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reviewer-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars .star {
  font-size: 16px;
}

.review-date {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}

.review-text {
  color: #555;
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .reviews-section {
    padding: 40px 15px;
  }

  .reviews-section h2 {
    font-size: 2rem;
  }

  .reviews-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .google-rating {
    flex-direction: column;
    text-align: center;
    padding: 15px 20px;
  }

  .rating-info {
    align-items: center;
  }

  .review-header {
    flex-direction: column;
    gap: 10px;
  }

  .review-date {
    align-self: flex-start;
    margin-left: 57px;
  }
}

/* iPad / tablet specific: ensure review cards wrap into two columns and don't overflow */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .reviews-section {
    padding: 50px 16px;
    overflow: visible;
  }

  .reviews-container {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 24px;
    justify-items: stretch;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
  }

  .review-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .reviews-section h2 {
    font-size: 1.75rem;
  }

  .review-card {
    padding: 20px;
  }

  .review-link {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* Desktop layout: link left, reviews center, rating right */
.reviews-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  .reviews-layout {
    display: grid;
    grid-template-columns:
      clamp(180px, 18vw, 220px)
      minmax(0, 1fr)
      clamp(180px, 18vw, 220px);
    grid-template-areas: "rating reviews link";
    gap: 20px;
    align-items: start;
  }

  .review-link {
    grid-area: link;
    align-self: center;
    justify-self: end;
    margin-top: 0;
    width: 100%;
    max-width: 220px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .reviews-container {
    grid-area: reviews;
    margin-top: 0;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .rating-summary {
    grid-area: rating;
    align-self: center;
    justify-self: start;
    width: 100%;
    max-width: 220px;
  }
}

@media (min-width: 1300px) {
  .reviews-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
