/*
Theme Name: My Simple Blog
Author: Me
Description: A minimal blog theme for IT and Politics.
Version: 1.0
*/

/* 기본 초기화 및 폰트 설정 (가독성 중심) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    background-color: #f9f9f9;
}

/* 레이아웃 (중앙 정렬, 읽기 편한 폭) */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* 헤더 스타일 */
header {
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 40px;
}
header h1 a {
    text-decoration: none;
    color: #000;
    font-size: 2rem;
    font-weight: bold;
}

/* 글 목록 스타일 */
article {
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    overflow-wrap: break-word;  /* 공간 넘치면 줄바꿈 (표준) */
    word-break: break-word;     /* 호환성용 */
}
article h2 a {
    text-decoration: none;
    color: #222;
}
article h2 a:hover {
    color: #0056b3;
}
.meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}
/* 요약문 스타일 */
.content p {
    margin-bottom: 15px;
    color: #666;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 계속 읽기 버튼 스타일 */
.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.read-more:hover {
    background-color: #0056b3;
}
/* 이미지 스타일 추가 */
.post-thumbnail img {
    width: 100%;       /* 가로 꽉 차게 */
    height: auto;      /* 비율 유지 */
    border-radius: 8px; /* 모서리 둥글게 */
    margin-bottom: 20px;
}
/* 네비게이션 메뉴 스타일 */
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    gap: 20px; /* 메뉴 사이 간격 */
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.main-navigation a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    font-size: 1.1rem;
}
.main-navigation a:hover {
    color: #000;
}
/* 전체 레이아웃: 옆으로 나란히 배치 */
.post-layout {
    display: flex;            /* 플렉스 박스 발동 */
    justify-content: space-between; /* 양쪽 끝으로 배치 */
    align-items: flex-start;  /* 위쪽 라인 맞춤 */
    gap: 20px;                /* 글과 그림 사이 간격 */
}

/* [좌측] 텍스트 영역 */
.post-text {
    flex: 1;                  /* 남은 공간을 다 차지함 */
    min-width: 0;             /* 글자가 박스를 뚫고 나가는 것 방지 (필수) */
}

/* 본문 요약 (...) 말줄임표 처리 */
.content-summary p {
    display: -webkit-box;
    -webkit-line-clamp: 3;    /* 3줄까지만 보여주고 자름 */
    -webkit-box-orient: vertical;
    overflow: hidden;         /* 넘치는 글자 숨김 */
    text-overflow: ellipsis;  /* 뒤에 ... 붙이기 */
    margin-bottom: 0;
    line-height: 1.6;
    height: 4.8em;            /* line-height(1.6) * 3줄 = 4.8em (높이 고정) */
}

/* [우측] 이미지 영역 */
.post-image {
    width: 200px;             /* 이미지 박스 너비 고정 (원하는대로 조절) */
    flex-shrink: 0;           /* 화면이 좁아져도 이미지는 줄어들지 않음 */
}

.post-image img {
    width: 100%;
    height: 150px;            /* 이미지 높이 고정 (선택사항) */
    object-fit: cover;        /* 비율 유지하면서 꽉 채우기 (찌그러짐 방지) */
    border-radius: 8px;       /* 둥근 모서리 */
}

/* 모바일 화면에서는 위아래로 다시 배치 (반응형) */
@media (max-width: 600px) {
    .post-layout {
        flex-direction: column-reverse; /* 이미지가 위로 가고 글이 아래로 */
    }
    .post-image {
        width: 100%;
        margin-bottom: 15px;
    }
}
/* 메타 정보 (날짜, 조회수, 좋아요) 디자인 */
.meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.meta .sep {
    margin: 0 8px;
    color: #ddd;
}

/* 좋아요 버튼 미세 조정 */
.wp_ulike_btn {
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}
.wpulike-heart {
    font-size: 16px !important; /* 하트 크기 */
}
.count-box {
    font-size: 0.85rem !important; /* 좋아요 숫자 크기 */
    margin-left: 5px !important;
}
/* 좋아요 버튼 수직 중앙 정렬 */
.wp_ulike_btn {
    vertical-align: middle !important;
    margin-top: -3px !important; /* 살짝 위로 당김 */
}
/* --- 댓글창 전체 고급화 --- */
#respond {
    background: #fff;
    padding: 30px;
    margin-top: 40px;
    border-top: 1px solid #333; /* 상단 굵은 선 */
}

#reply-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: block;
}

/* 안내 문구 숨김 (이메일 공개 안됨 등) */
.comment-notes {
    display: none;
}

/* 입력창 스타일 (이름, 본문) */
.comment-form-author input,
.comment-form-comment textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ddd; /* 밑줄 스타일 */
    background: #fafafa;
    padding: 15px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 4px 4px 0 0; /* 윗부분만 살짝 둥글게 */
    box-sizing: border-box; /* 패딩 포함 크기 계산 */
}

/* 입력창 클릭했을 때 효과 */
.comment-form-author input:focus,
.comment-form-comment textarea:focus {
    outline: none;
    background: #fff;
    border-bottom: 2px solid #000; /* 클릭하면 밑줄 진해짐 */
}

.comment-form-comment textarea {
    min-height: 120px;
    resize: vertical; /* 세로로만 조절 가능 */
}

/* 라벨(이름 *) 숨기기 - 플레이스홀더 느낌으로 깔끔하게 */
.comment-form-author label {
    display: none;
}
.comment-form-author input::placeholder {
    color: #999;
}
/* 강제로 이름 필드에 placeholder 넣기 (CSS 트릭) */
.comment-form-author {
    position: relative;
}
.comment-form-author input {
    /* 배경 이미지를 넣을 순 없으니 JS 없이 하려면 깔끔함으로 승부 */
    margin-bottom: 15px;
}

/* 등록 버튼 고급화 */
.form-submit {
    text-align: right; /* 오른쪽 정렬 */
    margin-top: 15px;
}

#submit {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 20px; /* 둥근 버튼 */
    transition: background-color 0.3s;
}

#submit:hover {
    background-color: #0056b3; /* 마우스 올리면 파란색 */
}

/* 기존 댓글 리스트 스타일 정리 */
.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}
.comment-body {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}
.comment-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}
.fn { /* 작성자 이름 */
    font-weight: bold;
    font-size: 1rem;
    color: #000;
    font-style: normal;
    margin-right: 5px;
}
