/* ═══════════════════════════════════════════
   LENDENGINE v3 · TICKER FOOTER
   Fixed bottom bar: scrolling logos + testimonials
   Hover → pause + slide-up reveal card
═══════════════════════════════════════════ */

:root {
  --ticker-h: 64px;
  --ticker-popup-h: 180px;
}

/* ── BODY PADDING so page content clears the bar ── */
body { padding-bottom: var(--ticker-h); }

/* ══ TICKER WRAP ══ */
.ticker-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 800;
  height: 55px;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 32px rgba(10,12,18,.08);
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Fade masks on left and right edges */
.ticker-footer::before,
.ticker-footer::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-footer::before {
  left: 0;
  background: linear-gradient(to right, var(--white) 0%, transparent 100%);
}
.ticker-footer::after {
  right: 0;
  background: linear-gradient(to left, var(--white) 0%, transparent 100%);
}

/* ══ TRACK ══ */
.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: tickerScroll 155s linear infinite;
  will-change: transform;
}

.ticker-track.paused { animation-play-state: paused; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══ EACH ITEM ══ */
.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0 2rem;
  height: var(--ticker-h);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background var(--t-fast);
  border-right: 1px solid var(--border);
  user-select: none;
}

.ticker-item:hover { background: var(--off); }
.ticker-item:hover .ticker-item__divider { opacity: 0; }

/* Partner logo items */
.ticker-item--partner .ticker-item__logo-img {
  height: 80px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  /* Desaturate at rest for a clean, consistent look */
  /*filter: grayscale(100%) opacity(0.65);*/
  transition: filter var(--t-base);
}
.ticker-item--partner:hover .ticker-item__logo-img {
  filter: grayscale(0%) opacity(1);
}

/* Fallback initials badge if image fails to load */
.ticker-item__logo-fallback {
  width: 28px; height: 28px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.ticker-item--partner:hover .ticker-item__logo-fallback {
  background: var(--blue) !important;
  color: var(--white) !important;
}

/* Testimonial items */
.ticker-item--testimonial {
  background: var(--blue-pale);
  border-right-color: rgba(37,99,235,.15);
}
.ticker-item--testimonial:hover { background: var(--blue); }

.ticker-item--testimonial .ticker-item__quote {
  font-size: var(--t-xs);
  font-style: italic;
  color: var(--ink-3);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
      margin-top: -7px;
}
.ticker-item--testimonial:hover .ticker-item__quote { color: var(--white); }

.ticker-item--testimonial .ticker-item__stars {
  display: flex; gap: 2px; flex-shrink: 0;
}
.ticker-item--testimonial .ticker-item__star {
  color: var(--amber);
  font-size: 10px;
  transition: color var(--t-fast);
}
.ticker-item--testimonial:hover .ticker-item__star { color: rgba(255,255,255,.8); }

.ticker-item--testimonial .ticker-item__author {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-m);
  white-space: nowrap;
  transition: color var(--t-fast);
  margin-top:-5px;
  margin-left: 5px;
}
.ticker-item--testimonial:hover .ticker-item__author { color: rgba(255,255,255,.7); }

/* ══ SLIDE-UP POPUP CARD ══ */
.ticker-popup {
  position: fixed;
  bottom: calc(var(--ticker-h) + 8px);
  z-index: 1000;
  width: 300px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  overflow: hidden;

  /* Hidden state */
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}

.ticker-popup.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Partner popup */
.ticker-popup--partner .tp-head {
  background: var(--off);
  border-bottom: 1px solid var(--border);
  padding: var(--s4) var(--s5);
  display: flex; align-items: center; gap: var(--s4);
}
.tp-head__logo {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  background: var(--off);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.tp-head__name { font-size: var(--t-md); font-weight: 700; color: var(--ink); }
.tp-head__type { font-size: var(--t-xs); color: var(--text-m); margin-top: 2px; }

.tp-body { padding: var(--s5); }

.tp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s4); }
.tp-stat__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-m); margin-bottom: 2px; }
.tp-stat__val   { font-family: var(--font-d); font-size: var(--t-lg); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.tp-stat__val.blue { color: var(--blue); }

.tp-products { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }

.tp-cta { display: flex; align-items: center; justify-content: space-between; }

/* Testimonial popup */
.ticker-popup--testimonial .tp-testimonial-head {
  background: linear-gradient(135deg, var(--blue) 0%, #1D4ED8 100%);
  padding: var(--s5);
  position: relative; overflow: hidden;
}
.tp-testimonial-head::before {
  content: '"';
  position: absolute; top: -10px; left: var(--s4);
  font-family: var(--font-d); font-size: 80px; font-weight: 900;
  color: rgba(255,255,255,.12); line-height: 1;
  pointer-events: none;
}
.tp-testimonial-head .tp-quote {
  font-size: var(--t-sm); font-style: italic;
  color: var(--white); line-height: 1.65;
  position: relative; z-index: 1;
}
.tp-testimonial-body {
  padding: var(--s4) var(--s5);
  /*display: flex; */
  align-items: center; gap: var(--s3);
  border-top: 1px solid var(--border);
}
.tp-testimonial-body .tp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-pale); border: 2px solid var(--blue-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--blue);
  flex-shrink: 0;
}
.tp-testimonial-body .tp-person-name { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }
.tp-testimonial-body .tp-person-role { font-size: var(--t-xs); color: var(--text-m); }
.tp-testimonial-body .tp-stars { display: flex; gap: 2px; margin-top: 2px; }
.tp-testimonial-body .tp-star  { color: var(--amber); font-size: 11px; }

/* ══ RESPONSIVE ══ */
@media(max-width:768px) {
  :root { --ticker-h: 52px; }
  .ticker-item { padding: 0 var(--s5); }
  .ticker-item--testimonial .ticker-item__quote { max-width: 140px; }
  .ticker-popup { width: 260px; }
  .ticker-footer::before,
  .ticker-footer::after { width: 40px; }
}