/* 공통 스타일 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 컨테이너 스타일 */
.blog-container {
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* 네비게이션 바 스타일 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #8000ff;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* 다른 요소 위에 표시되도록 */
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #5a00b2;
}

/* 네비게이션 바 아래 내용에 상단 여백 추가 */
body {
    margin-top: 60px; /* 네비게이션 바 높이만큼 추가 */
}


/* 블로그 카드 스타일 */
.blog-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 블로그 제목 스타일 */
.blog-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

/* 블로그 내용 스타일 */
.blog-card p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 최대 3줄로 제한 */
    -webkit-box-orient: vertical;
}

/* 날짜 스타일 */
.blog-card small {
    font-size: 12px;
    color: #999;
}

/* 버튼 스타일 */
.blog-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #6A24FE;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.blog-card a:hover {
    background-color: #4a18b5;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr; /* 모바일에서는 한 열로 정렬 */
    }

    .blog-card {
        padding: 15px;
    }
}
