@charset "UTF-8";
/**
 * category.css
 * 바톤 웰스 (Baton Wealth) - 카테고리 페이지 스타일
 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  overflow-x: clip;
  width: 100%;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: #f3f5f9;
  color: #222;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── 웹 접근성: 본문 바로가기 (Skip Navigation) ── */
.skip-nav {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a2332;
  color: #fff;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 99999;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: top 0.2s ease;
}

.skip-nav:focus {
  top: 0;
  outline: 2px solid #3b82f6;
}

/* 헤더 */
body>header {
  background: #1a2332;
  border-bottom: 1px solid #1a2332;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

nav {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px 41px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  transition: transform .2s ease, opacity .2s ease;
}

.logo:hover .nav-logo-img {
  transform: scale(1.03);
  opacity: 0.95;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #c8d8ea;
  text-decoration: none;
  font-size: 18px;
  padding: 9px 19px;
  border-radius: 20px;
  transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.on {
  background: #173b63;
  color: #fff;
}

/* ── 헤더 금융 키워드 검색창 ── */
.nav-search-form {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 10px;
}

.nav-search-input {
  width: 175px;
  height: 36px;
  padding: 0 34px 0 14px;
  font-size: 13.5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.nav-search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.nav-search-input:focus {
  width: 220px;
  background: rgba(255, 255, 255, 0.16);
  border-color: #38a169;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.25);
}

.nav-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s ease, transform .2s ease;
}

.nav-search-btn:hover {
  color: #4ade80;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .nav-search-form {
    margin-left: 6px;
  }

  .nav-search-input {
    width: 130px;
    font-size: 12px;
  }

  .nav-search-input:focus {
    width: 155px;
  }
}

/* 히어로 배너 (PC 슬림 최적화) */
header.hero,
.hero {
  background: none;
  border: none;
  position: static;
  box-shadow: none;
  color: #173b63;
  padding: 34px 24px 22px;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 8px;
  line-height: 1.32;
}

.hero .sub {
  font-size: 14px;
  opacity: .88;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
  word-break: keep-all;
}

/* 본문 (PC 슬림 최적화) */
main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px 50px;
}

/* 섹션 헤더 */
.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sec-title {
  font-size: 18px;
  font-weight: 800;
  color: #173b63;
}

.sec-sub {
  font-size: 12.5px;
  color: #7a8fa6;
  font-weight: 500;
}

/* 글 카드 리스트 (스크린샷 피드형 가로 레이아웃) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 28px;
}

/* 카드 - 텍스트(왼쪽) + 대표 이미지(오른쪽) 가로 배치 카드 */
.post-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(23, 59, 99, .08);
  border-color: #aac1e0;
}

.post-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* 왼쪽 텍스트 정보 */
.post-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.post-info h2 {
  font-size: 16.5px;
  font-weight: 700;
  color: #173b63;
  line-height: 1.45;
  margin: 0 0 7px;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s;
}

.post-card:hover .post-info h2 {
  color: #2563eb;
}

