/* =============================================
   클릭샘 이용 가이드 페이지
   · 워드프레스 테마 스타일 완전 차단 (#cg-wrap 스코프)
   · 홈페이지(style.css)와 동일한 디자인 토큰 사용
============================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

:root {
  --p:       #00BFA5;
  --p-d:     #00A896;
  --p-l:     #E0F5F2;
  --p-xl:    #F0FEFA;
  --navy:    #0F172A;
  --body:    #334155;
  --muted:   #64748B;
  --border:  #E2E8F0;
  --bg:      #F8FAFC;
  --radius:  16px;
  --shadow:  0 4px 24px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.11);
}

#cg-wrap {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
  background: #fff;
  font-size: 16px;
  letter-spacing: normal;
}
#cg-wrap *, #cg-wrap *::before, #cg-wrap *::after { box-sizing: border-box; }
#cg-wrap h1, #cg-wrap h2, #cg-wrap h3, #cg-wrap h4 { margin: 0; padding: 0; font-weight: 900; }
#cg-wrap p { margin: 0; padding: 0; }
#cg-wrap ul, #cg-wrap ol { margin: 0; padding: 0; list-style: none; }
#cg-wrap a { text-decoration: none; color: inherit; }
#cg-wrap img { max-width: 100%; display: block; }
#cg-wrap button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
#cg-wrap input { font-family: inherit; }

.cg-inner {
  width: 100%;
  max-width: 1080px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── 상단 헤더 ── */
.cg-top {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.cg-top-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cg-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.12rem;
  color: var(--navy);
  flex-shrink: 0;
}
.cg-logo img { height: 28px; width: auto; object-fit: contain; }
.cg-logo b { color: var(--p); }
.cg-top-search {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
  position: relative;
  display: none;
}
.cg-top-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px 0 40px;
  font-size: .9rem;
  outline: none;
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.cg-top-search input:focus { border-color: var(--p); background: #fff; }
.cg-top-search .cg-s-ic {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .95rem;
}
.cg-top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cg-btn-ghost {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  color: var(--body);
  display: inline-flex;
  align-items: center;
}
.cg-btn-ghost:hover { border-color: var(--p); color: var(--p); }
.cg-btn-fill {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--p);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}
.cg-btn-fill:hover { background: var(--p-d); }

