/*
Theme Name:  SermonAI
Theme URI:   https://sermonai.kr
Description: AI 성경 설교 + HitMag 스타일 매거진 통합 테마
Version:     2.0.0
Author:      SermonAI
Text Domain: sermonai
*/

/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  /* SermonAI (설교 전용) */
  --navy:        #1a2e4a;
  --navy-mid:    #1e3a5f;
  --navy-light:  #2d5282;
  --gold:        #c9a84c;
  --gold-light:  #e8c96a;
  --gold-pale:   #fdf6e3;

  /* HitMag (일반 게시물) */
  --hm-red:      #e8281e;
  --hm-red-dark: #c0211a;
  --hm-black:    #1a1a1a;
  --hm-dark:     #2d2d2d;
  --hm-gray:     #f5f5f5;
  --hm-border:   #e8e8e8;
  --hm-text:     #333333;
  --hm-muted:    #777777;
  --hm-white:    #ffffff;

  /* 공통 */
  --cream:       #f9f7f2;
  --white:       #ffffff;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-800:    #1f2937;
  --text:        #1f2937;
  --text-muted:  #6b7280;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);

  --font-sans:   'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-serif:  'Noto Serif KR', 'Batang', serif;

  --max-w:       1160px;
  --section-py:  88px;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--hm-text);
  background: var(--hm-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.container      { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section        { padding: var(--section-py) 0; }

/* ═══════════════════════════════════════
   HEADER / NAV  (SermonAI 네이비 유지)
═══════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(26,46,74,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow-lg); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 700; font-size: 20px;
}
.logo-cross {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--navy); font-weight: 900; flex-shrink: 0;
}
.logo-text span { color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: rgba(255,255,255,.8); font-size: 14px; font-weight: 500;
  padding: 7px 13px; border-radius: var(--radius-sm);
  transition: all .15s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.nav-links { display: flex; align-items: center; gap: 2px; }

/* 버튼 공통 */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all .18s; white-space: nowrap;
}
.btn-primary  { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,168,76,.4); }
.btn-outline  { background: transparent; border: 1.5px solid rgba(255,255,255,.45); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn-navy     { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-1px); }
.btn-red      { background: var(--hm-red); color: var(--white); }
.btn-red:hover { background: var(--hm-red-dark); transform: translateY(-1px); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* 햄버거 */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: .2s; }

/* ═══════════════════════════════════════
   SERMONAI HERO & LANDING  (기존 유지)
═══════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #0f2340 100%);
  padding: 150px 0 90px; position: relative; overflow: hidden;
}
.hero::before {
  content: '✝'; position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  font-size: 400px; color: rgba(255,255,255,.025); line-height: 1; pointer-events: none; font-family: serif;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3);
  color: var(--gold-light); font-size: 12px; font-weight: 600;
  padding: 5px 13px; border-radius: 99px; margin-bottom: 22px;
}
.hero-badge::before { content: '✦'; font-size: 9px; }
.hero-title {
  font-family: var(--font-serif); font-size: clamp(30px,5vw,50px);
  font-weight: 700; line-height: 1.2; color: var(--white); margin-bottom: 18px;
}
.hero-title em { font-style: normal; color: var(--gold); display: block; }
.hero-desc { font-size: 15px; color: rgba(255,255,255,.72); line-height: 1.8; margin-bottom: 32px; max-width: 480px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl); padding: 26px; backdrop-filter: blur(8px);
}
.hero-card-title { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hero-verse {
  font-family: var(--font-serif); font-size: 16px; color: var(--white); line-height: 1.7;
  margin-bottom: 18px; padding-left: 14px; border-left: 3px solid var(--gold);
}
.hero-verse-ref { font-size: 12px; color: var(--gold); font-weight: 600; margin-top: 6px; }
.hero-output-list { margin-top: 18px; display: flex; flex-direction: column; gap: 7px; }
.hero-output-item {
  display: flex; align-items: center; gap: 9px; font-size: 12px;
  color: rgba(255,255,255,.75); background: rgba(255,255,255,.05);
  border-radius: var(--radius-sm); padding: 8px 11px;
}
.hero-output-icon { font-size: 14px; flex-shrink: 0; }
.hero-output-check {
  margin-left: auto; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(201,168,76,.2); display: flex; align-items: center;
  justify-content: center; font-size: 9px; color: var(--gold);
}

/* Stats bar */
.stats-bar { background: var(--navy); padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { text-align: center; padding: 0 20px; border-right: 1px solid rgba(255,255,255,.08); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 30px; font-weight: 700; color: var(--gold); display: block; font-family: var(--font-serif); }
.stat-label { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 3px; }

/* How / Features / Worship / CTA (기존 SermonAI 섹션 유지) */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; display: block; }
.section-title { font-family: var(--font-serif); font-size: clamp(24px,4vw,38px); font-weight: 700; line-height: 1.3; color: var(--navy); margin-bottom: 14px; }
.section-title.light { color: var(--white); }
.section-desc { font-size: 15px; color: var(--text-muted); max-width: 540px; line-height: 1.8; }
.section-desc.light { color: rgba(255,255,255,.72); }
.text-center { text-align: center; }
.text-center .section-desc { margin: 0 auto; }