.post-info p {
  font-size: 13.5px;
  color: #556980;
  line-height: 1.58;
  margin: 0 0 9px;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-info .date {
  font-size: 12px;
  color: #8fa1b5;
  line-height: 1.3;
  font-weight: 500;
}

/* 오른쪽 대표 이미지(썸네일 - 16:9 표준 비율로 텍스트 잘림 완전 방지) */
.post-thumb {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 9px;
  overflow: hidden;
  background: #edf2f7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .3s ease;
}

.post-card:hover .post-thumb img {
  transform: scale(1.05);
}

/* 검색 결과 없음 카드 (PC) */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: #7a8fa6;
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.empty .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty p {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.6;
}

/* 뒤로 가기 버튼 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #173b63;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border: 1.5px solid #c8d8ea;
  border-radius: 22px;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}

.back-btn:hover {
  background: #173b63;
  color: #fff;
  border-color: #173b63;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 59, 99, 0.12);
}

.back-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* 푸터 */
footer {
  background: #1a2332;
  color: #7a8fa6;
  text-align: center;
  padding: 36px 20px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  line-height: 1.8;
}

footer b {
  color: #c8d8ea;
  font-size: 14.5px;
}

.footer-links {
  margin: 10px 0 6px;
}

.footer-links a {
  color: #9cb2cb;
  font-size: 13px;
  text-decoration: none;
  margin: 0 7px;
  transition: color .2s;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

footer .copyright {
  color: #8fa2ba;
  font-size: 12.5px;
  margin: 10px 0 0;
  letter-spacing: .2px;
}

/* 반응형 */
@media (max-width: 650px) {
  nav {
    padding: 9px 14px 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
  }

  .logo {
    font-size: 19px;
  }

  .nav-links {
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 13px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
  }

  .nav-links a:active {
    background: #173b63;
    color: #fff;
  }

  /* 모바일 헤더: 돋보기 아이콘 전용 & 터치 시 확장 UX */
  .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-search-form {
    margin-left: 4px;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
  }

  /* 모바일 환경: 평소 돋보기 아이콘 ➡️ 터치/클릭 시 PC형으로 확장 */
  .nav-search-input {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: transparent !important;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .nav-search-input::placeholder {
    color: transparent !important;
  }

  .nav-search-form:focus-within .nav-search-input,
  .nav-search-form.active .nav-search-input,
  .nav-search-input:focus {
    width: clamp(125px, 36vw, 160px) !important;
    height: 32px !important;
    padding: 0 30px 0 12px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid #38a169 !important;
    color: #ffffff !important;
    cursor: text;
    box-shadow: 0 0 0 2px rgba(56, 161, 105, 0.25) !important;
    z-index: 1;
  }

  .nav-search-form:focus-within .nav-search-input::placeholder,
  .nav-search-form.active .nav-search-input::placeholder,
  .nav-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 11.5px;
  }

  .nav-search-btn {
    position: absolute;
    right: 7px !important;
    width: 24px;
    height: 24px;
    z-index: 3;
    pointer-events: auto !important;
  }

  .nav-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
  }

  .hero {
    padding: 24px 16px 18px;
  }

  .hero h1 {
    font-size: 21px;
    margin-bottom: 5px;
    word-break: keep-all;
  }

  .hero .sub {
    font-size: 12.5px;
    line-height: 1.45;
  }

  main {
    padding: 14px 12px 36px;
  }

  /* ── 모바일 카드 리스트 (스크린샷 231 일치 가로형 피드) ── */
  .post-list {
    gap: 10px;
    margin-bottom: 18px;
  }

  .post-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
  }

  .post-info {
    flex: 1;
    min-width: 0;
  }

  .post-info h2 {
    font-size: 14.5px;
    font-weight: 700;
    color: #173b63;
    margin-bottom: 4px;
    line-height: 1.38;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-info p {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 5px;
    color: #556980;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-info .date {
    font-size: 11px;
    color: #8fa1b5;
    line-height: 1.3;
  }

  .post-thumb {
    width: 116px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .back-btn {
    font-size: 12px;
    padding: 7px 14px;
    margin-top: 6px;
  }

  .back-btn:active {
    background: #173b63;
    color: #fff;
    border-color: #173b63;
    transform: scale(0.98);
  }

  /* 모바일 검색 결과 없음 화면 슬림화 */
  .empty {
    padding: 36px 16px;
  }

  .empty .icon {
    font-size: 38px;
    margin-bottom: 8px;
  }

  .empty p {
    font-size: 13px;
    line-height: 1.5;
  }
}

/* ── 크롤러 및 JS 비활성화 환경 대비 정적 칼럼 리스트 ── */
.static-post-list {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}

.static-post-list h2 {
  font-size: 18px;
  font-weight: 700;
  color: #173b63;
  margin-bottom: 14px;
}

.static-post-list ul {
  padding-left: 20px;
  line-height: 2;
}

.static-post-list a {
  color: #173b63;
  transition: color .2s ease;
}

.static-post-list a:hover {
  color: #1a56db;
  text-decoration: underline;
}