/* Breaking News Ticker - Headline Theme Integration */
.breaking-news-container {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border-bottom: 3px solid #990000;
    position: sticky;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.breaking-news-wrapper {
    display: flex;
    align-items: center;
    height: 80px;
    width: 100%;
    padding: 0 20px;
    position: relative;
}

.breaking-label {
    background: rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    margin-right: 20px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
}

.breaking-scroll-container {
    flex: 1;
    overflow: hidden;
    height: 60px;
    position: relative;
    width: 100%;
   

}

.breaking-scroll-content {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 20px;
    width: max-content;
    animation: breakingScrollFullWidth 10 linear infinite;  /* Default slow speed */

}

.breaking-scroll-content.paused {
    animation-play-state: paused;
}

/* FINAL, COMBINED CSS FOR THE TICKER */

.breaking-item {
    position: relative;
    width: 360px;
    height: 85px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    overflow: hidden;
    /* Enables animation for the container */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.breaking-item:hover {
    /* The container's hover animation */
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.breaking-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
}

.breaking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breaking-content {
    position: absolute;
    left: 75px;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
}

.breaking-title {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Enables animation for the title's color */
    transition: color 0.3s ease;
}

.breaking-title:hover {
    /* The title's hover color */
    color: #ffeb3b;
}

.breaking-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: normal;
    padding-top: 3px;
    display: block;
}



/* Replace with this corrected rule */
@keyframes breakingScrollFullWidth {
    0% {
        transform: translateX(0); /* This starts the content on-screen */
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Large Desktop - Very Slow Speed */
@media (min-width: 1400px) {
    .breaking-scroll-content {
        animation: breakingScrollFullWidth 120s linear infinite;
        gap: 30px;
    }

    .breaking-item {
        min-width: 420px;
        padding: 10px 18px;
    }
}

/* Standard Desktop - Slow Speed */
@media (min-width: 1024px) and (max-width: 1399px) {
    .breaking-scroll-content {
        animation: breakingScrollFullWidth 140s linear infinite;
        gap: 25px;
    }

    .breaking-item {
        min-width: 380px;
    }
}

/* Tablet - Medium Speed */
@media (min-width: 769px) and (max-width: 1023px) {
    .breaking-scroll-content {
        animation: breakingScrollFullWidth 150s linear infinite;
        gap: 22px;
    }

    .breaking-item {
        min-width: 320px;
    }
}

/* Mobile - Fast Speed */
@media (max-width: 768px) {
    .breaking-news-wrapper {
        padding: 0 15px;
        height: 70px;
    }

    .breaking-label {
        font-size: 12px;
        padding: 6px 12px;
        margin-right: 15px;
    }

    .breaking-scroll-content {
        animation: breakingScrollFullWidth 300s linear infinite;
        gap: 18px;
    }

    .breaking-item {
        min-width: 250px;
        padding: 6px 12px;
    }

    .breaking-image {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .breaking-title {
        font-size: 13px;
    }

    .breaking-time {
        font-size: 10px;
    }
}


@media (max-width: 480px) {
    .breaking-scroll-content {
        animation: breakingScrollFullWidth 300s linear infinite;
        gap: 15px;
    }

    .breaking-item {
        min-width: 200px;
        padding: 5px 10px;
    }

    .breaking-label span {
        font-size: 11px;
    }
}