:root {
    --primary-color: #7B42BC;
    --secondary-color: #5C4EE5;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.header-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.header-image {
    flex-shrink: 0;
}

.header-image img {
    max-width: 250px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.subtitle-small {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 5px;
}

.subtitle a {
    color: white;
    text-decoration: underline;
}

.subtitle-small a {
    color: white;
    text-decoration: underline;
}

/* Main Content */
main {
    padding: 40px 20px;
    min-height: 60vh;
}

/* Loading, Error, No Posts */
.loading, .error, .no-posts {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
}

.error {
    color: #d32f2f;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Blog Card */
.blog-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.4;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-card-date {
    font-size: 0.85rem;
    color: #999;
}

.blog-card-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.blog-card-link:hover {
    background: var(--secondary-color);
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .header-content {
        justify-content: center;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-image img {
        max-width: 200px;
    }
    
    .blog-grid {
    
    .header-image img {
        max-width: 150px;
    }
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}