.how-bg { background: var(--cream); }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 50px; }
.step-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 28px 24px; position: relative; transition: transform .2s, box-shadow .2s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number { font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.step-icon   { font-size: 30px; margin-bottom: 14px; display: block; }
.step-title  { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.step-desc   { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.step-arrow  { position: absolute; top: 50%; right: -18px; transform: translateY(-50%); color: var(--gray-200); font-size: 22px; z-index: 1; }

.features-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; margin-top: 50px; }
.feature-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 24px 24px 24px 20px; border-left: 4px solid var(--gold); transition: box-shadow .2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-icon  { font-size: 26px; margin-bottom: 10px; display: block; }
.feature-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.feature-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.feature-tags  { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.feature-tag   { font-size: 11px; font-weight: 600; background: var(--gold-pale); color: #7a5c1a; padding: 2px 9px; border-radius: 99px; }

.preview-bg    { background: var(--navy); }
.preview-tabs  { display: flex; gap: 3px; margin-bottom: 20px; background: rgba(255,255,255,.06); padding: 4px; border-radius: var(--radius-md); width: fit-content; }
.preview-tab   { padding: 7px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); cursor: pointer; transition: all .15s; border: none; background: none; }
.preview-tab.active { background: rgba(255,255,255,.1); color: var(--white); }
.preview-panel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 26px; display: none; }
.preview-panel.active { display: block; }
.preview-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.preview-sermon-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.preview-verse { border-left: 3px solid var(--gold); padding: 10px 16px; background: rgba(201,168,76,.08); border-radius: 0 4px 4px 0; font-style: italic; color: rgba(255,255,255,.8); font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.preview-text  { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.8; }
.preview-point { background: rgba(255,255,255,.06); border-radius: 4px; padding: 12px 14px; margin-bottom: 8px; }
.preview-point-num   { color: var(--gold); font-weight: 700; font-size: 12px; }
.preview-point-title { color: var(--white); font-size: 14px; font-weight: 600; margin: 3px 0; }
.preview-point-text  { color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.7; }
.hymn-list { display: flex; flex-direction: column; gap: 8px; }
.hymn-item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.06); border-radius: 4px; padding: 10px 14px; }
.hymn-type-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgba(201,168,76,.2); color: var(--gold); white-space: nowrap; flex-shrink: 0; }
.hymn-title { color: var(--white); font-size: 13px; font-weight: 500; }
.hymn-sub   { color: rgba(255,255,255,.5); font-size: 11px; margin-top: 2px; }
.prayer-box { background: rgba(255,255,255,.05); border-radius: 4px; padding: 16px 18px; font-size: 13px; color: rgba(255,255,255,.75); line-height: 2; font-family: var(--font-serif); margin-bottom: 10px; }
.prayer-label { color: var(--gold); font-size: 11px; font-weight: 700; margin-bottom: 8px; display: block; }

