/* === Testimonials Section === */
.aft-testimonials-section {
  background: #000;
  padding: 80px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* === Section Header === */
.aft-section-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 20px;
}

.aft-section-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 15px 0;
  letter-spacing: -0.5px;
}

.aft-section-subtitle {
  font-size: 18px;
  color: #ccc;
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
}

/* === Swiper Container === */
.aft-swiper-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  position: relative;
  padding: 0 60px;
}

/* Every slide stretches to the height of the tallest card in the row */
.swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.swiper-slide {
  display: flex;
  height: auto;
}

.aft-card {
  background: linear-gradient(145deg, #722c2e 0%, #000 80%);
  border-radius: 22px;
  padding: 40px 30px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.aft-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(114, 44, 46, 0.8);
}

.aft-avatar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.aft-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: block;
}

.aft-message {
  font-size: 16px;
  color: #eaeaea;
  line-height: 1.8;
  font-style: italic;
  flex-grow: 1;
}

.aft-message-text p {
  margin: 0;
}

/* Long quotes are cut to a fixed number of lines so every card stays the same size */
.aft-message-text.is-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aft-read-more {
  align-self: center;
  margin: 12px 0 0;
  padding: 6px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.aft-read-more:hover,
.aft-read-more:focus-visible {
  background: #722c2e;
  border-color: #722c2e;
}

.aft-read-more[hidden] {
  display: none;
}

.aft-name {
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  margin-top: 25px;
}

.aft-designation {
  color: #ccc;
  font-size: 14px;
  margin-top: 5px;
}

/* === Swiper Arrows === */
.swiper-button-prev,
.swiper-button-next {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 22px !important;
  font-weight: bold;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: #722c2e;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(114, 44, 46, 0.8);
}

.swiper-button-prev {
  left: 0;
}

.swiper-button-next {
  right: 0;
}

.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Tablet Responsive === */
@media (max-width: 1023px) {
  .aft-testimonials-section {
    padding: 60px 0;
  }
  
  .aft-section-header {
    margin-bottom: 40px;
  }
  
  .aft-section-title {
    font-size: 36px;
  }
  
  .aft-section-subtitle {
    font-size: 16px;
  }
  
  .aft-swiper-container {
    width: 95%;
    padding: 0 50px;
  }
  
  .aft-card {
    padding: 35px 25px;
  }
  
  .aft-avatar {
    width: 100px;
    height: 100px;
  }
  
  .swiper-button-prev,
  .swiper-button-next {
    width: 45px;
    height: 45px;
  }
  
  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 20px !important;
  }
}

/* === Mobile Responsive === */
@media (max-width: 767px) {
  .aft-testimonials-section {
    padding: 50px 0;
  }
  
  .aft-section-header {
    margin-bottom: 35px;
  }
  
  .aft-section-title {
    font-size: 28px;
  }
  
  .aft-section-subtitle {
    font-size: 15px;
  }
  
  .aft-swiper-container {
    width: 90%;
    padding: 0 45px;
  }
  
  .aft-card {
    padding: 30px 20px;
  }
  
  .aft-avatar {
    width: 90px;
    height: 90px;
    border: 3px solid #fff;
  }
  
  .aft-message {
    font-size: 15px;
    line-height: 1.7;
  }
  
  .aft-name {
    font-size: 17px;
  }
  
  .aft-designation {
    font-size: 13px;
  }
  
  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
  }
  
  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 18px !important;
  }
}

/* === Small Mobile === */
@media (max-width: 480px) {
  .aft-section-title {
    font-size: 24px;
  }
  
  .aft-section-subtitle {
    font-size: 14px;
  }
  
  .aft-swiper-container {
    padding: 0 40px;
  }
  
  .aft-avatar {
    width: 80px;
    height: 80px;
  }
  
  .aft-message {
    font-size: 14px;
  }
}

/* === Full Testimonial Dialog === */
/* margin:auto !important keeps the popup centred even when the theme resets dialog margins */
.aft-dialog {
  position: fixed;
  inset: 0;
  margin: auto !important;
  border: none;
  padding: 0;
  background: transparent;
  color: #fff;
  width: min(680px, 92vw);
  height: fit-content;
  max-height: 88vh;
}

.aft-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.aft-dialog-inner {
  position: relative;
  box-sizing: border-box;
  max-height: 88vh;
  overflow-y: auto;
  padding: 50px 40px 40px;
  border-radius: 22px;
  background: linear-gradient(145deg, #722c2e 0%, #000 80%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.aft-dialog-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.aft-dialog-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  margin-bottom: 20px;
}

.aft-dialog-message {
  font-size: 17px;
  line-height: 1.8;
  font-style: italic;
  color: #eaeaea;
}

.aft-dialog-message p {
  margin: 0 0 1em;
}

.aft-dialog-message p:last-child {
  margin-bottom: 0;
}

.aft-dialog-name {
  margin-top: 25px;
  font-weight: 700;
  font-size: 18px;
}

.aft-dialog-designation {
  margin-top: 5px;
  color: #ccc;
  font-size: 14px;
}

.aft-dialog [hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .aft-dialog-inner {
    padding: 44px 22px 28px;
  }

  .aft-dialog-message {
    font-size: 15px;
  }
}