/* Financial News Page - Blog Design */

.news-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Yellow Header Section */
.news-header {
    background: linear-gradient(135deg, #EDB809 0%, #FFC107 100%);
    border-radius: 0 0 60px 60px;
    padding: 80px 40px 100px 40px;
    position: relative;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(237, 184, 9, 0.2);
}

.news-title {
    color: white;
    font-size: 56px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 40px 0;
    letter-spacing: -1px;
}

/* Search Bar */
.search-bar-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 12px 32px rgba(237, 184, 9, 0.2);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-spinner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #EDB809;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-symbol {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.search-result-name {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

/* Current Filter Banner */
.current-filter-banner {
    background: linear-gradient(135deg, #EDB809 0%, #f59e0b 100%);
    padding: 16px 40px;
    margin: -20px 0 30px 0;
}

.filter-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.filter-icon {
    font-size: 20px;
    margin-right: 12px;
}

.filter-text {
    font-size: 15px;
    flex: 1;
}

.filter-text strong {
    font-weight: 700;
    text-decoration: underline;
}

.clear-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.clear-filter-btn svg {
    width: 16px;
    height: 16px;
}

/* Loading Spinner */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #EDB809;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-container p {
    margin-top: 20px;
    color: #6b7280;
    font-size: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert-success, .alert-warning {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 15px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background: #fed7d7;
    color: #9b2c2c;
    border: 1px solid #fc8181;
}

/* News Articles Container */
.news-articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 60px 40px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* News Card */
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 12px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.news-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-snippet {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.news-date {
    font-size: 12px;
    color: #9ca3af;
}

.news-symbols {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.symbol-badge {
    background: #EDB809;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 50px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: white;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover:not(:disabled) {
    background: #7c3aed;
    color: white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 20px;
    height: 20px;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: white;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-number-btn:hover {
    background: #f9fafb;
}

.page-number-btn.active {
    background: #EDB809;
    color: white;
    box-shadow: 0 4px 16px rgba(237, 184, 9, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-header {
        padding: 60px 20px 80px 20px;
        border-radius: 0 0 40px 40px;
    }

    .news-title {
        font-size: 40px;
    }

    .news-articles-container {
        padding: 0 20px 40px 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .current-filter-banner {
        padding: 12px 20px;
    }

    .filter-content {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-container {
        flex-direction: column;
    }

    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Featured Article (first card larger) */
.news-card.featured {
    grid-column: span 2;
}

.news-card.featured .news-card-image {
    height: 320px;
}

.news-card.featured .news-card-title {
    font-size: 28px;
}

.news-card.featured .news-card-snippet {
    font-size: 16px;
    -webkit-line-clamp: 4;
}

@media (max-width: 768px) {
    .news-card.featured {
        grid-column: span 1;
    }

    .news-card.featured .news-card-image {
        height: 220px;
    }

    .news-card.featured .news-card-title {
        font-size: 20px;
    }

    .news-card.featured .news-card-snippet {
        font-size: 14px;
    }
}
