/*
Theme Name: E2 Visa Premium
Theme URI: https://e2visainfo.rand3.com/
Description: E2비자 발급 정보 검색소 전용 프리미엄 테마. 딥네이비·스카이블루 디자인 시스템, 프리텐다드+노토세리프 타이포, WCAG AA 대비, 모바일 완벽 대응.
Author: E2 Visa Info
Version: 1.0.0
Requires at least: 6.0
Text Domain: e2visa-premium
*/

/* ============ DESIGN TOKENS ============ */
:root {
  --navy: #1B2A4A;
  --navy-deep: #14203A;
  --sky: #2E7DD1;
  --sky-soft: #EAF2FB;
  --ivory: #F7F9FC;
  --ink: #1E293B;
  --slate: #5B6B84;
  --muted: #8594AC;
  --line: #E3E9F2;
  --line-strong: #C9D5E4;
  --white: #FFFFFF;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 4px 16px rgba(27,42,74,.08);
  --shadow-2: 0 14px 40px rgba(27,42,74,.14);
  --shadow-navy: 0 10px 30px rgba(27,42,74,.25);
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "Noto Serif KR", "Nanum Myeongjo", serif;
  --container: 1200px;
  --content: 780px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ============ RESET / BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--sky); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h3 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; }
:focus-visible { outline: 3px solid rgba(46,125,209,.55); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--sky); color: #fff; }

/* ============ LAYOUT ============ */
.site-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.content-column { max-width: var(--content); margin: 0 auto; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 0; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: block; box-shadow: var(--shadow-1); }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--navy); letter-spacing: -0.02em; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.main-nav a {
  display: inline-flex; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: 15px; font-weight: 600; min-height: 44px;
}
.main-nav a:hover { background: var(--sky-soft); color: var(--navy); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff !important; font-weight: 700;
  border-radius: var(--radius-sm); padding: 12px 22px; min-height: 44px;
  box-shadow: var(--shadow-navy); transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--sky); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--navy); }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow-2);
    display: none; max-height: calc(100vh - 68px); overflow: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { width: 100%; }
  .nav-cta { justify-content: center; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 16px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition); text-align: center;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-navy); }
.btn-primary:hover { background: var(--sky); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--sky); color: #fff; box-shadow: 0 8px 24px rgba(46,125,209,.35); }
.btn-accent:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--sky); color: var(--sky); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }

/* ============ HERO (single) ============ */
.single-hero { background: linear-gradient(180deg, var(--ivory), #fff); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.single-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--sky-soft); color: var(--sky); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.single-hero h1 { margin-bottom: 14px; }
.single-hero .excerpt { font-size: 18px; color: var(--slate); max-width: 720px; }
.single-hero .meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--sky); }

/* ============ POST CONTENT ============ */
.single-content-wrap { padding: 56px 0 72px; }
.post-content { font-size: 17px; line-height: 1.8; }
.post-content > * { margin-bottom: 1.35em; }
.post-content h2 { margin-top: 2.2em; padding-bottom: .4em; border-bottom: 2px solid var(--sky); display: inline-block; }
.post-content h3 { margin-top: 1.8em; }
.post-content h2 + p, .post-content h3 + p { margin-top: .6em; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin-bottom: 1.35em; }
.post-content li { margin-bottom: .45em; }
.post-content blockquote { margin: 1.6em 0; padding: 18px 22px; background: var(--ivory); border-left: 4px solid var(--sky); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--slate); font-size: 16px; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(46,125,209,.4); }
.post-content a:hover { text-decoration-color: var(--sky); }
.post-content img { border-radius: var(--radius-md); box-shadow: var(--shadow-1); }

