body {
    margin: 0;
}

.blog {
    max-width: 1200px;
    margin: 20px auto 100px;
    padding: 0 20px;
    color: black;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 50px;
}

.blog-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-header p {
    color: #666;
    font-size: 18px;
}

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

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;

    /* 🔥 추가 */
    display: flex;
    flex-direction: column;
    height: auto;
}
.blog-card:hover {
    transform: translateY(-8px);
}

.blog-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-content {
    padding: 25px;

    /* 🔥 추가 */
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.blog-category {
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
}

.blog-content h2 {
    margin: 15px 0 10px;
    font-size: 24px;
    line-height: 1.4;
}

.blog-date {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-preview {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;

    /* 🔥 핵심 */
    white-space: normal;
    word-break: break-word;

    /* 너무 길면 자연스럽게 제한 */
    max-height: none;
}

/* 카드 전체가 늘어나도록 */
.blog-grid {
    align-items: stretch;
}

.read-more {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.read-more:hover {
    opacity: 0.7;
}

.empty-blog {
    width: 100%;
    min-height: 300px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 2px dashed #e5e5e5;
    border-radius: 16px;

    background: #fcfcfc;
}

.empty-blog p {
    font-size: 20px;
    font-weight: 600;
    color: #999;
}

/* =========================
   Blog Mobile Responsive
   ========================= */
@media (max-width: 768px) {

    .blog {
        margin: 10px auto 60px;
        padding: 0 15px;
    }

    .blog-header {
        margin-bottom: 40px;
    }

    .blog-header h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .blog-header p {
        font-size: 15px;
    }

    .blog-grid {
        grid-template-columns: 1fr; /* 모바일에서는 1열 */
        gap: 20px;
    }

    .blog-card {
        border-radius: 12px;
    }

    .blog-thumbnail {
        height: 180px;
    }

    .blog-content {
        padding: 18px;
    }

    .blog-content h2 {
        font-size: 18px;
        margin: 10px 0;
    }

    .blog-category {
        font-size: 12px;
    }

    .blog-date {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .blog-preview {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .read-more {
        font-size: 14px;
    }

    .empty-blog {
        padding: 60px 0;
        font-size: 16px;
    }
}

