/* ============================================
   TESTIMONIALS CAROUSEL
   Used in: index.php, testimonials.php
   ============================================ */

.testimonials-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Extra horizontal padding so arrows have room outside */
.testimonials-carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 30px;
  overflow: visible;
  padding: 0 60px;
  box-sizing: border-box;
}

.testimonials-wrapper {
  position: relative;
  min-height: 200px;
}

/* Slides */
.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.testimonial-slide.prev {
  transform: translateX(-100%);
  opacity: 0;
}

.testimonial-slide.next {
  transform: translateX(100%);
  opacity: 0;
}

/* Card */
.testimonial-content {
  background: white;
  padding: 45px 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.testimonial-stars {
  margin-bottom: 20px;
}

.testimonial-stars i {
  color: #FFD700;
  font-size: 18px;
  margin: 0 2px;
}

.testimonial-text {
  font-size: 18px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 25px;
  font-style: italic;
  white-space: pre-wrap;
}

.testimonial-author h4 {
  color: #003B5C;
  margin: 0 0 5px 0;
  font-size: 16px;
}

.testimonial-author span {
  color: #666;
  font-size: 14px;
}

/* Arrows — outside the card */
.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #003B5C;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.testimonial-arrow:hover {
  background: #00AEEF;
  transform: translateY(-50%) scale(1.1);
}

/* Positioned outside the wrapper, inside the carousel padding */
.testimonial-arrow.left  { left: 0; }
.testimonial-arrow.right { right: 0; }

/* Indicators */
.testimonial-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.testimonial-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-indicator.active {
  background: #003B5C;
  transform: scale(1.3);
}

/* CTA buttons */
.testimonials-cta {
  margin-top: 30px;
}

/* Empty state */
.no-testimonials {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.no-testimonials-content {
  text-align: center;
  padding: 20px;
}

.no-testimonials-content h3 {
  color: #003B5C;
  margin-bottom: 10px;
  font-size: 20px;
}

.no-testimonials-content p {
  color: #666;
  margin-bottom: 20px;
  font-size: 15px;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  .testimonials-section {
    padding: 30px 20px;
  }

  /* Shrink carousel width to leave room for arrows outside */
  .testimonials-carousel {
    max-width: 100%;
    width: calc(100% - 80px);
    padding: 0 0;
    margin: 0 auto 20px;
    overflow: visible;
  }

  .testimonials-wrapper {
    min-height: 150px;
  }

  .testimonial-content {
    padding: 20px 14px;
  }


  .testimonial-text {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .testimonial-arrow {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* Arrows sit just outside the shrunken carousel */
  .testimonial-arrow.left  { left: -40px; }
  .testimonial-arrow.right { right: -40px; }

  .testimonials-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }

  .testimonials-cta .btn-secondary {
    margin-left: 0 !important;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .no-testimonials-content h3 { font-size: 18px; }
  .no-testimonials-content p  { font-size: 14px; }
}

/* Custom styles for testimonials CTA to ensure premium contrast and alignment */
.cta-container .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.cta-container .btn-primary {
  background: #ffffff !important;
  color: #003B5C !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15) !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  padding: 14px 30px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cta-container .btn-primary:hover {
  background: #00AEEF !important;
  border-color: #00AEEF !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 174, 239, 0.3) !important;
}

.cta-container .btn-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  border-radius: 50px !important;
  padding: 14px 30px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.cta-container .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

@media (max-width: 768px) {
  .cta-container .cta-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
  }
  .cta-container .btn-primary,
  .cta-container .btn-secondary {
    width: 100% !important;
    max-width: 280px !important;
    justify-content: center !important;
  }
}


/* ============================================
   TESTIMONIALS FORM STYLES
   ============================================ */
.testimonial-form-container {
  max-width: 600px;
  margin: 40px auto 0 auto;
}

.testimonial-form {
  background: #fff;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #003B5C;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00AEEF;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9em;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

.submit-btn {
  background: #00AEEF;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background: #0098d1;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .testimonial-form {
    padding: 20px;
  }
}

/* Styling for Testimonial Preview Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 59, 92, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 650px;
  padding: 35px;
  box-shadow: 0 15px 40px rgba(0, 59, 92, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 15px;
}

.modal-header h3 {
  margin: 0;
  color: #003B5C;
  font-size: 1.4em;
  font-weight: 700;
}

.warning-icon {
  color: #ff9800;
  font-size: 1.5em;
}

.modal-body {
  color: #333333;
  line-height: 1.6;
  font-size: 0.95em;
}

.modal-body p {
  margin: 0 0 12px 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 25px;
  border-top: 1px solid #eaeaea;
  padding-top: 20px;
}

.btn-modal-primary {
  background: #00AEEF !important;
  color: #ffffff !important;
  border: none !important;
  padding: 12px 22px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-size: 0.95em !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2) !important;
  transition: all 0.3s ease !important;
}

.btn-modal-primary:hover {
  background: #008fbf !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(0, 174, 239, 0.3) !important;
}

.btn-modal-secondary {
  background: transparent !important;
  color: #003B5C !important;
  border: 2px solid #bdbdbd !important;
  padding: 12px 22px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-size: 0.95em !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.3s ease !important;
}

.btn-modal-secondary:hover {
  background: #f8f9fa !important;
  border-color: #003B5C !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 576px) {
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .btn-modal-primary,
  .btn-modal-secondary {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Success & Error messages */
.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px;
  margin: 20px auto;
  max-width: 800px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 15px;
  margin: 20px auto;
  max-width: 800px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}
