/* ============================================================
   리투인 기업블로그 스킨
   - 색상 포인트는 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; }
/* 모바일 햄버거 토글 (데스크톱에서는 숨김) */
.gnb-toggle {
  display: none; width: 40px; height: 40px; padding: 9px;
  background: none; border: 0; cursor: pointer; border-radius: 8px;
}
.gnb-toggle span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform 0.2s, opacity 0.2s;
}
.gnb-toggle span + span { margin-top: 5px; }
.gnb-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gnb-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.gnb-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* 티스토리 [##_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;
  /* 칼럼이 서로의 높이에 맞춰 늘어나지 않게 고정(최근 글 개수 계산 기준을 본문 높이로 안정화) */
  align-items: start;
}

/* ---------- 인덱스 카드 ---------- */
.card {
  border-radius: 16px;
  overflow: hidden; margin-bottom: 16px; background: var(--bg-soft);
  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: 24px; padding: 24px; align-items: stretch; }
.card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.card-cate {
  align-self: flex-start;
  background: rgba(26, 95, 208, 0.10); color: var(--point-color);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.card-title { margin: 14px 0 8px; font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.4; }
.card-title img { display: none; } /* 티스토리 자동 new 아이콘 숨김 */
.card-summary { margin: 0 0 16px; color: var(--text-sub); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; font-size: 13px; color: var(--text-sub); }
.card-thumb { flex: 0 0 240px; display: flex; }
.card-thumb img { width: 240px; height: 100%; min-height: 150px; object-fit: cover; border-radius: 12px; }

/* ---------- 홈: 상단 자동 슬라이드 (홈에서만 노출) ---------- */
.home-slider { display: none; }
#tt-body-index .home-slider {
  display: block; position: relative;
  margin-bottom: 48px; border-radius: 16px; overflow: hidden;
  background: var(--bg-soft);
}
.home-slider-viewport { overflow: hidden; border-radius: 16px; }
.home-slider-track { display: flex; transition: transform .5s ease; }
.home-slide {
  position: relative; flex: 0 0 100%; display: block;
  aspect-ratio: 16 / 10; color: #fff; overflow: hidden;
}
.home-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s ease;
}
.home-slide:hover .home-slide-bg { transform: scale(1.04); }
.home-slide-bg.no-img { background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.home-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 16, 38, .85) 0%, rgba(7, 16, 38, .15) 55%, transparent 100%);
}
.home-slide-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 10px; padding: 32px 36px 44px;
}
.home-slide-cate {
  align-self: flex-start; background: var(--point-color); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.home-slide-title {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
/* 좌우 이동 버튼 (마우스 올리면 노출) */
.home-slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: var(--navy);
  font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  opacity: 0; transition: opacity .2s, background .2s;
}
.home-slider:hover .home-slider-nav { opacity: 1; }
.home-slider-nav:hover { background: #fff; }
.home-slider-nav.prev { left: 16px; }
.home-slider-nav.next { right: 16px; }
/* 인디케이터(점) */
.home-slider-dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2;
  display: flex; justify-content: center; gap: 8px;
}
.home-slider-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .5); cursor: pointer;
  transition: background .2s, width .2s;
}
.home-slider-dot.is-active { width: 22px; border-radius: 999px; background: #fff; }
/* 글이 1개뿐이면 컨트롤 숨김 */
.home-slider.is-single .home-slider-nav,
.home-slider.is-single .home-slider-dots { display: none; }

/* ---------- 홈: 카테고리별 섹션 ---------- */
/* 기본: 카테고리 섹션은 숨기고 일반 목록을 노출. 홈(#tt-body-index)에서만 반대로 전환 */
.cat-sections { display: none; }
#tt-body-index .cat-sections { display: block; }
#tt-body-index .index-list,
#tt-body-index .paging { display: none; }

.cat-section { margin-bottom: 48px; }
.cat-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--text);
}
.cat-section-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.cat-more { font-size: 14px; font-weight: 700; color: var(--point-color); white-space: nowrap; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* 그리드 안에서는 카드를 세로형(썸네일 위)으로 전환 */
.cat-grid .card { margin-bottom: 0; }
.cat-grid .card-link { flex-direction: column; gap: 14px; padding: 16px; }
.cat-grid .card-thumb { order: -1; flex: 0 0 auto; display: block; }
.cat-grid .card-thumb img { width: 100%; height: 150px; }
.cat-grid .card-title { font-size: 16px; }
.cat-grid .card-summary { font-size: 14px; -webkit-line-clamp: 2; }

/* ---------- 리스트 헤드 ---------- */
.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); display: flex; align-items: center; gap: 12px; }
.post-admin a { margin-right: 0; }
.copy-slide-addr {
  margin-left: auto; padding: 6px 14px; border: 1px solid var(--point-color);
  background: rgba(26, 95, 208, .08); color: var(--point-color);
  font-size: 13px; font-weight: 700; border-radius: 8px; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-slide-addr:hover { background: var(--point-color); color: #fff; }

/* ---------- 이전/다음 ---------- */
.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); }

