/*
Theme Name: Sanghoon Han Global Law
Theme URI: https://lawyernearme.kr
Author: 한상훈 변호사 (Sanghoon Han, Attorney at Law)
Author URI: https://lawyernearme.kr
Description: 국경을 넘는 창업을 위한 이중언어(한/영) 법률 정보 블로그 테마. 대한민국인의 해외 창업과 외국인의 국내 창업을 위한 법률 정보·사례·Q&A 게시판을 제공합니다. A bilingual legal blog theme for cross-border startups.
Version: 1.5.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hanbada-global-law
*/

/* =========================================================
   1. Design Tokens
   ========================================================= */
:root {
  --navy-900: #0b1733;
  --navy-800: #102047;
  --navy-700: #16305f;
  --navy-600: #1f3f78;
  --gold-500: #c9a24b;
  --gold-400: #d8b86a;
  --gold-300: #e7d39c;
  --paper:    #f7f4ec;
  --paper-2:  #efe9da;
  --ink:      #1a1f2b;
  --ink-soft: #4a5568;
  --line:     rgba(11,23,51,0.12);
  --line-gold:rgba(201,162,75,0.45);
  --white:    #ffffff;

  --font-display: "Fraunces", "Noto Serif KR", Georgia, serif;
  --font-body: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --radius: 4px;
  --shadow: 0 24px 60px -28px rgba(11,23,51,0.45);
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-500); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; color: var(--navy-900); font-weight: 600; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* =========================================================
   3. Top bar + Header
   ========================================================= */
.topbar {
  background: var(--navy-900);
  color: var(--gold-300);
  font-size: 13px;
  letter-spacing: .04em;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 40px; flex-wrap: wrap; gap: 6px;
}
.topbar a { color: var(--gold-300); }
.topbar a:hover { color: var(--white); }
.tb-slogan .tb-en::before { content: "· "; }
.tb-en { white-space: nowrap; }

.site-header {
  background: var(--navy-800);
  color: var(--white);
  border-bottom: 2px solid var(--gold-500);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark {
  width: 46px; height: 46px; flex: none;
  border: 1.5px solid var(--gold-500); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--gold-400);
}
.brand .name { color: var(--white); font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.brand .sub { display: block; font-family: var(--font-body); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-300); margin-top: 2px; }
.brand:hover .name { color: var(--white); }

/* Navigation */
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  color: rgba(255,255,255,0.88); font-size: 15px; font-weight: 500;
  padding: 10px 14px; border-radius: var(--radius); display: block;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a {
  color: var(--navy-900); background: var(--gold-400);
}
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--gold-500);
  color: var(--gold-300); border-radius: var(--radius); padding: 8px 12px;
  font-size: 15px; cursor: pointer;
}

/* =========================================================
   4. Hero (front page)
   ========================================================= */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201,162,75,0.16), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 84px 0 92px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero .container { position: relative; z-index: 2; max-width: 880px; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-300); border: 1px solid var(--line-gold); padding: 7px 16px; border-radius: 100px;
  margin-bottom: 26px;
}
.hero-title { margin: 0 0 24px; }
.hero-eyebrow {
  display: block; font-family: var(--font-body); font-weight: 700;
  font-size: clamp(16px, 2.2vw, 24px); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-300); margin-bottom: 14px;
}
.hero-lead {
  display: block; font-family: var(--font-display); color: var(--white);
  font-size: clamp(40px, 6.5vw, 76px); line-height: 1.08; letter-spacing: -.01em; font-weight: 600;
}
.hero h1 { color: var(--white); font-size: clamp(34px, 5vw, 58px); margin: 0 0 22px; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--gold-400); font-style: italic; }
.hero p { font-size: 18px; color: rgba(255,255,255,0.82); max-width: 640px; margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius); font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; transition: all .2s ease;
}
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-900); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,0.4); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold-400); color: var(--gold-300); }

/* =========================================================
   5. Section + cards
   ========================================================= */
