/* =================================================================
   testimonials-block.css — Bluworks v2
   ================================================================= */

/* ── Section Structure ──────────────────────────────────────────── */
.testimonials-section {
  padding: clamp(64px, 8vw, 96px) 0;
  background: #FFFFFF;
}

.testimonials-section .container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.testimonials-section .section-head {
  text-align: center;
  max-width: 920px;
  margin: 0 auto 40px;
}

.testimonials-section .section-head h2 {
  font-family: 'Neue Haas Grotesk Display', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: #0A0F1E;
  margin: 0 auto;
  text-align: center;
}

html[dir="rtl"] .testimonials-section .section-head h2 {
  font-family: 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  letter-spacing: 0;
  line-height: 1.25;
}

/* ── Carousel Full Bleed ────────────────────────────────────────── */
.testimonials-section .testimonials-carousel,
.testimonials-section > .container > .testimonials-carousel {
  max-width: 100vw !important;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%) !important;
  mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%) !important;
}

.testimonials-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 64px;
  margin: 0 0 28px;
}

/* ── Navigation Buttons ─────────────────────────────────────────── */
.testimonials-carousel .t-carousel-btn {
  display: inline-flex !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E4E8F3;
  color: #0A0F1E;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(10, 15, 30, 0.08);
  transition: background 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.testimonials-carousel .t-carousel-btn:hover {
  background: #1E50E5;
  color: #fff !important;
  border-color: #1E50E5;
}

.testimonials-carousel .t-carousel-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.testimonials-carousel .t-carousel-btn svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

.testimonials-carousel .t-carousel-prev { left: 8px; }
.testimonials-carousel .t-carousel-next { right: 8px; }
.testimonials-carousel .t-carousel-prev svg { transform: scaleX(-1); }

html[dir="rtl"] .testimonials-carousel .t-carousel-prev { left: auto; right: 8px; }
html[dir="rtl"] .testimonials-carousel .t-carousel-next { right: auto; left: 8px; }
html[dir="rtl"] .testimonials-carousel .t-carousel-prev svg { transform: none; }
html[dir="rtl"] .testimonials-carousel .t-carousel-next svg { transform: scaleX(-1); }

@media (max-width: 720px) {
  .testimonials-carousel .t-carousel-btn {
    display: none !important;
  }
  .testimonials-carousel {
    padding: 0 16px;
  }
  /* Card was 380px but carousel padding leaves only ~358px — cap it */
  .testimonials-carousel .testimonial {
    width: min(380px, calc(100vw - 32px)) !important;
  }
}

/* ── Carousel Track ─────────────────────────────────────────────── */
.testimonials-carousel .t-carousel-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 28px;
  padding-right: 28px;
  align-items: stretch !important;
}

.testimonials-carousel .t-carousel-track::-webkit-scrollbar {
  display: none;
}

/* ── Testimonial Cards ──────────────────────────────────────────── */
.testimonials-carousel .testimonial {
  flex: 0 0 auto;
  width: 380px !important;
  min-height: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 28px !important;
  background: #1E50E5 !important;
  color: #fff !important;
  border-radius: 12px !important;
  scroll-snap-align: start;
  gap:16px;
}

/* Fix for borders and fonts inside blockquotes */
.testimonials-carousel .testimonial blockquote {
  border: none !important;
  border-left: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  margin: 14px 0 16px !important;
  flex: 1 1 auto;
  color: #fff !important;
  font-weight: 500 !important; /* Readability weight on blue background */
  font-style: normal !important;
  
  /* FORCES the brand font to override Kadence system-sans defaults */
  font-family: 'Neue Haas Grotesk Display', 'Helvetica Neue', Arial, sans-serif !important;
}

/* RTL: FORCES Noto Sans Arabic for translation pages */
html[dir="rtl"] .testimonials-carousel .testimonial blockquote {
  font-family: 'Noto Sans Arabic', 'Segoe UI', sans-serif !important;
}

/* ── Author Area ────────────────────────────────────────────────── */
.testimonials-carousel .testimonial .author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonials-carousel .testimonial .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.testimonials-carousel .testimonial .avatar.avatar-img {
  background: transparent;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.testimonials-carousel .testimonial .avatar.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.testimonials-carousel .testimonial .author-info {
  display: flex;
  flex-direction: column;
}

.testimonials-carousel .testimonial .author-info .name {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
}

.testimonials-carousel .testimonial .author-info .title {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500 !important;
}

/* ── Call to Action Button ──────────────────────────────────────── */
.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-top: 8px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E4E8F3;
  color: #0A0F1E;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 220ms ease, border-color 220ms ease;
  white-space: nowrap;
}

.btn-cta:hover {
  background: #FAFBFD;
  border-color: #0A0F1E;
  color:black;
}

.btn-yt-icon {
  width: 22px;
  height: 22px;
  color: #FF0000;
  flex-shrink: 0;
}

.btn-arrow {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 3.5px !important;
  flex-shrink: 0;
  transition: transform 220ms ease;
}

.btn-cta:hover .btn-arrow {
  transform: translateX(3px);
}

html[dir="rtl"] .btn-arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] .btn-cta:hover .btn-arrow {
  transform: scaleX(-1) translateX(3px);
}


/* =================================================================
   GUTENBERG PREVIEW STYLES
   Ensures the block looks beautiful and is readable inside the editor.
   ================================================================= */

/* 1. Hide Carousel navigation buttons in Gutenberg */
.editor-styles-wrapper .t-carousel-btn,
.acf-block-preview .t-carousel-btn {
  display: none !important;
}

/* 2. Unmask overflow, let cards container fit the editor frame */
.editor-styles-wrapper .testimonials-carousel,
.acf-block-preview .testimonials-carousel {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  padding: 0 !important;
}

/* 3. Turn the scroll track into a 2-column Grid inside the editor */
.editor-styles-wrapper .t-carousel-track,
.acf-block-preview .t-carousel-track {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  overflow: visible !important;
  padding: 0 !important;
  width: 100% !important;
}

/* 4. Ensure card background, borders, blockquotes are explicitly styled */
.editor-styles-wrapper .testimonial,
.acf-block-preview .testimonial {
  background: #1E50E5 !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 24px !important;
  width: 100% !important;
}

.editor-styles-wrapper .testimonial blockquote,
.acf-block-preview .testimonial blockquote {
  color: #ffffff !important;
  border: none !important;
  border-left: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 12px 0 0 !important;
}

.editor-styles-wrapper .testimonial .author-info .name,
.acf-block-preview .testimonial .author-info .name {
  color: #ffffff !important;
}

.editor-styles-wrapper .testimonial .author-info .title,
.acf-block-preview .testimonial .author-info .title {
  color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 600px) {
  .editor-styles-wrapper .t-carousel-track,
  .acf-block-preview .t-carousel-track {
    grid-template-columns: 1fr !important;
  }
}