:root {
    --cnbc-blue-dark: #002F6C;
    --cnbc-blue-link: #005594;
    --cnbc-blue-accent: #0077B5;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --bg-gray: #F4F4F4;
    --border-color: #E0E0E0;
    --font-heading: 'Roboto', 'Arial', sans-serif;
    --font-body: 'Inter', 'Helvetica', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: #fff;
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

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

/* Header Styles */
header {
    width: 100%;
    margin-bottom: 2rem;
}

.top-bar {
    background-color: var(--cnbc-blue-dark);
    padding: 10px 0;
    color: white;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cnbc-logo {
    height: 60px;
    /* Reset to standard header size */
    display: block;
}

.mobile-header-tools {
    display: none;
}

.search-bar {
    flex: 1;
    margin: 0 40px;
    position: relative;
    max-width: 500px;
}

.search-bar input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
}

.header-tools {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.tool-link {
    color: white;
}

.btn-create-account {
    background-color: var(--cnbc-blue-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.main-nav {
    background-color: var(--cnbc-blue-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    overflow-x: auto;
    /* Allow scrolling on mobile */
    padding-bottom: 5px;
    /* Space for scrollbar */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.main-nav ul::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.main-nav a {
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.main-nav a.active {
    color: var(--cnbc-blue-accent);
}

/* Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Article Styles */
.article-header {
    margin-bottom: 20px;
}

.eyebrow {
    color: var(--cnbc-blue-link);
    font-weight: 700;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.headline {
    font-family: var(--font-heading);
    font-size: 42px;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.byline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-img {
    border-radius: 50%;
    height: 40px;
    width: 40px;
}

.author-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.author-name {
    font-weight: 700;
    color: var(--cnbc-blue-link);
}

.author-handle {
    color: var(--text-secondary);
    font-size: 12px;
}

.publish-time {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-image-container {
    margin: 20px 0;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f9f9f9;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.article-body {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
}

.key-points {
    background-color: white;
    padding: 0 0 20px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.key-points li {
    margin-bottom: 10px;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

/* Article CTA Buttons */
.cta-container {
    margin: 40px 0;
    text-align: center;
}

.btn-primary-cta {
    display: inline-block;
    background: linear-gradient(to bottom, #f44336, #d32f2f);
    background-color: #d32f2f;
    color: white;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: 900;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #b71c1c;
    letter-spacing: 1px;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary-cta:hover {
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: white;
}

.btn-primary-cta:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.newsletter-signup {
    border: 2px solid var(--cnbc-blue-dark);
    padding: 20px;
    margin-top: 40px;
    text-align: center;
}

.newsletter-signup h3 {
    margin-bottom: 15px;
}

.newsletter-signup button {
    background-color: var(--cnbc-blue-dark);
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
}

/* Sidebar Styles */
.sidebar-widget {
    margin-bottom: 40px;
}

.trending-now .widget-header {
    border-bottom: 2px solid black;
    margin-bottom: 15px;
}

.trending-now h2 {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
}

.trending-list {
    list-style: none;
    counter-reset: trending-counter;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.trending-item .rank {
    position: absolute;
    left: -10px;
    top: 5px;
    color: #ddd;
    font-size: 40px;
    font-weight: 900;
    z-index: 0;
    line-height: 1;
}

.trending-item .content {
    display: flex;
    gap: 15px;
    z-index: 1;
    margin-left: 20px;
}

.trending-item p {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.ad-placeholder {
    background-color: #f0f0f0;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* Footer */
footer {
    background-color: var(--cnbc-blue-dark);
    padding: 40px 0;
    color: white;
    font-size: 14px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        order: 2;
    }

    .header-tools {
        display: none;
    }


    .headline {
        font-size: 32px;
    }
}

/* More from CNBC Section */
.more-from-cnbc {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid black;
}

.more-from-cnbc h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--cnbc-blue-dark);
    margin-bottom: 30px;
}

.more-from-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.more-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.more-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.more-item h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.more-item .meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .more-from-grid {
        grid-template-columns: 1fr;
    }
}

/* Updated Header Styles */
.left-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger-menu {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.livestream-link {
    color: white !important;
    font-weight: 900 !important;
}

/* Updated Footer Styles */
footer {
    background-color: #002F6C;
    padding: 60px 0 40px;
    color: white;
    font-size: 13px;
    border-top: 5px solid #005594;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    /* Reduced margin */
}

.footer-logo {
    height: 60px;
    /* Slightly smaller for cleaner look */
    width: auto;
    margin-bottom: 0;
    /* Remove extra margin */
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    opacity: 0.9;
    margin-left: auto;
    /* Push to right */
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-col a {
    color: white;
    font-weight: 600;
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 5px;
}

.footer-col p {
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.footer-col .small-text {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 10px;
}

.btn-footer {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 10px 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    cursor: pointer;
    width: fit-content;
}

.btn-footer:hover {
    background-color: white;
    color: #002F6C;
}

.mt-4 {
    margin-top: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.legal-links {
    margin-bottom: 15px;
}

.legal-links a {
    color: white;
    margin: 0 5px;
}

.copyright {
    margin-bottom: 10px;
}

.disclaimer {
    margin-bottom: 15px;
}

.market-data-links a {
    color: #005594;
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Reduce spacing for mobile */
    header {
        margin-bottom: 0.5rem;
        position: sticky;
        top: 0;
        z-index: 1100;
        background-color: var(--cnbc-blue-dark);
    }

    .main-nav {
        padding: 5px 0;
    }

    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    .mobile-header-tools {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-left: auto;
        /* Push to right */
    }

    .mobile-header-tools .livestream-link {
        color: white;
        font-weight: 700;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-header-tools .search-icon-mobile {
        color: white;
        font-size: 18px;
    }

    .mobile-header-tools .sign-in-link {
        color: white;
        font-weight: 700;
        font-size: 11px;
    }

    .search-bar,
    .header-tools {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        z-index: 1000;
        padding: 10px 0;
        border-top: 1px solid #ddd;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .bottom-nav-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .bottom-nav-logo {
        height: 30px;
        width: auto;
    }

    .bottom-nav-icons {
        display: flex;
        gap: 20px;
    }

    .bottom-nav-icons .icon {
        color: #002F6C;
        font-size: 18px;
        font-weight: bold;
    }
}

/* Hide mobile nav on desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}