.section { padding: 78px 0; }
.section.alt { background: var(--paper-2); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker { color: var(--gold-500); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 12px 0 14px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.pillar {
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 38px 34px; box-shadow: var(--shadow);
  position: relative; transition: transform .25s ease;
}
.pillar:hover { transform: translateY(-4px); }
.pillar .flag { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-500); font-weight: 700; }
.pillar h3 { font-size: 25px; margin: 12px 0 14px; }
.pillar p { color: var(--ink-soft); margin: 0 0 22px; }
.pillar .regions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pillar .regions span {
  font-size: 13px; background: var(--paper-2); color: var(--navy-700);
  padding: 5px 12px; border-radius: 100px; border: 1px solid var(--line);
}
.lang-tag {
  position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 700;
  background: var(--navy-800); color: var(--gold-300); padding: 4px 10px; border-radius: 100px;
}

/* =========================================================
   6. Post lists / boards
   ========================================================= */
.board-head {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: var(--white); padding: 56px 0; border-bottom: 3px solid var(--gold-500);
}
.board-head .kicker { color: var(--gold-300); letter-spacing: .2em; text-transform: uppercase; font-size: 13px; font-weight: 700; }
.board-head h1 { color: var(--white); font-size: clamp(28px,4vw,44px); margin: 10px 0 6px; }
.board-head p { color: rgba(255,255,255,0.8); margin: 0; max-width: 680px; }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding: 64px 0; }
.post-list { display: flex; flex-direction: column; gap: 30px; }
/* Homepage "latest posts" grid — responsive, never squeezes a lone card into a narrow column */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.post-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 10px 30px -22px rgba(11,23,51,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card .thumb { aspect-ratio: 16/7; overflow: hidden; background: var(--paper-2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 28px 30px; }
.post-card .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; flex-wrap: wrap; }
.post-card .meta .cat { color: var(--gold-500); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.post-card h2, .post-card h3 { font-size: 24px; margin: 0 0 10px; }
.post-card h2 a, .post-card h3 a { color: var(--navy-900); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--gold-500); }
.post-card .excerpt { color: var(--ink-soft); margin: 0 0 18px; }
.readmore { font-weight: 600; color: var(--navy-700); border-bottom: 2px solid var(--gold-400); padding-bottom: 2px; }
.readmore:hover { color: var(--gold-500); }

/* Sidebar */
.sidebar .widget {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; margin-bottom: 26px;
}
.sidebar .widget-title, .sidebar h2, .sidebar h3 {
  font-size: 17px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--gold-400);
  letter-spacing: .02em;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sidebar li:last-child { border-bottom: none; }
.cta-box { background: linear-gradient(160deg, var(--navy-800), var(--navy-600)); color: var(--white); }
.cta-box h3 { color: var(--white); border-color: var(--line-gold); }
.cta-box p { color: rgba(255,255,255,0.82); font-size: 14px; }
.cta-box a.btn-gold { width: 100%; justify-content: center; }

/* =========================================================
   7. Single post + comments (Q&A answers)
   ========================================================= */
.single-wrap { max-width: 820px; margin: 0 auto; padding: 64px 28px; }
.single-wrap .post-meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 26px; }
.single-wrap .post-meta .cat { color: var(--gold-500); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.entry-title { font-size: clamp(30px,4vw,44px); margin: 8px 0 22px; }
.entry-content { font-size: 18px; }
.entry-content p { margin: 0 0 22px; }
.entry-content h2 { font-size: 28px; margin: 40px 0 14px; }
.entry-content h3 { font-size: 22px; margin: 32px 0 12px; }
.entry-content blockquote {
  border-left: 4px solid var(--gold-500); background: var(--paper-2);
  margin: 28px 0; padding: 18px 26px; font-style: italic; color: var(--navy-800);
}
.entry-content img { border-radius: var(--radius); margin: 22px 0; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content code { background: var(--paper-2); padding: 2px 6px; border-radius: 3px; }

.comments-area { max-width: 820px; margin: 0 auto 80px; padding: 0 28px; }
.comments-area .comments-title, .comments-area h2, .comments-area h3 {
  font-family: var(--font-display); font-size: 24px; border-bottom: 2px solid var(--gold-400);
  padding-bottom: 12px; margin-bottom: 26px;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.comment-list .comment-author { font-weight: 700; color: var(--navy-800); }
.comment-respond { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: var(--radius); padding: 30px; }
.comment-form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 15px; background: var(--paper);
}
.comment-form textarea { min-height: 140px; }
.comment-form .submit, .comment-form input[type=submit] {
  background: var(--gold-500); color: var(--navy-900); border: none; padding: 14px 28px;
  border-radius: var(--radius); font-weight: 700; cursor: pointer; margin-top: 16px; font-size: 15px;
}
.comment-form input[type=submit]:hover { background: var(--gold-400); }

/* About / generic page */
.page-wrap { max-width: 860px; margin: 0 auto; padding: 64px 28px; }
.about-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); margin-bottom: 40px;
}
.about-card .portrait {
  aspect-ratio: 3/4; border-radius: var(--radius); background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  display: grid; place-items: center; color: var(--gold-300); font-family: var(--font-display); font-size: 40px;
  border: 1px solid var(--line-gold);
}
.credentials { list-style: none; padding: 0; margin: 16px 0 0; }
.credentials li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px dashed var(--line); }
.credentials li::before { content: "§"; position: absolute; left: 0; color: var(--gold-500); font-weight: 700; }

/* Legal notice page */
.notice { max-width: 800px; }
.notice .lead {
  background: var(--paper-2); border-left: 4px solid var(--gold-500);
  padding: 16px 22px; border-radius: var(--radius); color: var(--navy-800); margin-bottom: 8px;
}
.notice h2 {
  font-size: 22px; margin: 34px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-gold);
}
.notice p { color: var(--ink); margin: 0 0 14px; }
.notice em { color: var(--ink-soft); font-size: 15px; }
.notice strong { color: var(--navy-800); }

