/* NexDesk — Testimonials (Carousel + Grid + Modal) */

/* FIX: all rgba alphas must be 0.xx not xx */
.nx-testimonials{
  padding: 90px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #f6f7fb; /* soft section background */
}

.nx-testimonials .nx-container {
  max-width: 1100px;
}

.nx-testimonials-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 20px;
}

.nx-testimonials-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.nx-testimonials-head p {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.75;
}

/* CTA */
.nx-t-cta {
  display: flex;
  justify-content: center;
  margin: 14px 0 8px;
}

.nx-t-open {
  border: 1px solid rgba(0,0,0,0.12);
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.nx-t-open:hover { opacity: 0.95; }

.nx-t-success {
  max-width: 640px;
  margin: 14px auto 0;
  text-align: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
}

.nx-t-error {
  max-width: 640px;
  margin: 14px auto 0;
  text-align: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.22);
}

/* =========================
   Carousel
========================= */
.nx-testimonials-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.nx-t-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: #3b82f6;       /* blue */
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  user-select: none;
}

.nx-t-btn:hover { transform: translateY(-1px); }

.nx-t-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.nx-testimonials-track {
  display: flex;
  gap: 18px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  scrollbar-width: none;
  flex: 1;
}

.nx-testimonials-track::-webkit-scrollbar { display: none; }

/* 3 cards on desktop */
.nx-testimonials--carousel .nx-testimonial-card {
  flex: 0 0 calc((100% - 36px) / 3);
  min-width: 280px;
}

@media (max-width: 980px) {
  .nx-testimonials--carousel .nx-testimonial-card {
    flex-basis: calc((100% - 18px) / 2);
  }
}

@media (max-width: 640px) {
  .nx-testimonials-wrap { gap: 10px; }
  .nx-testimonials--carousel .nx-testimonial-card {
    flex-basis: 86vw;
    min-width: 86vw;
  }
}

/* =========================
   Grid page
========================= */
.nx-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .nx-testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nx-testimonials-grid { grid-template-columns: 1fr; }
}

/* =========================
   Card
========================= */
.nx-testimonial-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08); /* softer line */
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.06);
  scroll-snap-align: start;
}

.nx-testimonial-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.nx-t-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 44px;
  background: rgba(0,0,0,0.06);
  display: grid;
  place-items: center;
}

.nx-t-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nx-t-avatar-fallback {
  font-weight: 800;
  font-size: 14px;
  opacity: 0.85;
}

.nx-t-head { flex: 1; min-width: 0; }

.nx-t-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* stars right */
  gap: 12px;
}

.nx-t-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-testimonial-meta {
  font-size: 14px;
  opacity: 0.65;
  margin-top: 2px;
}

.nx-testimonial-stars {
  display: inline-flex;
  gap: 2px;
  flex: 0 0 auto;
}

.nx-star { font-size: 16px; line-height: 1; }
.nx-star.is-on  { color: #fbbf24; }   /* gold */
.nx-star.is-off { color: rgba(0,0,0,0.15); }

.nx-testimonial-text {
  font-size: 15.5px;
  line-height: 1.7;
  opacity: 0.92;
}

.nx-testimonial-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Cleaner, recognizable social icons */
.nx-t-links{
  display:flex;
  gap:14px;
  align-items:center;
}

.nx-t-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  padding:0;
  border:0;
  background:transparent;
  line-height:1;
}

.nx-t-icon svg{
  width:24px;
  height:24px;
  display:block;
}

.nx-t-icon--linkedin{ color:#0a66c2; }  /* LinkedIn blue */
.nx-t-icon--website{ color:#2563eb; }   /* your site blue */

.nx-t-icon:hover{ opacity:0.85; }


/* Empty state */
.nx-testimonials-empty {
  margin: 0;
  width: 100%;
  text-align: center;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.75);
  opacity: 0.9;
}

/* Pagination */
.nx-pagination {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  gap: 8px;
}

.nx-pagination a,
.nx-pagination span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.nx-pagination .current {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.30);
}

/* =========================
   Modal
========================= */
.nx-t-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.nx-t-modal.is-open { display: block; }

