/* =====================================================
   TESTIMONIALS SECTION
===================================================== */

.testimonials-section {
  padding: 90px 6%;
  background: #f7fafc;
  overflow: hidden;
}

.testimonials-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* =====================================================
   HEADER
===================================================== */

.testimonials-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1d4f73;
}

.testimonials-header h2 {
  margin: 0 0 15px;
  font-size: 38px;
  font-weight: 700;
  color: #12344d;
}

.testimonials-header p {
  max-width: 650px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: #667781;
}

/* =====================================================
   CAROUSEL
===================================================== */

.testimonial-carousel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* =====================================================
   VIEWPORT
===================================================== */

.testimonial-viewport {
  width: 100%;
  overflow: hidden;
}

/* =====================================================
   TRACK
===================================================== */

.testimonial-track {
  display: flex;
  gap: 22px;
  transition: transform 0.5s ease;
  will-change: transform;
}

/* =====================================================
   TESTIMONIAL CARD
===================================================== */

.testimonial-card {
  flex: 0 0 calc((100% - 44px) / 3);
  box-sizing: border-box;

  padding: 30px 26px;

  background: #ffffff;

  border: 1px solid #e2eaf0;
  border-radius: 16px;

  box-shadow: 0 8px 25px rgba(18, 52, 77, 0.06);

  min-height: 260px;

  display: flex;
  flex-direction: column;
}

/* =====================================================
   STARS
===================================================== */

.testimonial-stars {
  margin-bottom: 18px;
  font-size: 18px;
  letter-spacing: 3px;
  color: #f4b400;
}

/* =====================================================
   REVIEW TEXT
===================================================== */

.testimonial-text {
  margin: 0 0 25px;

  font-size: 15px;
  line-height: 1.7;

  color: #53636d;

  flex: 1;
}

/* =====================================================
   CUSTOMER
===================================================== */

.testimonial-customer {
  display: flex;
  align-items: center;
  gap: 13px;
}

/* =====================================================
   AVATAR
===================================================== */

.testimonial-avatar {
  width: 44px;
  height: 44px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #12344d;
  color: #ffffff;

  font-size: 17px;
  font-weight: 700;
}

/* =====================================================
   CUSTOMER NAME
===================================================== */

.testimonial-customer h4 {
  margin: 0 0 4px;

  font-size: 15px;
  color: #12344d;
}

.testimonial-customer span {
  font-size: 13px;
  color: #8997a0;
}

/* =====================================================
   ARROWS
===================================================== */

.testimonial-arrow {
  position: absolute;
  z-index: 5;

  width: 44px;
  height: 44px;

  border: none;
  border-radius: 50%;

  background: #12344d;
  color: #ffffff;

  font-size: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  transition:
    background 0.3s ease,
    transform 0.3s ease,
    opacity 0.3s ease;

  box-shadow: 0 5px 15px rgba(18, 52, 77, 0.18);
}

.testimonial-arrow:hover {
  background: #1d5d85;
  transform: scale(1.08);
}

.testimonial-arrow-left {
  left: -22px;
}

.testimonial-arrow-right {
  right: -22px;
}

.testimonial-arrow.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* =====================================================
   DOTS
===================================================== */

.testimonial-dots {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 8px;

  margin-top: 30px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: #cbd6dd;

  cursor: pointer;

  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.testimonial-dot.active {
  width: 24px;

  border-radius: 10px;

  background: #12344d;
}

/* =====================================================
   SHARE YOUR EXPERIENCE
===================================================== */

.testimonial-submit-section {
  margin-top: 45px;

  text-align: center;

  padding: 32px 25px;

  background: #f7fafc;

  border: 1px solid #e4edf2;

  border-radius: 16px;
}

/* =====================================================
   SHARE HEADING
===================================================== */

.testimonial-submit-section h3 {
  margin: 0 0 8px;

  font-size: 24px;
  font-weight: 700;

  color: #102f46;
}

/* =====================================================
   SHARE DESCRIPTION
===================================================== */

.testimonial-submit-section p {
  margin: 0 auto 20px;

  max-width: 600px;

  font-size: 14px;
  line-height: 1.7;

  color: #6f7f89;
}

/* =====================================================
   WRITE REVIEW BUTTON
===================================================== */

.testimonial-write-btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 12px 26px;

  border: none;
  border-radius: 8px;

  background: #102f46;
  color: #ffffff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.testimonial-write-btn:hover {
  background: #174b6b;

  transform: translateY(-2px);

  box-shadow: 0 8px 20px rgba(16, 47, 70, 0.18);
}

