/* Google Reviews Section Styling */

/* Reviews Container */
.reviews-container {
  width: 100%;
  margin-top: 2rem;
  overflow: hidden;
}

/* Review Card */
.review-card {
  background: var(--background-color-alt, #f8f9fa);
  border-radius: var(--radius-md, 8px);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm, 0 2px 5px rgba(0,0,0,0.1));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.15));
}

/* Review Header */
.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.review-header img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
  border: 2px solid var(--primary-color, #4a90e2);
}

.review-header h4 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--text-color, #333);
}

/* Stars Rating */
.stars {
  color: #ffb400;
  margin-top: 0.25rem;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

/* Review Text */
.review-text {
  margin: 0;
  flex-grow: 1;
  line-height: 1.6;
  color: var(--text-color, #333);
}

/* Review Date */
.review-date {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-color-muted, #666);
}

/* Loading Message */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-color-muted, #666);
  grid-column: 1 / -1;
}

/* Error Message */
.review-error {
  text-align: center;
  padding: 2rem;
  color: #e74c3c;
  grid-column: 1 / -1;
}

/* Reviews Footer */
.reviews-footer {
  margin-top: 2rem;
  text-align: center;
}

/* Review Button */
.reviews-footer .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm, 4px);
}

.reviews-footer .button i {
  color: #ffb400;
}

/* Fix for white box in footer */
#footer .clinic-logo,
#footer .contact-info .clinic-logo {
  background: none !important;
  box-shadow: none !important;
}

/* Fix for white box in loading div */
.loading,
#google-reviews .loading,
#reviews-section div {
  background: transparent !important;
  box-shadow: none !important;
}

/* Fix for back to top button */
#static-back-to-top {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  transition: opacity 0.3s ease;
}

/* Ensure svg inside back to top is visible */
#static-back-to-top svg {
  fill: #00bfb3;
  background: transparent;
}

/* Remove extra space at the bottom of the page */
body.is-loading {
  min-height: auto !important;
  height: auto !important;
}

#wrapper {
  min-height: auto !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

#footer {
  margin-top: 0 !important;
}

/* Target pagination and progress bar specifically */
.reviews-nav-buttons {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  height: 50px !important;
}

/* Hide progress bar and extra elements at bottom */
#reviews-grid + div,
#reviews-grid ~ div:not(.reviews-nav-buttons),
.reviews-grid-container + div:not(.reviews-nav-buttons),
[role="progressbar"],
input[type="range"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
}

/* Ensure no extra space after reviews container */
.reviews-container {
  margin-bottom: 0 !important;
}

/* Target the specific blue progress bar in the screenshot */
div:not(#reviews-grid):not(.reviews-nav-buttons) > div[role="progressbar"],
div > span[role="progressbar"],
.progress-bar,
.slider {
  display: none !important;
}

/* Section Title and Description */
#reviews-section .section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

#reviews-section .section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--text-color-muted, #666);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .reviews-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Animation for new reviews loading */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.review-card {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.review-card:nth-child(2) { animation-delay: 0.1s; }
.review-card:nth-child(3) { animation-delay: 0.2s; }
.review-card:nth-child(4) { animation-delay: 0.3s; }
.review-card:nth-child(5) { animation-delay: 0.4s; }