.nx-t-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.nx-t-panel {
  position: relative;
  width: min(760px, 92vw);
  margin: 7vh auto;
  background: #fff;
  border-radius: 22px;
  padding: 20px 20px 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.25);
}

.nx-t-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  opacity: 0.7;
}

.nx-t-h3 { margin: 4px 0 4px; font-size: 22px; }
.nx-t-sub { margin: 0 0 14px; opacity: 0.7; }

.nx-t-form label {
  display: block;
  font-weight: 700;
  margin: 10px 0 6px;
}

.nx-t-form input,
.nx-t-form select,
.nx-t-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  outline: none;
  appearance: none;
}

.nx-t-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .nx-t-grid { grid-template-columns: 1fr; }
}

.nx-t-submit {
  margin-top: 12px;
  border: 0;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}
.nx-rating-num{
  margin-left: 8px;
  font-weight: 800;
  font-size: 13px;
  color: rgba(0,0,0,0.65);
}
/* Force space under the "Leave a testimonial" button */
.nx-testimonials-cta,
.nx-testimonials-cta .nx-btn,
.nx-testimonials-cta a{
  margin-bottom: 32px !important;
}

/* Add gap before the grid/cards no matter what */
.nx-testimonials-grid,
.nx-testimonials-list,
.nx-testimonials-carousel{
  margin-top: 24px !important;
}

/* If the button is inside a centered header block, add padding below */
.nx-testimonials-header{
  padding-bottom: 24px !important;
}
/* Testimonials PAGE template only (testimonials-template.php)
   - remove the inner section “extra” padding/line
   - add better gap between button and cards
*/
body.page-template-testimonials-template-php .nx-testimonials{
  padding: 0 0 60px;
  border-top: 0;
  background: transparent;
}

/* hide the inner “What teams say” heading on the Testimonials page
   (keep your page heading above it) */
body.page-template-testimonials-template-php .nx-testimonials .nx-testimonials-head{
  display: none;
}

/* more breathing room between CTA and cards */
body.page-template-testimonials-template-php .nx-testimonials .nx-t-cta{
  margin: 18px 0 22px;
}

body.page-template-testimonials-template-php .nx-testimonials .nx-testimonials-wrap{
  margin-top: 28px;
}

/* optional: remove double horizontal padding if it feels “too tight” */
body.page-template-testimonials-template-php .nx-testimonials .nx-container{
  padding-left: 0;
  padding-right: 0;
}
/* =========================================
   Spacing + section background consistency
   (added override)
========================================= */

/* Give the button breathing room */
.testimonials-section .leave-testimonial-btn,
.testimonials-section .nexdesk-leave-testimonial,
.testimonials-section a.leave-testimonial-btn,
.testimonials-section button.leave-testimonial-btn {
  margin-bottom: 28px !important;
}

/* Also ensure the grid/list starts lower */
.testimonials-section .testimonials-grid,
.testimonials-section .testimonials-list,
.testimonials-section .testimonials-wrapper {
  margin-top: 18px !important;
}

/* Make the section background match the other “soft” sections */
.testimonials-section {
  background: #f6f7fb !important; /* soft light gray like your other sections */
  padding-top: 70px !important;
  padding-bottom: 70px !important;
}
/* Homepage: make Testimonials section match other sections */
body.home #testimonials{
  background: #f6f7fb !important;
  padding: 80px 0 !important;
}
/* Give more breathing room under the CTA button */
.nx-testimonials .nx-t-cta{
  margin-top: 16px;
  margin-bottom: 34px; /* increase/decrease if you want */
}

/* Remove extra top spacing so it feels balanced */
.nx-testimonials .nx-testimonials-wrap{
  margin-top: 0;
}
/* Keep the section background consistent */
.nx-testimonials{
  background: #f6f7fb !important;
}

/* Remove the extra darker band behind the carousel/cards */
.nx-testimonials .nx-t-wrapper,
.nx-testimonials .nx-t-viewport,
.nx-testimonials .nx-t-track,
.nx-testimonials .nx-t-list,
.nx-testimonials .nx-t-carousel{
  background: transparent !important;
  box-shadow: none !important;
}
