/* TechPulse Custom Styles */

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Article content styles */
.article-content {
    line-height: 1.8;
    font-size: 1.125rem;
}

.article-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.article-content a:hover {
    color: #2563eb;
}

.article-content h2 {
    font-size: 1.875rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
}

/* Card hover effect */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.news-card:hover::before {
    left: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 30px -5px rgba(59, 130, 246, 0.2), 0 15px 15px -5px rgba(59, 130, 246, 0.1);
}

.news-card img {
    transition: transform 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

/* Loading animation */
.loader {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.category-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* Banner Slider */
.banner-slider {
    position: relative;
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* Ticker Line */
.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
    padding: 0.75rem 0;
    position: relative;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.ticker {
    display: flex;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    color: #fff;
    font-size: 0.875rem;
    gap: 0.25rem;
}

.ticker-item strong {
    font-weight: 600;
}

.ticker-item small {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.ticker-item.up {
    color: #10b981;
}

.ticker-item.down {
    color: #ef4444;
}

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

.ticker:hover {
    animation-play-state: paused;
}

/* Desktop optimization */
@media (min-width: 768px) {
    .ticker-wrapper {
        padding: 1rem 0;
    }

    .ticker-item {
        padding: 0 2.5rem;
        font-size: 0.9375rem;
    }
}

/* Mobile optimization */
@media (max-width: 767px) {
    .ticker-item {
        padding: 0 1.5rem;
        font-size: 0.8125rem;
    }
}

/* Hashtag badge */
.hashtag-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    transition: all 0.3s ease;
}

.hashtag-badge:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-5px);
}
