/* Testimonial Section Custom CSS */

/* Grids */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 48px 0;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  margin: 64px 0;
}

@media (min-width: 992px) {
  .split-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Page Header */
.page-header {
  padding: 140px 0 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: var(--gradient-glow);
  filter: blur(100px);
  border-radius: 50%;
  z-index: -1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-light);
  transition: color 0.3s ease;
}
.breadcrumb a:hover {
  color: var(--accent-primary);
}

/* Stats Box */
.stats-box {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.stats-box i {
  color: var(--brand-color2);
  margin-bottom: 24px;
}

.stats-box h2 {
  font-size: 3rem;
  color: #064E3B;
  margin-bottom: 8px;
  line-height: 1.1;
}

.stats-box p {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  font-size: 1.1rem;
}

/* Video Box */
.video-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.video-box img {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-height: 400px;
}

.video-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--brand-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 10px rgba(6, 78, 59, 0.2);
  transition: var(--transition-base);
  color: #fff;
  z-index: 2;
  cursor: pointer;
}

.video-btn:hover {
  background: var(--brand-color2);
  box-shadow: 0 0 0 15px rgba(5, 150, 105, 0.3);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.05);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 32px 24px 24px 24px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  z-index: 1;
}

/* Testimonial Cards */
.testimonial-card-v2 {
  padding: 32px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-top-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.star-rating {
  color: #FBBF24; /* Golden yellow */
  display: flex;
  gap: 4px;
}

.testimonial-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand-color2);
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.testimonial-card-v2 .quote-text {
  flex-grow: 1;
  color: black;
  line-height: 1.6;
  font-size: 1.05rem;
  margin: 12px 0 24px 0;
  font-style: italic;
}

.client-info {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.client-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-color2);
}

.client-details {
  padding-left: 16px;
}

.client-details h6 {
  margin: 0 0 4px 0;
  color: #FC4C02;
  font-size: 1.1rem;
}

.client-details .muted-text {
  color: var(--text-dark);
  font-size: 0.85rem;
  display: block;
}

/* Fi-style Testimonial Carousel */
.fi-testimonial-section {
  position: relative;
  max-width: 900px;
  margin: 40px auto 0 auto;
  padding: 0 15px;
}

.fi-avatars-container {
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Align at the bottom so the arc peaks in the center */
  gap: 20px;
  height: 140px; /* Space for the largest avatar */
  margin-bottom: -50px; /* Overlap with the card below */
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .fi-avatars-container {
    gap: 10px;
  }
}

.fi-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
  transform: translateY(0);
}

.fi-avatar.near-active {
  width: 80px;
  height: 80px;
  opacity: 0.8;
  transform: translateY(-15px); /* slight arc */
}

.fi-avatar.active-avatar {
  width: 120px;
  height: 120px;
  border: 4px solid var(--brand-color2, #059669);
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.4);
  opacity: 1;
  transform: translateY(-30px); /* Highest point of arc */
  z-index: 3;
}

@media (max-width: 768px) {
  .fi-avatar { width: 45px; height: 45px; }
  .fi-avatar.near-active { width: 60px; height: 60px; transform: translateY(-10px); }
  .fi-avatar.active-avatar { width: 90px; height: 90px; transform: translateY(-20px); border-width: 3px;}
}

.fi-testimonial-card {
  background: var(--glass-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 70px 40px 40px 40px; /* Top padding extra large to accommodate overlapping avatar */
  position: relative;
  z-index: 1;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

.fi-client-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #FC4C02;
}

.fi-client-location {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark, #6b7280);
}

.fi-client-location i {
  color: var(--brand-color2, #059669);
  margin-right: 4px;
}

.fi-carousel-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.fi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand-color2, #059669);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fi-dot.active-dot {
  width: 32px;
  border-radius: 6px;
  background: var(--brand-color2, #059669);
}

/* Content Fade Transition */
.fi-fade-content {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.fi-fade-content.fi-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Share Experience Form */
.feedback-box {
  margin-top: 64px;
  padding: 48px;
}

.feedback-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feedback-full {
  grid-column: 1 / -1;
}

.feedback-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  font-family: inherit;
  transition: border-color var(--transition-base);
}

.feedback-input:focus {
  outline: none;
  border-color: var(--brand-color2);
}

.feedback-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.feedback-btn {
  width: 100%;
}

@media (max-width: 768px) {
  .feedback-form {
    grid-template-columns: 1fr;
  }
}

/* Video Modal & Animation */
.video-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.show {
  display: flex;
  opacity: 1;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 500px;
  background: var(--bg-dark, #0f172a);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
}

.video-close-btn {
  position: absolute;
  top: 16px;
  right: 24px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.video-close-btn:hover {
  color: var(--accent-primary, #ef4444);
}

.story-scene {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

.story-scene h2 { font-size: 2.5rem; margin-bottom: 1rem; color: white; }
.story-scene p { font-size: 1.2rem; color: #94a3b8; max-width: 600px; margin: 0 auto; }

.story-highlight { color: var(--brand-color2, #10b981); }
.story-alert { color: #ef4444; }

@keyframes storyFadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}
@keyframes storyFadeInHold {
  0% { opacity: 0; transform: scale(0.95); }
  15% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

.video-modal.playing #scene1 { animation: storyFadeInOut 4s ease-in-out forwards; animation-delay: 0.5s; }
.video-modal.playing #scene2 { animation: storyFadeInOut 4s ease-in-out forwards; animation-delay: 4.5s; }
.video-modal.playing #scene3 { animation: storyFadeInOut 4s ease-in-out forwards; animation-delay: 8.5s; }
.video-modal.playing #scene4 { animation: storyFadeInHold 4s ease-in-out forwards; animation-delay: 12.5s; }

.story-chart {
  width: 200px; height: 100px;
  margin: 2rem auto 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}
.story-bar {
  width: 30px;
  background: #ef4444;
  border-radius: 4px 4px 0 0;
  transition: height 1s ease;
}
.story-b1 { height: 60px; } .story-b2 { height: 20px; } .story-b3 { height: 80px; } .story-b4 { height: 30px; }

.story-chart-up .story-bar { background: var(--brand-color2, #10b981); }
.video-modal.playing .story-chart-up .story-b1 { height: 30px; } 
.video-modal.playing .story-chart-up .story-b2 { height: 50px; } 
.video-modal.playing .story-chart-up .story-b3 { height: 70px; } 
.video-modal.playing .story-chart-up .story-b4 { height: 100px; }
