/* ==========================================================================
   DELEGATE ERP — Client Testimonials Carousel Section ("What Our Customers Say")
   Matches modern school community showcase with peek-edge cards, center focus,
   full review modal & all-testimonials directory modal.
   ========================================================================== */

.clients-section {
  position: relative;
  padding: 84px 0 88px;
  scroll-margin-top: 90px;
  background:
    radial-gradient(ellipse 48% 36% at 12% 4%, rgba(20, 158, 179, 0.12), transparent 72%),
    radial-gradient(ellipse 46% 36% at 88% 6%, rgba(34, 197, 94, 0.10), transparent 72%),
    linear-gradient(180deg, #f3f9fc 0%, #ffffff 34%, #f8fbfd 100%);
  border-top: 1px solid #e4eef5;
  overflow: hidden;
}

.clients-container {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ================= HEADER (Hairline Eyebrow + Highlighted Title) ================= */
.clients-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 0 20px;
}

.clients-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1674b1;
  margin-bottom: 14px;
}

.clients-eyebrow::before,
.clients-eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: #b9d4e6;
}

.clients-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.16;
  color: #0e1e40;
  margin-bottom: 10px;
}

.clients-title span {
  color: #20a4bf;
}

.clients-subtitle {
  font-size: 0.98rem;
  color: #55667a;
  line-height: 1.6;
}

/* ================= CAROUSEL VIEWPORT WITH SOFT EDGE FADES ================= */
.clients-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 16px 0 24px;
}

.clients-carousel-viewport::before,
.clients-carousel-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(32px, 6vw, 96px);
  z-index: 6;
  pointer-events: none;
}

.clients-carousel-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(249, 252, 254, 0.96) 0%, rgba(249, 252, 254, 0) 100%);
}

.clients-carousel-viewport::after {
  right: 0;
  background: linear-gradient(270deg, rgba(249, 252, 254, 0.96) 0%, rgba(249, 252, 254, 0) 100%);
}

.clients-track {
  display: flex;
  align-items: stretch;
  gap: 24px;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  padding: 6px 0;
}

/* ================= INDIVIDUAL CLIENT TESTIMONIAL CARD ================= */
.client-card {
  flex: 0 0 368px;
  background: #ffffff;
  border: 1.2px solid #e6eef5;
  border-radius: 18px;
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 34px -18px rgba(14, 48, 84, 0.14), 0 4px 12px -4px rgba(14, 48, 84, 0.05);
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.32s ease,
    box-shadow 0.36s ease,
    opacity 0.36s ease;
  cursor: pointer;
  opacity: 0.88;
}

.client-card:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -18px rgba(14, 72, 118, 0.2);
}

.client-card.is-center {
  opacity: 1;
  border: 1.6px solid #2b97c9;
  box-shadow:
    0 22px 48px -18px rgba(22, 116, 177, 0.24),
    0 6px 16px -6px rgba(22, 116, 177, 0.1);
}

.client-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.client-crest {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: #f8fbfd;
  border: 1px solid #e3eef6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -4px rgba(14, 30, 64, 0.1);
}

.client-crest svg {
  width: 34px;
  height: 34px;
}

.client-school-meta h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: #0e1e40;
  line-height: 1.25;
  margin-bottom: 3px;
}

.client-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #5b6d82;
}

.client-location svg {
  width: 13px;
  height: 13px;
  color: #1c85ba;
  flex-shrink: 0;
}

.client-quote-mark {
  display: inline-block;
  color: #d4e8f4;
  margin-bottom: 8px;
  line-height: 1;
}

.client-quote-mark svg {
  width: 24px;
  height: 20px;
}

.client-excerpt {
  font-size: 0.89rem;
  line-height: 1.68;
  color: #3f5063;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 0 0 auto;
}

.client-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  color: #1674b1;
  padding: 2px 0;
  margin-bottom: 18px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.client-read-btn:hover {
  color: #0d5a8c;
  gap: 9px;
}

.client-read-btn svg {
  width: 14px;
  height: 14px;
}

.client-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #edf3f8;
}

.client-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(14, 30, 64, 0.14);
}

.client-author-meta strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0e1e40;
  line-height: 1.25;
}

.client-author-meta span {
  display: block;
  font-size: 0.77rem;
  color: #637487;
  line-height: 1.35;
}

/* ================= CAROUSEL CONTROLS & VIEW ALL CTA ================= */
.clients-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 0 20px;
}

.clients-nav-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.clients-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d7ebf6;
  color: #13689e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.clients-arrow-btn:hover {
  background: #1674b1;
  color: #ffffff;
  transform: scale(1.06);
}

.clients-arrow-btn svg {
  width: 17px;
  height: 17px;
}

.clients-browse-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4f6073;
}

.clients-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1.4px solid #75b7db;
  background: #ffffff;
  color: #1674b1;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(22, 116, 177, 0.35);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.clients-view-all-btn:hover {
  background: #1674b1;
  border-color: #1674b1;
  color: #ffffff;
  transform: translateY(-2px);
}

.clients-view-all-btn svg {
  width: 15px;
  height: 15px;
}

/* ================= CLIENT REVIEW & ALL TESTIMONIALS MODALS ================= */
.client-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(11, 24, 38, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.client-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.client-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #d9eaf5;
  padding: 28px;
  box-shadow: 0 28px 64px -18px rgba(10, 24, 42, 0.36);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.client-modal-dialog--wide {
  width: min(1040px, 100%);
}

.client-modal-overlay.is-open .client-modal-dialog {
  transform: translateY(0) scale(1);
}

.client-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #dce8f2;
  background: #f5fafd;
  color: #0e1e40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.client-modal-close:hover {
  background: #0e1e40;
  color: #ffffff;
}

.client-modal-close svg {
  width: 16px;
  height: 16px;
}

.client-modal-stars {
  display: inline-flex;
  gap: 4px;
  color: #f59e0b;
  margin-bottom: 12px;
}

.client-modal-stars svg {
  width: 16px;
  height: 16px;
}

.client-modal-fulltext {
  font-size: 0.96rem;
  line-height: 1.72;
  color: #2f4054;
  margin: 14px 0 18px;
}

.client-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.client-modal-tags span {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: #edf7fc;
  color: #1674b1;
  border: 1px solid #d4eaf6;
}

.all-clients-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.all-clients-grid .client-card {
  flex: initial;
  width: 100%;
  opacity: 1;
  cursor: default;
}

.all-clients-grid .client-excerpt {
  -webkit-line-clamp: unset;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .client-card {
    flex: 0 0 330px;
    padding: 22px;
  }

  .all-clients-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .clients-section {
    padding: 64px 0 68px;
  }

  .clients-carousel-viewport::before,
  .clients-carousel-viewport::after {
    width: 20px;
  }

  .client-card {
    flex: 0 0 min(306px, calc(100vw - 44px));
    padding: 20px;
  }

  .clients-eyebrow {
    gap: 10px;
    font-size: 0.68rem;
  }

  .clients-eyebrow::before,
  .clients-eyebrow::after {
    width: 20px;
  }
}
