/* news-headlines.css — single source of truth for the scrolling news ticker.
 *
 * Used by index.html and news_headlines_demo.html. This is the "ticker" flavor
 * of the news-* classes (marquee strip). The card/listing flavor used by
 * news.html lives in news-page.css.
 *
 * NOTE: the demo prototype and the homepage previously each carried an inline
 * copy of these rules; they drifted over time. This file is the canonical
 * version (based on the homepage). Do not re-inline news-* rules into pages.
 */

.news-headlines {
    background: linear-gradient(135deg, var(--accent), #4ECDC4);
    color: var(--primary);
    padding: 12px 0;
    position: relative;
    overflow: hidden;
    z-index: 200;
    border-bottom: 2px solid rgba(100, 255, 218, 0.3);
}

.news-headlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(100, 255, 218, 0.9) 0%,
        rgba(78, 205, 196, 0.9) 50%,
        rgba(100, 255, 218, 0.9) 100%);
    animation: newsShimmer 3s ease-in-out infinite;
}

@keyframes newsShimmer {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.news-label {
    background-color: var(--primary);
    color: var(--accent);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(10, 25, 47, 0.3);
    border: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.news-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: labelShine 2s infinite;
}

@keyframes labelShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

        .news-label .pulse-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            background-color: var(--danger);
    border-radius: 50%;
    margin-right: 8px;
    animation: newsPulse 1.5s infinite;
}

@keyframes newsPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.news-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 25px;
}

.news-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: newsScroll 50s linear infinite;
    gap: 60px;
}

@keyframes newsScroll {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

.news-item {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    position: relative;
    padding: 0 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(10, 25, 47, 0.3);
}

.news-item::before {
    content: '▶';
    color: var(--primary);
    font-size: 10px;
    margin-right: 5px;
    opacity: 0.8;
}

.news-item.featured::before {
    content: '🔥';
}

.news-item.update::before {
    content: '📈';
}

.news-item.tech::before {
    content: '⚡';
}

.news-item.partnership::before {
    content: '🤝';
}

.news-item.launch::before {
    content: '🚀';
}

/* Pause animation on hover */
.news-headlines:hover .news-track {
    animation-play-state: paused;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-headlines {
        padding: 10px 0;
    }

    .news-label {
        font-size: 10px;
        padding: 4px 10px;
    }

    .news-item {
        font-size: 13px;
    }

    .news-track {
        animation-duration: 40s;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .news-label {
        display: none;
    }

    .news-scroll {
        margin-left: 0;
    }

    .news-item {
        font-size: 12px;
    }
}
