/**
 * Synaptic Analysis Academy — Modern Testimonials & Lightbox Styles
 * Design Tokens: Deep Forest Green (#063022), Gold (#c5a86c), Clean Surfaces
 */

.testimonials-section {
  padding: 4.5rem 0 5rem;
  background: var(--bg, #f5f8f6);
}

.testimonials-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.testimonials-header .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5a86c;
  margin-bottom: 0.75rem;
}

.testimonials-header h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: #063022;
  margin: 0 0 1rem;
}

.testimonials-header h1 em {
  font-style: normal;
  color: #c5a86c;
}

.testimonials-header p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #51635b;
  margin: 0;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.testimonial-card {
  background: #ffffff;
  border: 1px solid rgba(6, 48, 34, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(6, 48, 34, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  outline: none;
}

.testimonial-card:hover,
.testimonial-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(6, 48, 34, 0.12);
  border-color: #c5a86c;
}

.testimonial-card-header {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(6, 48, 34, 0.08);
  background: #ffffff;
}

.testimonial-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #063022;
  background: rgba(6, 48, 34, 0.08);
  border: 1px solid rgba(6, 48, 34, 0.18);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.testimonial-badge svg {
  width: 14px;
  height: 14px;
  color: #c5a86c;
}

.testimonial-zoom-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #7a8c84;
  font-weight: 600;
  transition: color 0.18s ease;
}

.testimonial-card:hover .testimonial-zoom-hint {
  color: #c5a86c;
}

.testimonial-image-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
  background: #fafcfb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.testimonial-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(6, 48, 34, 0.06);
  transition: transform 0.25s ease;
}

.testimonial-card:hover .testimonial-image-wrapper img {
  transform: scale(1.025);
}

.testimonial-overlay-hover {
  position: absolute;
  inset: 0;
  background: rgba(6, 48, 34, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.testimonial-card:hover .testimonial-overlay-hover {
  opacity: 1;
}

.testimonial-overlay-btn {
  background: #ffffff;
  color: #063022;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid #c5a86c;
}

.testimonial-overlay-btn svg {
  width: 16px;
  height: 16px;
  color: #c5a86c;
}

.testimonial-card-footer {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid rgba(6, 48, 34, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #51635b;
}

.testimonial-card-footer span {
  font-weight: 600;
}

.testimonial-stars {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
  flex-shrink: 0;
}

/* CTA Bridge Panel */
.testimonials-cta-bridge {
  margin-top: 4rem;
  background: linear-gradient(135deg, rgba(6, 48, 34, 0.06) 0%, rgba(197, 168, 108, 0.1) 100%);
  border: 1px solid #c5a86c;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.testimonials-cta-bridge h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #063022;
  margin: 0;
}

.testimonials-cta-bridge p {
  color: #51635b;
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Full-Screen Testimonial Lightbox / Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 28, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightboxPop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 82vh;
  max-width: 88vw;
}

.lightbox-img {
  max-height: 80vh;
  max-width: 86vw;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(197, 168, 108, 0.5);
  background: #ffffff;
}

.lightbox-close-btn {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  outline: none;
}

.lightbox-close-btn:hover,
.lightbox-close-btn:focus-visible {
  background: #c5a86c;
  color: #063022;
  border-color: #c5a86c;
  transform: rotate(90deg);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(6, 48, 34, 0.85);
  border: 1px solid rgba(197, 168, 108, 0.4);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  z-index: 3;
  outline: none;
}

.lightbox-nav-btn:hover,
.lightbox-nav-btn:focus-visible {
  background: #c5a86c;
  color: #063022;
  border-color: #c5a86c;
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev-btn {
  right: -64px;
}

.lightbox-next-btn {
  left: -64px;
}

.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(6, 48, 34, 0.85);
  border: 1px solid rgba(197, 168, 108, 0.3);
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
}

/* RTL Layout adjustments for lightbox navigation */
[dir="rtl"] .lightbox-close-btn {
  right: auto;
  left: 0;
}

[dir="rtl"] .lightbox-prev-btn {
  right: auto;
  left: -64px;
}

[dir="rtl"] .lightbox-next-btn {
  left: auto;
  right: -64px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .lightbox-prev-btn {
    right: -12px;
  }
  .lightbox-next-btn {
    left: -12px;
  }
  [dir="rtl"] .lightbox-prev-btn {
    left: -12px;
  }
  [dir="rtl"] .lightbox-next-btn {
    right: -12px;
  }
}

@media (max-width: 640px) {
  .testimonials-section {
    padding: 3rem 0 4rem;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .testimonial-image-wrapper {
    height: 320px;
  }
  .testimonials-cta-bridge {
    padding: 2rem 1.25rem;
  }
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
  }
}
