/* ==========================================================================
   TRUST COMPONENTS
   ========================================================================== */

/* --- Stars ---------------------------------------------------------------- */

.stars { position: relative; display: inline-block; line-height: 1; font-size: var(--star-size, 18px); letter-spacing: 2px; }
.stars__track { color: var(--hbr-hairline); }
.stars__fill { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; color: var(--hbr-accent); }

/* --- Credential bar ------------------------------------------------------- */

.credbar {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--hbr-space-3) var(--hbr-space-6);
  align-items: center;
}
.credbar__item { display: flex; align-items: center; gap: 10px; }
.credbar__icon { color: var(--hbr-accent); display: flex; }
.credbar__text { display: flex; flex-direction: column; line-height: 1.25; }
.credbar__text strong { font-family: var(--hbr-font-head); font-size: 17px; font-weight: var(--hbr-w-bold); color: var(--hbr-charcoal); }
.credbar__text span { font-size: 13px; color: var(--hbr-text-muted); }
.credbar--dark .credbar__text strong { color: var(--hbr-white); }
.credbar--dark .credbar__text span { color: rgba(255,255,255,0.65); }

/* --- Rating --------------------------------------------------------------- */

.rating { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rating__text { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--hbr-text-muted); }
.rating__text strong { font-family: var(--hbr-font-head); font-size: 20px; font-weight: var(--hbr-w-extrabold); color: var(--hbr-charcoal); }
.rating__text a { color: var(--hbr-accent); text-decoration: underline; text-underline-offset: 3px; }
.section--dark .rating__text strong { color: var(--hbr-white); }
.section--dark .rating__text { color: rgba(255,255,255,0.72); }
.rating--compact .rating__text strong { font-size: 16px; }

/* --- Reviews -------------------------------------------------------------- */

.review {
  margin: 0; background: var(--hbr-white);
  border: 1px solid var(--hbr-hairline); border-top: 3px solid var(--hbr-accent);
  border-radius: var(--hbr-radius); padding: var(--hbr-space-5);
  display: flex; flex-direction: column; gap: var(--hbr-space-3);
  box-shadow: var(--hbr-shadow-s);
}
.review blockquote { margin: 0; border: 0; padding: 0; background: none; }
.review blockquote p { margin: 0; color: var(--hbr-charcoal); font-size: 16px; line-height: 27px; }
.review figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.review figcaption strong { font-family: var(--hbr-font-head); font-size: 15px; font-weight: var(--hbr-w-bold); color: var(--hbr-charcoal); }
.review figcaption span { font-size: 13px; color: var(--hbr-text-muted); }

/* --- Logo strip ----------------------------------------------------------- */

.logostrip { text-align: center; }
.logostrip__label {
  font-family: var(--hbr-font-head); font-size: 12px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-text-muted); text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 var(--hbr-space-4);
}
.logostrip__track { display: flex; align-items: center; justify-content: center; gap: var(--hbr-space-7); flex-wrap: wrap; }
.logostrip__item img { height: 46px; width: auto; opacity: 0.75; filter: grayscale(1); transition: opacity var(--hbr-duration) var(--hbr-ease), filter var(--hbr-duration) var(--hbr-ease); }
.logostrip__item img:hover { opacity: 1; filter: none; }

.logostrip__track.is-scrolling {
  flex-wrap: nowrap; justify-content: flex-start;
  animation: logoscroll 28s linear infinite;
  width: max-content;
}
.logostrip:hover .is-scrolling { animation-play-state: paused; }
@keyframes logoscroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logostrip__track.is-scrolling { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

/* --- Stats ---------------------------------------------------------------- */

.statrow { gap: 16px; }
.stat { border-radius: var(--hbr-radius); padding: 26px 22px; border-bottom: 3px solid var(--hbr-accent); }
.statrow--dark .stat { background: var(--hbr-charcoal); color: var(--hbr-white); }
.statrow--light .stat { background: var(--hbr-bg-alt); color: var(--hbr-charcoal); }
.stat__value { display: block; font-family: var(--hbr-font-head); font-size: 34px; font-weight: var(--hbr-w-extrabold); line-height: 1.1; margin-bottom: 6px; }
.stat__label { display: block; font-size: 14px; }
.statrow--dark .stat__label { color: rgba(255,255,255,0.72); }
.statrow--light .stat__label { color: var(--hbr-text-muted); }
.stat__source { display: block; margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.55; }

/* --- Before / after ------------------------------------------------------- */

.ba { margin: 0; }
.ba__pane { position: relative; border-radius: var(--hbr-radius); overflow: hidden; }
.ba__img { display: block; width: 100%; height: auto; }
/* Without JS the two images stack, which is a fair presentation, not a break. */
.ba__clip { position: static; }
.ba__range, .ba__handle { display: none; }

.ba.is-interactive .ba__pane { aspect-ratio: 16/10; }
.ba.is-interactive .ba__img--after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba.is-interactive .ba__clip {
  position: absolute; inset: 0; width: 50%; overflow: hidden;
  border-right: 3px solid var(--hbr-white);
}
.ba.is-interactive .ba__clip .ba__img { position: absolute; inset: 0; width: 100vw; max-width: none; height: 100%; object-fit: cover; }
.ba.is-interactive .ba__range {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0; z-index: 3;
}
.ba.is-interactive .ba__handle {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: var(--hbr-white); border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,.28); pointer-events: none;
}
.ba.is-interactive .ba__handle::before { content: "⟷"; color: var(--hbr-charcoal); font-size: 16px; }
.ba__tag {
  position: absolute; bottom: 12px; z-index: 2;
  background: rgba(32,38,41,.82); color: #fff;
  font-family: var(--hbr-font-head); font-size: 11px; font-weight: var(--hbr-w-bold);
  text-transform: uppercase; letter-spacing: .1em;
  padding: 5px 10px; border-radius: var(--hbr-radius-sm);
}
.ba__tag--before { left: 12px; }
.ba__tag--after { right: 12px; }
.ba figcaption { margin-top: var(--hbr-space-3); font-size: 14px; color: var(--hbr-text-muted); }

