/* =========================================================
   EXCALCULATOR — 환율 계산기 & 여행 정보 포털
   디자인 시스템 (화이트 베이스 · 모던 · 미니멀)
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-softer: #f0f2f5;
  --border: #e6e8ec;
  --text: #15181e;
  --text-sub: #5b616e;
  --text-muted: #9aa0ab;
  --brand: #2563eb;        /* 메인 블루 */
  --brand-dark: #1d4ed8;
  --brand-soft: #eef4ff;
  --accent: #0ea5a4;       /* 포인트 틸 */
  --accent-soft: #e6faf8;
  --warn: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 6px 24px rgba(16,24,40,.08);
  --shadow-lg: 0 16px 48px rgba(16,24,40,.12);
  --max: 1080px;
  --header-h: 60px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex; align-items: center;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--text-sub); transition: .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.cta { background: var(--brand); color: #fff; }
.nav a.cta:hover { background: var(--brand-dark); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--text); padding: 4px; }

/* ---------- 환율 바 (상단 고정) ---------- */
.fx-bar {
  position: sticky; top: var(--header-h); z-index: 90;
  background: linear-gradient(180deg, var(--brand-soft), #fff);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.fx-inner { padding: 14px 20px; max-width: var(--max); margin: 0 auto; }
.fx-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fx-field { display: flex; flex-direction: column; gap: 4px; }
.fx-field label { font-size: 12px; font-weight: 700; color: var(--text-sub); }
.fx-field.amount { flex: 1 1 180px; min-width: 140px; }
.fx-input, .fx-select {
  height: 46px; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 0 14px; font-size: 16px; font-weight: 600; background: #fff; color: var(--text);
  outline: none; transition: .15s; width: 100%;
}
.fx-input:focus, .fx-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fx-swap {
  height: 46px; width: 46px; border: 1.5px solid var(--border); background: #fff;
  border-radius: 12px; font-size: 18px; color: var(--brand); flex: 0 0 auto;
}
.fx-swap:hover { background: var(--brand-soft); }
.fx-result {
  flex: 1 1 220px; min-width: 180px; background: #fff; border: 1.5px solid var(--brand);
  border-radius: 12px; padding: 7px 16px; display: flex; flex-direction: column; justify-content: center;
}
.fx-result .big { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--brand-dark); }
.fx-result .sub { font-size: 12px; color: var(--text-muted); }
.fx-meta { margin-top: 8px; font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.fx-chip { display: inline-flex; gap: 6px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fx-chips button {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--text-sub);
}
.fx-chips button:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 섹션 공통 ---------- */
section { padding: 56px 0; }
.section-head { margin-bottom: 26px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: .4px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.6px; margin: 0 0 8px; }
.section-head p { font-size: 16px; color: var(--text-sub); margin: 0; max-width: 640px; }

/* ---------- 히어로 ---------- */
.hero { padding: 54px 0 20px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 50px); font-weight: 900; letter-spacing: -1.2px; margin: 0 0 16px; line-height: 1.15; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--text-sub); max-width: 620px; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 24px;
  border-radius: 999px; font-weight: 700; font-size: 16px; border: 1.5px solid transparent; transition: .15s;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 카드 그리드 ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: .18s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dce0e6; }

/* 여행지 카드 */
.dest-card { cursor: pointer; overflow: hidden; padding: 0; }
.dest-card .thumb {
  height: 128px; background-size: cover; background-position: center;
  position: relative; display: flex; align-items: flex-end; padding: 12px;
}
.dest-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.5)); }
.dest-card .thumb .flag { position: relative; z-index: 1; color: #fff; font-weight: 800; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.dest-card .body { padding: 14px 16px 16px; }
.dest-card .body .cur { font-size: 13px; color: var(--text-muted); }
.dest-card .body .rate { font-weight: 700; font-size: 14.5px; margin-top: 2px; }

/* ---------- 패널 (툴) ---------- */
.panel { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; }
.form-field label { font-size: 13px; font-weight: 700; color: var(--text-sub); }
.form-field select, .form-field input {
  height: 48px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 14px;
  font-size: 15px; font-weight: 600; background: #fff; color: var(--text); outline: none;
}
.form-field select:focus, .form-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.seg { display: inline-flex; background: var(--bg-softer); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: none; background: none; padding: 9px 16px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text-sub); }
.seg button.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group button {
  border: 1.5px solid var(--border); background: #fff; border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; color: var(--text-sub);
}
.chip-group button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.chip-group button:hover { border-color: var(--brand); }