/* lead / date / notice */
.article-lead { font-size: 19px; color: var(--slate); line-height: 1.75; }
.article-date { display: inline-block; background: var(--ivory); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.notice-box { background: var(--sky-soft); border: 1px solid rgba(46,125,209,.25); border-radius: var(--radius-md); padding: 14px 18px; font-size: 14.5px; color: var(--slate); line-height: 1.7; }
.notice-box strong { color: var(--navy); }

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

/* tables */
.table-scroll { overflow-x: auto; margin: 1.6em 0; border-radius: var(--radius-md); border: 1px solid var(--line); box-shadow: var(--shadow-1); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 15px; min-width: 640px; }
.data-table th { background: var(--navy); color: #fff; font-weight: 700; text-align: left; padding: 13px 16px; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); color: var(--ink); vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: var(--ivory); }
.data-table tbody tr:hover { background: var(--sky-soft); }

/* callout */
.callout { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: #EAF0F8; border-radius: var(--radius-lg); padding: 22px 26px; font-size: 15.5px; line-height: 1.75; box-shadow: var(--shadow-navy); }
.callout p { margin: 0; }
.callout::before { content: "참고"; display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; background: var(--sky); color: #fff; border-radius: 999px; padding: 3px 12px; margin-bottom: 10px; }

/* check grid */
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.6em 0; }
.check-grid > div { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; }
.check-grid h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.check-grid h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--sky); }
.check-grid ul { margin: 0; padding-left: 1.2em; }
.check-grid li { margin-bottom: 7px; font-size: 15px; }
@media (max-width: 640px) { .check-grid { grid-template-columns: 1fr; } }

/* steps chart */
.steps-chart { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 1.8em 0; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 16px; position: relative; box-shadow: var(--shadow-1); transition: transform var(--transition), box-shadow var(--transition); }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.step strong { display: block; font-size: 15px; color: var(--navy); margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--slate); margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .steps-chart { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-chart { grid-template-columns: 1fr; } }

/* bars chart */
.bars-chart { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin: 1.6em 0; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 130px; align-items: center; gap: 14px; margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.bar-track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), #5FA3E8); border-radius: 999px; }
.bar-row em { font-size: 12.5px; color: var(--muted); font-style: normal; text-align: right; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr; gap: 6px; } .bar-row em { text-align: left; } }

/* FAQ */
.faq-item { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 22px; margin-bottom: 14px; }
.faq-item h3 { font-size: 16.5px; margin-bottom: 8px; }
.faq-item p { font-size: 15px; color: var(--slate); margin: 0; }

/* related box */
.related-box { background: linear-gradient(135deg, var(--sky-soft), #fff); border: 1px solid rgba(46,125,209,.22); border-radius: var(--radius-lg); padding: 22px 26px; margin: 2.2em 0 1em; }
.related-box h3 { font-size: 18px; margin-bottom: 12px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { margin-bottom: 8px; }
.related-list a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; }
.related-list a::before { content: "→"; color: var(--sky); font-weight: 800; }
.related-list a:hover { color: var(--sky); }

/* legal / ai notices */
.legal-notice, .ai-notice { font-size: .85em; }
.legal-notice { color: #6b7787; background: #f8f9fa; border-left: 3px solid #cbd5e1; padding: 10px 14px; margin-top: 2em; border-radius: 0 6px 6px 0; }
.ai-notice { color: #8a94a3; margin-top: 2em; }

/* ============ POST / CARD GRIDS ============ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 28px 0; }
.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.post-card .card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--ivory); }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.post-card:hover .card-thumb img { transform: scale(1.04); }
.post-card .card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 18px; margin: 0; line-height: 1.4; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--sky); }
.post-card .card-excerpt { font-size: 14px; color: var(--slate); margin: 0; flex: 1; }
.post-card .card-meta { font-size: 12.5px; color: var(--muted); }
.related-posts-section { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 36px; }
.related-posts-section > h2 { font-size: 24px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ============ ARCHIVE ============ */
.archive-head { background: var(--ivory); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.archive-head h1 { margin-bottom: 8px; }
.archive-head p { color: var(--slate); max-width: 640px; margin: 0; }

/* ============ PAGES ============ */
.page-content { padding: 56px 0 80px; }
.page-content h2 { margin-top: 2em; }
.page-content ul, .page-content ol { padding-left: 1.4em; }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy-deep); color: #C9D5E4; margin-top: 0; }
.footer-top { padding: 64px 0 40px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: 14.5px; line-height: 1.8; color: #A9B8CE; margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 16px; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #A9B8CE; font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(201,213,228,.15); padding: 28px 0 8px; font-size: 12.5px; line-height: 1.85; color: #8FA0B8; }
.footer-legal p { margin: 0 0 8px; }
.footer-legal .ai-note { color: #A9B8CE; }
.footer-bottom { border-top: 1px solid rgba(201,213,228,.12); padding: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 13px; color: #8FA0B8; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #A9B8CE; }
.footer-links a:hover { color: #fff; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } }

/* ============ UTIL ============ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============ MOTION ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* easy TOC alignment */
.ez-toc-container { border: 1px solid var(--line) !important; border-radius: var(--radius-md) !important; background: var(--ivory) !important; padding: 14px 18px !important; margin: 1.4em 0 !important; }
.ez-toc-title { font-family: var(--font-display); color: var(--navy); font-weight: 700; }
.ez-toc-list a { color: var(--slate); }
.ez-toc-list a:hover { color: var(--sky); }
