/* ============================================
   메인 레이아웃 (2열 구도 & 경계선)
   ============================================ */
.site-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px; /* 본문(가변) : 사이드바(320px) */
    gap: 40px; /* 본문과 사이드바 사이 여백 */
    align-items: start;
}

/* 좌측 메인 콘텐츠 영역 */
.main-content {
    min-width: 0; /* Grid 자식 요소 넘침 방지 */
}

/* 섹션 타이틀 */
.section-header {
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #111;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

/* ============================================
   포스트 그리드 & 카드
   ============================================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.post-card {
    background: #fff;
    border: 1px solid #e5e7eb; /* 오타 수정 완료 */
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.post-card-image-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background-color: #f3f4f6;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.post-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-title a {
    color: #1f2937;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #2563eb;
}

.post-card-summary {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
}

/* ============================================
   사이드바 경계선 및 디자인
   ============================================ */
.sidebar {
    position: sticky;
    top: 20px;
    padding-left: 20px;
    border-left: 1px solid #e5e7eb; /* 좌측 경계선 생성 */
}


/* ============================================
   💡 본문 상세 페이지 타이포그래피 & 요소 스타일 (.post-content)
   ============================================ */
.post-content {
    font-size: 0.95rem;     /* 전체적인 본문 글자 크기 (약 17~18px) */
    line-height: 1.8;       /* 줄 간격 (읽기 편한 쾌적한 간격) */
    color: #374151;         /* 눈이 편안한 짙은 회색 톤 */
    word-break: break-word;
}

/* 문단(Paragraph) 간격 */
.post-content p {
    margin-bottom: 1.5rem;
}

/* 대제목 (H2) 스타일 */
.post-content h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f3f4f6; /* 제목 아래 은은한 구분선 */
}

/* 소제목 (H3) 스타일 */
.post-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* 글머리 기호 및 번호 목록 */
.post-content ul, 
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }

.post-content li {
    margin-bottom: 0.5rem;
}

/* 인용구 (Blockquote) 디자인 */
.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    border-left: 4px solid #4f46e5; /* 인디고 포인트 컬러 */
    border-radius: 0 8px 8px 0;
    color: #4b5563;
    font-style: italic;
}

/* 본문 내 이미지 꾸미기 */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: block;
}

/* 본문 내 링크 */
.post-content a {
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.post-content a:hover {
    color: #4338ca;
}

/* 💡 테이블(표) 디자인 (깔끔하고 모던한 표 스타일) */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.post-content th, 
.post-content td {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.post-content th {
    background-color: #f9fafb;
    font-weight: 700;
    color: #111827;
}

.post-content tr:hover td {
    background-color: #f8fafc; /* 마우스 올렸을 때 행 배경색 살짝 변경 */
}


/* ============================================
   모바일/패드 대응 (반응형)
   ============================================ */
@media (max-width: 992px) {
    .site-container {
        grid-template-columns: 1fr; /* 모바일에서는 1열로 세로 정렬 */
    }
    
    .sidebar {
        border-left: none;
        border-top: 2px solid #e5e7eb;
        padding-left: 0;
        padding-top: 30px;
        margin-top: 40px;
    }
}