.worship-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin-top: 44px; }
.worship-card { background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: 20px 14px; text-align: center; transition: all .18s; }
.worship-card:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(201,168,76,.2); transform: translateY(-2px); }
.worship-card-icon { font-size: 26px; margin-bottom: 8px; }
.worship-card-name { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.worship-card-desc { font-size: 11px; color: var(--text-muted); }

.cta-section { background: linear-gradient(135deg,var(--navy) 0%,#0f2340 100%); padding: 90px 0; text-align: center; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(201,168,76,.08) 0%,transparent 70%); }
.cta-section .container { position: relative; z-index: 1; }
.cta-title { font-family: var(--font-serif); font-size: clamp(26px,4vw,42px); font-weight: 700; color: var(--white); margin-bottom: 14px; line-height: 1.3; }
.cta-title em { font-style: normal; color: var(--gold); }
.cta-desc { font-size: 15px; color: rgba(255,255,255,.65); margin-bottom: 36px; line-height: 1.8; }
.cta-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   HITMAG 스타일 — 일반 게시물 공통
═══════════════════════════════════════ */
.hm-wrap { background: var(--hm-white); padding-top: 84px; }

/* 카테고리 배지 */
.hm-cat {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: var(--hm-red); color: var(--white);
  padding: 2px 8px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px;
}
.hm-cat:hover { background: var(--hm-red-dark); color: var(--white); }

/* ═══════════════════════════════════════
   HITMAG — 아카이브 / 목록
═══════════════════════════════════════ */
.hm-archive-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding: 32px 0 64px;
  align-items: start;
}

/* 대표 카드 (첫 번째 게시물) */
.hm-featured-post {
  background: var(--hm-white);
  border-bottom: 3px solid var(--hm-border);
  margin-bottom: 28px;
  overflow: hidden;
}
.hm-featured-thumb { position: relative; overflow: hidden; aspect-ratio: 16/7; }
.hm-featured-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hm-featured-post:hover .hm-featured-thumb img { transform: scale(1.03); }
.hm-featured-body  { padding: 20px 0 16px; }
.hm-featured-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700; color: var(--hm-black);
  line-height: 1.3; margin-bottom: 10px;
}
.hm-featured-title a:hover { color: var(--hm-red); }
.hm-featured-excerpt { font-size: 14px; color: var(--hm-muted); line-height: 1.7; margin-bottom: 12px; }

/* 게시물 그리드 (3열) */
.hm-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.hm-post-card { border-bottom: 2px solid var(--hm-border); padding-bottom: 16px; }
.hm-post-card-thumb { overflow: hidden; aspect-ratio: 4/3; margin-bottom: 10px; }
.hm-post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hm-post-card:hover .hm-post-card-thumb img { transform: scale(1.04); }
.hm-post-card-title {
  font-size: 14px; font-weight: 700; color: var(--hm-black);
  line-height: 1.4; margin-bottom: 6px;
}
.hm-post-card-title a:hover { color: var(--hm-red); }
.hm-post-card-meta { font-size: 11px; color: var(--hm-muted); }

/* 리스트형 게시물 */
.hm-post-list { display: flex; flex-direction: column; gap: 0; }
.hm-list-item {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--hm-border);
}
.hm-list-thumb { overflow: hidden; aspect-ratio: 4/3; }
.hm-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hm-list-item:hover .hm-list-thumb img { transform: scale(1.04); }
.hm-list-title {
  font-size: 14px; font-weight: 700; color: var(--hm-black);
  line-height: 1.4; margin-bottom: 5px;
}
.hm-list-title a:hover { color: var(--hm-red); }
.hm-list-meta { font-size: 11px; color: var(--hm-muted); }
.hm-list-excerpt { font-size: 13px; color: var(--hm-muted); line-height: 1.6; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 메타 공통 */
.hm-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--hm-muted); margin-top: 6px;
}
.hm-meta a:hover { color: var(--hm-red); }
.hm-meta-sep { color: var(--hm-border); }

/* 아카이브 타이틀 바 */
.hm-archive-title-bar {
  border-left: 4px solid var(--hm-red);
  padding: 6px 0 6px 14px;
  margin-bottom: 20px;
}
.hm-archive-title-bar h1 {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700; color: var(--hm-black); margin: 0;
}
.hm-archive-title-bar p { font-size: 13px; color: var(--hm-muted); margin: 2px 0 0; }

/* 페이지네이션 */
.hm-pagination { margin: 28px 0; display: flex; justify-content: center; }
.hm-pagination .page-numbers ul {
  display: flex; gap: 4px; list-style: none; padding: 0; margin: 0;
}
.hm-pagination ul { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.hm-pagination ul li a,
.hm-pagination ul li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid var(--hm-border);
  font-size: 13px; font-weight: 500; color: var(--hm-text);
  transition: all .12s;
}
.hm-pagination ul li .current { background: var(--hm-red); color: var(--white); border-color: var(--hm-red); }
.hm-pagination ul li a:hover { background: var(--hm-red); color: var(--white); border-color: var(--hm-red); }

