/* ==========================================================================
   Reviews & Testimonials Module - Pulsearis Style for WebsiteBuySell
   ========================================================================== */

.wbs-reviews-section {
  padding: 80px 0 60px;
  background: #ffffff;
  position: relative;
  font-family: 'Epilogue', sans-serif;
}

.wbs-reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Titles */
.wbs-reviews-header {
  text-align: center;
  margin-bottom: 45px;
}

.wbs-reviews-badge {
  display: inline-block;
  background: rgba(240, 165, 0, 0.12);
  color: #d97706;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 14px;
}

.wbs-reviews-title {
  font-size: 38px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
  line-height: 1.25;
}

.wbs-reviews-subtitle {
  font-size: 17px;
  color: #666666;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Scoreboard Top Summary Card */
.wbs-scoreboard {
  background: #fdfbf7;
  border: 1px solid #faecd8;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 32px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.wbs-score-main {
  text-align: center;
  border-right: 1px solid #ebd9c0;
  padding-right: 28px;
}

.wbs-score-number {
  font-size: 56px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
}

.wbs-score-stars {
  color: #f59e0b;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.wbs-score-count {
  font-size: 14px;
  color: #78716c;
  font-weight: 500;
}

/* Star Distribution Bars */
.wbs-star-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wbs-bar-row {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #57534e;
  gap: 12px;
}

.wbs-bar-label {
  width: 45px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wbs-bar-track {
  flex: 1;
  height: 8px;
  background: #e7e5e4;
  border-radius: 999px;
  overflow: hidden;
}

.wbs-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #eab308);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.wbs-bar-count {
  width: 35px;
  text-align: right;
  font-size: 12px;
  color: #a8a29e;
}

/* Trust Badges & Action */
.wbs-trust-col {
  border-left: 1px solid #ebd9c0;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.wbs-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #292524;
}

.wbs-trust-icon {
  width: 24px;
  height: 24px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.wbs-btn-write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.wbs-btn-write:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* Filter Bar (Languages & Sorting) */
.wbs-filters-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0eee9;
}

.wbs-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wbs-lang-tab {
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  color: #44403c;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wbs-lang-tab:hover {
  background: #e7e5e4;
  color: #1c1917;
}

.wbs-lang-tab.active {
  background: #1c1917;
  color: #ffffff;
  border-color: #1c1917;
}

.wbs-lang-tab .tab-badge {
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
}

.wbs-lang-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.wbs-sort-select {
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #d6d3d1;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #44403c;
  cursor: pointer;
  outline: none;
}

/* Reviews Grid */
.wbs-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Single Review Card */
.wbs-card {
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.wbs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  border-color: #f59e0b;
}

.wbs-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.wbs-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.wbs-card-meta {
  flex: 1;
  overflow: hidden;
}

.wbs-author-name {
  font-size: 16px;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wbs-flag {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f5f5f4;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  color: #44403c;
  border: 1px solid #e7e5e4;
}

.wbs-email-masked {
  font-size: 12px;
  color: #78716c;
}

.wbs-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  align-self: flex-start;
  border: 1px solid #a7f3d0;
}

.wbs-stars-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wbs-card-stars {
  color: #f59e0b;
  font-size: 16px;
  letter-spacing: 1px;
}

.wbs-card-date {
  font-size: 12px;
  color: #a8a29e;
}

.wbs-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 8px;
  line-height: 1.4;
}

.wbs-card-text {
  font-size: 14px;
  color: #44403c;
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.wbs-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f5f5f4;
  font-size: 13px;
}

.wbs-btn-like {
  background: none;
  border: 1px solid #e7e5e4;
  padding: 6px 14px;
  border-radius: 20px;
  color: #57534e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.wbs-btn-like:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.wbs-btn-like.liked {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.wbs-lang-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #a8a29e;
  background: #f5f5f4;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Modal for Adding Review */
.wbs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wbs-modal-overlay.active {
  display: flex;
}

.wbs-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 32px;
  position: relative;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.wbs-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #78716c;
  cursor: pointer;
}

.wbs-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 6px;
}

.wbs-modal-desc {
  font-size: 14px;
  color: #78716c;
  margin-bottom: 20px;
}

.wbs-form-group {
  margin-bottom: 16px;
}

.wbs-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #292524;
  margin-bottom: 6px;
}

.wbs-form-input, .wbs-form-select, .wbs-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1c1917;
  background: #fff;
  box-sizing: border-box;
}

.wbs-form-input:focus, .wbs-form-select:focus, .wbs-form-textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.wbs-star-picker {
  display: flex;
  gap: 8px;
  font-size: 28px;
  color: #d6d3d1;
  cursor: pointer;
  margin-top: 4px;
}

.wbs-star-picker span.active {
  color: #f59e0b;
}

.wbs-modal-submit {
  width: 100%;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 10px;
}

.wbs-modal-submit:hover {
  background: #d97706;
}

/* Responsiveness */
@media (max-width: 991px) {
  .wbs-scoreboard {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .wbs-score-main {
    border-right: none;
    border-bottom: 1px solid #ebd9c0;
    padding-right: 0;
    padding-bottom: 20px;
  }
  .wbs-trust-col {
    border-left: none;
    border-top: 1px solid #ebd9c0;
    padding-left: 0;
    padding-top: 20px;
  }
}

@media (max-width: 640px) {
  .wbs-reviews-grid {
    grid-template-columns: 1fr;
  }
  .wbs-reviews-title {
    font-size: 28px;
  }
  .wbs-filters-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .wbs-lang-tabs {
    justify-content: center;
  }
}

/* Numbered Pagination Bar */
.wbs-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #f0eee9;
}

.wbs-pagination-info {
  font-size: 14px;
  color: #78716c;
  font-weight: 500;
}

.wbs-pagination-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wbs-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e7e5e4;
  background: #ffffff;
  color: #44403c;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-decoration: none;
  user-select: none;
}

.wbs-page-btn:hover:not(:disabled):not(.active) {
  background: #f5f5f4;
  border-color: #d6d3d1;
  color: #1c1917;
  transform: translateY(-1px);
}

.wbs-page-btn.active {
  background: #1c1917;
  color: #ffffff;
  border-color: #1c1917;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wbs-page-btn:disabled, .wbs-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.wbs-page-ellipsis {
  padding: 0 6px;
  color: #a8a29e;
  font-weight: 700;
  user-select: none;
}

@media (max-width: 640px) {
  .wbs-pagination-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
