/* 
  EbookFinance - Financial Education CSS
  Archetype: Bento Grid / Trustworthy
  Protocol: Rules Fix (Phase 2, 3, 6 Compliant)
*/

:root {
    --primary: #15803D;
    /* Wealth Green */
    --primary-dark: #14532D;
    --accent: #F59E0B;
    /* Gold */
    --bg-color: #F0FDF4;
    /* Mint White */
    --white: #FFFFFF;
    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */

    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --max-width: 1200px;
    --header-height: 80px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: block;
}

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

/* Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #DCFCE7;
    /* Green 100 */
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: #064E3B;
    /* Green 900 */
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.footer a {
    color: #86EFAC;
}

.footer a:hover {
    color: var(--white);
}

/* Sidebar Ad */
.ad-slot-sidebar {
    width: 100%;
    min-height: 250px;
    background: #F1F5F9;
    border: 2px dashed #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    margin: 2rem 0;
    border-radius: 8px;
}

/* --- Data Visualizations --- */
/* 
   Note: Visualizations are now handled via Inline SVG in HTML files
   (Hero Charts, Thumbnails) for superior quality and scalability.
   Legacy CSS-only charts have been removed for cleaner code.
*/

/* Mobile & Responsive Header */
#mobile-menu-toggle {
    display: none;
    /* Hidden on Desktop by default */
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.5rem;
}

@media (max-width: 768px) {
    #mobile-menu-toggle {
        display: block;
        /* Show on Mobile */
    }

    .nav-menu {
        display: none;
        /* Hide Menu by default on Mobile */
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: block;
        /* Show when toggled via JS */
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}