/* ═══════════════════════════════════════
   HITMAG — 단일 게시물
═══════════════════════════════════════ */
.hm-single-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 32px 0 64px;
  align-items: start;
}
.hm-article {}
.hm-article-header { margin-bottom: 20px; }
.hm-article-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700; color: var(--hm-black);
  line-height: 1.3; margin: 10px 0 12px;
}
.hm-article-meta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: 12px; color: var(--hm-muted);
  padding: 10px 0; border-top: 1px solid var(--hm-border); border-bottom: 1px solid var(--hm-border);
}
.hm-article-meta a:hover { color: var(--hm-red); }
.hm-article-meta .meta-author { font-weight: 600; color: var(--hm-dark); }
.hm-article-thumb { margin-bottom: 24px; overflow: hidden; }
.hm-article-thumb img { width: 100%; border-radius: 2px; }

/* 게시물 본문 */
.hm-article-content {
  font-size: 16px; line-height: 1.95; color: var(--hm-text);
}
.hm-article-content h2 {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  color: var(--hm-black); margin: 2em 0 .6em;
  border-bottom: 2px solid var(--hm-border); padding-bottom: 8px;
}
.hm-article-content h3 {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  color: var(--hm-black); margin: 1.8em 0 .5em;
  border-left: 3px solid var(--hm-red); padding-left: 10px;
}
.hm-article-content h4 { font-size: 16px; font-weight: 700; color: var(--hm-dark); margin: 1.5em 0 .4em; }
.hm-article-content p  { margin: 0 0 1.2em; }
.hm-article-content a  { color: var(--hm-red); }
.hm-article-content a:hover { text-decoration: underline; }
.hm-article-content img {
  max-width: 100%; margin: 1.5em auto; display: block; border-radius: 2px;
}
.hm-article-content blockquote {
  border-left: 4px solid var(--hm-red);
  padding: 14px 18px; margin: 1.5em 0;
  background: var(--hm-gray);
  font-style: italic; color: var(--hm-dark);
  font-size: 15px; line-height: 1.7;
}
.hm-article-content ul,
.hm-article-content ol { padding-left: 22px; margin: 0 0 1.2em; }
.hm-article-content li { margin-bottom: .4em; }
.hm-article-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.hm-article-content th { background: var(--hm-dark); color: var(--white); padding: 9px 12px; text-align: left; font-weight: 600; }
.hm-article-content td { padding: 9px 12px; border-bottom: 1px solid var(--hm-border); }
.hm-article-content tr:nth-child(even) td { background: var(--hm-gray); }
.hm-article-content pre { background: var(--hm-black); color: #e2e8f0; padding: 18px 22px; overflow-x: auto; font-size: 13px; margin: 1.5em 0; border-radius: 2px; }
.hm-article-content code { background: var(--hm-gray); padding: 2px 6px; font-size: 13px; color: var(--hm-red); border-radius: 2px; }
.hm-article-content pre code { background: none; color: inherit; padding: 0; }
.hm-article-content hr { border: none; border-top: 1px solid var(--hm-border); margin: 2em 0; }

/* 태그 */
.hm-tags { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hm-tags-label { font-size: 12px; font-weight: 700; color: var(--hm-dark); margin-right: 4px; }
.hm-tag-item {
  font-size: 11px; padding: 3px 10px;
  border: 1px solid var(--hm-border); color: var(--hm-muted);
  transition: all .12s;
}
.hm-tag-item:hover { background: var(--hm-red); color: var(--white); border-color: var(--hm-red); }

/* 저자 박스 */
.hm-author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--hm-gray); border-top: 3px solid var(--hm-red);
  padding: 20px; margin: 28px 0;
}
.hm-author-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.hm-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hm-author-name { font-size: 15px; font-weight: 700; color: var(--hm-black); margin-bottom: 6px; }
.hm-author-bio  { font-size: 13px; color: var(--hm-muted); line-height: 1.6; }

/* 관련 글 */
.hm-related { margin-top: 32px; }
.hm-related-title {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  color: var(--hm-black); border-bottom: 3px solid var(--hm-red);
  padding-bottom: 8px; margin-bottom: 18px;
}
.hm-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.hm-related-item {}
.hm-related-thumb { overflow: hidden; aspect-ratio: 4/3; margin-bottom: 8px; }
.hm-related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hm-related-item:hover .hm-related-thumb img { transform: scale(1.04); }
.hm-related-title-text { font-size: 13px; font-weight: 700; color: var(--hm-black); line-height: 1.4; }
.hm-related-title-text a:hover { color: var(--hm-red); }

