.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.blog-item {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-item-content {
    padding: 1.75rem;
}

.blog-item-date {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

.blog-item h3 {
    font-size: 1.375rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-item-excerpt {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-item-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.blog-item-link:hover {
    gap: 0.75rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    margin: 2rem auto;
    padding: 0;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.modal-close {
    color: var(--gray-600);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--dark-color);
}

.modal-body {
    padding: 2rem;
}

.modal-body img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.modal-body h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.25rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    flex-wrap: wrap;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.modal-meta-item i {
    color: var(--primary-color);
}

.modal-body h3 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin: 2rem 0 1rem;
}

.modal-body p {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.modal-body ul, .modal-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.modal-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body h2 {
        font-size: 1.75rem;
    }

    .modal-body img {
        height: 250px;
    }
}
