/* ===== Wrapper Utama ===== */
.ticker-wrapper {
    position: relative;
    background: #02747c;
    /* border-radius: 8px; */
    overflow: hidden;
    /* font-family: 'Segoe UI', Tahoma, sans-serif; */
    box-shadow: 0 4px 12px rgba(165, 3, 16, 0.466);
    margin: 20px 0;
    width: 80%;
}

/* ===== Label / Title ===== */
.ticker-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20%;
    height: 100%;
    background: linear-gradient(135deg, #ff003c, #b30059);
    clip-path: polygon(0 0,
            70% 0,
            100% 100%,
            100% 100%,
            0 100%);
    display: flex;
    align-items: center;
    justify-content: start;
    z-index: 2;
    /* box-shadow: 4px 0 15px rgba(0, 0, 0, 0.4); */
    font-size: 1.7vw;
    gap: 3px;
    padding-left: 5px;
}

.ticker-icon {
    animation: blink 1.5s infinite;
    font-size: 1.7vw;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===== Container Ticker ===== */
.ticker-container {
    position: relative;
    overflow: hidden;
    height: 70px;
    /* Sesuaikan tinggi item */
    background: #16213e00;
}

/* Track yang bergerak */
.ticker-track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    gap: 10px;
    /* Jarak antar item */

    /* Animasi scrolling */
    animation: scrollLeft linear infinite;
    animation-play-state: running;
    will-change: transform;
}

/* Keyframes animasi */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
        /* Geser 50% karena ada 2 group duplikat */
    }
}

/* ===== Item Ticker ===== */
.ticker-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    /* Mencegah item mengecil */
}

.ticker-link {
    display: flex;
    align-items: start;
    gap: 12px;
    text-decoration: none;
    color: #e0e0e0;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-direction: column;
}

/* Hover effect pada link */
.ticker-link:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #ffffff;
}

.ticker-headline {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.ticker-time {
    font-size: 12px;
    color: #8892b0;
    font-weight: 400;
}

/* ===== Tombol Control ===== */
.ticker-controls {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(22, 33, 62, 0.9);
    border-radius: 50%;
    padding: 2px;
}

.ticker-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 12px;
}

.ticker-btn:hover {
    background: #e94560;
}

/* ===== Class untuk Pause via JS ===== */
.ticker-track.paused {
    animation-play-state: paused !important;
}

/* ===== Responsive Mobile ===== */
@media (max-width: 768px) {
    .ticker-label {
        padding: 8px 12px;
    }

    .ticker-container {
        height: 44px;
    }

    .ticker-headline {
        font-size: 13px;
    }

    .ticker-time {
        display: none;
        /* Sembunyikan waktu di mobile */
    }

    .ticker-track {
        gap: 20px;
    }
}

/* ===== Utility: Sembunyikan saat JS belum load ===== */
.ticker-track {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ticker-track.loaded {
    opacity: 1;
}