/* General Styles */
:root {
    --primary: #2563eb;
    --dark: #1e293b;
    --light: #f8fafc;
    --text: #334155;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: var(--text);
    background-color: var(--light);
}

header {
    background: var(--dark);
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Listing Grid - Mobile First */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 2rem;
}

/* Desktop Grid */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    }
}
/* Stacked Post Header */
.post-header {
    display: flex;
    flex-direction: column; /* Stacks items vertically */
    align-items: center;    /* Centers items horizontally */
    text-align: center;     /* Centers the text lines */
    gap: 1rem;              /* Adds consistent spacing between rows */
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.post-header .category {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.post-header h1 {
    margin: 0;
    max-width: 90%;         /* Prevents the title from hitting the edges */
    font-size: 2.2rem;
    line-height: 1.2;
}

.post-header .post-meta {
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
}
.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.post-card:hover { transform: translateY(-5px); }

.post-card img { width: 100%; height: 200px; object-fit: cover; }

.post-content { padding: 1.5rem; }

.category { color: var(--primary); font-weight: bold; font-size: 0.8rem; text-transform: uppercase; }

/* Single Post Page Styling */
.single-post-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 20px;
}

.featured-image {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

.post-body { font-size: 1.1rem; }

footer { text-align: center; padding: 2rem; background: #eee; margin-top: 4rem; }