/* ============================================================
 * home-references.css  —  v2 (Marquee Redesign)
 * Sonsuz kayan referans logoları bandı
 * ============================================================ */

/* ── Bölüm header ────────────────────────────────────────── */
.page-home .ref-marquee__head {
  margin-bottom: clamp(24px, 3vw, 40px);
}

/* "Tümünü gör" butonu */
.page-home .ref-marquee__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--color-line, #dfe7f0);
  border-radius: 6px;
  background: #fff;
  color: var(--color-ink-600, #4a6072);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .22s, color .22s, transform .2s, box-shadow .22s;
}

.page-home .ref-marquee__link:hover {
  border-color: var(--color-brand, #1098a2);
  color: var(--color-brand, #1098a2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 152, 162, .12);
}

/* ── Bölüm footer ────────────────────────────────────────── */
.page-home .ref-marquee__footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* ── Marquee kayan bant ───────────────────────────────────── */
.ref-belt {
  position: relative;
  overflow: hidden;
  /* Yan soluk geçişler (fade kenarlar) */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

/* Track: öğeler tek satırda, JS tarafından kontrol edilir */
.ref-belt__track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  padding: 12px 0 16px;
  will-change: transform;
  /* JS devralana kadar CSS animasyonu çalışır */
  animation: ref-marquee-scroll 28s linear infinite;
}

/* JS devraldığında animasyonu devre dışı bırak */
.ref-belt__track.js-controlled {
  animation: none !important;
}

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

/* Erişilebilirlik: hareketi azalt tercihinde durdur */
@media (prefers-reduced-motion: reduce) {
  .ref-belt__track {
    animation: none;
  }
  .ref-belt {
    -webkit-mask-image: none;
    mask-image: none;
    overflow-x: auto;
  }
  .ref-belt__track {
    flex-wrap: wrap;
    width: auto;
    padding: 8px 16px;
    justify-content: center;
  }
}

/* ── Tek kart ────────────────────────────────────────────── */
.ref-belt__item {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  height: 78px;
  padding: 14px 22px;
  border: 1px solid #dce7f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(10, 37, 64, .04);
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
  cursor: default;
}

.ref-belt__item:hover {
  border-color: rgba(14, 159, 170, .4);
  box-shadow: 0 6px 20px rgba(10, 37, 64, .08);
  transform: translateY(-3px);
}

/* Logo resmi */
.ref-belt__item img {
  display: block;
  max-width: 130px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .25s ease, opacity .25s ease;
  flex-shrink: 0;
}

.ref-belt__item:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* Metin badge (logo yoksa veya yüklenemezse) */
.ref-belt__badge {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid color-mix(in srgb, var(--badge-accent, #0e9faa) 30%, #e7eef5);
  border-radius: 8px;
  color: var(--badge-accent, #0e9faa);
  background: color-mix(in srgb, var(--badge-accent, #0e9faa) 8%, #fff);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.ref-belt__name {
  display: none;
  min-width: 0;
  color: #0a2540;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* Sadece metin modu */
.ref-belt__item.is-text-only {
  justify-content: flex-start;
  min-width: 180px;
}

.ref-belt__item.is-text-only .ref-belt__badge {
  display: grid;
}

.ref-belt__item.is-text-only .ref-belt__name {
  display: block;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 760px) {

  .ref-belt__item {
    min-width: 130px;
    height: 64px;
    padding: 10px 16px;
  }

  .ref-belt__item img {
    max-width: 100px;
    max-height: 36px;
  }

  .ref-belt__track {
    gap: 10px;
    animation-duration: 22s;
  }
}
