/* News Ticker Styles */
.news-ticker-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid #ddd;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-ticker-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.news-ticker-content {
    display: flex;
    align-items: center;
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}

.news-ticker-content.direction-right {
    animation: scroll-right 30s linear infinite;
}

.news-ticker-content.paused {
    animation-play-state: paused;
}

.news-ticker-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    position: relative;
    min-width: auto;
}

.news-ticker-item img {
    height: 100px;
    width: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.news-ticker-item:hover img {
    transform: scale(1.05);
}

.news-ticker-caption {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    max-width: 150px;
    line-height: 1.3;
    word-wrap: break-word;
    white-space: normal;
}

/* Animation Keyframes */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-ticker-wrapper {
        height: 80px;
    }
    
    .news-ticker-item img {
        height: 60px;
    }
    
    .news-ticker-caption {
        font-size: 10px;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .news-ticker-wrapper {
        height: 60px;
    }
    
    .news-ticker-item img {
        height: 40px;
    }
    
    .news-ticker-caption {
        display: none;
    }
}

/* Widget Specific Styles */
.widget .news-ticker-container {
    margin-bottom: 20px;
}

.widget .news-ticker-wrapper {
    height: 100px;
}

.widget .news-ticker-item img {
    height: 80px;
}

/* Loading State */
.news-ticker-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    color: #666;
}

.news-ticker-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar for horizontal overflow (if needed) */
.news-ticker-container::-webkit-scrollbar {
    height: 3px;
}

.news-ticker-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.news-ticker-container::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 3px;
}

.news-ticker-container::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}
