/* =========================================================
   PROJECT: Batam All Transport - Top Icon Menu
   UPDATE: Symmetrical End-Gap Fix (Hard Cut 10px)
   ========================================================= */

/* --- 1. CONTAINER UTAMA --- */
.top-icon-wrapper {
    width: 100%;
    background: transparent;
    padding: 10px 0;
    margin-top: 5px;
    overflow-x: auto;
    display: flex;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* HARD CUT: Memotong bersih 10px sebelum tepi layar */
    -webkit-mask-image: linear-gradient(
        to right,
        black 0%,
        black calc(100% - 10px),
        transparent calc(100% - 10px)
    );
    mask-image: linear-gradient(
        to right,
        black 0%,
        black calc(100% - 10px),
        transparent calc(100% - 10px)
    );
}

.top-icon-wrapper::-webkit-scrollbar {
    display: none;
}

/* --- 2. ITEM MENU STYLING --- */
.top-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 0 5px; /* Jarak rapat antar ikon */
    min-width: 73px; /* Ukuran item yang lebih padat */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

/* --- 3. LINGKARAN IKON --- */
.icon-circle {
    width: 60px;
    height: 60px;
    background: #008751;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    margin-bottom: 15px;
}

/* --- 4. SVG IKON & TEKS --- */
.top-icon-item svg {
    width: 34px;
    height: 34px;
    fill: #ffffff;
}

.top-icon-item span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #444;
    text-align: center;
    line-height: 1.2;
}

/* --- 5. EFEK HOVER --- */
.top-icon-item:hover .icon-circle {
    transform: translateY(-6px);
    background-color: #006b40;
}

/* --- 6. RESPONSIVE LOGIC (PERBAIKAN JARAK KANAN) --- */
@media (min-width: 992px) {
    .top-icon-wrapper {
        justify-content: center;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (max-width: 991px) {
    .top-icon-wrapper {
        justify-content: flex-start;
        padding-left: 5px; /* Jarak 10px dari tepi kiri layar */
        padding-right: 0;
        box-sizing: border-box;
    }

    .top-icon-item:first-child {
        margin-left: 0;
        padding-left: 0;
    }

    /* SOLUSI: Menggunakan Margin Right pada item terakhir */
    .top-icon-item:last-child {
        /* Tambahkan margin kanan agar ada ruang kosong sebelum garis Hard Cut */
        /* Ini akan membuat icon EMAIL tidak menempel saat di-scroll mentok */
        margin-right: 20px;
        padding-right: 5px; /* Samakan dengan padding standar lainnya */
    }
}
