/* ═══════════════════════════════════════
   GTPlayer Ghost Theme — style.css
   Design: Minimal B&W + Inter + Flat
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green: #000000; --green-dark: #000000; --green-light: #f5f5f5;
  --dark: #000000; --gray: #888888; --light: #fafafa; --border: #e0e0e0;
  --white: #ffffff;
}
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--white); color: var(--dark); line-height: 1.6; }

/* ── HEADER ── */
.site-header {
  border-bottom: 2px solid #000;
  padding: 0 48px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white);
  z-index: 100;
}
.logo { font-size: 20px; font-weight: 900; color: var(--dark); text-decoration: none; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--dark); }
.logo-img { height: 28px; width: auto; }
.header-right { display: flex; align-items: center; gap: 12px; }

/* Language Selector */
.lang-selector { position: relative; }
.lang-btn {
  background: var(--light); border: 1px solid var(--border); border-radius: 0;
  padding: 6px 14px; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif;
  color: var(--dark); font-weight: 600; transition: all .2s;
}
.lang-btn:hover { border-color: #000; }
.lang-dropdown {
  display: none; position: absolute; top: 42px; right: 0;
  background: white; border: 2px solid #000; border-radius: 0;
  box-shadow: none; overflow: hidden; z-index: 200; min-width: 140px;
}
.lang-dropdown.show { display: block; }
.lang-option {
  display: block; padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--dark); text-decoration: none; transition: background .15s;
}
.lang-option:hover { background: #f0f0f0; color: #000; }

/* Search */
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 0;
  padding: 6px 14px; background: var(--light); cursor: pointer;
}
.search-wrap input { border: none; background: none; outline: none; font-size: 13px; color: var(--dark); width: 140px; font-family: 'Inter', sans-serif; cursor: pointer; }
.search-wrap input::placeholder { color: var(--gray); }

