/* ===========================================================
   한국요식업지원센터 블로그 공통 스타일
   - /blog/index.html (목록) 및 개별 글 페이지에서 공용으로 사용
   - 정적 파일이므로 <link rel="stylesheet" href="/blog/blog.css"> 로 참조
   =========================================================== */

:root {
    --brand: #1d4ed8;
    --brand-dark: #1e3a8a;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Pretendard", "Apple SD Gothic Neo", "맑은 고딕",
    "Malgun Gothic", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 헤더 ===== */
.blog-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.blog-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.blog-brand {
    font-weight: 800;
    font-size: 18px;
    color: var(--brand-dark);
}
.blog-nav a {
    margin-left: 18px;
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
}
.blog-nav a:hover {
    color: var(--brand);
}

/* ===== 히어로 ===== */
.blog-hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 56px 0;
    text-align: center;
}
.blog-hero h1 {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.blog-hero p {
    margin-top: 12px;
    font-size: clamp(15px, 2.5vw, 17px);
    opacity: 0.92;
}

/* ===== 게시글 그리드 ===== */
.blog-main {
    padding: 40px 0 64px;
}

.blog-section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--brand);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.12);
}

/*.post-thumb {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: #eef2ff;
    display: block;
}*/

.post-thumb {
    width: 100%;
    height: 180px;          /* aspect-ratio 대신 고정 높이 */
    object-fit: cover;      /* 카드 영역에 맞게 잘라서 채움 */
    object-position: top;   /* 이미지 상단 기준으로 크롭 */
    background: #eef2ff;
    display: block;
}
.post-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 6px;
}
.post-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.post-excerpt {
    font-size: 14px;
    color: var(--muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-date {
    margin-top: 14px;
    font-size: 12px;
    color: #9ca3af;
}

/* ===== 푸터 ===== */
.blog-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0;
    text-align: center;
    font-size: 13px;
}
.blog-footer a {
    color: #93c5fd;
}



/* ===== 모바일: 헤더 2줄 레이아웃 ===== */
@media (max-width: 600px) {
    .blog-header-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
        padding: 10px 0 8px;
        gap: 6px;
    }
    .blog-nav {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 0;
    }
    .blog-nav a {
        margin-left: 0;
        padding: 0 10px;
        font-size: 14px;
        border-right: 1px solid var(--line);
    }
    .blog-nav a:last-child {
        border-right: none;
    }
}
