/* ===============================================
   TESTIMONIALS PAGE CSS
   Back-to-top → only style.css + home.js
   =============================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --navbar: #5DADE2;
  --bg: #F8FBFF;
  --mint: #7ED6A5;
  --mint-hover: #66c491;
  --hover-blue: #4A90E2;
  --text: #2C3E50;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(44, 62, 80, 0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== HERO ========== */
.testi-hero {
  background: linear-gradient(135deg, #EAF4FF 0%, var(--bg) 100%);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.testi-hero-container {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.testi-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 10px 0 16px;
}

.testi-hero p:not(.eyebrow) {
  color: #5A6B7B;
  font-size: 1.05rem;
  line-height: 1.7;
}

.testi-hero .floating-icon {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--navbar);
}

.testi-hero .icon-1 { top: 15%; left: 10%; }
.testi-hero .icon-2 { top: 20%; right: 12%; color: var(--mint-hover); }
.testi-hero .icon-3 { top: 70%; left: 45%; }



.testi-avatar-placeholder,
.avatar-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--navbar);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.eyebrow.center {
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navbar);
  background: rgba(93, 173, 226, 0.12);
  width: fit-content;
  margin: 0 auto 20px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
}

/* ========== TRUST STATS ========== */
.testi-stats {
  max-width: 1200px;
  margin: 50px auto;
  padding: 40px;
}

.testi-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  align-items: stretch;
}

.testi-stat {
  height: 100%;
}

.testi-stat i {
  font-size: 1.6rem;
  color: var(--navbar);
  margin-bottom: 10px;
}

.testi-stat h3 {
  font-size: 1.8rem;
  color: var(--text);
  font-weight: 800;
}

.testi-stat h3 span {
  font-size: 1rem;
  color: #6B7C8C;
  font-weight: 500;
}

.testi-stat p {
  color: #6B7C8C;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ========== FILTER TABS ========== */
.testi-filter-section {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 0 32px;
  box-sizing: border-box;
}

.testi-filter-section.section-box {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
  padding: 0 32px;
}

.testi-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 35px;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 32px;
  gap: 12px;
  box-sizing: border-box;
}

.tfilter-btn {
  background: var(--bg);
  border: none;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.tfilter-btn:focus,
.tfilter-btn:active {
  outline: none;
}

.tfilter-btn:hover {
  background: #EAF4FF;
}

.tfilter-btn.active {
  background: var(--navbar);
  color: var(--white);
}

/* ========== TESTIMONIALS GRID ========== */
.testi-main-section {
  max-width: 1300px;
  margin: 0 auto 60px;
  padding: 0 40px;
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

.testi-card-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 28px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testi-quote-icon {
  color: #E2EEFB;
  font-size: 2rem;
  margin-bottom: 10px;
}

.stars {
  color: #FFC107;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.stars i {
  margin-right: 3px;
}

.testi-text {
  color: #5A6B7B;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex: 1;
}

.testi-person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.testi-person img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.testi-person strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.testi-person span {
  color: #6B7C8C;
  font-size: 0.8rem;
}

.testi-extra {
  display: none;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.load-more-wrapper .btn {
  display: inline-flex;
}

/* ========== SHARE FORM ========== */
.testi-form-section {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 50px;
  text-align: center;
}

h2.center {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 12px;
}

.section-sub {
  color: #6B7C8C;
  margin-bottom: 40px;
}

.testi-submit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.testi-submit-form input,
.testi-submit-form select,
.testi-submit-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #E2EEFB;
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  background: var(--bg);
  color: var(--text);
}

.testi-submit-form input:focus,
.testi-submit-form select:focus,
.testi-submit-form textarea:focus {
  border-color: var(--navbar);
  box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.15);
}

.testi-submit-form textarea {
  resize: vertical;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rating-input span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.rating-stars {
  display: flex;
  gap: 8px;
  font-size: 1.4rem;
  color: #FFC107;
  cursor: pointer;
}

/* ========== CTA ========== */
.testi-cta {
  background: linear-gradient(135deg, var(--navbar), var(--mint-hover));
  padding: 80px 40px;
  text-align: center;
  margin-top: 60px;
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .testi-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* Floating icons visible on mobile */
  .testi-hero .floating-icon {
    display: flex;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 12px;
  }
  .testi-hero .icon-1 { top: 10%; left: 4%; }
  .testi-hero .icon-2 { top: 12%; right: 4%; }
  .testi-hero .icon-3 { top: 78%; left: 8%; }


  .testi-hero {
    padding: 50px 16px;
  }

  .testi-hero h1 {
    font-size: 2rem;
  }

  .testi-stats {
    margin: 28px 12px;
    padding: 28px 16px;
    max-width: calc(100% - 24px);
  }

  /* Stats: 2 per row, equal size */
  .testi-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    grid-auto-rows: 1fr;
  }

  .testi-filter-section,
  .testi-filter-section.section-box {
    margin: 0 auto 24px;
    padding: 0 20px;
    max-width: 100%;
  }

  .testi-filter-tabs {
    max-width: 100%;
    padding: 14px 22px;
    border-radius: 28px;
    gap: 10px;
  }

  .tfilter-btn {
    padding: 11px 18px;
    font-size: 0.8rem;
  }

  /* Cards: 2 per row */
  .testi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .testi-card-item {
    padding: 22px 16px;
  }

  .testi-text {
    font-size: 0.85rem;
  }

  .testi-main-section {
    padding: 0 12px;
  }

  .testi-form-section {
    margin: 0 12px 40px;
    padding: 32px 18px;
    max-width: calc(100% - 24px);
  }

  h2.center {
    font-size: 1.6rem;
  }

  /* Form: 2 fields per row */
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .testi-cta {
    padding: 50px 16px;
  }

  .cta-inner h2 {
    font-size: 1.7rem;
  }

  /* 2 buttons side by side */
  .cta-buttons {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .cta-buttons .btn,
  .cta-buttons .btn-outline-white {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    font-size: 0.85rem;
    padding: 12px 10px;
  }

  .footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .footer-brand,
  .footer-newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .testi-hero h1 {
    font-size: 1.7rem;
  }

  .testi-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .testi-stat h3 {
    font-size: 1.4rem;
  }

  .testi-filter-tabs {
    padding: 12px 16px;
  }

  .tfilter-btn {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  /* Keep 2 cards per row */
  .testi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .testi-card-item {
    padding: 16px 12px;
  }

  .testi-person img,
  .testi-avatar-placeholder,
  .avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cta-buttons {
    flex-wrap: nowrap;
  }

  .footer-container {
    gap: 24px 14px;
  }
}
