/* News Page Styles */

/* Breaking News Ticker */
.breaking-news-ticker {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 1rem;
    height: 48px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ticker-label {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    border-right: 1px solid rgba(59, 130, 246, 0.1);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    gap: 4rem;
    padding-left: 2rem;
}

.ticker-track span {
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
}

.ticker-track span::after {
    content: "•";
    margin-left: 4rem;
    color: rgba(59, 130, 246, 0.3);
}

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

.news-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .news-controls {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: #64748b;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.refresh-btn {
    padding: 0.75rem;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.refresh-btn:hover {
    background: rgba(51, 65, 85, 0.6);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.5);
    transform: rotate(180deg);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.category-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background: transparent;
    border: 1px solid rgba(51, 65, 85, 0.3);
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn:hover {
    background: rgba(51, 65, 85, 0.3);
    color: #f1f5f9;
}

.cat-btn.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(51, 65, 85, 0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Modern News Card Design */
.news-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.news-item:hover::before {
    opacity: 1;
}

.news-item:hover {
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.news-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-source-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.news-item:hover .news-source-badge {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(96, 165, 250, 0.2);
    color: #cbd5e1;
}

.news-date {
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.news-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item:hover .news-item-title {
    color: #60a5fa;
}

.news-item-excerpt {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-more-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    transition: gap 0.2s;
}

.news-item:hover .read-more-link {
    color: #60a5fa;
    gap: 0.5rem;
    transition: gap 0.2s;
}

/* Newsletter Section Styling */
.newsletter-section {
    margin-top: 6rem;
    padding-bottom: 4rem;
}

.newsletter-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 2rem;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .newsletter-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
    pointer-events: none;
}

.newsletter-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 500px;
}

.newsletter-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.newsletter-text h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}

.newsletter-text p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 1rem;
}

.newsletter-form {
    flex: 1;
    max-width: 450px;
}

.newsletter-input-group {
    display: flex;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    transition: border-color 0.3s;
}

.newsletter-input-group:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
}

.newsletter-input {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    color: white;
    flex: 1;
    font-size: 0.875rem;
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.newsletter-submit:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.newsletter-privacy {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.newsletter-privacy a {
    color: #94a3b8;
    text-decoration: underline;
}

/* Chronicles Section Styling */
.chronicles-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.chronicles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.3), transparent);
}

.chronicles-header {
    text-align: center;
    margin-bottom: 3rem;
}

.chronicles-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.chronicles-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #fed7aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chronicles-subtitle {
    color: #94a3b8;
    font-size: 1.125rem;
}

.chronicle-card {
    padding: 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.3), rgba(15, 23, 42, 0.5));
    border: 1px solid rgba(249, 115, 22, 0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.chronicle-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #f97316, #fb923c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.chronicle-card:hover {
    border-color: rgba(249, 115, 22, 0.4);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.7));
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.15);
}

.chronicle-card:hover::after {
    transform: scaleX(1);
}

.chronicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chronicle-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    background: #f97316;
    color: white;
}

.chronicle-meta {
    font-size: 0.875rem;
    color: #94a3b8;
}

.chronicle-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.chronicle-card-excerpt {
    font-size: 0.9375rem;
    color: #cbd5e1;
    line-height: 1.6;
}
