/* ============================================
   Google Reviews Widget — Styles
   Inspired by faranitaylor.com testimonials
   ============================================ */

/* --- Global Reset --- */
* {
  box-sizing: border-box;
}

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Section Container --- */
.reviews-section {
  padding: 80px 5%;
  background-color: #f9f9f9;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

.reviews-subtitle {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: #b89a5a;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.reviews-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

/* --- Main Layout: Summary (left) + Carousel (right) --- */
.reviews-container {
  display: flex;
  align-items: stretch;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Left: Rating Summary Badge --- */
.reviews-summary {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.rating-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.rating-stars-summary {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  justify-content: center;
}

.rating-stars-summary .star {
  color: #f5a623;
  font-size: 1.5rem;
}

.rating-count {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 16px;
  line-height: 1.5;
}

.rating-count strong {
  color: #1a1a1a;
  text-decoration: underline;
}

.google-logo {
  width: 90px;
  height: auto;
  opacity: 0.9;
}

/* --- Right: Carousel Wrapper --- */
.reviews-carousel-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.reviews-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 16px 40px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.reviews-carousel::-webkit-scrollbar {
  display: none;
}

/* --- Review Card --- */
.review-card {
  flex-shrink: 0;
  width: 300px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  scroll-snap-align: center;
}

.review-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* --- Card Header: Avatar + Name + Google icon --- */
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #e0e0e0;
}

/* Fallback initial circle when no avatar */
.review-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.review-author-info {
  flex: 1;
  min-width: 0;
}

.review-author {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

.review-google-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* --- Star Rating Row --- */
.review-stars {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-bottom: 12px;
}

.review-stars .star {
  color: #f5a623;
  font-size: 1rem;
}

.review-stars .star.empty {
  color: #ddd;
}

.review-verified {
  margin-left: 6px;
  font-size: 0.8rem;
  color: #4285f4;
}

/* --- Review Text --- */
.review-text {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.65;
  flex: 1;
  word-break: break-word;
}

.review-readmore {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #b89a5a;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.review-readmore:hover {
  color: #8a7340;
  text-decoration: underline;
}

/* --- Carousel Navigation Buttons --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carousel-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: #bbb;
}

.carousel-btn-left {
  left: -4px;
}

.carousel-btn-right {
  right: -4px;
}

/* --- "See all reviews" Link --- */
.reviews-see-all {
  display: inline-block;
  margin-top: 36px;
  color: #b89a5a;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.reviews-see-all:hover {
  color: #8a7340;
  text-decoration: underline;
}

/* --- Loading State --- */
.reviews-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #999;
  font-size: 0.9rem;
}

.reviews-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e8e8e8;
  border-top-color: #b89a5a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Error State --- */
.reviews-error {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
  .reviews-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .reviews-summary {
    width: 100%;
    max-width: 600px;
    flex-direction: row;
    justify-content: space-evenly;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 20px;
  }
  .reviews-carousel-wrapper {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 600px) {
  .reviews-section {
    padding: 40px 15px;
  }
  .reviews-title {
    font-size: 1.8rem;
    margin-bottom: 24px;
  }
  .reviews-summary {
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
  }
  .google-logo {
    margin-top: 8px;
  }
  .reviews-carousel {
    padding: 16px 24px;
    gap: 16px;
  }
  .review-card {
    width: 80vw;
    max-width: 320px;
    padding: 20px;
  }
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
  .carousel-btn-left {
    left: -10px;
  }
  .carousel-btn-right {
    right: -10px;
  }
}

@media (max-width: 400px) {
  .reviews-title {
    font-size: 1.5rem;
  }
  .reviews-subtitle {
     font-size: 0.7rem;
     letter-spacing: 2px;
  }
  .review-card {
    width: 85vw;
  }
}

