/* ==========================================================================
   Hira Facebook Reviews — fb-reviews.css
   Facebook-recommendation style cards, themed for Hira Compounds.
   ========================================================================== */

.hfb-wrap {
  --hfb-navy:   #14304f;
  --hfb-blue:   #2f6fed;
  --hfb-fb:     #1877f2;
  --hfb-muted:  #8a97a6;
  --hfb-border: #e6ebf1;
  font-family: inherit;
  color: var(--hfb-navy);
  box-sizing: border-box;
}
.hfb-wrap *, .hfb-wrap *::before, .hfb-wrap *::after { box-sizing: border-box; }

/* ── Summary header ──────────────────────────────────────────── */
.hfb-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--hfb-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(20,48,79,.04);
}
.hfb-summary-fb { flex-shrink: 0; }
.hfb-summary-pct { font-size: 1.15rem; font-weight: 800; color: var(--hfb-blue); }
.hfb-summary-count { font-size: 1rem; color: var(--hfb-muted); font-weight: 600; }

/* ── Grid ────────────────────────────────────────────────────── */
.hfb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ── Card ────────────────────────────────────────────────────── */
.hfb-card {
  background: #fff;
  border: 1px solid var(--hfb-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(20,48,79,.04);
  transition: box-shadow .2s, transform .2s;
}
.hfb-card:hover { box-shadow: 0 8px 24px rgba(20,48,79,.09); transform: translateY(-2px); }

.hfb-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.hfb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef3f6;
}
.hfb-avatar--init {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hfb-navy);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.hfb-meta { flex: 1; min-width: 0; }
.hfb-name {
  font-size: .98rem;
  font-weight: 700;
  color: var(--hfb-navy);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hfb-recommends {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--hfb-muted);
  line-height: 1.3;
  margin-top: 2px;
}
.hfb-recommends b { color: var(--hfb-blue); font-weight: 700; }
.hfb-rec-icon { color: var(--hfb-fb); flex-shrink: 0; }
.hfb-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  color: var(--hfb-muted);
  margin-top: 3px;
}
.hfb-fb-logo { flex-shrink: 0; margin-left: 4px; }

.hfb-text {
  font-size: 1rem;
  line-height: 1.55;
  color: #2b3a4a;
  margin: 2px 0 0;
  flex: 1;
}

.hfb-likes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hfb-border);
}
.hfb-like-ico { display: inline-flex; }
.hfb-like-count { font-size: .85rem; color: var(--hfb-muted); font-weight: 600; }

.hfb-empty {
  padding: 24px;
  text-align: center;
  color: var(--hfb-muted);
  border: 1px dashed var(--hfb-border);
  border-radius: 12px;
  font-size: .9rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hfb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hfb-grid { grid-template-columns: 1fr; }
  .hfb-summary { flex-wrap: wrap; }
}

/* ── Reactions row (like / love) + comments ──────────────────── */
.hfb-react { display: inline-flex; align-items: center; }
.hfb-comments { margin-left: auto; font-size: .82rem; color: var(--hfb-muted); }

/* ── Slider ──────────────────────────────────────────────────── */
.hfb-slider { position: relative; }
.hfb-viewport { overflow: hidden; }
.hfb-track {
  display: flex;
  align-items: stretch;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.hfb-slide { display: flex; box-sizing: border-box; }
.hfb-slide > .hfb-card { width: 100%; }

.hfb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--hfb-border);
  background: #fff;
  color: var(--hfb-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20,48,79,.14);
  transition: background .15s, color .15s, opacity .15s;
}
.hfb-arrow:hover { background: var(--hfb-blue); color: #fff; border-color: var(--hfb-blue); }
.hfb-arrow:disabled { opacity: .35; cursor: default; }
/* Arrows sit in a gutter created by --hfb-arrow-space, so they never
   overlap the review cards. Adjust via the "Arrow Spacing" control. */
.hfb-slider.hfb-has-arrows {
  padding-left: var(--hfb-arrow-space, 48px);
  padding-right: var(--hfb-arrow-space, 48px);
}
.hfb-prev { left: 0; }
.hfb-next { right: 0; }

.hfb-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}
.hfb-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cdd8e2;
  cursor: pointer;
  transition: background .2s, width .2s;
}
.hfb-dot.is-active { background: var(--hfb-blue); width: 22px; border-radius: 5px; }

.hfb-slider.hfb-static .hfb-track { transform: none !important; }

@media (max-width: 600px) {
  .hfb-slider.hfb-has-arrows { padding-left: 34px; padding-right: 34px; }
}

/* ── Circular avatar guard (beats theme img styles) ──────────── */
.hfb-wrap .hfb-avatar,
.hfb-wrap img.hfb-avatar {
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex-shrink: 0;
}

/* ── Header button (Write a Review / View Profile) ───────────── */
.hfb-header-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hfb-fb);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.hfb-header-btn:hover { background: var(--hfb-navy); color: #fff; transform: translateY(-1px); }
.hfb-header-btn svg { flex-shrink: 0; }
@media (max-width: 640px) {
  .hfb-header-btn { margin-left: 0; }
}
