/* Latest Reviews Carousel Styles - Compact Clean Design */
.fb-latest-reviews-section {
  padding: 30px 0;
  background: transparent;
  position: relative;
}

.fb-latest-reviews-section .container {
  position: relative;
  z-index: 1;
}

.fb-latest-reviews-section .section-heading {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.fb-latest-reviews-section .section-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.fb-latest-reviews-section .section-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

.fb-reviews-carousel {
  margin-top: 20px;
  padding: 0;
  overflow: hidden;
}

/* Force equal heights in Owl Carousel */
.fb-reviews-carousel .owl-stage {
  display: flex;
  padding: 8px 0;
}

.fb-reviews-carousel .owl-item {
  display: flex;
  height: auto;
}

.fb-reviews-carousel .owl-stage-outer {
  overflow: hidden;
  padding: 8px 0;
}

.fb-carousel-review-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin: 4px;
  border: 1px solid #dfe1e6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  width: calc(100% - 8px);
  position: relative;
}

.fb-carousel-review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--fb-hero-primary, #6c1cff);
}

/* Ad card styles */
.fb-carousel-ad-card {
  background: transparent;
  border-radius: 8px;
  padding: 0;
  margin: 4px;
  border: none;
  box-shadow: none;
  transition: all 0.3s ease;
  display: block;
  height: auto !important;
  max-height: 400px;
  width: calc(100% - 8px);
  position: relative;
  overflow: hidden;
}

.fb-carousel-ad-card.adsratings > * {
  height: auto !important;
  display: block;
}

.fb-carousel-ad-card .elementor-widget-wrap,
.fb-carousel-ad-card .elementor-element {
  height: auto !important;
  min-height: 0 !important;
}

/* Prevent ad cards from stretching in Owl Carousel */
.fb-reviews-carousel .owl-item:has(.fb-carousel-ad-card) {
  align-items: flex-start;
}

/* Fallback for browsers that don't support :has() */
.owl-item .fb-carousel-ad-card {
  align-self: flex-start;
}

.fb-carousel-ad-card img {
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
}

/* Ensure Elementor sections don't exceed container */
.fb-carousel-ad-card .elementor-section {
  max-height: inherit;
}

.fb-carousel-ad-card .elementor-column {
  height: auto !important;
}

