/*
Theme Name: WPBogopni Guide
Theme URI: https://wpbogopni.com/
Author: WPBogopni
Author URI: https://wpbogopni.com/
Description: A focused Korean knowledge magazine theme for self-development and productivity content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: wpbogopni-guide
*/

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f3f6f8;
  --ink: #1f2430;
  --muted: #687083;
  --line: #e4e8ee;
  --brand: #22756a;
  --brand-dark: #15574f;
  --accent: #e16545;
  --blue: #3268b8;
  --yellow: #f4c45b;
  --shadow: 0 16px 46px rgba(34, 46, 65, .08);
  --radius: 8px;
  --max: 1024px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }

.site-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(31, 36, 48, .04);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(228, 232, 238, .72);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.1;
}
.brand-text strong { font-size: 18px; }
.brand-text span { color: var(--muted); font-size: 11px; font-weight: 700; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 8px;
  color: #3a4150;
  font-size: 15px;
  font-weight: 700;
}
.main-nav a:hover { color: var(--brand); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.search-mini {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(31, 36, 48, .06);
}
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.content {
  padding: 28px 32px 88px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 24px;
  align-items: center;
  padding: 26px 0 34px;
}
.hero-copy h1 {
  margin: 0 0 14px;
  max-width: 680px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: 0;
}
.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}
.hero-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7fbfa 0%, #fff8f0 100%);
}
.hero-visual {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.metric {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.metric strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.visual-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.visual-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: #e8f3f1;
  color: var(--brand-dark);
  font-size: 24px;
}
.visual-card b { display: block; line-height: 1.35; }
.visual-card small { color: var(--muted); }

.search-box {
  margin: 0 auto 28px;
  max-width: 720px;
}
.search-box form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 7px 7px 18px;
  border: 1.5px solid #b7d8d2;
  border-radius: 999px;
  background: #fff;
}
.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-weight: 650;
}
.search-box button {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.section-link {
  margin-left: auto;
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.category-tile {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.category-tile:hover { border-color: #a9cec8; box-shadow: var(--shadow); }
.category-tile .icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #f1f5f4;
  color: var(--brand-dark);
}
.category-tile strong { font-size: 17px; line-height: 1.25; }
.category-tile span { color: var(--muted); font-size: 13px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.thumb {
  min-height: 138px;
  background:
    radial-gradient(circle at 22% 20%, rgba(244, 196, 91, .9) 0 13%, transparent 14%),
    linear-gradient(135deg, rgba(34, 117, 106, .92), rgba(50, 104, 184, .78));
}
.post-card:nth-child(3n + 2) .thumb {
  background:
    radial-gradient(circle at 76% 24%, rgba(225, 101, 69, .9) 0 12%, transparent 13%),
    linear-gradient(135deg, rgba(50, 104, 184, .86), rgba(34, 117, 106, .7));
}
.post-card:nth-child(3n) .thumb {
  background:
    radial-gradient(circle at 32% 72%, rgba(244, 196, 91, .85) 0 14%, transparent 15%),
    linear-gradient(135deg, rgba(225, 101, 69, .84), rgba(34, 117, 106, .72));
}
.post-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  flex: 1;
}
.post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.post-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}
.post-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) 240px;
  gap: 32px;
  align-items: start;
}
.article {
  min-width: 0;
}
.article h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
}
.article .entry-content {
  color: #2c3340;
  font-size: 17px;
}
.entry-content h2 {
  margin-top: 36px;
  font-size: 25px;
}
.entry-content h3 {
  margin-top: 28px;
  font-size: 21px;
}
.entry-content p { margin: 16px 0; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--brand);
  background: #f4f8f7;
}
.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}
.side-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.side-box h2, .side-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.side-box ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.page-header {
  padding: 18px 0 26px;
}
.page-header h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
}
.page-header p {
  margin: 10px 0 0;
  color: var(--muted);
}
.pagination {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pagination .current {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.site-footer {
  padding: 34px 32px 96px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: #3b4350;
  font-size: 13px;
  font-weight: 700;
}
.footer-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: 62px;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(31, 36, 48, .08);
}
.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 25%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.bottom-nav b { font-size: 19px; line-height: 1; }

@media (max-width: 860px) {
  .site-header { height: 60px; padding: 0 18px; }
  .main-nav, .pill-button { display: none; }
  .brand-text span { display: none; }
  .content { padding: 20px 16px 82px; }
  .hero { grid-template-columns: 1fr; padding-top: 12px; }
  .hero-copy h1 { font-size: 38px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: 1fr; gap: 12px; }
  .post-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
  .thumb { min-height: 100%; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
}

@media (max-width: 420px) {
  .hero-copy h1 { font-size: 34px; }
  .metric-row { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}
