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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 40px;
}

.blog-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 60px;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

.blog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.categories-card, .newsletter-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.categories-card h3, .newsletter-card h3 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 700;
}

.categories-list {
    list-style: none;
}

.category-item {
    margin-bottom: 4px;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.category-item a:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.category-item.active a {
    background: #3b82f6;
    color: white;
}

.category-item .count {
    background: #e2e8f0;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-item.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-card p {
    color: #64748b;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.newsletter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.newsletter-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.newsletter-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-btn:hover {
    background: #1e3a8a;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

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

.blog-category {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.blog-content h2 {
    font-size: 1.35rem;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-content > p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.author-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
}

.date {
    color: #94a3b8;
    font-size: 0.85rem;
}

.read-more {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.read-more:hover {
    color: #1e3a8a;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
    }

    .categories-card, .newsletter-card {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .sidebar {
        flex-direction: column;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