/* =========================================================
   8. Pagination
   ========================================================= */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); font-weight: 600;
}
.pagination .current { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.78); padding: 60px 0 28px; margin-top: 40px; border-top: 3px solid var(--gold-500); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: var(--gold-300); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: var(--gold-300); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; }
.footer-brand .name { font-family: var(--font-display); color: var(--white); font-size: 22px; }
.footer-brand p { font-size: 14px; max-width: 320px; }
.contact-line { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 8px 0; }
.contact-line .ic { color: var(--gold-400); font-weight: 700; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0; margin-top: 8px;
  font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.62);
}
.footer-disclaimer strong { color: var(--gold-300); font-weight: 700; }

/* Per-post disclaimer + CTA (single.php) */
.post-disclaimer {
  background: var(--paper-2); border: 1px solid var(--line); border-left: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 22px 24px; margin: 40px 0 0;
  font-size: 14.5px; line-height: 1.7; color: var(--ink-soft);
}
.post-disclaimer .ko { display: block; }
.post-disclaimer .ko strong { color: var(--navy-800); }
.post-disclaimer .en { display: block; margin-top: 6px; font-style: italic; opacity: .8; }
.post-disclaimer .cta { display: block; margin-top: 16px; }
.post-disclaimer .cta a.btn { font-size: 14px; padding: 11px 20px; }

/* Board-level note in dark board header (archive.php) */
.board-note {
  margin-top: 18px; padding: 13px 18px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--line-gold); border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.9);
}

/* Public question form (Ask page) */
.q-form { display: flex; flex-direction: column; gap: 6px; max-width: 820px; margin-top: 18px; }
.q-form label { font-weight: 600; color: var(--navy-800); margin-top: 14px; display: block; }
.q-form label .sub { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.q-form input[type=text], .q-form input[type=email], .q-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 15px; background: var(--white);
}
.q-form input[type=text], .q-form input[type=email] { max-width: 460px; }
.q-form textarea { width: 100%; min-height: 220px; resize: vertical; }
.q-form .q-note { font-size: 13px; color: var(--ink-soft); line-height: 1.6; background: var(--paper-2);
  border-left: 3px solid var(--gold-500); padding: 12px 16px; border-radius: var(--radius); margin: 18px 0 6px; }
.q-form .btn { align-self: flex-start; margin-top: 8px; }
.q-success, .q-error { border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; font-size: 15px; line-height: 1.6; }
.q-success { background: #eaf3ec; border: 1px solid #bcdcc4; color: #205c33; }
.q-success span { color: #3a6b48; font-size: 13.5px; }
.q-error { background: #fcecec; border: 1px solid #e4b9b9; color: #8a2b2b; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.55);
}

/* =========================================================
   10. Responsive
   ========================================================= */
@media (max-width: 900px) {
  .pillars, .footer-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; }
  .about-card .portrait { max-width: 200px; }
  .main-nav { display: none; position: absolute; top: 84px; left: 0; right: 0; background: var(--navy-800); border-bottom: 2px solid var(--gold-500); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px; gap: 2px; }
  .nav-toggle { display: inline-block; }
}

@media (max-width: 600px) {
  /* Latest-posts cards stack into a single, well-proportioned column */
  .cards-3 { grid-template-columns: 1fr; gap: 18px; }
  .cards-3 .post-card .thumb { aspect-ratio: 16 / 9; }
  .cards-3 .post-card .body { padding: 20px 22px; }
  .cards-3 .post-card h3 { font-size: 21px; }
  /* About action buttons stack instead of overflowing */
  .about-card .btn { display: block; margin: 10px 0 0 0 !important; text-align: center; }
  /* Hero fits nicely on phones */
  .hero { padding: 56px 0 60px; }
  .hero-eyebrow { font-size: clamp(11px, 3.4vw, 15px) !important; letter-spacing: .06em !important; }
  /* Brand subtitle stays on one line */
  .brand .sub { white-space: nowrap; letter-spacing: .1em; font-size: 10px; }
  .brand .name { font-size: 19px; }
  /* Topbar slogan: Korean on line 1, English on line 2 (each one line) */
  .topbar .container { justify-content: center; text-align: center; }
  .tb-slogan { display: block; width: 100%; line-height: 1.5; }
  .tb-slogan .tb-ko, .tb-slogan .tb-en { display: block; }
  .tb-slogan .tb-en { font-size: 11px; }
  .tb-slogan .tb-en::before { content: ""; }
}
@media (max-width: 360px) {
  /* Extra-narrow phones: ensure the Korean title still holds one line */
  .hero-lead { font-size: 30px !important; }
}
