/* ============================================
   FreeToolbox Blog — 블로그 전용 스타일
   style.css 위에 추가 로드
   ============================================ */

/* === 블로그 인덱스 === */
.blog-list {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  text-align: center;
}
.blog-list h1 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}
.blog-list > p {
  color: #6b7280;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  font-size: 1.1rem;
}
.blog-list nav {
  text-align: left;
}

/* 카드 */
.blog-card {
  display: block;
  padding: 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1.2rem;
  text-decoration: none !important;
  color: var(--text);
  transition: all 0.2s;
  text-align: left;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none !important;
}
.blog-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 700;
}
.blog-card p {
  font-size: 1.02rem !important;
  color: #6b7280 !important;
  line-height: 1.6;
  margin: 0;
}
.blog-card .meta {
  font-size: 0.92rem;
  color: #9ca3af;
  margin-top: 0.6rem;
}
.blog-card .tag {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.2rem 0.65rem;
  background: #fff7ed;
  border: none;
  border-radius: 999px;
  color: #9a3412;
  margin-right: 0.3rem;
}

/* === 블로그 포스트 본문 === */
.blog-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* 메타 (저자, 날짜) */
.blog-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.98rem;
  color: #9ca3af;
}
.blog-meta .author {
  font-weight: 600;
  color: var(--text);
}

/* 제목 */
.blog-article h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.blog-article h2 {
  font-size: 1.55rem;
  margin: 2.8rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  color: var(--text);
  font-weight: 700;
}
.blog-article h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.8rem;
  color: #374151;
  font-weight: 600;
}

/* 본문 텍스트 */
.blog-article p {
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
  color: #374151;
}
.blog-article strong {
  color: var(--text);
}

/* 이미지 */
.blog-article img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 1.2rem 0;
}
.blog-article .img-caption {
  font-size: 0.92rem;
  color: #9ca3af;
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

/* 리스트 */
.blog-article ul, .blog-article ol {
  margin: 0.8rem 0 1.4rem 1.5rem;
  line-height: 1.85;
  font-size: 1.08rem;
  color: #374151;
}
.blog-article li {
  margin-bottom: 0.3rem;
}

/* 인용 */
.blog-article blockquote {
  border: 1px solid var(--border);
  padding: 1rem 1.4rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 10px;
  color: #555555;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* 코드 */
.blog-article code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface2);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 0.92rem;
  color: #1e293b;
}
.blog-article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.3rem;
  overflow-x: auto;
  margin: 1.2rem 0;
}
.blog-article pre code {
  background: none;
  padding: 0;
}

/* 링크 */
.blog-article a {
  color: var(--accent);
  text-decoration: underline;
}

/* === 테이블 (핵심) === */
.blog-article table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 !important;
  font-size: 1.02rem !important;
  border-radius: 10px;
  overflow: hidden;
}
/* 모바일 — 셀 한 글자씩 wrap 방지: 가로 스크롤 + nowrap */
@media (max-width: 720px) {
  .blog-article table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0;
  }
  .blog-article th,
  .blog-article td {
    white-space: nowrap !important;
  }
}
.blog-article thead tr {
  background: var(--surface2) !important;
  border-bottom: 2px solid var(--accent) !important;
}
.blog-article th {
  padding: 0.9rem 1rem !important;
  text-align: left !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  font-size: 1.02rem !important;
}
.blog-article td {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #374151 !important;
}
.blog-article tbody tr:hover {
  background: rgba(249,115,22,0.06);
}
.blog-article tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

/* === CTA 블록 === */
.blog-cta {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 14px;
  padding: 1.8rem;
  margin: 2.5rem 0;
  text-align: center;
}
.blog-cta p {
  font-size: 1.15rem !important;
  color: var(--text) !important;
}
.blog-cta a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 0.6rem;
  transition: background 0.2s;
}
.blog-cta a:hover {
  background: #ff9700;
  text-decoration: none !important;
}

/* === 태그 === */
.blog-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
}
.blog-tags span {
  font-size: 0.9rem;
  padding: 0.3rem 0.85rem;
  background: #fff7ed;
  border: none;
  border-radius: 999px;
  color: #9a3412;
}

/* === 하단 네비게이션 === */
.blog-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
}
.blog-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.blog-nav a:hover {
  text-decoration: underline;
}

/* === 모바일 반응형 === */
@media (max-width: 768px) {
  .blog-list { padding: 1.2rem 1rem 3rem; }
  .blog-list h1 { font-size: 1.7rem; }
  .blog-card h2 { font-size: 1.2rem; }

  .blog-article { padding: 1.2rem 1rem 3rem; }
  .blog-article h1 { font-size: 1.6rem; }
  .blog-article h2 { font-size: 1.35rem; }
  .blog-article h3 { font-size: 1.15rem; }
  .blog-article p,
  .blog-article ul,
  .blog-article ol { font-size: 1.02rem; }

  .blog-article table { font-size: 0.95rem !important; }
  .blog-article th,
  .blog-article td { padding: 0.7rem 0.6rem !important; }
}
