/* Modern News Marquee Styles */
.newsbar-section {
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.newsbar-container {
    background: linear-gradient(135deg, #ce1126 0%, #b30f22 100%);
    display: flex;
    align-items: center;
    min-height: 60px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.newsbar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 0%, 
        transparent 50%, 
        rgba(255,255,255,0.1) 100%);
    pointer-events: none;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.newsbar-title {
    background: rgba(0,0,0,0.2);
    color: white;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border-right: 3px solid rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.newsbar-title::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.5), transparent);
    animation: borderPulse 2s ease-in-out infinite;
}

.newsbar-title i {
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.marquee-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-left 60s linear infinite;
    gap: 30px;
    padding-left: 100%;
    pointer-events: none;
}

.marquee-content * {
    pointer-events: auto;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-content.paused {
    animation-play-state: paused !important;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.news-item {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.news-link {
    color: white !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 5px 10px;
    position: relative;
    cursor: pointer !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    border-radius: 4px;
}

.news-link:visited {
    color: white !important;
}

.news-link:active {
    color: #ffd700 !important;
}

.news-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.news-link:hover {
    color: #ffd700 !important;
    text-decoration: underline !important;
    transform: translateY(-1px);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
}

.news-link:hover::before {
    width: 100%;
}

.news-link::after {
    content: '→';
    opacity: 0;
    margin-left: 5px;
    transition: opacity 0.3s ease;
    color: #ffd700;
    font-weight: bold;
}

.news-link:hover::after {
    opacity: 1;
}

.news-item:hover .news-text {
    color: #ffd700 !important;
}

.news-item:hover .news-date {
    background: rgba(255,215,0,0.3);
    color: white !important;
}

.news-text {
    font-size: 15px;
    font-weight: 500;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.news-date {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 400;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.news-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #ce1126;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: glow 2s ease-in-out infinite alternate;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px #ffd700, 0 2px 4px rgba(255, 215, 0, 0.3);
        transform: scale(1);
    }
    to {
        box-shadow: 0 0 15px #ffd700, 0 0 25px #ffd700, 0 2px 8px rgba(255, 215, 0, 0.5);
        transform: scale(1.05);
    }
}

.news-separator {
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    margin: 0 15px;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.marquee-controls {
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.control-btn {
    background: rgba(255,255,255,0.25);
    border: none;
    color: white !important;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.control-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white !important;
}

.control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn i {
    font-size: 14px;
    position: relative;
    z-index: 1;
    color: white !important;
}

/* Enhanced clickable link styles */
.news-link::after {
    content: '→';
    opacity: 0;
    margin-left: 5px;
    transition: opacity 0.3s ease;
    color: #ffd700;
    font-weight: bold;
}

.news-link:hover::after {
    opacity: 1;
}

/* Add a subtle animation to draw attention to clickable items */
.news-item {
    position: relative;
}

.news-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    width: 3px;
    height: 0;
    background: #ffd700;
    transform: translateY(-50%);
    transition: height 0.3s ease;
}

.news-item:hover::before {
    height: 80%;
}

/* Make it clear that links open in new tab */
.news-link[target="_blank"]::after {
    content: '↗';
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .newsbar-title {
        padding: 12px 15px;
        font-size: 14px;
    }

    .news-text {
        font-size: 14px;
        max-width: 300px;
        color: white !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    }

    .news-date {
        font-size: 11px;
        color: white !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    }

    .marquee-content {
        animation-duration: 45s;
        gap: 20px;
    }

    .newsbar-container {
        min-height: 50px;
    }

    .marquee-wrapper {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .newsbar-title span {
        display: none;
    }

    .newsbar-title {
        padding: 12px;
        min-width: 50px;
    }

    .news-text {
        max-width: 200px;
        font-size: 13px;
        color: white !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    }

    .marquee-controls {
        padding: 0 10px;
    }

    .control-btn {
        width: 30px;
        height: 30px;
    }

    .control-btn i {
        font-size: 10px;
    }

    .news-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .marquee-content {
        gap: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .newsbar-container {
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .news-link:hover {
        color: #ffed4e;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation-duration: 120s;
    }
    
    .newsbar-title i,
    .news-badge,
    .news-separator {
        animation: none;
    }
    
    .newsbar-container::before {
        animation: none;
        opacity: 0.5;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .newsbar-container {
        background: #000;
        border: 2px solid #fff;
    }
    
    .newsbar-title {
        background: #fff;
        color: #000;
        border-right-color: #000;
    }
    
    .news-link {
        color: #fff;
    }
    
    .news-badge {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Additional styles for better visibility and functionality */
.news-link:visited {
    color: white !important;
}

.news-link:active {
    color: #ffd700 !important;
}

.news-item:hover .news-text {
    color: #ffd700 !important;
}

.news-item:hover .news-date {
    background: rgba(255,215,0,0.3);
    color: white !important;
}

/* Ensure clickability */
.marquee-content a {
    pointer-events: auto !important;
    user-select: none;
}

.marquee-content {
    user-select: none;
}

/* Make sure text is always white and visible */
.newsbar-section * {
    box-sizing: border-box;
}

.news-separator {
    color: rgba(255,255,255,0.8) !important;
    font-size: 20px;
    margin: 0 15px;
    animation: twinkle 3s ease-in-out infinite;
}

/* Improved button visibility */
.control-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.control-btn:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}