.result-links { display: grid; gap: 10px; margin-top: 18px; }
.result-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; transition: .15s;
}
.result-link:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.result-link .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; background: var(--brand-soft); }
.result-link .tx { flex: 1; }
.result-link .tx b { font-size: 15px; }
.result-link .tx span { display: block; font-size: 12.5px; color: var(--text-muted); }
.result-link .arrow { color: var(--text-muted); font-size: 18px; }

/* 지도 */
.map-frame { width: 100%; height: 380px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 16px; }

/* 항공권 특가 위젯 */
.tp-slot { min-height: 120px; }
.tp-placeholder { text-align: center; padding: 8px 4px; }
.tp-placeholder .badge { display: inline-block; background: var(--warn); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .4px; }
.fare-demo { display: grid; gap: 8px; margin: 16px auto; max-width: 620px; opacity: .85; }
.fare-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.fare-row .air { width: 38px; height: 38px; border-radius: 9px; background: var(--brand-soft); display: grid; place-items: center; font-size: 17px; flex: 0 0 auto; }
.fare-row .info { flex: 1; text-align: left; }
.fare-row .info b { font-size: 14.5px; }
.fare-row .info span { display: block; font-size: 12.5px; color: var(--text-muted); }
.fare-row .price { font-size: 17px; font-weight: 800; color: var(--brand-dark); }
.fare-row .price small { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: right; }
.setup-steps { counter-reset: s; display: grid; gap: 10px; text-align: left; max-width: 620px; margin: 18px auto 0; }
.setup-steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-sub); }
.setup-steps li::before { counter-increment: s; content: counter(s); flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.setup-steps a { color: var(--brand); font-weight: 700; }

/* 블로그 결과 */
.blog-embed { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 16px; background: #fff; }

/* ---------- 기능 소개 ---------- */
.feature { text-align: left; }
.feature .fic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin: 0 0 6px; font-weight: 800; }
.feature p { font-size: 14.5px; color: var(--text-sub); margin: 0; }

/* ---------- 광고 슬롯 ---------- */
.ad-slot {
  margin: 28px auto; max-width: var(--max); padding: 0 20px;
  display: flex; justify-content: center;
}
.ad-slot .ad-inner { width: 100%; max-width: 970px; min-height: 90px; display: grid; place-items: center;
  border: 1px dashed var(--border); border-radius: 12px; color: var(--text-muted); font-size: 13px; background: var(--bg-soft); }

/* ---------- 콘텐츠(가이드/FAQ) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 26px; margin: 36px 0 14px; letter-spacing: -.4px; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose p { color: var(--text-sub); margin: 0 0 14px; }
.prose ul { color: var(--text-sub); padding-left: 20px; }
.prose li { margin: 6px 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { font-weight: 700; font-size: 16.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--brand); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; color: var(--text-sub); }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 44px 0 30px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 0 0 12px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-sub); padding: 4px 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 20px; font-size: 12.5px; color: var(--text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- 유틸 ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 20px; } .mt-l { margin-top: 36px; }
.note { font-size: 13px; color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav { position: fixed; top: var(--header-h); right: 0; left: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 2px;
    box-shadow: var(--shadow); transform: translateY(-120%); transition: .22s; z-index: 95; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 10px; border-radius: 10px; }
  .nav-toggle { display: block; }
  .fx-result { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
  .fx-field.amount { flex-basis: 100%; }
}
