/* MarketRead v2.0 - Main Stylesheet */

/* === CSS VARIABLES === */
:root {
    /* Colors */
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --secondary: #10B981;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-gray: #F9FAFB;
    --border-gray: #E5E7EB;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;

    /* Spacing */
    --container-max: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Effects */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.home-page {
    background: linear-gradient(180deg, #F0F7FF 0%, #FFFFFF 100%);
    background-attachment: fixed;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* === CONTAINER === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === HEADER === */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo:hover {
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

/* Main Nav Links - Increased Specificity */
.site-header .main-nav a {
    color: var(--text-dark) !important;
    /* Force darker color */
    font-weight: 700;
    /* Make it bolder */
    font-size: 0.95rem;
    opacity: 1;
}

.site-header .main-nav a:hover {
    color: var(--primary) !important;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* === POST GRID === */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-body {
    padding: var(--spacing-md);
}

.post-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
}

.post-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.post-meta {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--text-light);
}

/* === FOOTER === */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #D1D5DB;
    font-size: 0.9rem;
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}