/*
 * PTUN Kupang — Breaking News ticker
 * Dynamic content is rendered by app/Views/frontend/partials/index.php.
 * Styles are isolated from home-modern.css and navbar styles.
 */

.ptun-home-2026 .ptun-breaking-news {
    width: min(100% - 48px, 1220px);
    min-height: 72px;
    margin: 18px auto 26px;
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #E2E8F2;
    border-radius: 12px;
    background: #F1F3F7;
    box-shadow: 0 8px 24px rgba(18, 35, 76, .055);
}

.ptun-home-2026 .ptun-breaking-news-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 18px;
    color: #FFFFFF;
    background: linear-gradient(120deg, #0E29CD 0%, #176CEA 100%);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.ptun-home-2026 .ptun-breaking-news-live {
    position: relative;
    display: inline-block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFCA55;
    box-shadow: 0 0 0 4px rgba(255, 202, 85, .16);
}

.ptun-home-2026 .ptun-breaking-news-viewport {
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ptun-home-2026 .ptun-breaking-news-track {
    display: flex;
    width: max-content;
    min-width: max-content;
}

.ptun-home-2026 .ptun-breaking-news-track.is-animated {
    animation: ptunBreakingNewsTicker 44s linear infinite;
}

.ptun-home-2026 .ptun-breaking-news-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 30px;
    padding: 14px 30px 14px 22px;
}

.ptun-home-2026 .ptun-breaking-news-item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    max-width: none;
    color: #27334B;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease;
}

.ptun-home-2026 .ptun-breaking-news-item:hover {
    color: #0E29CD;
    text-decoration: none;
}

.ptun-home-2026 .ptun-breaking-news-tag {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 5px;
    color: #FFFFFF;
    background: #0E29CD;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.ptun-home-2026 .ptun-breaking-news-tag.is-announcement {
    color: #4A3100;
    background: #FFD36A;
}

.ptun-home-2026 .ptun-breaking-news-title {
    display: inline-block;
    max-width: min(48vw, 580px);
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ptun-home-2026 .ptun-breaking-news-item > .fa {
    flex: 0 0 auto;
    color: #176CEA;
    font-size: 15px;
}

.ptun-home-2026 .ptun-breaking-news-viewport:hover .ptun-breaking-news-track.is-animated,
.ptun-home-2026 .ptun-breaking-news-viewport:focus-within .ptun-breaking-news-track.is-animated {
    animation-play-state: paused;
}

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

@media (max-width: 991px) {
    .ptun-home-2026 .ptun-breaking-news {
        grid-template-columns: 150px minmax(0, 1fr);
        width: min(100% - 40px, 1220px);
        margin-top: 16px;
        margin-bottom: 22px;
    }

    .ptun-home-2026 .ptun-breaking-news-label {
        padding-inline: 12px;
        font-size: 14px;
    }

    .ptun-home-2026 .ptun-breaking-news-group {
        gap: 24px;
        padding-right: 24px;
        padding-left: 18px;
    }

    .ptun-home-2026 .ptun-breaking-news-title {
        max-width: 56vw;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .ptun-home-2026 .ptun-breaking-news {
        width: min(100% - 28px, 1220px);
        grid-template-columns: minmax(0, 1fr);
        margin-top: 14px;
        margin-bottom: 20px;
        border-radius: 10px;
    }

    .ptun-home-2026 .ptun-breaking-news-label {
        min-height: 42px;
        justify-content: flex-start;
        padding: 10px 14px;
        font-size: 13px;
    }

    .ptun-home-2026 .ptun-breaking-news-viewport {
        min-height: 58px;
    }

    .ptun-home-2026 .ptun-breaking-news-group {
        gap: 20px;
        padding: 13px 18px;
    }

    .ptun-home-2026 .ptun-breaking-news-title {
        max-width: 64vw;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ptun-home-2026 .ptun-breaking-news-viewport {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .ptun-home-2026 .ptun-breaking-news-track.is-animated {
        animation: none !important;
    }

    .ptun-home-2026 .ptun-breaking-news-group[aria-hidden="true"] {
        display: none;
    }

    .ptun-home-2026 .ptun-breaking-news-item {
        transition: none;
    }
}


/* Kategori pengumuman diambil dari field jenis_pengumuman CMS. */
.ptun-home-2026 .ptun-breaking-news-category {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid #D8E1F0;
    border-radius: 5px;
    color: #52627F;
    background: #E8EDF6;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .ptun-home-2026 .ptun-breaking-news-category {
        min-height: 20px;
        padding: 2px 6px;
        font-size: 9px;
    }
}