.fb-review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fb-carousel-review-card .fb-review-post {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.fb-carousel-review-card .fb-review-post-image {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #f3f4f6;
  background: #f9fafb;
}

.fb-carousel-review-card .fb-review-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.fb-carousel-review-card:hover .fb-review-post-image img {
  transform: scale(1.05);
}

.fb-carousel-review-card .fb-review-post-info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.fb-carousel-review-card .fb-review-post-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.fb-carousel-review-card .fb-review-post-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-carousel-review-card .fb-review-post-title a:hover {
  color: var(--fb-hero-primary, #6c1cff);
}

.fb-carousel-review-card .fb-review-post-type {
  display: none;
}

.fb-carousel-review-card .fb-review-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.fb-carousel-review-card .fb-review-rating .mi {
  font-size: 14px;
  color: #ffc107;
}

.fb-carousel-review-card .fb-review-rating-text {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.fb-carousel-review-card .fb-review-no-rating {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  font-style: italic;
}

.fb-carousel-review-card .fb-review-category {
  margin-bottom: 10px;
}

.fb-carousel-review-card .fb-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--fb-hero-primary, #6c1cff);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: capitalize;
}

.fb-carousel-review-card .fb-review-text {
  flex: 1;
  margin-bottom: 10px;
}

.fb-carousel-review-card .fb-review-text p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.fb-carousel-review-card .fb-review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  gap: 6px;
}

.fb-carousel-review-card .fb-review-author {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}

.fb-carousel-review-card .fb-review-date {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

.fb-latest-reviews-empty {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.fb-latest-reviews-empty p {
  font-size: 18px;
  margin: 0;
  color: #888;
}

/* Owl Carousel Navigation Styling */
.fb-reviews-carousel .owl-nav {
  margin-top: 40px;
}

.fb-reviews-carousel .owl-nav button {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e8e8e8 !important;
  transition: all 0.3s ease !important;
  margin: 0 8px !important;
}

.fb-reviews-carousel .owl-nav button:hover {
  background: linear-gradient(135deg, var(--fb-hero-primary, #6c1cff) 0%, var(--fb-hero-secondary, #8f52ff) 100%) !important;
  box-shadow: 0 6px 24px var(--fb-hero-primary-30, rgba(108, 28, 255, 0.3)) !important;
  border-color: transparent !important;
}

.fb-reviews-carousel .owl-nav button span {
  font-size: 32px;
  line-height: 48px;
  color: #333;
  transition: color 0.3s ease;
}

.fb-reviews-carousel .owl-nav button:hover span {
  color: white;
}

.fb-reviews-carousel .owl-dots {
  margin-top: 30px;
  text-align: center;
}

.fb-reviews-carousel .owl-dots .owl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d0d0;
  margin: 0 6px;
  transition: all 0.3s ease;
}

.fb-reviews-carousel .owl-dots .owl-dot.active {
  border-radius: 5px;
  background: linear-gradient(90deg, var(--fb-hero-primary, #6c1cff) 0%, var(--fb-hero-secondary, #8f52ff) 100%);
}

/* Responsive Styling - Compact Design */
@media (max-width: 1024px) {
  .fb-latest-reviews-section {
    padding: 30px 0;
  }

  .fb-latest-reviews-section .section-title {
    font-size: 24px;
  }

  .fb-carousel-review-card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .fb-latest-reviews-section {
    padding: 24px 0;
  }

  .fb-latest-reviews-section .section-title {
    font-size: 22px;
  }

  .fb-latest-reviews-section .section-subtitle {
    font-size: 14px;
  }

  .fb-carousel-review-card {
    padding: 16px;
    margin: 6px;
  }

  .fb-carousel-review-card .fb-review-post-image {
    width: 42px;
    height: 42px;
  }

  .fb-carousel-review-card .fb-review-post-title {
    font-size: 14px;
  }

  .fb-carousel-review-card .fb-review-text p {
    font-size: 12px;
  }

  .fb-carousel-review-card .fb-review-rating .mi {
    font-size: 14px;
  }

  .fb-reviews-carousel .owl-nav button {
    width: 36px;
    height: 36px;
  }

  .fb-reviews-carousel .owl-nav button span {
    font-size: 20px;
    line-height: 36px;
  }

  /* Reduce ad card height on mobile */
  .fb-carousel-ad-card {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .fb-latest-reviews-section {
    padding: 20px 0;
  }

  .fb-latest-reviews-section .section-title {
    font-size: 20px;
  }

  .fb-latest-reviews-section .section-subtitle {
    font-size: 13px;
  }

  .fb-carousel-review-card {
    padding: 14px;
    margin: 4px;
  }

  .fb-carousel-review-card .fb-review-post {
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .fb-carousel-review-card .fb-review-post-image {
    width: 38px;
    height: 38px;
  }

  .fb-carousel-review-card .fb-review-post-title {
    font-size: 13px;
  }

  .fb-carousel-review-card .fb-review-text p {
    font-size: 12px;
  }

  .fb-carousel-review-card .fb-review-rating .mi {
    font-size: 14px;
  }

  .fb-carousel-review-card .fb-review-meta {
    padding-top: 10px;
  }

  .fb-carousel-review-card .fb-review-author,
  .fb-carousel-review-card .fb-review-date {
    font-size: 11px;
  }

  .fb-reviews-carousel .owl-nav button {
    width: 32px;
    height: 32px;
  }

  .fb-reviews-carousel .owl-nav button span {
    font-size: 18px;
    line-height: 32px;
  }

  /* Further reduce ad card height on small mobile */
  .fb-carousel-ad-card {
    max-height: 250px;
  }
}

/* ── Review card promoted/featured badges ── */
.fb-review-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

.fb-badge-promoted {
  background: var(--fb-badge-promoted, #ff9800);
  color: #fff;
}

.fb-badge-featured {
  background: var(--fb-badge-featured, #27ae60);
  color: #fff;
}

/* Subtle border accent for promoted/featured cards */
.fb-review-promoted {
  border-left: 3px solid var(--fb-badge-promoted, #ff9800);
}

.fb-review-featured {
  border-left: 3px solid var(--fb-badge-featured, #27ae60);
}

/* ── "Read more" trigger inside review card ── */
.fb-carousel-review-card .fb-review-readmore {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--fb-hero-primary, #6c1cff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.fb-carousel-review-card .fb-review-readmore:hover,
.fb-carousel-review-card .fb-review-readmore:focus {
  color: var(--fb-hero-secondary, #8f52ff);
  text-decoration: underline;
  outline: none;
}

/* ── Review modal (Read more popup) ── */
.fb-review-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fb-review-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.fb-review-modal-backdrop .fb-review-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.fb-review-modal-backdrop.is-open .fb-review-modal {
  transform: scale(1);
}

.fb-review-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.fb-review-modal-close:hover,
.fb-review-modal-close:focus {
  background: #f3f4f6;
  color: #111827;
  outline: none;
}

.fb-review-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 14px;
}

.fb-review-modal-listing-image {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.fb-review-modal-listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-review-modal-listing-info {
  flex: 1;
  min-width: 0;
}

.fb-review-modal-listing-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.fb-review-modal-listing-title a {
  color: #111827;
  text-decoration: none;
}

.fb-review-modal-listing-title a:hover {
  color: var(--fb-hero-primary, #6c1cff);
}

.fb-review-modal-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fb-review-modal-rating .mi {
  font-size: 16px;
  color: #ffc107;
}

.fb-review-modal-rating .fb-review-rating-text {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-left: 4px;
}

.fb-review-modal-category {
  margin-bottom: 10px;
}

.fb-review-modal-category:empty {
  display: none;
}

.fb-review-modal-category .fb-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--fb-hero-primary, #6c1cff);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: capitalize;
}

.fb-review-modal-text {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-review-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
}

.fb-review-modal-author {
  font-weight: 600;
  color: #111827;
}

.fb-review-modal-date {
  color: #9ca3af;
}

body.fb-review-modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .fb-review-modal-backdrop {
    padding: 12px;
  }

  .fb-review-modal-backdrop .fb-review-modal {
    padding: 18px;
  }

  .fb-review-modal-listing-image {
    width: 44px;
    height: 44px;
  }

  .fb-review-modal-listing-title {
    font-size: 15px;
  }

  .fb-review-modal-text {
    font-size: 13px;
  }
}
