/**
 * NBN Google Reviews - Front-end Stylesheet
 * Luxury Gold & Slate Theme with Responsive Grid, Carousel Slider, and Filter Tabs.
 */

:root {
  --nbn-gold: #d4af37;
  --nbn-gold-dark: #b89726;
  --nbn-gold-light: #fef9e7;
  --nbn-slate-900: #0f172a;
  --nbn-slate-800: #1e293b;
  --nbn-slate-700: #334155;
  --nbn-slate-600: #475569;
  --nbn-slate-500: #64748b;
  --nbn-slate-200: #e2e8f0;
  --nbn-slate-100: #f1f5f9;
  --nbn-slate-50:  #f8fafc;
  --nbn-white:     #ffffff;
  --nbn-radius:    14px;
  --nbn-shadow:    0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --nbn-shadow-hover: 0 10px 30px -4px rgba(212, 175, 55, 0.18);
  --nbn-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.nbn-reviews-wrapper {
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--nbn-slate-800);
  box-sizing: border-box;
}

.nbn-reviews-wrapper *,
.nbn-reviews-wrapper *::before,
.nbn-reviews-wrapper *::after {
  box-sizing: inherit;
}

/* -------------------------------------------------------------
   1. Google Reviews Aggregate Header
   ------------------------------------------------------------- */
.nbn-reviews-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.nbn-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--nbn-white);
  padding: 10px 18px;
  border-radius: 40px;
  border: 1px solid var(--nbn-slate-200);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.nbn-google-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nbn-header-meta {
  display: flex;
  flex-direction: column;
}

.nbn-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--nbn-slate-900);
}

.nbn-brand-name {
  color: var(--nbn-slate-900);
}

.nbn-rating-number {
  color: var(--nbn-gold-dark);
  font-weight: 800;
}

.nbn-header-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--nbn-slate-500);
}

.nbn-stars-gold {
  color: var(--nbn-gold);
  letter-spacing: 2px;
  font-size: 14px;
}

.nbn-count-tag {
  font-weight: 500;
}

/* -------------------------------------------------------------
   2. Interactive Category Filter Tabs
   ------------------------------------------------------------- */
.nbn-category-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  padding-bottom: 6px;
}

.nbn-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nbn-slate-600);
  background: var(--nbn-slate-100);
  border: 1px solid var(--nbn-slate-200);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--nbn-transition);
  outline: none;
  line-height: 1.2;
}

.nbn-filter-tab:hover {
  background: var(--nbn-gold-light);
  color: var(--nbn-gold-dark);
  border-color: rgba(212, 175, 55, 0.4);
}

.nbn-filter-tab.is-active {
  background: var(--nbn-slate-900);
  color: var(--nbn-white);
  border-color: var(--nbn-slate-900);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.nbn-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nbn-gold);
  display: inline-block;
}

.nbn-tab-count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 12px;
  font-size: 11px;
}

.nbn-filter-tab.is-active .nbn-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--nbn-white);
}

/* -------------------------------------------------------------
   2.5. Category Benefit & Consultation Summary Box
   ------------------------------------------------------------- */
.nbn-category-summaries-wrap {
  width: 100%;
  margin-bottom: 24px;
}

.nbn-category-summary-box {
  width: 100%;
  max-width: 50%; /* Strictly within 50% of desktop viewport */
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(254, 249, 231, 0.75) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-left: 4px solid var(--nbn-gold-dark);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nbn-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nbn-gold-dark);
  background: rgba(212, 175, 55, 0.14);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 9px;
}

.nbn-summary-title {
  margin: 0 0 8px 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--nbn-slate-900);
  line-height: 1.35;
}

.nbn-summary-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--nbn-slate-700);
}

.nbn-summary-readmore-btn {
  display: none; /* Hidden on desktop */
}