/* 이전/다음 글 */
.hm-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hm-border); margin: 28px 0; }
.hm-post-nav-item { background: var(--hm-gray); padding: 14px 18px; transition: background .12s; }
.hm-post-nav-item:hover { background: #ededed; }
.hm-post-nav-next { text-align: right; }
.hm-post-nav-label { display: block; font-size: 10px; font-weight: 700; color: var(--hm-red); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.hm-post-nav-title-text { font-size: 13px; font-weight: 600; color: var(--hm-dark); line-height: 1.4; }
.hm-post-nav-title-text:hover { color: var(--hm-red); }

/* ═══════════════════════════════════════
   HITMAG — 사이드바
═══════════════════════════════════════ */
.hm-sidebar { position: sticky; top: 84px; }
.hm-widget { margin-bottom: 28px; }
.hm-widget-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: var(--hm-black); border-bottom: 3px solid var(--hm-red);
  padding-bottom: 7px; margin-bottom: 14px;
}
/* 최근글 위젯 */
.hm-recent-list { display: flex; flex-direction: column; gap: 0; }
.hm-recent-item {
  display: grid; grid-template-columns: 80px 1fr; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--hm-border);
}
.hm-recent-item:last-child { border-bottom: none; }
.hm-recent-thumb { overflow: hidden; aspect-ratio: 1; }
.hm-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hm-recent-title { font-size: 12px; font-weight: 600; color: var(--hm-dark); line-height: 1.4; }
.hm-recent-title a:hover { color: var(--hm-red); }
.hm-recent-date { font-size: 11px; color: var(--hm-muted); margin-top: 3px; }
/* 카테고리 위젯 */
.hm-cat-list { display: flex; flex-direction: column; gap: 0; }
.hm-cat-list li { border-bottom: 1px solid var(--hm-border); }
.hm-cat-list li:last-child { border-bottom: none; }
.hm-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px; color: var(--hm-text); transition: color .12s;
}
.hm-cat-list a:hover { color: var(--hm-red); }
.hm-cat-count { font-size: 11px; background: var(--hm-gray); color: var(--hm-muted); padding: 1px 7px; border-radius: 2px; }
/* CTA 위젯 */
.hm-cta-widget { background: var(--navy); padding: 20px; text-align: center; }
.hm-cta-widget .cta-icon { font-size: 28px; color: var(--gold); margin-bottom: 8px; }
.hm-cta-widget p { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 14px; line-height: 1.5; }