/* 최근 글 — 소형 카드 리스트 (카드 높이는 고정, 들어갈 수 있는 개수만 노출) */
.mini-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mini-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg-soft); border-radius: 14px; padding: 14px;
  transition: box-shadow .2s, transform .2s;
}
.mini-card:hover { box-shadow: 0 10px 24px rgba(20, 30, 60, 0.10); transform: translateY(-2px); }
.mini-thumb { flex: 0 0 64px; }
.mini-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.mini-body { display: flex; flex-direction: column; min-width: 0; }
.mini-cate {
  align-self: flex-start;
  background: rgba(26, 95, 208, 0.10); color: var(--point-color);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.mini-title {
  margin: 8px 0 6px; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-date { font-size: 12px; color: var(--text-sub); }
/* '더 보기' 토글 — 모바일에서 5개 초과 시 JS가 노출 (데스크톱은 항상 숨김) */
.mini-more {
  width: 100%; margin-top: 12px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px;
  font-size: 14px; font-weight: 700; color: var(--point-color); cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.mini-more:hover { box-shadow: 0 8px 20px rgba(20, 30, 60, 0.08); transform: translateY(-1px); }
.mini-more[hidden] { display: none; }

/* ---------- 푸터 ---------- */
.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; order: -1; }
  .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; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  /* 그리드 카드는 이미 세로형이므로 모바일 전역 .card-link 규칙 영향 없음 */
  .home-slide-title { font-size: 22px; }
  .home-slide-text { padding: 26px 26px 40px; }
}

@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero p { font-size: 16px; }
  /* 모바일은 hover가 없어 좌우 버튼 대신 자동 전환·점으로 조작 */
  .home-slider-nav { display: none; }
  .home-slide { aspect-ratio: 4 / 3; }
  .home-slide-title { font-size: 19px; }
  .home-slide-text { padding: 20px 20px 36px; }
  /* 헤더: 브랜드 줄바꿈 방지 + 햄버거 토글 메뉴 */
  .site-header .inner { height: 56px; gap: 8px; }
  .brand { flex-shrink: 0; }
  .brand-mark { font-size: 17px; white-space: nowrap; }
  .gnb-toggle { display: block; }
  .gnb {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 8px 20px 14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(20, 30, 60, 0.08);
  }
  .gnb.is-open { display: flex; }
  .gnb a { padding: 12px; font-size: 15px; }
  .gnb .gnb-home { text-align: center; margin-top: 4px; }
}

/* ---------- 티스토리 자동 삽입 블록 숨김 ---------- */
/* 공감/공유/게시글 관리 툴바, '카테고리의 다른 글' 목록 제거 */
.container_postbtn,
.another_category {
  display: none !important;
}
