:root {
    --joy-yellow: #FFD700;
    --joy-dark: #1a1a1a;
    --joy-blue: #2563eb;
    --bg-gray: #f8fafc;
    --text-dark: #334155;
    --white: #ffffff;
    --footer-bg: #111827;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-gray); color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; }

/* --- HEADER --- */
header {
    position: relative; /* Header will stay at the top and move up with scroll */
    width: 100%;
    background-color: var(--joy-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid #eee;
    z-index: 10;
}

.logo { font-family: 'Poppins', sans-serif; font-size: 26px; font-weight: 800; text-decoration: none; color: white; letter-spacing: -1px; }
.logo span { color: var(--joy-yellow); }

.desktop-nav { display: flex; list-style: none; }
.desktop-nav li { margin-left: 25px; }
.desktop-nav a { text-decoration: none; color: #cbd5e1; font-size: 14px; font-weight: 500; transition: 0.3s; }
.desktop-nav a:hover { color: var(--joy-yellow); }


/* HAMBURGER ICON */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #cbd5e1;
    border-radius: 2px;
    transition: all 0.3s;
}

/* MOBILE NAVIGATION */
@media (max-width: 992px) {
    .desktop-nav {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--joy-dark);
        width: 200px;
        flex-direction: column;
        padding: 15px 0;
        display: none;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .desktop-nav.active {
        display: flex;
    }

    .desktop-nav li {
        margin: 10px 0;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}


/* --- FEATURED SECTION --- */
.featured-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2563eb 100%);
    color: white; padding: 60px 5% 90px; text-align: center;
}
.featured-header h1 { font-family: 'Poppins'; font-size: 3rem; line-height: 4rem; margin-bottom: 10px; }

/* --- MAIN LAYOUT --- */
.main-container {
    max-width: 1250px;
    margin: -50px auto 40px;
    display: flex; gap: 30px; padding: 0 20px;
    flex: 1;
}

/* --- BLOG CARDS (Updated for Horizontal Left Image) --- */
#blog-container { flex: 2; }

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: 0.3s;
    display: flex;
    cursor: pointer;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

.card-banner { width: 35%; background-size: cover; background-position: center; min-height: 220px; }
.card-body { width: 65%; padding: 25px; display: flex; flex-direction: column; justify-content: center; }

.badge { background: rgba(37, 99, 235, 0.1); color: var(--joy-blue); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; width: fit-content; }
.card-body h2 { font-family: 'Poppins'; font-size: 22px; margin: 15px 0; color: var(--joy-dark); }
.card-footer { display: flex; gap: 15px; border-top: 1px solid #f1f5f9; padding-top: 15px; font-size: 13px; color: #64748b; margin-top: auto; }

/* --- SIDEBAR & WIDGETS --- */
.sidebar { flex: 0 0 320px; }
.widget { background: var(--white); border-radius: 12px; padding: 20px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.widget-title { font-family: 'Poppins'; font-size: 18px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--joy-yellow); }
.cat-item { display: flex; justify-content: space-between; padding: 10px 0; text-decoration: none; color: var(--text-dark); border-bottom: 1px solid #f1f5f9; font-size: 14px; }

/* --- PAGINATION --- */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 20px; margin-bottom: 40px; }
.pg-btn { border: none; padding: 10px 18px; border-radius: 8px; background: white; cursor: pointer; font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: 0.3s; }
.pg-btn.active { background: var(--joy-blue); color: white; }
.pg-btn:hover:not(.active) { background: var(--joy-yellow); color: var(--joy-dark); }

/* --- FOOTER --- */
        footer {
            background: var(--footer-bg);
            color: #9ca3af;
            padding: 60px 5% 20px;
            margin-top: 40px;
        }
        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
            max-width: 1200px;
            margin: 0 auto;
        }
        .footer-logo { color: white; font-size: 22px; font-weight: 800; margin-bottom: 15px; display: block; text-decoration: none; }
        .footer-logo span { color: var(--joy-yellow); }
        .footer-heading { color: white; font-size: 16px; font-weight: 600; margin-bottom: 20px; }
        .footer-links { list-style: none; }
        .footer-links li { margin-bottom: 10px; }
        .footer-links a { color: #9ca3af; text-decoration: none; transition: 0.3s; font-size: 14px; }
        .footer-links a:hover { color: var(--joy-yellow); }
        .footer-bottom {
            text-align: center;
            padding-top: 40px;
            margin-top: 40px;
            border-top: 1px solid #374151;
            font-size: 13px;
        }
/* --- MOBILE --- */
@media (max-width: 768px) {
    .main-container { flex-direction: column; }
    .blog-card { flex-direction: column; }
    .card-banner, .card-body { width: 100%; }
    .desktop-nav { display: none; }
}



/* This ensures the sidebar stays on the right on desktop */
.main-container {
    display: flex;
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
    align-items: flex-start; /* Prevents sidebar from stretching weirdly */
}

.post-container {
    flex: 2; /* Takes up double the space of the sidebar */
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 0 !important; /* Overriding your previous margin to align with sidebar */
}

.sidebar {
    flex: 1; /* Takes up 1 part of the space */
    position: sticky; /* Optional: keeps sidebar visible while scrolling */
    top: 100px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    .post-container, .sidebar {
        width: 100%;
    }
}