/* ═══════════════════════════════════════
   설교 생성 페이지 (기존 유지)
═══════════════════════════════════════ */
.generate-hero { background: linear-gradient(135deg,var(--navy) 0%,var(--navy-mid) 100%); padding: 110px 0 56px; text-align: center; }
.generate-hero h1 { font-family: var(--font-serif); font-size: clamp(26px,4vw,40px); color: var(--white); font-weight: 700; margin-bottom: 10px; }
.generate-hero p { font-size: 15px; color: rgba(255,255,255,.65); }
.generate-wrap { background: var(--cream); padding: 56px 0 80px; }
.generate-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-xl); padding: 36px 40px; box-shadow: var(--shadow-md); max-width: 760px; margin: 0 auto; }
.gen-field { margin-bottom: 22px; }
.gen-label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.gen-label span { color: var(--gold); }
.gen-input, .gen-select { width: 100%; padding: 11px 15px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); font-size: 15px; color: var(--text); transition: border .15s, box-shadow .15s; background: var(--white); }
.gen-input:focus, .gen-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); outline: none; }
.gen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gen-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.gen-tag { font-size: 12px; padding: 4px 13px; border: 1.5px solid var(--gray-200); border-radius: 99px; cursor: pointer; color: var(--text-muted); background: var(--white); transition: all .12s; font-weight: 500; }
.gen-tag:hover { border-color: var(--gold); color: var(--navy); }
.gen-tag.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.gen-submit { width: 100%; padding: 15px; background: var(--navy); color: var(--white); border: none; border-radius: var(--radius-md); font-size: 15px; font-weight: 700; cursor: pointer; transition: all .18s; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.gen-submit:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,46,74,.3); }
.gen-submit:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.gen-loading { text-align: center; padding: 40px 0; display: none; }
.gen-spinner { width: 38px; height: 38px; border: 3px solid var(--gray-200); border-top-color: var(--navy); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform:rotate(360deg); } }
.gen-loading-text { font-size: 13px; color: var(--text-muted); }
.result-wrap { max-width: 900px; margin: 36px auto 0; }
.result-tab-bar { display:flex; gap:3px; flex-wrap:wrap; margin-bottom:0; }
.result-tab { padding: 9px 16px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--gray-200); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--gray-100); color: var(--text-muted); cursor: pointer; transition: all .12s; }
.result-tab.active { background: var(--white); color: var(--navy); }
.result-panel { background: var(--white); border: 1.5px solid var(--gray-200); border-radius: 0 var(--radius-lg) var(--radius-lg); padding: 30px 34px; display: none; }
.result-panel.active { display: block; }
.result-sermon-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.result-bible-quote { background: var(--gold-pale); border-left: 4px solid var(--gold); padding: 13px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--gray-800); font-size: 15px; line-height: 1.8; margin-bottom: 22px; }
.result-h3 { font-size: 15px; font-weight: 700; color: var(--navy); border-left: 3px solid var(--gold); padding-left: 11px; margin: 22px 0 9px; }
.result-apply { background: #f0fff4; border: 1px solid #a7f3d0; border-radius: var(--radius-sm); padding: 9px 13px; font-size: 13px; margin: 8px 0; }
.result-prayer { background: var(--cream); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px 22px; font-size: 15px; line-height: 2; font-family: var(--font-serif); color: var(--gray-800); white-space: pre-wrap; margin-bottom: 14px; }
.result-prayer-title { font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 9px; display: block; }
.result-hymn-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:11px; }
.result-hymn-card { background: var(--cream); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 13px 15px; }
.result-hymn-name { font-weight: 700; font-size: 13px; color: var(--navy); margin-bottom: 3px; }
.result-hymn-num  { font-size: 11px; color: var(--gold); margin-bottom: 5px; font-weight: 600; }
.result-hymn-why  { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.result-topic-item { border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 13px 16px; margin-bottom: 9px; }
.result-topic-cat { font-size: 10px; font-weight: 700; background: #eff6ff; color: #1d4ed8; padding: 2px 9px; border-radius: 99px; display: inline-block; margin-bottom: 5px; }
.result-topic-text  { font-size: 14px; color: var(--text); margin: 3px 0; }
.result-topic-verse { font-size: 12px; color: var(--text-muted); }
.result-bulletin-title { font-size: 17px; font-family: var(--font-serif); font-weight: 700; text-align:center; color: var(--navy); margin-bottom: 18px; }
.result-order-list { padding-left: 20px; }
.result-order-list li { padding: 6px 0; font-size: 14px; border-bottom: 1px dotted var(--gray-200); }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
/* 결과 배지 */
.sai-badge { font-size: 10px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.sai-badge-blue  { background:#eff6ff; color:#1d4ed8; }
.sai-badge-green { background:#f0fdf4; color:#166534; }
.sai-badge-amber { background:#fffbeb; color:#92400e; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer { background: #0f1e33; color: rgba(255,255,255,.5); padding: 50px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-brand .site-logo { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.footer-col li + li { margin-top: 7px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,.5); transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: var(--gold); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 960px) {
  :root { --section-py: 60px; }
  .hero-grid          { grid-template-columns: 1fr; }
  .hero-card          { display: none; }
  .stats-grid         { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .steps-grid         { grid-template-columns: 1fr; }
  .step-arrow         { display: none; }
  .features-grid      { grid-template-columns: 1fr; }
  .worship-grid       { grid-template-columns: repeat(3,1fr); }
  .hm-archive-layout,
  .hm-single-layout   { grid-template-columns: 1fr; }
  .hm-sidebar         { position: static; }
  .hm-post-grid       { grid-template-columns: repeat(2,1fr); }
  .hm-related-grid    { grid-template-columns: repeat(2,1fr); }
  .footer-grid        { grid-template-columns: 1fr 1fr; }
  .footer-brand       { grid-column: 1/-1; }
  .gen-row            { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links          { display: none; }
  .nav-toggle         { display: flex; }
  .hero               { padding: 110px 0 56px; }
  .hm-post-grid       { grid-template-columns: 1fr; }
  .hm-related-grid    { grid-template-columns: 1fr; }
  .worship-grid       { grid-template-columns: repeat(2,1fr); }
  .hm-post-nav        { grid-template-columns: 1fr; }
  .footer-grid        { grid-template-columns: 1fr; }
  .generate-card      { padding: 24px 18px; }
  .result-panel       { padding: 22px 18px; }
}
