/* =========================================================
   BizFund Design System — 소상공인 정책자금
   단일 소스: html.php 및 워드프레스 글/페이지 공통 적용
   ========================================================= */

:root{
  /* Color tokens */
  --bf-navy-900:#0E1B33;
  --bf-navy-800:#16305C;
  --bf-navy-700:#1E3B6B;
  --bf-navy-600:#2A4B80;
  --bf-gold-600:#B98A46;
  --bf-gold-500:#C9A15A;
  --bf-gold-100:#F3E8D4;
  --bf-bg:#FAF8F4;
  --bf-surface:#FFFFFF;
  --bf-line:#E7E1D3;
  --bf-line-strong:#D8CFB9;
  --bf-text:#1E2A3D;
  --bf-text-muted:#5B6B85;
  --bf-text-faint:#8A93A6;

  /* Spacing (8pt scale) */
  --sp-1:8px; --sp-2:16px; --sp-3:24px; --sp-4:32px; --sp-5:40px;
  --sp-6:48px; --sp-7:64px; --sp-8:80px; --sp-9:96px; --sp-10:120px; --sp-11:140px;

  /* Radius / shadow */
  --radius-sm:8px; --radius-md:14px; --radius-lg:22px; --radius-pill:999px;
  --shadow-sm:0 2px 8px rgba(14,27,51,.06);
  --shadow-md:0 12px 32px rgba(14,27,51,.10);
  --shadow-lg:0 24px 64px rgba(14,27,51,.16);

  /* Type */
  --font-body:'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,'Noto Sans KR',sans-serif;
  --font-display:'Noto Serif KR','Pretendard Variable',serif;

  --container-w:1200px;
  --content-w:760px;
  --dur-1:150ms; --dur-2:220ms; --dur-3:300ms;
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- Base ---------- */
.bf-root, body{
  background:var(--bf-bg);
  color:var(--bf-text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.bf-root *, .bf-root *::before, .bf-root *::after{ box-sizing:border-box; }
.bf-root img{ max-width:100%; height:auto; display:block; }
.bf-root a{ color:inherit; }
.bf-root :focus-visible{ outline:3px solid var(--bf-gold-500); outline-offset:2px; border-radius:4px; }

.bf-container{ max-width:var(--container-w); margin:0 auto; padding:0 24px; }
@media (max-width:640px){ .bf-container{ padding:0 20px; } }

.bf-section{ padding:var(--sp-9) 0; }
@media (max-width:768px){ .bf-section{ padding:var(--sp-7) 0; } }

.bf-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:var(--bf-gold-600); margin-bottom:var(--sp-2);
}
.bf-eyebrow::before{ content:''; width:20px; height:2px; background:var(--bf-gold-600); display:inline-block; }

.bf-h1{ font-family:var(--font-display); font-weight:700; color:var(--bf-navy-900); font-size:clamp(2.1rem,1.6rem + 2.4vw,3.4rem); line-height:1.25; letter-spacing:-0.01em; margin:0 0 var(--sp-3); }
.bf-h2{ font-family:var(--font-display); font-weight:700; color:var(--bf-navy-900); font-size:clamp(1.6rem,1.3rem + 1.2vw,2.25rem); line-height:1.3; margin:0 0 var(--sp-2); }
.bf-h3{ font-weight:700; color:var(--bf-navy-800); font-size:1.2rem; line-height:1.5; margin:0 0 8px; }
.bf-lead{ font-size:1.15rem; line-height:1.8; color:var(--bf-text-muted); max-width:680px; }

.bf-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:48px; padding:0 28px; border-radius:var(--radius-pill);
  font-weight:600; font-size:15px; text-decoration:none; white-space:nowrap;
  transition:transform var(--dur-2) ease, box-shadow var(--dur-2) ease, background var(--dur-2) ease;
  border:1px solid transparent; cursor:pointer;
}
.bf-btn-primary{ background:var(--bf-navy-800); color:#fff; box-shadow:var(--shadow-sm); }
.bf-btn-primary:hover{ background:var(--bf-navy-700); transform:translateY(-2px); box-shadow:var(--shadow-md); }
.bf-btn-outline{ background:transparent; color:var(--bf-navy-800); border-color:var(--bf-line-strong); }
.bf-btn-outline:hover{ background:var(--bf-surface); border-color:var(--bf-navy-800); transform:translateY(-2px); }

/* ---------- Header ---------- */
.bf-site-header{ background:rgba(250,248,244,.9); backdrop-filter:saturate(160%) blur(10px); position:sticky; top:0; z-index:40; border-bottom:1px solid var(--bf-line); }
.bf-site-header .wp-block-group.alignwide{ max-width:var(--container-w); }
.bf-site-logo img{ height:36px; width:auto; }
.bf-nav a{ font-weight:500; color:var(--bf-navy-800); text-decoration:none; padding:8px 14px; border-radius:var(--radius-pill); transition:background var(--dur-1) ease, color var(--dur-1) ease; }
.bf-nav a:hover{ background:var(--bf-gold-100); color:var(--bf-navy-900); }
.bf-nav .wp-block-navigation-item__label{ font-size:15px; }
.bf-nav .wp-block-navigation__submenu-container{ background:#fff !important; border:1px solid var(--bf-line); border-radius:var(--radius-md); box-shadow:var(--shadow-md); padding:8px; }
.bf-nav .wp-block-navigation__submenu-container a{ color:var(--bf-navy-800) !important; }

/* ---------- Hero ---------- */
.bf-hero{ position:relative; overflow:hidden; background:var(--bf-navy-900); color:#fff; }
.bf-hero-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:var(--sp-7); align-items:center; padding:var(--sp-9) 0; }
.bf-hero-copy .bf-h1{ color:#fff; }
.bf-hero-copy .bf-eyebrow{ color:var(--bf-gold-500); }
.bf-hero-copy .bf-lead{ color:#C7CEDC; }
.bf-hero-actions{ display:flex; gap:16px; margin-top:var(--sp-4); flex-wrap:wrap; }
.bf-hero-media{ position:relative; border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-lg); }
.bf-hero-media img{ width:100%; height:100%; object-fit:cover; aspect-ratio:4/3; }
.bf-hero-media::after{ content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(14,27,51,0) 40%,rgba(14,27,51,.55) 100%); }
.bf-hero-badge{ position:absolute; left:24px; bottom:24px; z-index:2; background:rgba(255,255,255,.94); color:var(--bf-navy-900); padding:14px 18px; border-radius:var(--radius-md); box-shadow:var(--shadow-md); font-size:14px; font-weight:600; }
@media (max-width:900px){ .bf-hero-grid{ grid-template-columns:1fr; padding:var(--sp-7) 0; } }

/* ---------- Intro / Procedure split sections ---------- */
.bf-split{ display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-7); align-items:center; }
.bf-split-media{ border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-md); }
.bf-split-media img{ width:100%; aspect-ratio:4/3; object-fit:cover; }
.bf-split.bf-split-rev .bf-split-media{ order:2; }
.bf-check-list{ list-style:none; margin:var(--sp-3) 0 0; padding:0; display:grid; gap:14px; }
.bf-check-list li{ display:flex; gap:12px; align-items:flex-start; color:var(--bf-text); line-height:1.6; }
.bf-check-list li::before{ content:''; flex:0 0 20px; width:20px; height:20px; margin-top:2px; border-radius:50%; background:var(--bf-gold-600); -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat; }
@media (max-width:860px){ .bf-split{ grid-template-columns:1fr; } .bf-split.bf-split-rev .bf-split-media{ order:0; } }

/* ---------- Steps ---------- */
.bf-steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:var(--sp-3); counter-reset:bf-step; margin-top:var(--sp-5); }
.bf-step{ position:relative; background:var(--bf-surface); border:1px solid var(--bf-line); border-radius:var(--radius-lg); padding:var(--sp-4) var(--sp-3); box-shadow:var(--shadow-sm); transition:transform var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.bf-step:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.bf-step-num{ counter-increment:bf-step; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; background:var(--bf-navy-800); color:#fff; font-weight:700; margin-bottom:var(--sp-2); }
.bf-step-num::before{ content:counter(bf-step); }
@media (max-width:900px){ .bf-steps{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .bf-steps{ grid-template-columns:1fr; } }

/* ---------- Carousel ---------- */
.bf-carousel-wrap{ position:relative; }
.bf-carousel{ display:flex; gap:var(--sp-3); overflow-x:auto; scroll-snap-type:x mandatory; padding:8px 4px var(--sp-2); scrollbar-width:thin; }
.bf-carousel::-webkit-scrollbar{ height:8px; }
.bf-carousel::-webkit-scrollbar-thumb{ background:var(--bf-line-strong); border-radius:99px; }
.bf-carousel-item{ scroll-snap-align:start; flex:0 0 320px; background:var(--bf-surface); border:1px solid var(--bf-line); border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-sm); text-decoration:none; color:var(--bf-text); transition:transform var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.bf-carousel-item:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.bf-carousel-item img{ width:100%; aspect-ratio:16/10; object-fit:cover; }
.bf-carousel-item .bf-carousel-body{ padding:18px 20px 22px; }
.bf-carousel-item .bf-carousel-tag{ font-size:12px; font-weight:700; color:var(--bf-gold-600); text-transform:uppercase; letter-spacing:.06em; }
.bf-carousel-item h3{ margin:6px 0 0; font-size:17px; font-weight:700; color:var(--bf-navy-900); }
.bf-carousel-nav{ display:flex; gap:10px; justify-content:flex-end; margin-top:10px; }
.bf-carousel-nav button{ width:44px; height:44px; border-radius:50%; border:1px solid var(--bf-line-strong); background:#fff; cursor:pointer; font-size:18px; color:var(--bf-navy-800); transition:background var(--dur-1) ease; }
.bf-carousel-nav button:hover{ background:var(--bf-gold-100); }

/* ---------- Post grid / cards (home latest + single "more posts") ---------- */
.bf-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--sp-3); margin-top:var(--sp-5); }
.bf-card{ display:flex; flex-direction:column; background:var(--bf-surface); border:1px solid var(--bf-line); border-radius:var(--radius-lg); overflow:hidden; text-decoration:none; color:var(--bf-text); box-shadow:var(--shadow-sm); transition:transform var(--dur-2) ease, box-shadow var(--dur-2) ease; height:100%; }
.bf-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.bf-card img{ width:100%; aspect-ratio:16/10; object-fit:cover; }
.bf-card-body{ padding:20px 22px 24px; display:flex; flex-direction:column; gap:8px; flex:1; }
.bf-card-body h3{ font-size:18px; font-weight:700; color:var(--bf-navy-900); margin:0; line-height:1.4; }
.bf-card-body p{ font-size:14px; color:var(--bf-text-muted); margin:0; line-height:1.6; }
.bf-card-more{ margin-top:auto; font-size:13px; font-weight:700; color:var(--bf-navy-700); }
@media (max-width:900px){ .bf-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .bf-grid{ grid-template-columns:1fr; } }

/* ---------- Footer ---------- */
.bf-site-footer{ background:var(--bf-navy-900); color:#C7CEDC; margin-top:var(--sp-9); border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
.bf-site-footer .wp-block-group.alignwide{ max-width:var(--container-w); }
.bf-site-footer .bf-site-logo img, .bf-site-footer img{ height:32px; filter:brightness(0) invert(1); opacity:.95; }
.bf-site-footer .wp-block-site-title a{ color:#fff !important; font-family:var(--font-display); font-size:20px; text-decoration:none; }
.bf-site-footer .wp-block-site-tagline{ color:#93A0BA; font-size:14px; margin-top:6px; }
.bf-site-footer nav a{ color:#C7CEDC !important; text-decoration:none; font-size:14px; line-height:2.2; }
.bf-site-footer nav a:hover{ color:#fff !important; }
.bf-site-footer p{ color:#8A97B3; }
.bf-site-footer p a{ color:#C9A15A !important; }

/* =========================================================
   Post / Page content typography (shared: single.php, page.php, html.php articles)
   ========================================================= */
.wp-block-post-content, .entry-content, .bf-article-body{
  max-width:var(--content-w); margin:0 auto; font-size:17px; line-height:1.8; color:var(--bf-text);
}
.wp-block-post-content h2, .entry-content h2{ font-family:var(--font-display); color:var(--bf-navy-900); font-size:1.6rem; margin:2.2em 0 .7em; line-height:1.4; }
.wp-block-post-content h3, .entry-content h3{ color:var(--bf-navy-800); font-size:1.25rem; margin:1.8em 0 .6em; }
.wp-block-post-content p, .entry-content p{ margin:0 0 1.3em; }
.wp-block-post-content ul, .wp-block-post-content ol, .entry-content ul, .entry-content ol{ margin:0 0 1.3em; padding-left:1.4em; }
.wp-block-post-content li, .entry-content li{ margin-bottom:.5em; }
.wp-block-post-content a, .entry-content a{ color:var(--bf-navy-700); text-decoration:underline; text-decoration-color:var(--bf-line-strong); text-underline-offset:3px; }
.wp-block-post-content a:hover, .entry-content a:hover{ color:var(--bf-gold-600); }
.wp-block-post-content figure, .entry-content figure{ margin:2em 0; }
.wp-block-post-content figure img, .entry-content figure img{ border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.wp-block-post-content figcaption, .entry-content figcaption{ text-align:center; font-size:13px; color:var(--bf-text-faint); margin-top:10px; }
.wp-block-post-content blockquote, .entry-content blockquote{ border-left:4px solid var(--bf-gold-600); margin:2em 0; padding:.6em 1.4em; background:var(--bf-gold-100); border-radius:0 var(--radius-md) var(--radius-md) 0; color:var(--bf-navy-800); }
.wp-block-post-content table, .entry-content table{ width:100%; border-collapse:collapse; margin:2em 0; display:block; overflow-x:auto; }
.wp-block-post-content th, .wp-block-post-content td, .entry-content th, .entry-content td{ border:1px solid var(--bf-line); padding:10px 14px; text-align:left; }
.wp-block-post-content th, .entry-content th{ background:var(--bf-gold-100); color:var(--bf-navy-900); }

.wp-block-post-title, .entry-title{ font-family:var(--font-display); color:var(--bf-navy-900) !important; max-width:var(--content-w); margin-left:auto; margin-right:auto; padding:var(--sp-6) 24px var(--sp-3); line-height:1.35 !important; }

.related-posts{ max-width:var(--content-w); margin:var(--sp-6) auto 0; padding:var(--sp-4); background:var(--bf-surface); border:1px solid var(--bf-line); border-radius:var(--radius-lg); }
.related-posts h2{ font-family:var(--font-display); font-size:1.2rem !important; margin:0 0 .6em !important; color:var(--bf-navy-900); }
.related-posts ul{ margin:0; padding-left:1.2em; }
.related-posts a{ font-weight:600; }

.ai-notice{ max-width:var(--content-w); margin:var(--sp-4) auto 0; padding:0 24px; }

/* TOC plugin */
#ez-toc-container{ max-width:var(--content-w); margin:0 auto var(--sp-4) !important; background:var(--bf-surface) !important; border:1px solid var(--bf-line) !important; border-radius:var(--radius-lg) !important; padding:var(--sp-3) var(--sp-4) !important; box-shadow:var(--shadow-sm); }
#ez-toc-container .ez-toc-title{ font-family:var(--font-display); color:var(--bf-navy-900); font-weight:700; }
#ez-toc-container a{ color:var(--bf-navy-700) !important; text-decoration:none !important; }
#ez-toc-container a:hover{ color:var(--bf-gold-600) !important; }

/* Hide default WordPress chrome */
.comment-respond, #comments, .wp-block-comments, .wp-block-post-terms.is-style-post-terms-1:empty{ display:none !important; }

