/* blog/assets/css/blog-styles.css */

/* 블로그 메인 타이틀 */
.blog-header {
    text-align: center;
    margin: 40px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: #000; /* Match main page h1 color */
}

.blog-header p {
    font-size: 1.1rem;
    color: #666;
    margin-top: 10px;
}

/* 새 글 작성 버튼 */
.create-post-btn {
    display: inline-block;
    background-color: #007aff; /* Blue accent color from main CTA */
    color: #fff;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 30px;
    transition: background-color 0.2s, transform 0.2s;
}

.create-post-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Add a subtle lift effect */
}

/* 포스트 카드 목록 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 링크 스타일 제거용 래퍼 */
.post-card-link {
    text-decoration: none;
    color: inherit;
}

.post-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make card fill the link wrapper height */
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-card-content {
    padding: 20px;
    flex-grow: 1;
}

.post-card-content h2 {
    margin-top: 0;
    font-size: 1.4rem;
}

.post-card-content h2 a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.post-card-content h2 a:hover {
    color: #007aff; /* Match main page accent color on hover */
}

.post-card-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-card-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 태그가 많을 경우 줄바꿈 */
    gap: 10px;
}

/* --- 태그 필터 및 카드 내 태그 스타일 시작 --- */

/* 툴바 (태그 필터 + 새 글 작성 버튼) */
.blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

/* 태그 필터 컨테이너 */
.tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 태그 필터 버튼 */
.tag-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px; /* 둥근 알약 모양 */
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* 활성화된 태그 필터 버튼 */
.tag-btn.active {
    color: #fff;
    background-color: #007aff; /* 메인 컬러와 통일 */
    border-color: #007aff;
    font-weight: 600;
}

/* 포스트 카드 하단의 태그 컨테이너 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 포스트 카드 하단의 개별 태그 */
.post-tags .tag {
    background-color: #e9e9eb;
    color: #5c5c5c;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 작성일 스타일 */
.post-date {
    white-space: nowrap; /* 날짜가 줄바꿈되지 않도록 */
}

/* 작성된 글이 없을 때 메시지 */
.no-posts-message {
    grid-column: 1 / -1; /* 그리드 전체 너비 차지 */
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 1.1rem;
}

/* --- 포스트 카드 썸네일 스타일 --- */
.post-card-thumbnail {
    width: 100%;
    height: 200px; /* 썸네일 이미지 높이 고정 */
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 컨테이너에 꽉 차도록 설정 */
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05); /* 호버 시 이미지 약간 확대 */
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    gap: 8px;
}

.pagination .page-link {
    text-decoration: none;
    color: #007aff;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.pagination .page-link:hover {
    background-color: #e9f5ff;
}

.pagination .page-link.active {
    background-color: #007aff;
    color: #fff;
    border-color: #007aff;
}
