/* ============================================
   HORIZONTAL SCROLL WITH DRAG CURSOR
   ============================================ */

/* Container for horizontal scrollable content */
.horizontal-scroll-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.horizontal-scroll-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.horizontal-scroll-track:active {
    cursor: grabbing;
}

/* Sembunyikan scrollbar total, tetap bisa di-drag/scroll */
.horizontal-scroll-track::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-track {
    scrollbar-width: none; /* Firefox */
}

/* Scroll item base styling */
.horizontal-scroll-item {
    flex-shrink: 0;
    /* Tanpa translateY di hover: transform pada kartu + foto sering membuat gambar terlihat blur di Chrome/Edge */
    transition: box-shadow 0.2s ease;
}

.horizontal-scroll-item:hover {
    transform: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

/* Drag indicator - shows when hovering over container */
.horizontal-scroll-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(90deg, rgba(13, 92, 66, 0.05) 0%, transparent 10%, transparent 90%, rgba(13, 92, 66, 0.05) 100%);
    border-radius: 12px;
    z-index: 1;
}

.horizontal-scroll-container:hover::before {
    opacity: 1;
}

/* Drag handle indicator — disabled (tidak tampilkan teks ⟨Drag⟩) */
.horizontal-scroll-container::after {
    content: none;
}

/* Navigation arrows di bawah kotak */
.horizontal-scroll-nav-wrapper {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.horizontal-scroll-nav {
    position: static;
    background: rgba(12, 84, 64, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0c5440;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.horizontal-scroll-nav:hover {
    background: rgba(12, 84, 64, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(12, 84, 64, 0.15);
}

.horizontal-scroll-nav:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.horizontal-scroll-nav.prev,
.horizontal-scroll-nav.next {
    /* tidak perlu posisi absolute lagi */
}

.horizontal-scroll-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.horizontal-scroll-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .horizontal-scroll-track {
        gap: 0.75rem;
    }

    .horizontal-scroll-container::after {
        font-size: 0.65rem;
        padding: 0.4rem 0.8rem;
    }

    .horizontal-scroll-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .horizontal-scroll-nav.prev {
        left: 5px;
    }

    .horizontal-scroll-nav.next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .horizontal-scroll-track {
        gap: 0.5rem;
    }

    .horizontal-scroll-container::after {
        display: none;
    }

    .horizontal-scroll-nav {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Smooth drag scrolling JavaScript helper */
.horizontal-scroll-track.is-dragging {
    scroll-behavior: auto;
}

/* Loading state */
.horizontal-scroll-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.horizontal-scroll-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #9ca3af;
    font-size: 0.95rem;
}

/* Nama mitra: dua baris rapi, putus di spasi, baris seimbang */
.mitra-nama {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: balance;
    line-height: 1.35;
    min-height: 2.7em;
}
