/*
Theme Name: Icheon Gym Guide
Theme URI: https://icheongym.rand3.com/
Author: Icheon Gym Guide
Description: 이천 지역 헬스장·체력단련시설 정보 제공 플랫폼 전용 테마. 프리미엄 디자인 시스템(8pt 그리드, 딥그린 팔레트, Pretendard+Noto Serif KR).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: icheongym
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --brand: #1E6F5C;
  --brand-dark: #15513F;
  --brand-deep: #0C2F26;
  --accent: #C7E86B;
  --accent-warm: #E8743B;
  --ink: #1F2933;
  --ink-soft: #4B5563;
  --muted: #7A838C;
  --bg: #FFFFFF;
  --ivory: #F7F7F4;
  --soft: #EEF0EA;
  --line: #E3E6DF;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(20,33,28,.06), 0 2px 10px rgba(20,33,28,.05);
  --shadow-md: 0 6px 16px rgba(20,33,28,.07), 0 16px 40px rgba(20,33,28,.08);
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --container: 1180px;
  --measure: 760px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.35; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,111,92,.28); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: rgba(30,111,92,.06); color: var(--brand-dark); box-shadow: none; }
.btn-light { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn-light:hover { background: var(--ivory); color: var(--brand-deep); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.main-nav { margin-left: auto; display: flex; align-items: center; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); border-radius: 999px; }
.main-nav a:hover { color: var(--brand); background: rgba(30,111,92,.07); }
.main-nav .current-menu-item > a { color: var(--brand); background: rgba(30,111,92,.09); }
.nav-cta { margin-left: 12px; }
.nav-cta .btn { min-height: 42px; padding: 9px 20px; font-size: 14px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .site-header .container { min-height: 64px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto; border: 1px solid var(--line);
    border-radius: 12px; background: #fff; cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; display: none;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { width: 100%; min-height: 48px; }
  .nav-cta { margin: 12px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ============================================================
   SINGLE POST / PAGE LAYOUT
   ============================================================ */
.post-hero {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 56px;
}
.post-hero-inner { max-width: 860px; margin: 0 auto; padding: 0 24px; text-align: center; }
.post-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--brand);
  background: rgba(30,111,92,.09); border: 1px solid rgba(30,111,92,.16);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 20px;
}
.post-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin: 0 0 18px; word-break: keep-all; }
.post-hero .post-meta { display: flex; justify-content: center; align-items: center; gap: 8px 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.single-article { padding: 48px 0 80px; }
.article-body { font-size: 17px; line-height: 1.85; color: var(--ink); }
.article-body > * { margin-bottom: 1.5em; }
.article-body h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  margin: 2.2em 0 .8em; padding-top: .4em;
  border-top: 3px solid var(--brand);
  padding-top: 22px;
}
.article-body h2::before { content: ""; display: none; }
.article-body h3 { font-size: 1.3rem; margin: 1.8em 0 .6em; color: var(--brand-dark); }
.article-body p { margin: 0 0 1.4em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(30,111,92,.35); }
.article-body a:hover { text-decoration-color: var(--brand); }
.article-body ul, .article-body ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.article-body li { margin-bottom: .55em; }
.article-body .lead { font-size: 1.12em; color: var(--ink-soft); font-weight: 500; }

/* callout */
.info-callout, .article-body .callout {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-md);
  padding: 18px 22px;
  font-size: .95em;
  color: var(--ink-soft);
}
.info-callout p, .article-body .callout p { margin: 0; }
/* blockquote */
.article-body blockquote {
  margin: 2em 0; padding: 22px 26px;
  background: var(--soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-md);
  color: var(--ink-soft);
}
.article-body blockquote p { margin: 0; }

/* tables */
.article-body .cmp-table, .cmp-table {
  width: 100%; border-collapse: collapse; margin: 1.8em 0;
  font-size: 14.5px; line-height: 1.6;
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cmp-table thead th {
  background: var(--brand-deep); color: #fff; text-align: left;
  padding: 13px 16px; font-weight: 700; letter-spacing: -.01em;
}
.cmp-table tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff;
  vertical-align: top;
}
.cmp-table tbody tr:nth-child(even) td { background: #FBFCFA; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1.8em 0; }
.table-wrap table { margin: 0; }

/* figures */
.article-body .content-figure { margin: 2em 0; }
.content-figure img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 100%; }
.content-figure figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }

