:root {
    /* MoneyHub Style Palette */
    --bg-color: #f3f4f6; /* Light gray background for the body */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-primary: #1e3a8a; /* Deep trustworthy blue */
    --accent-secondary: #2563eb;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --nav-bg: #1e3a8a; /* Dark blue nav like MoneyHub */
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', sans-serif;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Dense Navigation Header */
.top-bar {
    background-color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    letter-spacing: -1px;
}

.navbar {
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-links > li > a {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 15px 20px;
    display: block;
    text-decoration: none !important;
    transition: background-color 0.2s;
}

.nav-links > li:hover > a {
    background-color: #1e40af;
}

/* Mega-Menu Style Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 250px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-top: none;
    z-index: 101;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    font-size: 0.95rem;
}

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

.dropdown-item:hover {
    background-color: var(--bg-color);
    text-decoration: none !important;
    color: var(--accent-secondary) !important;
}

/* Main Layout container */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Home Page Sections */
.home-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.home-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--accent-primary);
    padding-bottom: 10px;
    display: inline-block;
}

.home-section h3 {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.home-section p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.home-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.home-section li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.article-img-placeholder {
    height: 160px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.article-content h3 a:hover {
    color: var(--accent-secondary);
}

.article-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Sidebar Layout for Article Pages */
.sidebar-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

.article-body {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-body h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.article-body h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-secondary);
    padding-bottom: 5px;
}

.affiliate-sidebar-item {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.affiliate-sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.affiliate-sidebar-item img {
    max-width: 120px;
    height: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.affiliate-sidebar-item p {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* Footer */
footer {
    background: #111827;
    color: #9ca3af;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

footer a {
    color: #d1d5db;
    margin: 0 10px;
}

@media (max-width: 900px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
    .nav-links {
        flex-wrap: wrap;
    }
}