/* ── 히어로 ── */
.cg-hero {
  background: linear-gradient(160deg, #E8FBF7 0%, #F0FEFA 55%, #fff 100%);
  padding: 64px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cg-hero::before, .cg-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(0,191,165,.10);
}
.cg-hero::before { width: 200px; height: 200px; left: -60px; top: 20px; }
.cg-hero::after { width: 150px; height: 150px; right: -40px; bottom: -30px; background: rgba(0,191,165,.08); }
.cg-hero-emoji { font-size: 2.4rem; margin-bottom: 8px; }
.cg-hero h1 {
  font-size: 2.4rem;
  color: var(--navy);
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.cg-hero p {
  font-size: 1.02rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.cg-hero-search {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.cg-hero-search input {
  width: 100%;
  height: 56px;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0 20px 0 52px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.cg-hero-search input:focus { border-color: var(--p); box-shadow: var(--shadow-lg); }
.cg-hero-search .cg-s-ic {
  position: absolute;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--p);
  font-size: 1.15rem;
}

/* ── 섹션 공통 ── */
.cg-sec { padding: 56px 0; }
.cg-sec-head { margin-bottom: 24px; display: flex; align-items: baseline; justify-content: space-between; }
.cg-sec-title { font-size: 1.5rem; color: var(--navy); }
.cg-sec-sub { font-size: .9rem; color: var(--muted); margin-top: 4px; }

/* ── 추천 가이드 ── */
.cg-rec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cg-rec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex;
  flex-direction: column;
}
.cg-rec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--p-l); }
.cg-rec-thumb {
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.cg-rec-thumb.t1 { background: linear-gradient(135deg,#E0F5F2,#C4ECE6); }
.cg-rec-thumb.t2 { background: linear-gradient(135deg,#FFF1D6,#FFE3AE); }
.cg-rec-thumb.t3 { background: linear-gradient(135deg,#E8EEFF,#D4E0FF); }
.cg-rec-body { padding: 18px 18px 20px; }
.cg-rec-body h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 6px; line-height: 1.4; }
.cg-rec-body p { font-size: .88rem; color: var(--muted); }

/* ── 전체 카테고리 ── */
.cg-cats { background: var(--bg); }
.cg-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cg-cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  width: 100%;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cg-cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--p-l); }
.cg-cat-ic {
  width: 64px; height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  background: var(--p-xl);
}
.cg-cat-txt { flex: 1; min-width: 0; }
.cg-cat-txt h3 { font-size: 1.08rem; color: var(--navy); margin-bottom: 4px; }
.cg-cat-txt p { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.cg-cat-count {
  display: inline-block;
  margin-top: 8px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--p-d);
  background: var(--p-l);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ── FAQ / 아티클 ── */
.cg-faq-group { margin-bottom: 36px; scroll-margin-top: 80px; }
.cg-faq-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cg-faq-group-head .ic { font-size: 1.3rem; }
.cg-faq-group-head h3 { font-size: 1.2rem; color: var(--navy); }
.cg-faq-list { display: flex; flex-direction: column; gap: 10px; }
.cg-faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.cg-faq-item.open { border-color: var(--p); box-shadow: var(--shadow); }
.cg-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  text-align: left;
  font-size: .97rem;
  font-weight: 700;
  color: var(--navy);
}
.cg-faq-q .qmark {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--p-l);
  color: var(--p-d);
  font-weight: 900;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cg-faq-q .qtxt { flex: 1; }
.cg-faq-q .chev {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .2s;
  font-size: 1rem;
}
.cg-faq-item.open .cg-faq-q .chev { transform: rotate(180deg); color: var(--p); }
.cg-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.cg-faq-a-inner {
  padding: 0 18px 18px 54px;
  font-size: .92rem;
  color: var(--body);
  line-height: 1.75;
}
.cg-faq-a-inner ul { list-style: disc; padding-left: 18px; margin-top: 6px; }
.cg-faq-a-inner li { margin-bottom: 4px; }
.cg-faq-a-inner strong { color: var(--p-d); }

/* ── 검색 결과 없음 ── */
.cg-empty {
  display: none;
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
}
.cg-empty .ic { font-size: 2.4rem; margin-bottom: 10px; }
.cg-empty strong { color: var(--navy); display: block; margin-bottom: 4px; font-size: 1.05rem; }

/* ── 하단 CTA ── */
.cg-cta {
  background: linear-gradient(135deg, var(--p) 0%, var(--p-d) 100%);
  color: #fff;
  text-align: center;
  padding: 56px 24px;
}
.cg-cta h2 { font-size: 1.7rem; margin-bottom: 10px; }
.cg-cta p { opacity: .9; margin-bottom: 24px; }
.cg-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cg-cta a {
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .98rem;
  display: inline-flex;
  align-items: center;
}
#cg-wrap .cg-cta .b1 { background: #fff; color: var(--p-d); }
#cg-wrap .cg-cta .b1:hover { transform: translateY(-2px); }
#cg-wrap .cg-cta .b2 { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); }
#cg-wrap .cg-cta .b2:hover { background: rgba(255,255,255,.28); }

/* ── 푸터 ── */
.cg-footer {
  background: var(--navy);
  color: #94A3B8;
  padding: 32px 0;
  font-size: .85rem;
}
.cg-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.cg-footer b { color: #fff; }
#cg-wrap .cg-footer a { color: #CBD5E1; }
.cg-footer a:hover { color: #fff; }

/* ── 반응형 ── */
@media (min-width: 720px) {
  .cg-top-search { display: block; }
}
@media (max-width: 860px) {
  .cg-rec-grid { grid-template-columns: 1fr; }
  .cg-cat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cg-hero h1 { font-size: 1.8rem; }
  .cg-hero { padding: 44px 0 40px; }
  .cg-sec { padding: 40px 0; }
  .cg-btn-ghost { display: none; }
  .cg-cat-ic { width: 52px; height: 52px; font-size: 1.5rem; }
}
