/* Testimonials Section Styles */

/**
 * Combined testimonials component styles
 * Integrates Google Reviews Widget + Trustpilot Reviews
 * Uses brand color system and CSS variables from animations.css
 * Enhances Tailwind utility classes with specific animations and effects
 * Merged from reviews.css for complete Trustpilot styling
 */

/* ========== Testimonials Section Layout ========== */
.testimonials-section {
  position: relative;
  overflow: hidden;
  /* Very light orange background gradient for subtle warmth */
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.3) 0%, rgba(254, 215, 170, 0.2) 100%);
}

/* Seamless Transition Gradients */
.testimonials-section .absolute.top-0 {
  /* Blue gradient at top for seamless transition from above section */
  background: linear-gradient(to bottom, var(--color-primary-50) 0%, transparent 100%);
  z-index: 5;
}

.testimonials-section .absolute.bottom-0 {
  /* Blue gradient at bottom for seamless transition to below section */
  background: linear-gradient(to top, var(--color-primary-50) 0%, transparent 100%);
  z-index: 5;
}

/* Google Reviews Widget Container */
.google-reviews-widget {
  position: relative;
  z-index: 10;
}

.google-reviews-widget > div {
  /* Light orange background for contrast */
  backdrop-filter: blur(10px);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.google-reviews-widget:hover > div {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(235, 93, 20, 0.1), 0 10px 10px -5px rgba(235, 93, 20, 0.04);
}

/* Trustpilot Reviews Integration */
.trustpilot-reviews {
  /* Light orange background matching Google Reviews */
  position: relative;
  z-index: 10;
  transition: all var(--duration-normal) var(--ease-smooth);
}

.trustpilot-reviews:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(235, 93, 20, 0.1), 0 10px 10px -5px rgba(235, 93, 20, 0.04);
}

/* ========== TRUSTPILOT-STYLE REVIEWS SECTION (from reviews.css) ========== */
.tp-reviews-section {
  font-family: inherit;
}

.tp-trustscore {
  min-width: 160px;
  max-width: 220px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.07);
  border: 1px solid #e5e7eb;
  padding: 1rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-trustscore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.12);
}

.tp-trustscore img {
  display: block;
  margin: 0 auto;
}

.tp-reviews-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tp-reviews-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .tp-reviews-list {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.tp-review-card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem !important;
  min-width: 0;
}

.tp-review-card:hover {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.tp-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  letter-spacing: 1px;
}

.tp-review-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.tp-review-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.2rem;
}

.tp-review-card .text-xs {
  font-size: 0.75rem;
}

.tp-review-card .ml-auto {
  margin-left: auto;
}

.tp-readmore {
  color: var(--color-primary-600);
  text-decoration: underline;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}

.tp-readmore:hover {
  color: var(--color-primary-700);
}

/* Clamp review text to 5 lines */
.line-clamp-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== REVIEW CARD COMPONENTS (from reviews.css) ========== */
.review-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(92, 225, 230, 0.1);
  border-radius: 16px;
  box-shadow: 
    0 4px 6px -1px rgba(92, 225, 230, 0.08),
    0 2px 4px -1px rgba(124, 186, 209, 0.04);
  backdrop-filter: blur(10px);
  padding: 1rem !important;
  transition: all var(--duration-normal, 0.3s) var(--ease-smooth, ease);
}

.review-card:hover {
  transform: translateY(var(--lift-small, -2px));
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(92, 225, 230, 0.2);
}

.review-trustpilot-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(92, 225, 230, 0.1);
  border-radius: 16px;
  box-shadow: 
    0 4px 6px -1px rgba(92, 225, 230, 0.08),
    0 2px 4px -1px rgba(124, 186, 209, 0.04);
  backdrop-filter: blur(10px);
  padding: 1rem !important;
  transition: all var(--duration-normal, 0.3s) var(--ease-smooth, ease);
}

.review-trustpilot-card:hover {
  transform: translateY(var(--lift-small, -2px));
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(92, 225, 230, 0.2);
}

.review-stars {
  margin-bottom: 0.15rem;
}

/* ========== PROGRESS BARS FOR TRUSTSCORE ========== */
.progress-width-89 {
  width: 89%;
  height: 100%;
  display: block;
  transition: width 0.6s ease;
}

.progress-width-5 {
  width: 5%;
  height: 100%;
  display: block;
  transition: width 0.6s ease;
}

.progress-width-0 {
  width: 0%;
  height: 100%;
  display: block;
  transition: width 0.6s ease;
}

.progress-width-6 {
  width: 6%;
  height: 100%;
  display: block;
  transition: width 0.6s ease;
}

.progress-bar-green {
  background-color: #00b67a;
}

.progress-bar-green-light {
  background-color: #73cf99;
}

.progress-bar-yellow {
  background-color: #ffc94d;
}

.progress-bar-orange {
  background-color: #ff8c42;
}

.progress-bar-red {
  background-color: #ff3722;
}

/* ========== Decorative Background Elements ========== */
.testimonials-blob-1 {
  position: absolute;
  top: 10%;
  right: -5%;
  width: 12rem;
  height: 12rem;
  background: var(--color-accent-200);
  opacity: 0.3;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  animation: float-gentle 12s ease-in-out infinite;
}

.testimonials-blob-2 {
  position: absolute;
  bottom: 15%;
  left: -8%;
  width: 16rem;
  height: 16rem;
  background: var(--color-accent-300);
  opacity: 0.25;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  animation: float-gentle 15s ease-in-out infinite reverse;
}

@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  33% {
    transform: translateY(-20px) translateX(10px);
  }
  66% {
    transform: translateY(-10px) translateX(-15px);
  }
}

/* ========== Enhanced Widget Styling ========== */
.testimonials-section .google-reviews-widget [class*="grw"] {
  /* Override plugin styles with brand colors if needed */
  border-radius: 1rem !important;
}

/* ========== Responsive Design ========== */
@media (max-width: 1023px) {
  .tp-reviews-section .container {
    flex-direction: column;
    align-items: stretch;
  }
  .tp-trustscore {
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .testimonials-section h2 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .testimonials-section p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .google-reviews-widget > div {
    padding: 1rem;
  }
  
  /* Adjust decorative blobs for mobile */
  .testimonials-blob-1,
  .testimonials-blob-2 {
    width: 8rem;
    height: 8rem;
    filter: blur(40px);
  }
}

/* ========== Accessibility & Focus States ========== */
.testimonials-section [tabindex="0"]:focus,
.testimonials-section button:focus,
.testimonials-section a:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* ========== High Contrast Support ========== */
@media (prefers-contrast: high) {
  .testimonials-section {
    border-top: 3px solid var(--color-primary-600);
    border-bottom: 3px solid var(--color-primary-600);
  }
  
  .google-reviews-widget > div {
    border: 2px solid var(--color-primary-500);
  }
}

/* ========== Reduced Motion Support ========== */
@media (prefers-reduced-motion: reduce) {
  .testimonials-section *,
  .testimonials-blob-1,
  .testimonials-blob-2 {
    animation: none !important;
    transition: none !important;
  }
  
  .google-reviews-widget:hover > div {
    transform: none !important;
  }
}