.testimonial-write-btn:active {
  transform: translateY(0);
}

/* =====================================================
   TESTIMONIAL REVIEW MODAL
===================================================== */

.testimonial-modal {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 20px;
}

.testimonial-modal.active {
  display: flex;
}

/* =====================================================
   MODAL OVERLAY
===================================================== */

.testimonial-modal-overlay {
  position: absolute;

  inset: 0;

  background: rgba(16, 47, 70, 0.65);

  backdrop-filter: blur(4px);
}

/* =====================================================
   MODAL CONTENT
===================================================== */

.testimonial-modal-content {
  position: relative;

  width: 100%;
  max-width: 560px;

  max-height: 90vh;

  overflow-y: auto;

  background: #ffffff;

  border-radius: 18px;

  padding: 30px;

  box-shadow: 0 20px 60px rgba(16, 47, 70, 0.25);

  animation: testimonialModalOpen 0.25s ease;
}

/* =====================================================
   MODAL ANIMATION
===================================================== */

@keyframes testimonialModalOpen {
  from {
    opacity: 0;

    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}

/* =====================================================
   MODAL HEADER
===================================================== */

.testimonial-modal-header {
  display: flex;

  justify-content: space-between;
  align-items: flex-start;

  margin-bottom: 25px;

  padding-bottom: 18px;

  border-bottom: 1px solid #e5ebef;
}

.testimonial-modal-label {
  display: block;

  margin-bottom: 6px;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 1.5px;

  color: #7a8993;
}

.testimonial-modal-header h2 {
  margin: 0;

  font-size: 25px;

  color: #102f46;
}

/* =====================================================
   CLOSE BUTTON
===================================================== */

.testimonial-modal-close {
  width: 36px;
  height: 36px;

  border: none;
  border-radius: 50%;

  background: #f1f5f7;

  color: #102f46;

  font-size: 25px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.testimonial-modal-close:hover {
  background: #e4edf2;

  transform: rotate(90deg);
}

/* =====================================================
   FORM GROUP
===================================================== */

.testimonial-form-group {
  margin-bottom: 20px;
}

.testimonial-form-group label {
  display: block;

  margin-bottom: 8px;

  font-size: 13px;
  font-weight: 600;

  color: #102f46;
}

.testimonial-form-group label span {
  color: #dc2626;
}

.testimonial-form-group label small {
  font-weight: 400;

  color: #7a8993;
}

/* =====================================================
   INPUTS
===================================================== */

.testimonial-form-group input,
.testimonial-form-group textarea {
  width: 100%;

  box-sizing: border-box;

  border: 1px solid #d9e3e8;

  border-radius: 8px;

  padding: 12px 14px;

  font-family: inherit;
  font-size: 14px;

  color: #102f46;

  background: #ffffff;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.testimonial-form-group input {
  height: 46px;
}

.testimonial-form-group textarea {
  resize: vertical;

  min-height: 120px;

  line-height: 1.6;
}

.testimonial-form-group input:focus,
.testimonial-form-group textarea:focus {
  border-color: #102f46;

  box-shadow: 0 0 0 3px rgba(16, 47, 70, 0.08);
}

.testimonial-form-group input::placeholder,
.testimonial-form-group textarea::placeholder {
  color: #a1adb5;
}

/* =====================================================
   STAR RATING
===================================================== */

.testimonial-rating {
  display: flex;

  gap: 5px;
}

.rating-star {
  border: none;

  background: transparent;

  padding: 0;

  font-size: 32px;

  line-height: 1;

  color: #d5dde2;

  cursor: pointer;

  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.rating-star:hover {
  transform: scale(1.12);
}

.rating-star.active {
  color: #f5a623;
}

/* =====================================================
   RATING ERROR
===================================================== */

.testimonial-rating-error {
  display: none;

  margin-top: 6px;

  font-size: 12px;

  color: #dc2626;
}

.testimonial-rating-error.show {
  display: block;
}

/* =====================================================
   CHARACTER COUNT
===================================================== */

.testimonial-character-count {
  display: block;

  margin-top: 5px;

  font-size: 11px;

  color: #8b98a0;
}

/* =====================================================
   FORM ACTIONS
===================================================== */

.testimonial-form-actions {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  margin-top: 25px;
}

/* =====================================================
   CANCEL BUTTON
===================================================== */

.testimonial-form-cancel {
  border: 1px solid #d9e3e8;

  background: #ffffff;

  color: #102f46;

  padding: 11px 20px;

  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition: background 0.2s ease;
}

.testimonial-form-cancel:hover {
  background: #f4f7f9;
}

/* =====================================================
   SUBMIT BUTTON
===================================================== */

.testimonial-form-submit {
  border: none;

  background: #102f46;

  color: #ffffff;

  padding: 11px 22px;

  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.testimonial-form-submit:hover {
  background: #174b6b;

  transform: translateY(-1px);
}

.testimonial-form-submit:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;
}

/* =====================================================
   FORM MESSAGES
===================================================== */

.testimonial-form-message {
  display: none;

  margin-top: 18px;

  padding: 12px 14px;

  border-radius: 8px;

  font-size: 13px;

  line-height: 1.5;
}

.testimonial-form-message.success {
  background: #e7f7ee;

  color: #15803d;
}

.testimonial-form-message.error {
  background: #fef0f0;

  color: #dc2626;
}

.testimonial-form-message.show {
  display: block;
}

/* =====================================================
   REVIEW SUCCESS POPUP
   CENTER OF SCREEN
===================================================== */

.review-success-popup {
  position: fixed;

  top: 50%;
  left: 50%;

  width: 340px;

  max-width: calc(100vw - 40px);

  box-sizing: border-box;

  padding: 30px 25px;

  background: #ffffff;

  border: 1px solid #e4edf2;

  border-radius: 18px;

  text-align: center;

  box-shadow: 0 20px 60px rgba(16, 47, 70, 0.25);

  z-index: 999999;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transform: translate(-50%, -50%) scale(0.9);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

/* =====================================================
   SHOW SUCCESS POPUP
===================================================== */

.review-success-popup.show {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;

  transform: translate(-50%, -50%) scale(1);
}

/* =====================================================
   SUCCESS ICON
===================================================== */

.review-success-icon {
  width: 58px;
  height: 58px;

  margin: 0 auto 15px;

  border-radius: 50%;

  background: #e8f7ee;

  color: #15803d;

  display: flex;

  align-items: center;
  justify-content: center;

  font-size: 30px;

  font-weight: bold;
}

/* =====================================================
   SUCCESS TITLE
===================================================== */

.review-success-popup h3 {
  margin: 0 0 8px;

  font-size: 21px;

  color: #102f46;
}

/* =====================================================
   SUCCESS MESSAGE
===================================================== */

.review-success-popup p {
  margin: 0;

  font-size: 14px;

  line-height: 1.6;

  color: #687780;
}

/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {
  .testimonial-card {
    flex: 0 0 calc((100% - 22px) / 2);
  }
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 650px) {
  .testimonials-section {
    padding: 70px 5%;
  }

  .testimonials-header h2 {
    font-size: 30px;
  }

  .testimonials-header p {
    font-size: 14px;
  }

  .testimonial-card {
    flex: 0 0 100%;

    min-height: 240px;
  }

  .testimonial-arrow {
    width: 38px;
    height: 38px;

    font-size: 17px;
  }

  .testimonial-arrow-left {
    left: -8px;
  }

  .testimonial-arrow-right {
    right: -8px;
  }

  /* ---------------------------------------------
       SHARE YOUR EXPERIENCE
    --------------------------------------------- */

  .testimonial-submit-section {
    margin-top: 35px;

    padding: 26px 18px;
  }

  .testimonial-submit-section h3 {
    font-size: 21px;
  }

  .testimonial-submit-section p {
    font-size: 13px;
  }

  .testimonial-write-btn {
    width: 100%;

    max-width: 260px;
  }

  /* ---------------------------------------------
       MODAL
    --------------------------------------------- */

  .testimonial-modal {
    padding: 12px;
  }

  .testimonial-modal-content {
    padding: 22px;

    border-radius: 14px;

    max-height: 92vh;
  }

  .testimonial-modal-header h2 {
    font-size: 21px;
  }

  .rating-star {
    font-size: 29px;
  }

  .testimonial-form-actions {
    flex-direction: column-reverse;
  }

  .testimonial-form-submit,
  .testimonial-form-cancel {
    width: 100%;
  }

  /* ---------------------------------------------
       SUCCESS POPUP
    --------------------------------------------- */

  .review-success-popup {
    width: calc(100vw - 40px);

    max-width: 340px;

    padding: 26px 20px;
  }

  .review-success-icon {
    width: 52px;
    height: 52px;

    font-size: 27px;

    margin-bottom: 13px;
  }

  .review-success-popup h3 {
    font-size: 19px;
  }

  .review-success-popup p {
    font-size: 13px;
  }
}