/* charts */
.chart { margin: 1.8em 0; padding: 22px 22px 12px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-lg); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 130px; align-items: center; gap: 14px; margin-bottom: 14px; }
.bar-label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); text-align: right; }
.bar-track { height: 12px; background: #E6E9E2; border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #2E8F74); }
.bar-value { font-size: 13px; color: var(--muted); }
.chart-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: -6px 0 18px; }
@media (max-width: 640px) {
  .bar-row { grid-template-columns: 96px 1fr; gap: 10px; }
  .bar-label { text-align: left; }
  .bar-value { grid-column: 2; font-size: 12.5px; margin-top: -6px; }
}

/* check list */
.article-body .check-list { list-style: none; padding-left: 0; }
.article-body .check-list li { position: relative; padding-left: 30px; }
.article-body .check-list li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 7px;
  background: var(--brand) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="none" stroke="%23fff" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" d="M5 10.5l3.2 3.2L15 6.5"/></svg>') center/12px no-repeat;
}

/* legal + ai notices */
.legal-notice { font-size: .85em; color: #667; background: #f8f9fa; border-left: 3px solid #cbd5e1; padding: 12px 16px; margin-top: 2.2em; border-radius: 0 8px 8px 0; }
.legal-notice p { margin: 6px 0; }
.ai-notice { font-size: .85em; color: #888; margin-top: 2em; }

/* TOC (easy-table-of-contents) */
#ez-toc-container {
  background: var(--ivory) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-md) !important;
  padding: 18px 22px !important;
  box-shadow: var(--shadow-sm) !important;
  margin: 2em 0 !important;
  font-family: var(--font-sans) !important;
}
#ez-toc-container .ez-toc-title { font-weight: 800; font-size: 15px; color: var(--ink); }
#ez-toc-container ul { line-height: 1.9; }
#ez-toc-container a { color: var(--ink-soft); font-weight: 500; }
#ez-toc-container a:hover { color: var(--brand); }

/* ============================================================
   CARD GRID (archive / related)
   ============================================================ */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head .eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--brand); text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 8px 0 0; letter-spacing: -0.025em; }
.section-head p { color: var(--muted); margin: 10px 0 0; max-width: 560px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-chip { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand); background: rgba(30,111,92,.09); border-radius: 999px; padding: 5px 12px; }
.card-title { font-size: 18px; line-height: 1.45; margin: 0; letter-spacing: -0.015em; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); }
.card-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

/* archive page */
.archive-page { padding: 64px 0 96px; }
.archive-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.archive-desc { color: var(--muted); margin: 0 0 44px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--brand-deep); color: #D7E0DB; margin-top: 0; }
.footer-top { padding: 72px 0 48px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #9FB4AC; }
.footer-desc { font-size: 14px; color: #A9BCB4; line-height: 1.8; margin: 18px 0 0; max-width: 380px; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 18px; letter-spacing: .03em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #A9BCB4; font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-notices { border-top: 1px solid rgba(255,255,255,.12); padding: 36px 0; font-size: 13px; color: #8FA39B; }
.footer-notices .legal-notice { background: rgba(255,255,255,.05); border-left-color: rgba(199,232,107,.55); color: #B9C7C1; font-size: .9em; margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 24px 0; font-size: 13px; color: #7E948B; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: #A9BCB4; }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* page (privacy/terms) */
.page-shell { padding: 64px 0 96px; }
.page-shell .article-body h2 { border-top: 0; padding-top: 0; font-size: 1.4rem; }
.page-shell .article-body h3 { font-size: 1.15rem; }

/* 404 */
.notfound { padding: 120px 0; text-align: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); }
.notfound p { color: var(--muted); }

/* ============================================================
   PRINt
   ============================================================ */
@media print {
  .site-header, .site-footer, .related-posts, .post-nav, .skip-link { display: none !important; }
  body { font-size: 12pt; }
}