/* --- Guarantee ------------------------------------------------------------ */

.guarantee {
  display: flex; gap: var(--hbr-space-4);
  background: var(--hbr-bg-alt); border-left: 4px solid var(--hbr-accent);
  border-radius: 0 var(--hbr-radius) var(--hbr-radius) 0; padding: var(--hbr-space-5);
}
.guarantee__icon { color: var(--hbr-accent); flex: 0 0 auto; }
.guarantee__title { font-family: var(--hbr-font-head); font-size: 19px; font-weight: var(--hbr-w-bold); color: var(--hbr-charcoal); margin: 0 0 6px; }
.guarantee__body { color: var(--hbr-text-muted); margin: 0 0 8px; }
.guarantee__terms { font-size: 13px; color: var(--hbr-text-muted); margin: 0; }

/* --- Team ----------------------------------------------------------------- */

.teamcard { background: var(--hbr-white); border: 1px solid var(--hbr-hairline); border-radius: var(--hbr-radius); overflow: hidden; padding-bottom: var(--hbr-space-4); box-shadow: var(--hbr-shadow-s); }
.teamcard__media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.teamcard__name { font-family: var(--hbr-font-head); font-size: 19px; font-weight: var(--hbr-w-bold); color: var(--hbr-charcoal); margin: var(--hbr-space-4) var(--hbr-space-4) 2px; }
.teamcard__role { color: var(--hbr-accent); font-size: 14px; font-weight: var(--hbr-w-semibold); margin: 0 var(--hbr-space-4) 8px; }
.teamcard__cred { font-size: 13px; color: var(--hbr-text-muted); margin: 0 var(--hbr-space-4) 8px; }
.teamcard__bio { font-size: 15px; line-height: 24px; color: var(--hbr-text-muted); margin: 0 var(--hbr-space-4); }

/* --- Sticky call bar ------------------------------------------------------ */

.callbar { display: none; }
@media (max-width: 767px) {
  .callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--hbr-white); border-top: 1px solid var(--hbr-hairline);
    box-shadow: 0 -4px 18px rgba(0,0,0,.1);
    padding: 8px; gap: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .callbar__btn {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; border-radius: var(--hbr-radius);
    font-family: var(--hbr-font-body); font-weight: var(--hbr-w-semibold); font-size: 15px;
  }
  .callbar__btn--call { background: var(--hbr-charcoal); color: var(--hbr-white); }
  .callbar__btn--cta { background: var(--hbr-accent); color: var(--hbr-white); }
  /* Keep the bar from covering the footer's last line. */
  body { padding-bottom: 64px; }
}

/* --- Timeline ------------------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--hbr-hairline); }
.timeline__item { position: relative; padding: 0 0 var(--hbr-space-5) 44px; }
.timeline__marker { position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--hbr-white); border: 3px solid var(--hbr-accent); }
.timeline__meta { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--hbr-accent); font-weight: var(--hbr-w-bold); margin-bottom: 4px; }
.timeline__title { font-family: var(--hbr-font-head); font-size: 18px; font-weight: var(--hbr-w-bold); color: var(--hbr-charcoal); margin: 0 0 4px; }
.timeline__item p { color: var(--hbr-text-muted); margin: 0; font-size: 16px; line-height: 26px; }

@media (max-width: 767px) {
  .credbar { gap: var(--hbr-space-3) var(--hbr-space-4); }
  .statrow { gap: 12px; }
  .stat__value { font-size: 28px; }
  .logostrip__track { gap: var(--hbr-space-5); }
  .logostrip__item img { height: 34px; }
  .guarantee { flex-direction: column; gap: var(--hbr-space-3); }
}

/* Catalogue page code snippets */
.snippet {
  background: var(--hbr-charcoal); color: #E6EAF0;
  border-radius: var(--hbr-radius); padding: var(--hbr-space-4);
  overflow-x: auto; font-size: 13px; line-height: 20px;
  margin-top: var(--hbr-space-4);
}
.snippet code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: rgba(32,38,41,.07); padding: 1px 5px; border-radius: 3px; }
.section--dark code { background: rgba(255,255,255,.14); }

/* ==========================================================================
   WORDPRESS ADDITIONS

   The Astro template gets .grid and .ph from its own components.css. WordPress
   does not, so the shortcodes use a namespaced .hbr-grid to avoid colliding
   with Elementor's or any plugin's `.grid`.
   ========================================================================== */

.hbr-grid { display: grid; gap: var(--hbr-space-4); }
.hbr-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hbr-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hbr-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .hbr-grid--3, .hbr-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .hbr-grid--2, .hbr-grid--3, .hbr-grid--4 { grid-template-columns: 1fr; }
}

/* Elementor wraps shortcode output in .elementor-shortcode, which is inline by
   default and collapses grid children. */
.elementor-shortcode { display: block; }

/* The stats row sits inside Elementor's own containers, which already have
   padding; kill the double gap. */
.elementor-widget-shortcode .statrow { margin: 0; }