/* Mobile responsive constraints */
@media (max-width: 768px) {
  .nbn-category-summary-box {
    max-width: 100%; /* Full width on mobile */
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .nbn-summary-title {
    font-size: 15px;
  }

  .nbn-summary-text {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
  }

  .nbn-summary-text.is-expanded {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .nbn-summary-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    background: none;
    border: none;
    padding: 4px 0;
    color: var(--nbn-gold-dark);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
  }

  .nbn-summary-readmore-btn .nbn-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
  }
}

/* -------------------------------------------------------------
   3. Review Cards & Grid Layouts
   ------------------------------------------------------------- */
.nbn-reviews-grid {
  display: grid;
  gap: 20px;
  width: 100%;
}

/* Columns */
.nbn-cols-1 .nbn-reviews-grid { grid-template-columns: 1fr; }
.nbn-cols-2 .nbn-reviews-grid { grid-template-columns: repeat(2, 1fr); }
.nbn-cols-3 .nbn-reviews-grid { grid-template-columns: repeat(3, 1fr); }
.nbn-cols-4 .nbn-reviews-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
  .nbn-cols-3 .nbn-reviews-grid,
  .nbn-cols-4 .nbn-reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nbn-cols-2 .nbn-reviews-grid,
  .nbn-cols-3 .nbn-reviews-grid,
  .nbn-cols-4 .nbn-reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* Review Card Design */
.nbn-review-card {
  background: var(--nbn-white);
  border: 1px solid var(--nbn-slate-200);
  border-radius: var(--nbn-radius);
  box-shadow: var(--nbn-shadow);
  display: flex;
  flex-direction: column;
  transition: var(--nbn-transition);
  position: relative;
  overflow: hidden;
}

.nbn-review-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nbn-gold), #fef08a, var(--nbn-gold));
  opacity: 0;
  transition: var(--nbn-transition);
}

.nbn-review-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--nbn-shadow-hover);
}

.nbn-review-card:hover::before {
  opacity: 1;
}

.nbn-card-inner {
  padding: 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header */
.nbn-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.nbn-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nbn-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--nbn-slate-100);
}

.nbn-author-initials-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nbn-slate-900), var(--nbn-slate-700));
  color: var(--nbn-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.nbn-author-details {
  display: flex;
  flex-direction: column;
}

.nbn-author-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--nbn-slate-900);
  line-height: 1.25;
}

.nbn-review-time {
  font-size: 12px;
  color: var(--nbn-slate-500);
  margin-top: 2px;
}

.nbn-google-mark {
  opacity: 0.85;
}

/* Stars Row */
.nbn-stars-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.nbn-verified-chip {
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 10px;
}

/* Review Text */
.nbn-review-body {
  flex-grow: 1;
  margin-bottom: 16px;
}

.nbn-review-paragraph {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--nbn-slate-700);
}

.nbn-rating-only {
  font-size: 13px;
  font-style: italic;
  color: var(--nbn-slate-500);
  background: rgba(241, 245, 249, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--nbn-slate-300);
}

.nbn-rating-only-star {
  color: #f59e0b;
  font-style: normal;
  font-size: 14px;
}

/* Owner Reply Box (from Google Business Profile) */
.nbn-owner-reply-box {
  margin-top: 14px;
  background: #fdfbf7;
  border: 1px solid #f3ebd6;
  border-left: 3px solid var(--nbn-gold);
  border-radius: 8px;
  padding: 11px 14px;
}

.nbn-owner-reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nbn-slate-900);
}

.nbn-owner-title {
  color: var(--nbn-gold-dark);
}

.nbn-owner-reply-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--nbn-slate-500);
  font-weight: 400;
}

.nbn-owner-reply-text {
  margin: 6px 0 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--nbn-slate-600);
  font-style: italic;
}

/* Category Chips */
.nbn-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--nbn-slate-200);
}

.nbn-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--nbn-gold-dark);
  background: var(--nbn-gold-light);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* -------------------------------------------------------------
   4. Slider / Carousel Layout
   ------------------------------------------------------------- */
.nbn-layout-slider {
  position: relative;
}

