/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-bg: #0f172a;
    --dark-secondary: #1e293b;
    --dark-tertiary: #334155;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--dark-bg);
    font-weight: 700;
}

.logo .highlight {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links .cta-button {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-links .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--dark-bg);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-decoration {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-bg);
}

.btn-full {
    width: 100%;
}

/* Categories Section */
.categories {
    padding: 2rem 0;
    background: var(--light-bg);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-card.active-filter {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.category-card.active-filter h3,
.category-card.active-filter p {
    color: var(--white);
}

.category-card.active-filter .category-icon {
    background: rgba(255, 255, 255, 0.2);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon i {
    font-size: 1.25rem;
    color: var(--white);
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Articles Section */
.articles-section {
    padding: 5rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-bg);
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.article-image {
    height: 110px;
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Finance - Blue gradient */
.article-category.finance,
.article-image:has(.article-category:not(.technology):not(.cryptocurrencies):not(.macroeconomics)) .article-category {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

/* Technology - Purple gradient */
.article-category.technology {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

/* Cryptocurrencies - Green gradient */
.article-category.cryptocurrencies {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Macroeconomics - Orange/Red gradient */
.article-category.macroeconomics {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.article-content {
    padding: 1.8rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 0.4rem;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
    font-weight: 700;
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.article-link:hover {
    gap: 0.8rem;
}

/* Newsletter Section */
.newsletter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.newsletter-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.newsletter-text p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-benefits {
    list-style: none;
}

.newsletter-benefits li {
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.newsletter-benefits i {
    color: var(--success-color);
    font-size: 1.2rem;
}

.newsletter-form-wrapper {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.newsletter-form h3 {
    color: var(--dark-bg);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-privacy {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.subscription-success {
    text-align: center;
    padding: 2rem;
}

.subscription-success i {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.subscription-success h3 {
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

.subscription-success p {
    color: var(--text-secondary);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: var(--light-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    max-width: 180px;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--dark-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* X/Twitter icon - ensure it displays the X properly */
.fa-x-twitter::before {
    content: "𝕏" !important; /* Unicode X character */
    font-family: inherit !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.rss-link {
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.rss-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-secondary);
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .newsletter-content {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MARKET NEWS SECTION
   ============================================ */

/* ============================================
   COMBINED WIDGETS SECTION (News + Market Data)
   ============================================ */

.combined-widgets-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 0;
    margin: 40px 0 60px 0;
}

.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.widget-column {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-header {
    margin-bottom: 20px;
}

.widget-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.widget-header h2 i {
    color: #2563eb;
    margin-right: 10px;
    font-size: 1.3rem;
}

/* News Widget Specific */
.news-widget .news-grid {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 500px;
}

.news-widget .news-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 15px;
}

/* Market Widget Specific */
.market-widget {
    display: flex;
    flex-direction: column;
}

.market-widget .tradingview-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 520px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.market-widget .tradingview-widget-container {
    width: 100%;
    height: 100%;
    min-height: 480px;
    position: relative;
    flex: 1;
}

.market-widget .tradingview-widget-container__widget {
    width: 100% !important;
    height: 100% !important;
    min-height: 480px !important;
}

.market-widget .tradingview-widget-container iframe {
    width: 100% !important;
    height: 480px !important;
    border: none;
    display: block;
}

.market-widget .tradingview-widget-copyright {
    margin-top: 8px;
    text-align: center;
    font-size: 0.7rem;
    color: #64748b;
}

.market-widget .tradingview-widget-copyright a {
    color: #2563eb !important;
    text-decoration: none;
}

.market-widget .tradingview-widget-copyright .blue-text {
    color: #2563eb;
}

.market-widget .tradingview-widget-copyright .trademark {
    color: #94a3b8;
}

.news-item {
    display: grid;
    grid-template-columns: 50px 18px 1fr;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    transition: background 0.2s ease;
}

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

.news-item:hover {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 5px;
}

.news-time {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    padding-right: 5px;
}

.news-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.9;
    flex-shrink: 0;
}

.news-headline {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.2s ease;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-headline:hover {
    color: #3b82f6;
}

.news-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
}

.last-updated {
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

/* Scrollbar styling for news grid */
.news-grid::-webkit-scrollbar {
    width: 8px;
}

.news-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.news-grid::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.5);
    border-radius: 4px;
}

.news-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.7);
}

/* Loading state */
.news-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.news-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 15px;
}

.news-loading p {
    margin: 0;
    font-size: 0.95rem;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .combined-widgets-section {
        padding: 40px 0;
        margin: 20px 0 40px 0;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .widget-column {
        padding: 20px;
    }
    
    .widget-header h2 {
        font-size: 1.3rem;
    }
    
    .news-widget .news-grid {
        max-height: 400px;
        min-height: 400px;
        padding: 12px;
    }
    
    .news-item {
        grid-template-columns: 45px 16px 1fr;
        gap: 8px;
        padding: 10px 8px;
    }
    
    .news-time {
        font-size: 0.7rem;
    }
    
    .news-favicon {
        width: 14px;
        height: 14px;
    }
    
    .news-headline {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .market-widget .tradingview-wrapper {
        padding: 8px;
        min-height: 400px;
    }
    
    .market-widget .tradingview-widget-container {
        height: 100%;
        min-height: 380px;
    }
    
    .market-widget .tradingview-widget-container iframe {
        height: 380px !important;
    }
    }
    
    .news-footer {
        margin-top: 15px;
    }
}


/* ============================================
   ARTICLES SECTION
   ============================================ */
