/*
 * 블로그 목록(blog.php) 전용 스타일 — design.css 뒤에 싣는다.
 * 원본: web/design/blog.html 의 <style>. 시안을 고치면 이 파일도 같이 옮길 것.
 */
    /* ── 페이지 머리 (marathon.html 과 같은 규격) ─────────────────────── */
    .page-head { padding: calc(var(--header-h) + 40px) 0 24px; }
    .crumb { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
    .crumb a:hover { color: var(--text); }
    .page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .page-head h1 { font-size: 40px; line-height: 1.25; font-weight: 800; letter-spacing: -0.03em; }
    .page-head p { color: var(--text-2); margin-top: 8px; }

    /* ── 필터 줄: 카테고리 칩 + 검색 ──────────────────────────────────── */
    .blog-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .blog-tools .chip-row { min-width: 0; flex: 1; }
    .search { position: relative; width: 280px; max-width: 100%; }
    .search i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; font-size: 18px; color: var(--text-2); pointer-events: none; }
    .search .input { height: 44px; padding-left: 42px; }
    .result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px; font-size: 15px; color: var(--text-2); }
    .result-bar b { color: var(--primary); }

    /* ── 썸네일 자리 — 운영 글에 이미지가 없어 아이콘 + 라임 빛으로 그린다 ── */
    .thumb {
      position: relative; display: grid; place-items: center; overflow: hidden;
      aspect-ratio: 16 / 9;
      background:
        radial-gradient(110% 90% at var(--gx, 85%) var(--gy, 0%), rgba(198, 255, 52, 0.18), transparent 58%),
        linear-gradient(160deg, var(--surface-2), var(--bg-2));
    }
    .thumb > i { font-size: 44px; color: var(--primary); }
    .thumb img { width: 100%; height: 100%; object-fit: cover; }
    /* 사진 썸네일은 아래를 살짝 눌러 카드 본문과 이어지게 */
    .thumb.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,24,26,0) 55%, rgba(24,24,26,.35) 100%); }

    /* ── 대표 글 ──────────────────────────────────────────────────────── */
    .feature {
      display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
      padding: 0; overflow: hidden; border-radius: var(--radius-lg); margin-top: 28px;
    }
    .feature .thumb { aspect-ratio: auto; min-height: 320px; }
    .feature .thumb > i { font-size: 72px; }
    .feature-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 36px; min-width: 0; }
    .feature-body h2 { font-size: 28px; line-height: 1.35; font-weight: 800; letter-spacing: -0.02em; }
    .feature-body p { color: var(--text-2); }
    .feature-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

    /* ── 글 카드 ──────────────────────────────────────────────────────── */
    .blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .bcard { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
    .bcard-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px; min-width: 0; }
    .bcard-body .badge { align-self: flex-start; }
    .bcard h3 {
      font-size: 18px; line-height: 1.4; font-weight: 700;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .bcard p {
      font-size: 14px; color: var(--text-2);
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
    .feature .post-meta { margin-top: 4px; border-top: 0; padding-top: 0; }
    .post-meta span { display: inline-flex; align-items: center; gap: 4px; }
    .post-meta i { font-size: 14px; }

    .pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
    .pager a, .pager span {
      min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px;
      display: grid; place-items: center; font-weight: 600; color: var(--text-2); background: var(--surface);
    }
    .pager a:hover { color: var(--text); }
    .pager .is-current { background: var(--primary); color: var(--on-primary); }

    /* ── 하단 안내: 앱 유도 + 공지사항 ────────────────────────────────── */
    .blog-cta { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
    .app-banner {
      display: flex; flex-direction: column; justify-content: center; gap: 18px;
      padding: 32px; border-radius: var(--radius-lg);
      background: radial-gradient(500px circle at 100% 0%, rgba(198,255,52,.16), transparent 60%), var(--surface);
    }
    .app-banner h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
    .app-banner p { color: var(--text-2); margin-top: 6px; }
    .side-link { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius-lg); }
    .side-link > i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--primary); font-size: 22px; }
    .side-link strong { font-size: 18px; }
    .side-link p { font-size: 14px; color: var(--text-2); }
    .side-link .more { margin-top: auto; color: var(--text); }

    @media (max-width: 1024px) {
      .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .blog-cta { grid-template-columns: minmax(0, 1fr); }
    }
    @media (max-width: 768px) {
      .page-head { padding-top: calc(var(--header-h) + 28px); }
      .page-head h1 { font-size: 30px; }
      .search { width: 100%; }
      .feature { grid-template-columns: minmax(0, 1fr); }
      .feature .thumb { min-height: 0; aspect-ratio: 16 / 9; }
      .feature-body { padding: 24px 20px; }
      .feature-body h2 { font-size: 22px; }
      .app-banner, .side-link { padding: 24px 20px; }
    }
    @media (max-width: 640px) {
      .blog-grid { grid-template-columns: minmax(0, 1fr); }
    }

/* ── PHP 이관 추가분 ─────────────────────────────────────────────── */
/* 검색은 GET 폼이다 — 제출 버튼은 Enter 로 대신하고 스크린리더용으로만 둔다 */
.search .sr-only:focus { position: absolute; right: 6px; top: 6px; width: auto; height: 32px; clip: auto; padding: 0 10px; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary); }
/* 카드 메타는 <p> 라 위 '.bcard p' 의 줄 수 제한(-webkit-box)에 걸려 flex 간격이 사라진다 (시안에도 있던 문제) — 날짜와 읽는 시간이 붙어 보였다 */
.bcard p.post-meta { display: flex; -webkit-line-clamp: unset; overflow: visible; }
/* 칩은 링크(a)라 줄바꿈 없이 가로 스크롤 */
.blog-tools .chip { white-space: nowrap; }
.blog-cta { padding-bottom: 96px; }
@media (max-width: 768px) { .blog-cta { padding-bottom: 72px; } }
