/**
 * Tech Testimonials Widget Styles
 *
 * @package BongoHive
 */

/* ==========================================================================
   Base Section
   ========================================================================== */

.bh-tech-testimonials {
  background-color: #f2f2f2;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.bh-tech-testimonials__header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 48px;
}

.bh-tech-testimonials__title {
  color: #111111;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.44px;
  line-height: 1.2;
  margin: 0;
}

/* ==========================================================================
   Social Proof
   ========================================================================== */

.bh-tech-testimonials__proof {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 12px;
}

.bh-tech-testimonials__avatars {
  display: flex;
  flex-shrink: 0;
}

.bh-tech-testimonials__avatar {
  border: 4px solid #ffffff;
  border-radius: 50%;
  height: 48px;
  margin-left: -8px;
  object-fit: cover;
  width: 48px;
}

.bh-tech-testimonials__avatar:first-child {
  margin-left: 0;
}

.bh-tech-testimonials__proof-text {
  color: #606469;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* ==========================================================================
   Swiper Container
   Sits outside .bh-container but uses the same horizontal constraints so
   the active card aligns to the content column while inactive cards peek.
   ========================================================================== */

.bh-tech-testimonials__swiper {
  margin-bottom: 40px;
  overflow: visible !important;
  width: 100%;
}

.bh-tech-testimonials__swiper .swiper-wrapper {
  align-items: flex-start;
}

.bh-tech-testimonials__swiper .swiper-slide {
  height: auto;
  width: 400px;
}

/* ==========================================================================
   Card
   ========================================================================== */

.bh-tech-testimonials__card {
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 325px;
  opacity: 0.5;
  padding: 32px;
  transition: opacity 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.bh-tech-testimonials__swiper .swiper-slide-active .bh-tech-testimonials__card {
  border-color: #d8d8d8;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  opacity: 1;
}

/* ==========================================================================
   Quote Mark
   ========================================================================== */

.bh-tech-testimonials__quote-wrap {
  flex-shrink: 0;
  line-height: 1;
}

.bh-tech-testimonials__quote-mark {
  color: #f0af24;
  display: block;
  font-size: 80px;
  font-weight: 700;
  line-height: 0.65;
}

/* ==========================================================================
   Quote Text
   ========================================================================== */

.bh-tech-testimonials__text {
  color: #444444;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 20px;
  /* padding-top + 5 lines — no bottom padding so overflow clips cleanly */
  max-height: calc(20px + 8em);
  overflow: hidden;
  padding: 20px 0 0;
}

.bh-tech-testimonials__card--expanded .bh-tech-testimonials__text {
  max-height: none;
  overflow: visible;
}

.bh-tech-testimonials__card .bh-tech-testimonials__read-more {
  background-color: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: #f0af24;
  cursor: pointer;
  display: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  padding: 0 0 16px;
  text-align: left;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 2px;
  width: auto;
}

.bh-tech-testimonials__card .bh-tech-testimonials__read-more:hover {
  background-color: transparent;
  color: #c08c1c;
}

.bh-tech-testimonials__card .bh-tech-testimonials__read-more:focus-visible {
  outline: 2px solid #f0af24;
  outline-offset: 2px;
}

.bh-tech-testimonials__card--has-overflow .bh-tech-testimonials__read-more {
  display: inline-block;
}

/* ==========================================================================
   Author Footer
   ========================================================================== */

.bh-tech-testimonials__author-footer {
  align-items: center;
  border-top: 1px solid #d8d8d8;
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
}

.bh-tech-testimonials__author-image {
  border-radius: 4px;
  flex-shrink: 0;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.bh-tech-testimonials__author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bh-tech-testimonials__author-name {
  color: #60460e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.bh-tech-testimonials__author-company {
  color: #7f7f7f;
  font-size: 14px;
  line-height: 1.4;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.bh-tech-testimonials__nav {
  display: flex;
  gap: 12px;
}

.bh-tech-testimonials__prev,
.bh-tech-testimonials__next {
  align-items: center;
  background-color: transparent;
  border: 1px solid #b2b2b2;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  width: 44px;
}

.bh-tech-testimonials__prev:hover,
.bh-tech-testimonials__next:hover {
  background-color: #1d2229;
  border-color: #1d2229;
}

.bh-tech-testimonials__prev:focus-visible,
.bh-tech-testimonials__next:focus-visible {
  outline: 2px solid #1d2229;
  outline-offset: 2px;
}

.bh-tech-testimonials__prev:disabled,
.bh-tech-testimonials__next:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.bh-tech-testimonials__prev svg,
.bh-tech-testimonials__next svg {
  fill: #4c4c4c;
  height: 20px;
  transition: fill 0.2s ease;
  width: 20px;
}

.bh-tech-testimonials__prev:hover svg,
.bh-tech-testimonials__next:hover svg {
  fill: #ffffff;
}

/* ==========================================================================
   Empty / Editor States
   ========================================================================== */

.bh-tech-testimonials__empty {
  color: #606469;
  margin: 40px 0 0;
  text-align: center;
}

.bh-tech-testimonials__editor-notice {
  align-items: center;
  background: #ffffff;
  border: 1px dashed #d8d8d8;
  border-radius: 8px;
  color: #606469;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
  margin-top: 40px;
  padding: 32px;
  text-align: center;
}

.bh-tech-testimonials__editor-notice strong {
  color: #1d2229;
}

/* Editor preview — static flex list, no Swiper active */
.bh-tech-testimonials__swiper--editor {
  display: flex;
  overflow: hidden !important;
}

.bh-tech-testimonials__swiper--editor .swiper-wrapper {
  display: flex;
  gap: 24px;
}

.bh-tech-testimonials__swiper--editor .swiper-slide {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  opacity: 0.5;
}

.bh-tech-testimonials__swiper--editor .swiper-slide.swiper-slide-active {
  opacity: 1;
}

/* ==========================================================================
   Responsive — Tablet (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .bh-tech-testimonials__header {
    margin-bottom: 32px;
  }

  .bh-tech-testimonials__swiper--editor .swiper-slide {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

/* ==========================================================================
   Responsive — Mobile (≤ 640px)
   ========================================================================== */

@media (max-width: 640px) {
  .bh-tech-testimonials__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .bh-tech-testimonials__proof {
    flex-wrap: wrap;
  }

  .bh-tech-testimonials__proof-text {
    white-space: normal;
  }

  .bh-tech-testimonials__card {
    min-height: 280px;
    padding: 24px;
  }

  .bh-tech-testimonials__swiper--editor .swiper-slide {
    flex: 0 0 100%;
    max-width: 100%;
    opacity: 1;
  }

  .bh-tech-testimonials__swiper--editor .swiper-wrapper {
    flex-direction: column;
    gap: 16px;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .bh-tech-testimonials__card,
  .bh-tech-testimonials__prev,
  .bh-tech-testimonials__next,
  .bh-tech-testimonials__prev svg,
  .bh-tech-testimonials__next svg {
    transition: none;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .bh-tech-testimonials {
    background: white;
  }

  .bh-tech-testimonials__nav {
    display: none;
  }

  .bh-tech-testimonials__card {
    opacity: 1;
  }
}