/* Subscribe Button */
.btn-sub {
  background: #000; color: white; border: none; border-radius: 0;
  padding: 8px 18px; font-size: 13px; font-weight: 800; cursor: pointer;
  transition: all .2s; font-family: 'Inter', sans-serif; text-decoration: none;
}
.btn-sub:hover { background: #333; }

/* ── HERO ── */
.hero { background: #ffffff; padding: 40px 48px 36px; text-align: center; border-bottom: 2px solid #000; }
.hero-eyebrow { font-size: 11px; letter-spacing: 6px; color: #888; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.hero h1 { font-size: 44px; font-weight: 900; color: #000; letter-spacing: -1.5px; line-height: 1.15; margin-bottom: 8px; }
.hero h1 em { color: #000; font-style: italic; }
.hero-sub { font-size: 15px; color: #666; margin-bottom: 20px; }
.hero-note { font-size: 11px; color: #aaa; margin-top: 14px; }

/* Header Search Icon */
.header-search-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: #000; display: flex; align-items: center; transition: color .2s;
}
.header-search-btn:hover { color: #555; }

/* Hero Email Subscription Form */
.hero-subscribe-form { max-width: 520px; margin: 0 auto; position: relative; }
.hero-email-wrap {
  display: flex; align-items: center;
  background: #fff; border: 2px solid #000; border-radius: 0;
  padding: 4px 4px 4px 18px; gap: 8px;
}
.hero-email-input {
  flex: 1; border: none; outline: none; font-size: 15px;
  font-family: 'Inter', sans-serif; color: #000; background: transparent;
  padding: 10px 0; min-width: 0;
}
.hero-email-input::placeholder { color: #888; }
.hero-email-btn {
  background: #000; color: #fff; border: none; border-radius: 0;
  padding: 12px 28px; font-size: 14px; font-weight: 800; cursor: pointer;
  font-family: 'Inter', sans-serif; white-space: nowrap;
  transition: background .2s;
}
.hero-email-btn:hover { background: #333; }
.hero-subscribe-form .message-success,
.hero-subscribe-form .message-error {
  display: none; font-size: 13px; margin-top: 10px; font-weight: 600; text-align: center;
}
.hero-subscribe-form form.success .message-success { display: block; color: #15803d; }
.hero-subscribe-form form.error .message-error { display: block; color: #b91c1c; }
.hero-subscribe-form form.success .hero-email-wrap { display: none; }

/* ── PAGE WRAP ── */
.page { max-width: 820px; margin: 0 auto; padding: 0 48px 100px; }

/* ── FEATURED ── */
.featured-head { padding: 48px 0 24px; border-bottom: 2px solid #000; }
.featured-head h2 { font-size: 15px; font-weight: 800; color: var(--dark); }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 32px 0 56px; }
.feat-card { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.feat-thumb { width: 100%; aspect-ratio: 4/3; border-radius: 0; overflow: hidden; margin-bottom: 12px; background: var(--light); }
.feat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.feat-thumb-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #1f2937, #374151); }
.feat-card:hover .feat-thumb img { transform: scale(1.04); }
.feat-card-title { font-size: 14px; font-weight: 800; color: var(--dark); line-height: 1.4; margin-bottom: 8px; }
.feat-tag { font-size: 10px; font-weight: 600; color: var(--gray); }

/* ── EDITION LIST ── */
.edition-list-head { padding: 48px 0 20px; border-bottom: 2px solid #000; margin-bottom: 0; }
.edition-list-head h2 { font-size: 15px; font-weight: 800; }
.edition-row { padding: 28px 0; border-bottom: 1px solid #e0e0e0; }
.edition-meta { font-size: 11px; color: var(--gray); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.edition-dot { color: var(--border); }
.edition-link { text-decoration: none; color: inherit; display: block; }
.edition-link:hover .edition-title { color: #555; }
.edition-title { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; transition: color .2s; }
.edition-excerpt { font-size: 13px; color: var(--gray); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 32px 0; }
.page-btn { font-size: 13px; font-weight: 700; color: #000; text-decoration: none; padding: 8px 16px; border: 2px solid #000; border-radius: 0; transition: all .2s; }
.page-btn:hover { background: #000; color: white; }
.page-num { font-size: 12px; color: var(--gray); }

/* ── GHOST CONTENT WIDTH (required by Ghost) ── */
.kg-width-wide { margin-left: -60px; margin-right: -60px; max-width: calc(100% + 120px); }
.kg-width-full { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: 100vw; width: 100vw; }
.kg-width-full img { max-width: 100%; }
@media (max-width: 768px) {
  .kg-width-wide { margin-left: -20px; margin-right: -20px; max-width: calc(100% + 40px); }
}

/* ── POST PAGE ── */
.post-header { background: #ffffff; padding: 48px 48px 40px; border-bottom: 2px solid #000; }
.post-header-inner { max-width: 740px; margin: 0 auto; }
.post-eyebrow { font-size: 10px; letter-spacing: 3px; color: #888; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.post-title { font-size: 36px; font-weight: 900; color: #000; letter-spacing: -1.5px; line-height: 1.2; margin-bottom: 12px; }
.post-meta-bar { font-size: 12px; color: #999; }
.meta-sep { margin: 0 6px; color: #ccc; }

/* Post Content */
.post-content {
  max-width: 740px; margin: 0 auto; padding: 48px 40px 64px;
  font-size: 15px; line-height: 2; color: #374151;
}
.post-content h2 { font-size: 20px; font-weight: 900; color: var(--dark); margin: 48px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #000; }
.post-content h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin: 24px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content img { max-width: 100%; border-radius: 0; margin: 16px 0; }
.post-content blockquote {
  background: #fafafa; border-left: 2px solid #000; border-radius: 0;
  padding: 16px 20px; margin: 16px 0; font-size: 14px; color: #374151;
}
.post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.post-content th { background: var(--light); color: var(--dark); font-size: 11px; font-weight: 700; padding: 10px 14px; text-align: left; }
.post-content td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.post-content hr { border: none; border-top: 2px solid var(--light); margin: 32px 0; }

/* HTML 카드 내부에서는 Ghost 테마 스타일을 리셋하여 뉴스레터 인라인 스타일 보존 */
.post-content .kg-html-card table,
.post-content .kg-html-card td,
.post-content .kg-html-card th,
.post-content .kg-html-card h2,
.post-content .kg-html-card h3,
.post-content .kg-html-card p,
.post-content .kg-html-card img,
.post-content .kg-html-card blockquote,
.post-content .kg-html-card hr,
.post-content .kg-html-card div,
.post-content .kg-html-card span,
.post-content .kg-html-card a {
  all: revert;
}
.post-content .kg-html-card {
  max-width: 100%;
}

/* Post Nav */
.post-nav { max-width: 740px; margin: 0 auto; padding: 24px 40px; display: flex; justify-content: space-between; gap: 24px; }
.post-nav-link { text-decoration: none; color: inherit; padding: 16px 20px; border: 2px solid #000; border-radius: 0; flex: 1; transition: border-color .2s; }
.post-nav-link:hover { border-color: #555; }
.post-nav-link.next { text-align: right; }
.post-nav-label { font-size: 11px; color: var(--gray); display: block; margin-bottom: 4px; }
.post-nav-title { font-size: 14px; font-weight: 700; color: var(--dark); }

/* Post Subscribe CTA */
.post-subscribe {
  max-width: 740px; margin: 24px auto 48px; padding: 36px 40px; text-align: center;
  background: #fff; border-radius: 0; border: 2px solid #000;
}
.post-subscribe h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.post-subscribe p { font-size: 13px; color: var(--gray); margin-bottom: 18px; }
.btn-sub-lg {
  display: inline-block; background: #000; color: white; border-radius: 0;
  padding: 12px 32px; font-size: 14px; font-weight: 800; text-decoration: none;
  transition: background .2s;
}
.btn-sub-lg:hover { background: #333; }

/* Post Comments */
.post-comments { max-width: 740px; margin: 0 auto; padding: 0 40px 48px; }

/* ── FOOTER ── */
.site-footer { background: #ffffff; border-top: 2px solid #000; padding: 48px 48px; text-align: center; }
.foot-logo { font-size: 22px; font-weight: 900; color: #000; margin-bottom: 6px; }
.foot-logo span { color: #000; }
.foot-sub { font-size: 12px; color: #888; margin-bottom: 20px; }
.foot-lang { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.lbtn { font-size: 11px; font-weight: 600; padding: 5px 14px; border-radius: 0; border: 1px solid #000; color: #000; text-decoration: none; transition: all .2s; }
.lbtn:hover { background: #000; color: #fff; border-color: #000; }
.foot-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 14px; }
.foot-links a { font-size: 12px; color: #888; text-decoration: none; transition: color .2s; }
.foot-links a:hover { color: #000; }
.foot-copy { font-size: 11px; color: #aaa; }

/* ── SEARCH MODAL OVERLAY ── */
.search-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 1000;
  align-items: flex-start; justify-content: center; padding: 60px 20px 20px;
}
.search-overlay.active { display: flex; }
.search-modal {
  background: #fff; width: 100%; max-width: 600px;
  max-height: 85vh; display: flex; flex-direction: column;
  border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); overflow: hidden;
}
.search-modal-header {
  padding: 16px 20px; border-bottom: 1px solid #e0e0e0;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.search-input-lg {
  flex: 1; border: none; font-size: 18px; font-weight: 500;
  outline: none; font-family: 'Inter', sans-serif; background: transparent; color: #000;
}
.search-input-lg::placeholder { color: #aaa; font-weight: 400; }
.search-close {
  background: none; border: none; color: #666; cursor: pointer;
  display: flex; align-items: center; padding: 4px; transition: color .2s;
}
.search-close:hover { color: #000; }
.search-body {
  flex: 1; overflow-y: auto; padding: 20px; background: #fafafa;
}
.search-label {
  font-size: 10px; font-weight: 700; color: #999;
  letter-spacing: 1px; margin-bottom: 12px; padding: 0 8px;
}
.search-results { display: flex; flex-direction: column; gap: 6px; }
.search-result-item {
  display: block; padding: 14px 16px; border-radius: 4px;
  background: #fff; border: 1px solid #eee;
  text-decoration: none; color: inherit; transition: all .15s;
}
.search-result-item:hover { background: #f0f4f8; border-color: #dbeafe; }
.search-result-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 4px; }
.search-result-excerpt { font-size: 13px; color: #888; line-height: 1.5; }
.search-no-results { font-size: 14px; color: #888; text-align: center; padding: 32px 0; }

/* ── LANGUAGE FILTER TABS ── */
.lang-tabs {
  display: flex; gap: 0; padding: 32px 0 0; border-bottom: 2px solid #000;
}
.lang-tab {
  padding: 10px 20px; font-size: 13px; font-weight: 700; color: #888;
  text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.lang-tab:hover { color: #000; }
.lang-tab.active {
  color: #000; border-bottom-color: #000;
}

/* ── NO POSTS ── */
.no-posts {
  padding: 60px 0; text-align: center;
}
.no-posts p {
  font-size: 15px; color: #888;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }
  .search-wrap { display: none; }
  .hero { padding: 24px 20px 20px; }
  .hero h1 { font-size: 30px; }
  .hero-email-wrap { padding: 4px 4px 4px 16px; }
  .hero-email-input { font-size: 13px; }
  .hero-email-btn { padding: 10px 18px; font-size: 13px; }
  .page { padding: 0 20px 60px; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .lang-tabs { padding: 24px 0 0; overflow-x: auto; }
  .lang-tab { padding: 8px 14px; font-size: 12px; white-space: nowrap; }
  .post-header { padding: 28px 20px; }
  .post-title { font-size: 24px; }
  .post-content { padding: 24px 20px 36px; }
  .post-nav { padding: 16px 20px; flex-direction: column; }
  .post-subscribe { margin: 16px 20px 36px; padding: 28px 20px; }
  .site-footer { padding: 32px 20px; }
  .search-overlay { padding: 80px 16px 40px; }
  .search-input-lg { font-size: 22px; }
}
@media (max-width: 480px) {
  .featured-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feat-card-title { font-size: 12px; }
  .hero h1 { font-size: 26px; }
  .lang-btn { padding: 5px 10px; font-size: 12px; }
}
