/* Section Jaringan TUK: peta, filter, dan kartu TUK. */

.tuk-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.tuk-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  cursor: pointer;
}

.tuk-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}

@media (max-width:940px) {
  .tuk-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:640px) {
  .tuk-grid {
    grid-template-columns: 1fr;
  }
}

.tuk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tuk-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tuk-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.tuk-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tuk-logo.placeholder {
  background: var(--brand-black);
  color: var(--gold-ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.tuk-name {
  font-size: .98rem;
  color: var(--text);
  line-height: 1.3;
  font-weight: 600;
}

.tuk-kota {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--gold-ink);
  letter-spacing: .04em;
  margin-top: 4px;
}

.tuk-bintang {
  display: flex;
  gap: 1px;
  margin-top: 5px;
  font-size: .95rem;
  line-height: 1;
}

.tuk-bintang .on {
  color: var(--gold-ink);
}

.tuk-bintang .off {
  color: var(--border);
}

.tuk-skema {
  font-size: .8rem;
  color: var(--text-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.tuk-more {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.tuk-more[hidden] {
  display: none;
}

.tuk-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.tuk-contact a {
  color: var(--text-soft);
  text-decoration: none;
  word-break: break-word;
}

.tuk-contact a:hover {
  color: var(--gold-ink);
}

.tuk-empty {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-soft);
  padding: 40px 0;
}

.tuk-map-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 6px;
  overflow: hidden;
}

.tuk-map-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.tuk-map-pins {
  position: absolute;
  inset: 18px;
}

.tuk-map-pin {
  position: absolute;
  transform: translate(-50%,-50%);
  z-index: 2;
}

.tuk-map-dot {
  position: relative;
  display: block;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(245,197,24,.16);
}

.tuk-map-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  opacity: .55;
  animation: tuk-map-pulse 2.4s ease-out infinite;
}

@keyframes tuk-map-pulse {
  0% {
    transform: scale(.5);
    opacity: .6;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.tuk-map-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--brand-black);
  border: 1px solid var(--accent-gold);
  border-radius: 6px;
  padding: 7px 12px;
  white-space: nowrap;
  font-size: .76rem;
  color: var(--on-black);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 5;
}

.tuk-map-tooltip b {
  display: block;
  font-family: var(--font-display);
  font-size: .86rem;
  color: var(--gold-ink);
  letter-spacing: .02em;
}

.tuk-map-pin:hover .tuk-map-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tuk-map-credit {
  font-size: .68rem;
  color: var(--text-soft);
  opacity: .6;
  text-align: right;
  margin: 0 0 22px;
}

@media (prefers-reduced-motion: reduce) {
  .tuk-map-dot::before {
    animation: none;
  }
}

@media (max-width:640px) {
  .tuk-map-wrap {
    padding: 12px;
  }
  .tuk-map-pins {
    inset: 12px;
  }
}

.tuk-search {
  max-width: 340px;
  margin-bottom: 0;
}

/* Kartu TUK berjalan (beranda tanpa filter): semua TUK bergiliran, dua jalur berlawanan arah. */
.tuk-grid--jalan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Tepi kiri-kanan memudar supaya kartu tampak masuk-keluar dengan halus. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.tuk-jalur {
  overflow: hidden;
  padding: 4px 0;
}

.tuk-jalur-isi {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: tuk-jalan linear infinite;
}

.tuk-jalur.balik .tuk-jalur-isi {
  animation-direction: reverse;
}

.tuk-grid--jalan:hover .tuk-jalur-isi,
.tuk-grid--jalan:focus-within .tuk-jalur-isi {
  animation-play-state: paused;
}

.tuk-grid--jalan .tuk-card {
  flex: none;
  width: 320px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.tuk-grid--jalan .tuk-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

/* Gap ikut digeser supaya sambungan salinan pas di -50%. */
@keyframes tuk-jalan {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 9px)); }
}

@media (max-width:640px) {
  .tuk-grid--jalan .tuk-card {
    width: 270px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tuk-grid--jalan {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .tuk-jalur {
    overflow-x: auto;
  }
  .tuk-jalur-isi {
    animation: none;
  }
  .tuk-jalur-isi .salinan {
    display: none;
  }
}
