/* Enhanced Flash News System Styles */
.flash-news-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 8px 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.flash-news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

.flash-news-wrapper {
    position: relative;
    z-index: 2;
}

.flash-news-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 15px;
    transition: all 0.3s ease;
}

.flash-news-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.flash-news-label {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    margin-right: 20px;
    position: relative;
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.flash-news-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: flash-shine 2s ease-in-out infinite;
}

.flash-icon {
    margin-right: 8px;
    animation: flash-bounce 2s ease-in-out infinite;
    font-size: 16px;
}

.flash-text {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.flash-pulse {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 40px;
    z-index: -1;
    animation: pulse-ring 3s ease-in-out infinite;
}

.flash-news-content {
    flex: 1;
    overflow: hidden;
    height: 45px;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 25px;
}

.flash-news-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.98), transparent);
    z-index: 1;
    pointer-events: none;
}

.flash-news-content::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.98), transparent);
    z-index: 1;
    pointer-events: none;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 25px;
}

.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-left 25s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #2d3436;
    margin-right: 60px; /* Increased from 40px to 60px */
    margin-left: 20px; /* Added left margin */
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 20px;
    position: relative;
}

.ticker-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ticker-item i {
    margin-right: 8px;
    font-size: 16px;
    animation: icon-pulse 3s ease-in-out infinite;
}

.ticker-item[data-link] {
    cursor: pointer;
}

.ticker-separator {
    color: #667eea;
    font-size: 20px;
    margin: 0 25px;
    font-weight: bold;
    opacity: 0.7;
    animation: separator-glow 2s ease-in-out infinite alternate;
}

.flash-controls {
    margin-left: 20px;
    flex-shrink: 0;
}

.flash-control-btn {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
    cursor: pointer;
    font-size: 14px;
}

.flash-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
    background: linear-gradient(135deg, #00a085 0%, #00b7b7 100%);
}

.flash-control-btn:active {
    transform: scale(0.95);
}

/* Loading States */
.flash-news-loading .ticker-item {
    animation: flash-loading 1.5s ease-in-out infinite;
}

.flash-news-error .ticker-item {
    color: #e74c3c;
}

.flash-news-error .ticker-item span[onclick] {
    color: #3498db;
    font-weight: bold;
}

.flash-news-error .ticker-item span[onclick]:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes flash-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes flash-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes scroll-left {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes separator-glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes flash-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .flash-news-container {
        margin: 0 10px;
    }
    
    .flash-news-label {
        padding: 10px 20px;
        margin-right: 15px;
    }
    
    .flash-text {
        font-size: 13px;
    }
    
    .ticker-item {
        font-size: 14px;
        margin-right: 50px; /* Increased from 35px to 50px */
        margin-left: 15px; /* Added left margin */
    }
}

@media (max-width: 991.98px) {
    .flash-news-container {
        margin: 0 8px;
        padding: 5px;
    }
    
    .flash-news-label {
        padding: 8px 16px;
        margin-right: 12px;
    }
    
    .flash-text {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .ticker-item {
        font-size: 13px;
        margin-right: 45px; /* Increased from 30px to 45px */
        margin-left: 12px; /* Added left margin */
    }
    
    .flash-control-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Desktop styles (>900px) - Faster animation */
@media (min-width: 901px) {
    .ticker-content {
        animation-duration: 20s; /* Faster for desktop */
    }
}

/* Mobile styles (<900px) - Slower animation */
@media (max-width: 900px) {
    .flash-news-section {
        padding: 6px 0;
    }
    
    .flash-news-wrapper {
        width: 100%; /* Make wrapper fluid */
        max-width: none; /* Remove max-width constraint */
        margin: 0; /* Remove container margins */
    }
    
    .flash-news-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 8px;
        gap: 8px;
        margin: 0 5px;
        width: calc(100% - 10px); /* Full width minus margins */
    }
    
    .flash-news-label {
        margin-right: 0;
        margin-bottom: 0;
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
    }
    
    .flash-news-content {
        height: 40px;
        order: 2;
        padding: 0 15px; /* Add left and right padding */
        overflow: hidden; /* Ensure content stays within bounds */
        width: 100%; /* Full width */
    }
    
    .ticker-wrapper {
        padding: 0 10px; /* Add left and right padding */
        margin: 0 5px; /* Add left and right margin */
        overflow: hidden; /* Ensure content stays within bounds */
        width: calc(100% - 10px); /* Full width minus margins */
    }
    
    .flash-controls {
        display: none; /* Hide flash controls on mobile */
    }
    
    .ticker-item {
        font-size: 12px;
        margin-right: 40px; /* Increased from 25px to 40px */
        margin-left: 10px; /* Added left margin */
        padding: 6px 15px; /* Increase left and right padding */
        border-radius: 15px;
        background: rgba(102, 126, 234, 0.05);
    }
    
    .ticker-separator {
        font-size: 16px;
        margin: 0 20px;
    }
    
    .ticker-content {
        animation-duration: 15s; /* Much faster on mobile for better engagement */
        transform: translateX(0); /* Start from container edge */
        width: 100%; /* Full width */
    }
    
    .flash-control-btn {
        display: none; /* Hide flash control button on mobile */
    }
}

@media (max-width: 575.98px) {
    .flash-news-wrapper {
        width: 100%; /* Make wrapper fluid */
        max-width: none; /* Remove max-width constraint */
        margin: 0; /* Remove container margins */
    }
    
    .flash-news-container {
        margin: 0 3px;
        padding: 6px;
        width: calc(100% - 6px); /* Full width minus margins */
    }
    
    .flash-news-label {
        padding: 6px 12px;
    }
    
    .flash-text {
        font-size: 11px;
    }
    
    .flash-news-content {
        height: 35px;
        padding: 0 20px; /* More padding for very small screens */
        overflow: hidden; /* Ensure content stays within bounds */
        width: 100%; /* Full width */
    }
    
    .ticker-wrapper {
        padding: 0 15px; /* More left and right padding for small screens */
        margin: 0 8px; /* More left and right margin for small screens */
        overflow: hidden; /* Ensure content stays within bounds */
        width: calc(100% - 16px); /* Full width minus margins */
    }
    
    .flash-controls {
        display: none; /* Hide flash controls on small mobile */
    }
    
    .ticker-item {
        font-size: 11px;
        margin-right: 35px; /* Increased from 20px to 35px */
        margin-left: 8px; /* Added left margin */
        padding: 8px 20px; /* More left and right padding */
        border-radius: 18px;
        background: rgba(102, 126, 234, 0.08);
    }
    
    .ticker-separator {
        font-size: 14px;
        margin: 0 15px;
    }
    
    .ticker-content {
        animation-duration: 18s; /* Much faster on very small screens for better engagement */
        transform: translateX(0); /* Start from container edge */
        width: 100%; /* Full width */
    }
    
    .flash-control-btn {
        display: none; /* Hide flash control button on small mobile */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .flash-news-container {
        background: white;
        border: 2px solid #333;
    }
    
    .flash-news-label {
        background: #333;
        color: white;
    }
    
    .ticker-item {
        color: #000;
    }
    
    .flash-control-btn {
        background: #333;
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .flash-news-section::before,
    .flash-news-label::before,
    .flash-icon,
    .flash-pulse,
    .ticker-content,
    .ticker-item i,
    .ticker-separator {
        animation: none !important;
    }
    
         .ticker-content {
         animation: scroll-left 90s linear infinite; /* Reduced motion speed for better accessibility */
     }
}

/* Print styles */
@media print {
    .flash-news-section {
        display: none;
    }
} 