.nbn-slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.nbn-slider-prev,
.nbn-slider-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nbn-white);
  border: 1px solid var(--nbn-slate-200);
  color: var(--nbn-slate-800);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--nbn-transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.nbn-slider-prev:hover,
.nbn-slider-next:hover {
  background: var(--nbn-slate-900);
  color: var(--nbn-gold);
  border-color: var(--nbn-slate-900);
}

.nbn-slider-track {
  display: flex !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 20px;
  padding-bottom: 15px;
  -webkit-overflow-scrolling: touch;
}

.nbn-slider-track::-webkit-scrollbar {
  height: 6px;
}

.nbn-slider-track::-webkit-scrollbar-track {
  background: var(--nbn-slate-100);
  border-radius: 4px;
}

.nbn-slider-track::-webkit-scrollbar-thumb {
  background: var(--nbn-slate-300);
  border-radius: 4px;
}

.nbn-slider-track .nbn-review-card {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 290px;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .nbn-slider-track .nbn-review-card {
    flex: 0 0 85%;
  }
}

/* -------------------------------------------------------------
   5. Dark & Light Themes
   ------------------------------------------------------------- */
.nbn-theme-luxury-gold .nbn-review-card {
  border-color: rgba(212, 175, 55, 0.28);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.08);
}

.nbn-theme-luxury-gold .nbn-review-card:hover {
  border-color: var(--nbn-gold);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.nbn-theme-light .nbn-review-card {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nbn-theme-light .nbn-author-name {
  color: #0f172a;
}

.nbn-theme-light .nbn-review-paragraph {
  color: #475569;
}

.nbn-theme-light .nbn-header-badge {
  background: #ffffff;
  border-color: #e2e8f0;
}

.nbn-theme-light .nbn-category-summary-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.nbn-theme-light .nbn-summary-title {
  color: #0f172a;
}

.nbn-theme-light .nbn-summary-text {
  color: #475569;
}

.nbn-theme-dark .nbn-review-card {
  background: var(--nbn-slate-900);
  border-color: var(--nbn-slate-700);
  color: var(--nbn-slate-100);
}

.nbn-theme-dark .nbn-author-name {
  color: var(--nbn-white);
}

.nbn-theme-dark .nbn-review-paragraph {
  color: #cbd5e1;
}

.nbn-theme-dark .nbn-header-badge {
  background: var(--nbn-slate-900);
  border-color: var(--nbn-slate-700);
}

.nbn-theme-dark .nbn-header-title {
  color: var(--nbn-white);
}

.nbn-theme-dark .nbn-category-summary-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.nbn-theme-dark .nbn-summary-title {
  color: var(--nbn-white);
}

.nbn-theme-dark .nbn-summary-text {
  color: #cbd5e1;
}

.nbn-theme-dark .nbn-summary-text strong {
  color: #fef08a;
}

/* -------------------------------------------------------------
   7. Load More Reviews Button
   ------------------------------------------------------------- */
.nbn-load-more-wrap {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 16px;
  display: block;
}

.nbn-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--nbn-white);
  color: var(--nbn-slate-800);
  border: 1.5px solid var(--nbn-gold);
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.12);
  transition: var(--nbn-transition);
}

.nbn-load-more-btn:hover {
  background: linear-gradient(135deg, #d4af37 0%, #b89726 100%);
  color: var(--nbn-white);
  border-color: #b89726;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.nbn-load-more-btn .nbn-arrow {
  display: inline-block;
  font-size: 15px;
  transition: transform 0.2s ease;
}

.nbn-load-more-btn:hover .nbn-arrow {
  transform: translateY(2px);
}

.nbn-theme-dark .nbn-load-more-btn {
  background: var(--nbn-slate-800);
  color: var(--nbn-slate-100);
  border-color: rgba(212, 175, 55, 0.5);
}

.nbn-theme-dark .nbn-load-more-btn:hover {
  background: linear-gradient(135deg, #d4af37 0%, #b89726 100%);
  color: var(--nbn-white);
}

.nbn-theme-dark .nbn-rating-only {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
}


