/* ============================================================
   리투인 기업블로그 스킨
   - 색상 포인트는 index.xml 옵션(point-color)으로 제어되며
     skin.html <head>에서 --point-color 변수로 주입됩니다.
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --point-color: #1a5fd0;
  --navy: #0a1838;       /* 리투인 코퍼레이트 딥네이비 (CTA/푸터 강조) */
  --navy-2: #0b1f4d;
  --text: #1b1d21;
  --text-sub: #5a6069;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --radius: 12px;
  --maxw: 1160px;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 6px; }
.brand-mark { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; font-weight: 700; color: var(--point-color); }
.gnb { display: flex; align-items: center; gap: 8px; }
.gnb a { padding: 8px 12px; font-size: 15px; color: var(--text-sub); border-radius: 8px; }
.gnb a:hover { color: var(--text); background: var(--bg-soft); }
.gnb .gnb-home {
  color: #fff; background: var(--point-color); font-weight: 600;
}
.gnb .gnb-home:hover { filter: brightness(0.95); background: var(--point-color); color: #fff; }
/* 티스토리 [##_blog_menu_##] 기본 마크업 보정 */
.gnb ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }

/* ---------- 히어로 (홈에서만 노출) ---------- */
.hero { display: none; }
#tt-body-index .hero {
  display: block;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(26, 95, 208, 0.55), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; padding: 80px 0;
}
.hero-eyebrow {
  display: inline-block; margin-bottom: 16px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: #cdd9f5; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero h1 { margin: 0 0 14px; font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.hero p { margin: 0; font-size: 18px; opacity: 0.85; max-width: 620px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  background: #fff; color: var(--navy); font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 10px; transition: transform .15s, box-shadow .15s;
}
.hero-cta span { transition: transform .15s; }
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); color: var(--navy); }
.hero-cta:hover span { transform: translateX(3px); }

/* ---------- 레이아웃 ---------- */
.layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 48px;
  padding-top: 48px; padding-bottom: 80px;
}

/* ---------- 인덱스 카드 ---------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 20px; background: var(--bg);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 12px 28px rgba(20, 30, 60, 0.10); transform: translateY(-2px); }
.card-link { display: flex; gap: 20px; }
.card-thumb { flex: 0 0 200px; }
.card-thumb img { width: 200px; height: 140px; object-fit: cover; }
.card-body { padding: 18px 20px; }
.card-cate { font-size: 13px; font-weight: 700; color: var(--point-color); }
.card-title { margin: 6px 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.card-summary { margin: 0 0 12px; color: var(--text-sub); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 13px; color: var(--text-sub); }

/* ---------- 리스트 헤드 ---------- */
.list-head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--text); }
.list-head h2 { margin: 0; font-size: 24px; }
.list-head small { color: var(--point-color); font-weight: 700; }
.list-head p { margin: 6px 0 0; color: var(--text-sub); }
.empty { color: var(--text-sub); padding: 40px 0; text-align: center; }

/* ---------- 글 본문 ---------- */
.post { padding-bottom: 24px; }
.post-head { padding: 8px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.post-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; }
.post-crumb .crumb-home { color: var(--text-sub); }
.post-crumb .crumb-home:hover { color: var(--point-color); }
.post-crumb .crumb-sep { color: var(--line); font-weight: 400; }
.post-cate { font-size: 14px; font-weight: 700; color: var(--point-color); }
.post-title { margin: 10px 0 16px; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.post-meta { display: flex; gap: 14px; color: var(--text-sub); font-size: 14px; }
.post-body { font-size: 17px; line-height: 1.85; }
.post-body img { border-radius: 8px; margin: 16px 0; }
.post-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a { background: var(--bg-soft); padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-sub); }
.post-admin { margin-top: 16px; font-size: 13px; color: var(--text-sub); }
.post-admin a { margin-right: 10px; }

/* ---------- 이전/다음 ---------- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.post-nav a { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.post-nav a:hover { border-color: var(--point-color); }
.post-nav .next { text-align: right; }
.post-nav .dir { display: block; font-size: 12px; color: var(--point-color); font-weight: 700; margin-bottom: 4px; }
.post-nav .ttl { font-size: 15px; font-weight: 600; }

/* ---------- 페이징 ---------- */
.paging { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; }
.paging a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-sub); font-size: 14px; }
.paging a:hover { border-color: var(--point-color); color: var(--point-color); }
.paging .num.current, .paging a.selected { background: var(--point-color); color: #fff; border-color: var(--point-color); }
.page-nums { display: inline-flex; gap: 6px; }

/* ---------- 제품 전환 CTA (글 하단) ---------- */
.product-cta {
  margin-top: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
  background:
    radial-gradient(700px 240px at 100% 0%, rgba(26, 95, 208, 0.5), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; border-radius: 16px; padding: 32px 34px;
}
.product-cta-text { flex: 1 1 320px; }
.product-cta-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: #9db8ee; margin-bottom: 10px;
}
.product-cta-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; }
.product-cta-desc { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.product-cta-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #fff; color: var(--navy); font-weight: 700; font-size: 15px;
  padding: 14px 24px; border-radius: 10px; transition: transform .15s, box-shadow .15s;
}
.product-cta-btn span { transition: transform .15s; }
.product-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28); color: var(--navy); }
.product-cta-btn:hover span { transform: translateX(3px); }

/* ---------- 사이드바 제품 카드 ---------- */
.product-card {
  display: block; margin-bottom: 32px; padding: 22px 20px; border-radius: 14px;
  background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff;
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10, 24, 56, 0.28); color: #fff; }
.product-card-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #9db8ee; }
.product-card-name { display: block; margin: 6px 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.product-card-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.78);
}
.product-card-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 13px; font-weight: 700; color: #fff;
}
.product-card-cta span { transition: transform .15s; }
.product-card:hover .product-card-cta span { transform: translateX(3px); }

/* ---------- 사이드바 ---------- */
.widget { margin-bottom: 32px; }
.widget h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget-recent li { padding: 8px 0; border-bottom: 1px solid var(--bg-soft); }
.widget-recent a { font-size: 14px; display: block; }
.widget-recent a:hover { color: var(--point-color); }
.widget-recent .date { font-size: 12px; color: var(--text-sub); }
.widget-category a:hover { color: var(--point-color); }
.widget-search input[type="text"], .widget-search input[type="search"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}

/* ---------- 푸터 ---------- */
.site-footer { background: var(--navy); padding: 36px 0; margin-top: auto; }
.site-footer .inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer .copy { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 14px; }
.site-footer .links { margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer .links a { font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.site-footer .links a:hover { color: #fff; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  .card-link { flex-direction: column; }
  .card-thumb { flex-basis: auto; }
  .card-thumb img { width: 100%; height: 200px; }
  .post-title { font-size: 26px; }
  .post-nav { grid-template-columns: 1fr; }
  .product-cta { padding: 26px 24px; }
  .product-cta-btn { width: 100%; justify-content: center; }
  .hero h1 { font-size: 28px; }
}
